Device display method and apparatus, and terminal device
By adjusting the display time based on the signal strength value of Bluetooth devices and automatically deleting timeout information, the problem of displaying sleep or powered-off device information for too long in the Bluetooth device list is solved, improving the accuracy of the device list and user experience.
Patent Information
- Application Number
- PCT/CN2025/117503
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-19
- Filing Date
- 2025-08-28
- Publication Date
- 2026-01-22
AI Technical Summary
The device information for existing Bluetooth devices is displayed in the device list for a long time, causing Bluetooth devices that have entered sleep or power-off state to still appear in the list. Users may click on these devices, leading to pairing and connection failures.
By acquiring the signal strength values of Bluetooth devices at different scanning times, the display time of device information in the device list is adjusted based on the changes in signal strength values, and the devices are automatically deleted after the timeout, thus avoiding the display of device information when the device is in sleep or powered off.
It effectively alleviates the pairing and connection failure issue caused by users clicking to sleep or turn off Bluetooth devices, ensuring that only active Bluetooth device information is displayed in the device list.
Smart Images

Figure CN2025117503_22012026_PF_FP_ABST
Abstract
Description
Device display method, device display apparatus and terminal device
[0001] The present application claims priority to the Chinese patent application No. 202410981481.2, filed on July 19, 2024, and entitled "Device display method, device display apparatus, terminal device and computer readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of communication technology, in particular to a device display method, device display apparatus and terminal device. BACKGROUND
[0003] Bluetooth is widely used in various devices as a wireless communication technology, such as mobile phones, televisions, cars, etc. After the existing Bluetooth device is scanned, it needs to wait for about 5 scanning periods before the device information corresponding to the Bluetooth device disappears from the device list. For example, a scanning period is generally 3-4 minutes, and the device information corresponding to the Bluetooth device needs to wait for about twenty minutes before it disappears from the device list. TECHNICAL PROBLEM
[0004] Because the display time of the device information corresponding to the existing Bluetooth device in the device list is relatively long, the Bluetooth device in the sleep or shutdown state will also be displayed in the device list, and the user is easy to click the Bluetooth device in the sleep or shutdown state in the device list, resulting in the problem of pairing connection failure. TECHNICAL SOLUTION
[0005] The embodiments of the present application provide a device display method, device display apparatus and terminal device, which can make the device information corresponding to the Bluetooth device in the sleep or shutdown state disappear in the device list as soon as possible, and alleviate the problem of pairing connection failure caused by the user clicking the Bluetooth device in the sleep or shutdown state in the device list.
[0006] In a first aspect, the present application provides a device display method, comprising:
[0007] obtaining a first signal strength value of a first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in the same scanning period;
[0008] determining a device display time of first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value;
[0009] if the display time of the first device information in the device list exceeds the device display time, deleting the first device information from the device list.
[0010] In some embodiments of the present application, based on the first signal strength value and the second signal strength value, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined, comprising:
[0011] comparing the first signal strength value with the second signal strength value;
[0012] if the second signal strength value is greater than or equal to the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display duration;
[0013] if the second signal strength value is less than the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on a first signal strength difference value; the first signal strength difference value is the absolute value of the difference between the first signal strength value and the second signal strength value.
[0014] In some embodiments of the present application, based on the first signal strength difference value, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined, comprising:
[0015] comparing the first signal strength difference value with a preset first intensity threshold value;
[0016] if the first signal strength difference value is greater than the first intensity threshold value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset second display duration; the second display duration is less than the first display duration;
[0017] if the first signal strength difference value is less than or equal to the first intensity threshold value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and the first display duration.
[0018] In some embodiments of the present application, based on the first signal strength value and the second signal strength value, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined, comprising:
[0019] comparing the first signal strength value with the second signal strength value;
[0020] if the second signal strength value is greater than or equal to the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display duration;
[0021] if the second signal strength value is less than the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset second display duration; wherein the second display duration is less than the first display duration.
[0022] In some embodiments of the present application, based on the first signal strength value and the second signal strength value, the determining the device display time of the first device information corresponding to the first Bluetooth device in the device list further comprises:
[0023] obtaining a third signal strength value of the first Bluetooth device at a third scanning time; the third scanning time is a scanning time different from the first scanning time and the second scanning time in the same scanning period;
[0024] updating the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value.
[0025] In some embodiments of the present application, the updating the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value comprises:
[0026] comparing the third signal strength value with the second signal strength value;
[0027] if the third signal strength value is greater than or equal to the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, updating the device display time of the first device information in the device list based on the third scanning time and a preset first display duration;
[0028] if the third signal strength value is less than the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, updating the device display time of the first device information in the device list based on a second signal strength difference value; the second signal strength difference value is an absolute value of a difference between the third signal strength value and the second signal strength value;
[0029] if the third signal strength value is less than the second signal strength value and the second signal strength value is less than the first signal strength value, updating the device display time of the first device information in the device list based on a first signal strength difference value and the second signal strength difference value; the first signal strength difference value is an absolute value of a difference between the first signal strength value and the second signal strength value.
[0030] In some embodiments of the present application, the updating the device display time of the first device information in the device list based on the second signal strength difference value comprises:
[0031] if the second signal strength difference value is greater than a preset first intensity threshold value, updating the device display time of the first device information in the device list based on the third scanning time and a preset second display duration; the second display duration is less than the first display duration;
[0032] If the second signal strength difference value is less than or equal to the first strength threshold value, the device display time of the first device information in the device list is updated based on the third scanning time and the first display time length.
[0033] In some embodiments of the present application, updating the device display time of the first device information in the device list based on the first signal strength difference value and the second signal strength difference value comprises:
[0034] If the second signal strength difference value is less than or equal to the first strength threshold value, and / or the first signal strength difference value is less than or equal to the first strength threshold value, the device display time of the first device information in the device list is updated based on the third scanning time and the second display time length.
[0035] If the second signal strength difference value is greater than the first strength threshold value and the first signal strength difference value is greater than the first strength threshold value, the first device information is deleted from the device list.
[0036] In some embodiments of the present application, the method further comprises:
[0037] Judging whether the first device information is stored locally or not;
[0038] If the first device information is not stored locally, comparing the first signal strength value with a preset second strength threshold value;
[0039] If the first signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device does not exist in the remote name request queue, the first Bluetooth device is added to the remote name request queue.
[0040] If the first signal strength value is less than the second strength threshold value and the first Bluetooth device exists in the remote name request queue, the first Bluetooth device is deleted from the remote name request queue.
[0041] In some embodiments of the present application, when the first device information is not stored locally, the first Bluetooth device is characterized as a Bluetooth device whose device name has not been acquired; when the first device information is stored locally, the first Bluetooth device is characterized as a Bluetooth device whose device name has been acquired.
[0042] In some embodiments of the present application, the method further comprises:
[0043] Determining a first target Bluetooth device from the remote name request queue based on the signal strength values of a plurality of candidate Bluetooth devices in the remote name request queue; the first target Bluetooth device is a Bluetooth device in the remote name request queue whose signal strength value is arranged in descending order.
[0044] Sending a remote name request to the first target Bluetooth device to acquire the device name of the first target Bluetooth device.
[0045] In some embodiments of the present application, after determining the first target Bluetooth device from the remote name request queue based on the signal strength values of the plurality of candidate Bluetooth devices in the remote name request queue, the method further comprises:
[0046] storing the second device information corresponding to the first target Bluetooth device in the local device.
[0047] In some embodiments of the present application, before storing the second device information corresponding to the first target Bluetooth device in the local device, the method further comprises:
[0048] determining whether the storage space occupied by the third device information corresponding to the plurality of second target Bluetooth devices in the local device is greater than a preset threshold value;
[0049] If the storage space occupied by the third device information is greater than the preset threshold value, determining a third target Bluetooth device from the plurality of second target Bluetooth devices based on the storage time of the third device information in the local device; the third target Bluetooth device is a Bluetooth device with a high ranking in the plurality of second target Bluetooth devices in descending order of storage time;
[0050] deleting the device information of the third target Bluetooth device from the local device.
[0051] In some embodiments of the present application, the plurality of second target Bluetooth devices are Bluetooth devices that have obtained device names and are stored in the local device.
[0052] In some embodiments of the present application, after obtaining the second signal strength value, the method comprises:
[0053] determining whether the local device stores the first device information, and if the local device does not store the first device information, comparing the second signal strength value with a preset second strength threshold value;
[0054] If the second signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device does not exist in the remote name request queue, adding the first Bluetooth device to the remote name request queue;
[0055] If the second signal strength value is less than the second strength threshold value and the first Bluetooth device exists in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
[0056] In some embodiments of the present application, after obtaining the third signal strength value, the method comprises:
[0057] determining whether the local device stores the first device information, and if the local device does not store the first device information, comparing the third signal strength value with a preset second strength threshold value;
[0058] If the third signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device does not exist in the remote name request queue, adding the first Bluetooth device to the remote name request queue;
[0059] if the third signal strength value is less than the second strength threshold value and the first Bluetooth device exists in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
[0060] In a second aspect, the embodiments of the present application further provide a device display apparatus, comprising:
[0061] a first obtaining module, configured to obtain a first signal strength value of the first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period;
[0062] a time determining module, configured to determine a device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value;
[0063] a device display module, configured to delete the first device information from the device list if the display time of the first device information in the device list exceeds the device display time.
[0064] In some embodiments of the present application, the time determining module is specifically configured to:
[0065] compare the first signal strength value with the second signal strength value;
[0066] if the second signal strength value is greater than or equal to the first signal strength value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display duration;
[0067] if the second signal strength value is less than the first signal strength value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on a first signal strength difference value; the first signal strength difference value is an absolute value of a difference between the first signal strength value and the second signal strength value.
[0068] In some embodiments of the present application, the device display apparatus further comprises:
[0069] a second obtaining module, configured to obtain a third signal strength value of the first Bluetooth device at a third scanning time; the third scanning time is a scanning time different from the first scanning time and the second scanning time in the same scanning period;
[0070] a time updating module, configured to update the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value.
[0071] In a third aspect, the present application further provides a terminal device, comprising:
[0072] one or more processors;
[0073] a memory; and
[0074] one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the device display method of any one of the first aspect.
[0075] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is loaded by a processor to execute the steps in the device display method of any one of the first aspect. Advantages
[0076] By obtaining the first signal strength value of the first Bluetooth device at the first scanning time and the second signal strength value of the first Bluetooth device at the second scanning time, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value, and deleting the first device information from the device list if the display time of the first device information in the device list exceeds the device display time, the display time of the device information in the device list can be adjusted based on the signal strength values of the Bluetooth devices at different scanning times, the device information corresponding to the Bluetooth device in the sleep or shutdown state disappears in the device list as soon as possible, and the problem that the pairing connection fails when the user clicks the Bluetooth device in the sleep or shutdown state in the device list is alleviated. BRIEF DESCRIPTION OF DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0078] FIG. 1 is a scene schematic diagram of a device display system provided by an embodiment of the present application;
[0079] FIG. 2 is a flow schematic diagram of a device display method provided by an embodiment of the present application;
[0080] FIG. 3 is a specific flow schematic diagram of determining a device display time provided by an embodiment of the present application;
[0081] FIG. 4 is a flow schematic diagram of a device display method provided by another embodiment of the present application;
[0082] FIG. 5 is a flow schematic diagram of a device display method provided by yet another embodiment of the present application;
[0083] Fig. 6 is a schematic block diagram of a device display apparatus according to an embodiment of the present application;
[0084] Fig. 7 is a schematic block diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION
[0085] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, any other embodiments obtained by a person of ordinary skill in the art without creative effort should fall within the scope of the present application.
[0086] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are only for the purpose of description and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", "third" and the like can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified.
[0087] In the present application, the word "exemplary" is used to mean "serving as an example, instance, or illustration". Any implementation described as "exemplary" in the present application is not necessarily to be construed as preferred or advantageous over other implementations. The following description is presented to enable any person skilled in the art to make and use the present application. In the following description, for the purposes of explanation, numerous details are set forth in order to provide a thorough understanding. It should be apparent to those skilled in the art that the present application can be practiced without the use of these specific details. In other instances, well known structures and processes are not elaborated upon in order to avoid unnecessary detail, which might obscure the description of the present application. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
[0088] The present application provides a device display method, apparatus and terminal device, which are described in detail below.
[0089] Please refer to Fig. 1, which is a scene schematic diagram of a device display system provided by an embodiment of the present application. The device display system can include a computer device 100, and the computer device 100 is integrated with a device display apparatus, such as the computer device in Fig. 1.
[0090] The computer device 100 in the embodiment of the present application is mainly used for obtaining a first signal strength value of a first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period; based on the first signal strength value and the second signal strength value, a device display time of first device information corresponding to the first Bluetooth device in a device list is determined; if the display time of the first device information in the device list exceeds the device display time, the first device information is deleted from the device list, and the picture contrast of a display terminal can be improved from the signal dimension and the backlight dimension.
[0091] In the embodiment of the present application, the computer device 100 can be a stand-alone server, or a server network or a server cluster composed of servers. For example, the computer device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0092] It can be understood that the computer device 100 used in the embodiment of the present application can be a device that includes receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device can include a cellular or other communication device with a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The computer device 100 can be a desktop terminal or a mobile terminal, and the computer device 100 can also be one of a smart television, a mobile phone, a tablet computer, a notebook computer, and the like.
[0093] Those skilled in the art can understand that the application environment shown in Fig. 1 is only one application scenario of the present application scheme, and does not constitute a limitation on the application scenarios of the present application scheme. Other application environments can include more or fewer computer devices than those shown in Fig. 1. For example, Fig. 1 only shows one computer device. It can be understood that the device display system can also include one or more other services, which are not limited here.
[0094] In addition, as shown in FIG. 1, the device display system can further include a memory 200 for storing data, such as signal strength values, e.g., a first signal strength value, a second signal strength value, etc., device information, e.g., first device information, second device information, third device information, etc.
[0095] It should be noted that the scenario diagram of the device display system shown in FIG. 1 is merely an example, and the device display system and scenario described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, as the device display system evolves and new service scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0096] As shown in FIG. 2, it is a flow diagram of one embodiment of the device display method in the embodiments of the present application. The device display method can include the following steps S201-S203, which are as follows:
[0097] Step S201, obtaining a first signal strength value of a first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period.
[0098] In a specific embodiment, the terminal device scans the surrounding Bluetooth devices according to a scanning period. A scanning period includes an inquiry process and a remote name request (RNR) process. The first scanning time and the second scanning time are two different scanning times in a same scanning period, for example, the first scanning time is 11:15:48 and the second scanning time is 11:15:50.
[0099] Further, the first Bluetooth device is a Bluetooth device scanned by the terminal device at the first scanning time and the second scanning time. The first signal strength value is a Bluetooth received signal strength indication (RSSI) of the first Bluetooth device scanned by the terminal device at the first scanning time. The second signal strength value is an RSSI value of the first Bluetooth device scanned by the terminal device at the second scanning time.
[0100] Step S202, determining a device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value.
[0101] The first device information in the embodiment is information related to the first Bluetooth device. For example, the first device information can be a device identifier of the first Bluetooth device, the first device information can also be a device name of the first Bluetooth device, and the first device information can also be a device icon of the first Bluetooth device. The embodiment is not limited in this regard. The device display time is a display time period of the first device information corresponding to the first Bluetooth device in the device list. For example, the second scan time is 11:15:50, the display time of the first device information in the device list is 11:15:50-11:15:50+6.4 seconds, or the display time of the first device information in the device list is 11:15:50-11:15:50+12.8 seconds.
[0102] In an embodiment, the step of determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value includes: comparing the first signal strength value with the second signal strength value; if the second signal strength value is greater than or equal to the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scan time and a preset first display duration; if the second signal strength value is less than the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scan time and a preset second display duration; and the second display duration is less than the first display duration. For example, the first display duration is 12.8 seconds, the second display duration is 5.6 seconds, if the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is determined as the second scan time-the second scan time+12.8 seconds; if the second signal strength value is less than the first signal strength value, the device display time of the first device information in the device list is determined as the second scan time-the second scan time+6.4 seconds. Thus, the display time of the device information corresponding to the Bluetooth device in the device list can be adjusted according to the signal strength change of the Bluetooth device, so that the device information corresponding to the Bluetooth device is not displayed in the device list when the Bluetooth device is in a shutdown or hibernation state, or the Bluetooth device has moved away from the terminal device.
[0103] In another specific embodiment, the step of determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value comprises: comparing the first signal strength value with the second signal strength value; if the second signal strength value is greater than or equal to the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and the first display duration; if the second signal strength value is less than the first signal strength value and the first signal strength difference value is greater than the first strength threshold, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and the second display duration; if the second signal strength value is less than the first signal strength value and the first signal strength difference value is less than or equal to the first strength threshold, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and the first display duration. The first signal strength difference value is the absolute value of the difference between the first signal strength value and the second signal strength value. For example, the first display duration is 12.8s, the second display duration is 5.6s, if the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is determined as the second scanning time~the second scanning time+12.8s; if the second signal strength value is less than the first signal strength value and the first signal strength difference value is greater than the first strength threshold, the device display time of the first device information in the device list is determined as the second scanning time~the second scanning time+6.4s; if the second signal strength value is less than the first signal strength value and the first signal strength difference value is less than or equal to the first strength threshold, the device display time of the first device information in the device list is determined as the second scanning time~the second scanning time+12.8s.
[0104] In step S203, if the display time of the first device information in the device list exceeds the device display time, the first device information is deleted from the device list.
[0105] In the embodiment, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the first signal strength value and the second signal strength value, and if the display time of the first device information in the device list exceeds the device display time, the first device information is deleted from the device list. The display time of the device information in the device list can be adjusted according to the change of the signal strength value of the Bluetooth device, and the device information is deleted from the device list when the display time exceeds the device display time. The device information corresponding to the Bluetooth device in the sleep or shutdown state can disappear in the device list as soon as possible, and the problem of pairing connection failure caused by the user clicking the Bluetooth device in the sleep or shutdown state in the device list can be solved.
[0106] In a specific implementation, with reference to FIG. 3, the step of determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value in the step S202 can include steps S301-S303, and the details are as follows:
[0107] In step S301, the first signal strength value is compared with the second signal strength value.
[0108] In step S302, if the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the second scanning time and the preset first display duration.
[0109] The first display duration in the embodiment can be set according to actual needs. For example, the first display duration is set to 12.8 seconds. If the second signal strength value is greater than or equal to the first signal strength value, it indicates that the first Bluetooth device is not far away from the terminal device, and the first Bluetooth device is not in sleep or shutdown. Then, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the second scanning time and the preset first display duration. For example, the first display duration is set to 12.8 seconds. If the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is the second scanning time-second scanning time+12.8 seconds.
[0110] In step S303, if the second signal strength value is less than the first signal strength value, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the first signal strength difference value. The first signal strength difference value is the absolute value of the difference between the first signal strength value and the second signal strength value.
[0111] In the embodiment, the first signal strength difference value is the absolute value of the difference between the first signal strength value and the second signal strength value. If the second signal strength value is less than the first signal strength value, that is, the RSSI value of the first Bluetooth device is decreasing, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the decreasing amplitude of the RSSI value of the first Bluetooth device.
[0112] In a specific embodiment, the step of determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength difference value includes: comparing the first signal strength difference value with a preset first strength threshold value; if the first signal strength difference value is greater than the first strength threshold value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset second display duration; if the first signal strength difference value is less than or equal to the first strength threshold value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and the first display duration.
[0113] The first strength threshold value is a threshold value preset for measuring the reduction amplitude of the RSSI value of the first Bluetooth device. If the first signal strength difference value is greater than the first strength threshold value, it indicates that the reduction amplitude of the RSSI value of the first Bluetooth device is relatively large, and the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the second scanning time and the preset second display duration. If the first signal strength difference value is less than or equal to the first strength threshold value, it indicates that the reduction amplitude of the RSSI value of the first Bluetooth device is relatively small, and the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the second scanning time and the first display duration.
[0114] Further, the second display duration can be set according to actual needs, but the second display duration is less than the first display duration. For example, the first display duration is 12.8 seconds, and the second display duration is 6.4 seconds. If the first signal strength difference value is greater than the first strength threshold value, the device display time of the first device information in the device list is determined as the second scanning time~the second scanning time+6.4 seconds. If the first signal strength difference value is less than or equal to the first strength threshold value, the device display time of the first device information in the device list is determined as the second scanning time~the second scanning time+12.8 seconds.
[0115] In a specific implementation, referring to FIG. 4, after the step S202 of determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value, the steps S401-S402 can be further included, which are specifically as follows:
[0116] Step S401, obtaining a third signal strength value of the first Bluetooth device at a third scanning time; the third scanning time is a scanning time different from the first scanning time and the second scanning time in the same scanning period.
[0117] The third scanning time in the embodiment is a scanning time different from the first scanning time and the second scanning time in the same scanning cycle, for example, the first scanning time is 11:15:48, the second scanning time is 11:15:50, and the second scanning time is 11:15:52. The third signal strength value is the RSSI value of the first Bluetooth device scanned by the terminal device at the third scanning time.
[0118] In step S402, the device display time of the first device information in the device list is updated based on the first signal strength value, the second signal strength value, and the third signal strength value.
[0119] In an embodiment, updating the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value, and the third signal strength value can include the following steps:
[0120] (1) Comparing the third signal strength value with the second signal strength value.
[0121] (2) If the third signal strength value is greater than or equal to the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, updating the device display time of the first device information in the device list based on the third scanning time and the preset first display duration.
[0122] In the embodiment, if the third signal strength value is greater than or equal to the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, it indicates that the RSSI value of the first Bluetooth device is continuously increasing. Therefore, the device display time of the first device information in the device list is updated based on the third scanning time and the first display duration, so that the Bluetooth device that can normally be connected can be displayed in the device list without being displayed due to timeout. For example, if the first display duration is 12.8 seconds, and the third signal strength value is greater than or equal to the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is determined as the third scanning time~the third scanning time+12.8 seconds.
[0123] (3) If the third signal strength value is less than the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, updating the device display time of the first device information in the device list based on the second signal strength difference value.
[0124] In the embodiment, the second signal strength difference value is the absolute value of the difference between the third signal strength value and the second signal strength value. If the third signal strength value is less than the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is updated based on the decreasing amplitude of the third signal strength value.
[0125] In a specific embodiment, the step of updating the device display time of the first device information in the device list based on the second signal strength difference value specifically comprises: if the second signal strength difference value is greater than a preset first strength threshold, updating the device display time of the first device information in the device list based on the third scanning time and a preset second display duration; if the second signal strength difference value is less than or equal to the first strength threshold, updating the device display time of the first device information in the device list based on the third scanning time and a first display duration. The second display duration is less than the first display duration. For example, the first display duration is 12.8 seconds, and the second display duration is 6.4 seconds. If the second signal strength difference value is greater than the preset first strength threshold, i.e., the third signal strength value is reduced more than the second signal strength value, the device display time of the first device information in the device list is determined to be the third scanning time~the third scanning time+6.4 seconds. If the second signal strength difference value is less than or equal to the first strength threshold, i.e., the third signal strength value is reduced less than the second signal strength value, the device display time of the first device information in the device list is determined to be the third scanning time~the third scanning time+12.8 seconds.
[0126] (4) If the third signal strength value is less than the second signal strength value and the second signal strength value is less than the first signal strength value, updating the device display time of the first device information in the device list based on the first signal strength difference value and the second signal strength difference value.
[0127] In the embodiment, the first signal strength difference value is the absolute value of the difference between the first signal strength value and the second signal strength value. If the RSSI value of the first Bluetooth device is reduced twice in succession, the device display time of the first device information in the device list is updated based on the reduction amplitude of the two times.
[0128] In a specific embodiment, the step of updating the device display time of the first device information in the device list based on the first signal strength difference value and the second signal strength difference value specifically comprises: if the second signal strength difference value is less than or equal to the first strength threshold and / or the first signal strength difference value is less than or equal to the first strength threshold, updating the device display time of the first device information in the device list based on the third scanning time and the second display duration; if the second signal strength difference value is greater than the first strength threshold and the first signal strength difference value is greater than the first strength threshold, deleting the first device information from the device list. For example, if the second signal strength difference value is less than or equal to the first strength threshold and / or the first signal strength difference value is less than or equal to the first strength threshold, the device display time of the first device information in the device list is determined to be the third scanning time~the third scanning time+6.4 seconds.
[0129] The embodiment scans the first Bluetooth device multiple times in the same scanning period, and directly deletes the first device information from the device list when the RSSI value of the first Bluetooth device continuously decreases and the decreasing amplitude exceeds the first intensity threshold. The device information corresponding to the Bluetooth device in the sleep state or the shutdown state or the Bluetooth device far away from the terminal device can be directly deleted from the device list, thereby avoiding the problem of connection failure caused by the Bluetooth device in the sleep state or the shutdown state being displayed in the device list.
[0130] In a specific implementation, with reference to FIG. 5, the device display method further includes steps S501-S504, and the details are as follows.
[0131] In step S501, it is judged whether the first device information is stored locally.
[0132] In a specific embodiment, the terminal device sends a remote name request (RNR) to multiple Bluetooth devices with the highest signal intensity in each scanning period, to obtain the device names corresponding to the multiple Bluetooth devices, and saves the Bluetooth devices with the obtained device names to the local device.
[0133] To determine whether the first Bluetooth device is a Bluetooth device with the obtained device name, the embodiment first judges whether the first device information is stored locally. If the first device information is stored locally, it indicates that the first Bluetooth device is a Bluetooth device with the obtained device name. Otherwise, if the first device information is not stored locally, it indicates that the first Bluetooth device is a Bluetooth device without the obtained device name.
[0134] In step S502, if the first device information is not stored locally, the first signal intensity value is compared with a preset second intensity threshold.
[0135] The second intensity threshold is a preset intensity threshold for measuring whether the first signal intensity value meets the requirement. The second intensity threshold can be set according to actual needs. For example, the second intensity threshold can be set to -60 db. If the first device information is not stored locally, that is, the first Bluetooth device is a Bluetooth device without the obtained device name, the first signal intensity value is compared with the preset second intensity threshold.
[0136] In step S503, if the first signal intensity value is greater than or equal to the second intensity threshold and the first Bluetooth device is not in the remote name request queue, the first Bluetooth device is added to the remote name request queue.
[0137] The Bluetooth device requiring to obtain the device name is stored in the remote name request queue. In the embodiment, if the first signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device is not in the remote name request queue, the first Bluetooth device is added to the remote name request queue. For example, the second strength threshold value is -60db, and if the first signal strength value is -50db and the first Bluetooth device is not in the remote name request queue, the first Bluetooth device is added to the remote name request queue.
[0138] In step S504, if the first signal strength value is less than the second strength threshold value and the first Bluetooth device is in the remote name request queue, the first Bluetooth device is deleted from the remote name request queue.
[0139] In the embodiment, if the first signal strength value is less than the second strength threshold value and the first Bluetooth device is in the remote name request queue, the first Bluetooth device is deleted from the remote name request queue. In this way, the Bluetooth device with weak signal strength value can be deleted from the remote name request queue, and the time of the RNR process is shortened. For example, the second strength threshold value is -60db, and if the first signal strength value is -70db and the first Bluetooth device is in the remote name request queue, the first Bluetooth device is deleted from the remote name request queue.
[0140] In a specific embodiment, after the second signal strength value is obtained, the following steps are included: judging whether the first device information is stored locally, if the first device information is not stored locally, comparing the second signal strength value with the preset second strength threshold value; if the second signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device is not in the remote name request queue, adding the first Bluetooth device to the remote name request queue; and if the second signal strength value is less than the second strength threshold value and the first Bluetooth device is in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
[0141] In a specific embodiment, after the third signal strength value is obtained, the following steps are included: judging whether the first device information is stored locally, if the first device information is not stored locally, comparing the third signal strength value with the preset second strength threshold value; if the third signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device is not in the remote name request queue, adding the first Bluetooth device to the remote name request queue; and if the third signal strength value is less than the second strength threshold value and the first Bluetooth device is in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
[0142] In a specific implementation, the device display method further includes: determining a first target Bluetooth device from the remote name request queue based on the signal strength values of the plurality of candidate Bluetooth devices in the remote name request queue; and sending a remote name request to the first target Bluetooth device to obtain the device name of the first target Bluetooth device.
[0143] The first target Bluetooth device is a Bluetooth device with a high signal strength value in the remote name request queue, for example, the first target Bluetooth device is three Bluetooth devices with high signal strength values in the remote name request queue. In this embodiment, the plurality of candidate Bluetooth devices in the remote name request queue are filtered based on the signal strength values, and the remote name request is sent to the first target Bluetooth device filtered, so that the time of the RNR process in each scanning period can be shortened.
[0144] In a specific implementation, after determining the first target Bluetooth device from the remote name request queue based on the signal strength values of the plurality of candidate Bluetooth devices in the remote name request queue, the method further includes: saving second device information corresponding to the first target Bluetooth device to the local device, so that the device information saved in the local device is all device information of the Bluetooth device with the acquired device name. Whether the Bluetooth device has acquired the device name can be determined by judging whether the device information is saved in the local device.
[0145] In a specific implementation, before saving the second device information corresponding to the first target Bluetooth device to the local device, the method further includes: judging whether a storage space occupied by third device information corresponding to a plurality of second target Bluetooth devices in the local device is greater than a preset threshold; if the storage space occupied by the third device information is greater than the preset threshold, determining a third target Bluetooth device from the plurality of second target Bluetooth devices based on a saving time of the third device information in the local device; and deleting device information of the third target Bluetooth device from the local device.
[0146] The plurality of second target Bluetooth devices are Bluetooth devices with acquired device names stored in the local device, and the third target Bluetooth device is a Bluetooth device with a high saving time from high to low in the plurality of second target Bluetooth devices. If the storage space occupied by the third device information is greater than the preset threshold, the device information corresponding to the Bluetooth device with the longest saving time is deleted from the local device, so that the redundant storage space can be released for storing the second device information corresponding to the first target Bluetooth device.
[0147] To better implement the device display method in the embodiments of the present application, on the basis of the device display method, the embodiments of the present application further provide a device display apparatus, as shown in FIG. 6, the device display apparatus 700 includes:
[0148] The first acquisition module 710 is configured to acquire a first signal strength value of the first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period;
[0149] The time determining module 720 is configured to determine a device display time of the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value.
[0150] The device display module 730 is configured to delete the first device information from the device list if the display time of the first device information in the device list exceeds the device display time.
[0151] In the embodiments of the present application, the first signal strength value of the first Bluetooth device at the first scanning time and the second signal strength value of the first Bluetooth device at the second scanning time are obtained, the device display time of the first device information corresponding to the first Bluetooth device in the device list is determined based on the first signal strength value and the second signal strength value, and the first device information is deleted from the device list if the display time of the first device information in the device list exceeds the device display time. The display time of the device information in the device list can be adjusted based on the signal strength values of the Bluetooth device at different scanning times, the device information corresponding to the Bluetooth device in the sleep or shutdown state disappears in the device list as soon as possible, and the problem of pairing and connection failure caused by the user clicking the Bluetooth device in the sleep or shutdown state in the device list is alleviated.
[0152] In some embodiments of the present application, the time determining module 720 is specifically configured to:
[0153] compare the first signal strength value with the second signal strength value;
[0154] if the second signal strength value is greater than or equal to the first signal strength value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display time length;
[0155] if the second signal strength value is less than the first signal strength value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on a first signal strength difference value; the first signal strength difference value is an absolute value of a difference between the first signal strength value and the second signal strength value.
[0156] In some embodiments of the present application, the time determining module 720 is further configured to:
[0157] compare the first signal strength difference value with a preset first strength threshold value;
[0158] if the first signal strength difference value is greater than the first strength threshold value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset second display time length; the second display time length is less than the first display time length.
[0159] If the first signal strength difference value is less than or equal to the first strength threshold value, the first device information corresponding to the first Bluetooth device in the device list is determined to have a device display time based on the second scanning time and the first display duration.
[0160] In some embodiments of the present application, the device display apparatus further includes:
[0161] The second acquisition module is configured to acquire a third signal strength value of the first Bluetooth device at a third scanning time; the third scanning time is a scanning time different from the first scanning time and the second scanning time in the same scanning period.
[0162] The time updating module is configured to update the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value.
[0163] In some embodiments of the present application, the time updating module is specifically configured to:
[0164] compare the third signal strength value with the second signal strength value;
[0165] If the third signal strength value is greater than or equal to the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is updated based on the third scanning time and the preset first display duration;
[0166] If the third signal strength value is less than the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, the device display time of the first device information in the device list is updated based on the second signal strength difference value; the second signal strength difference value is an absolute value of a difference between the third signal strength value and the second signal strength value.
[0167] If the third signal strength value is less than the second signal strength value and the second signal strength value is less than the first signal strength value, the device display time of the first device information in the device list is updated based on the first signal strength difference value and the second signal strength difference value; the first signal strength difference value is an absolute value of a difference between the first signal strength value and the second signal strength value.
[0168] In some embodiments of the present application, the time updating module is specifically further configured to:
[0169] If the second signal strength difference value is greater than the preset first strength threshold value, the device display time of the first device information in the device list is updated based on the third scanning time and a preset second display duration; the second display duration is less than the first display duration.
[0170] If the second signal strength difference value is less than or equal to the first strength threshold value, the device display time of the first device information in the device list is updated based on the third scanning time and the first display time length.
[0171] In some embodiments of the present application, the time updating module is specifically further configured to:
[0172] If the second signal strength difference value is less than or equal to the first strength threshold value, and / or the first signal strength difference value is less than or equal to the first strength threshold value, the device display time of the first device information in the device list is updated based on the third scanning time and the second display time length.
[0173] If the second signal strength difference value is greater than the first strength threshold value and the first signal strength difference value is greater than the first strength threshold value, the first device information is deleted from the device list.
[0174] In some embodiments of the present application, the device display apparatus further comprises:
[0175] The first judging module is configured to judge whether the first device information is stored locally or not.
[0176] The first comparing module is configured to compare the first signal strength value with a preset second strength threshold value if the first device information is not stored locally.
[0177] The queue updating module is configured to add the first Bluetooth device into the remote name request queue if the first signal strength value is greater than or equal to the second strength threshold value and the first Bluetooth device does not exist in the remote name request queue.
[0178] The first deleting module is configured to delete the first Bluetooth device from the remote name request queue if the first signal strength value is less than the second strength threshold value and the first Bluetooth device exists in the remote name request queue.
[0179] In some embodiments of the present application, the device display apparatus further comprises:
[0180] The first determining module is configured to determine the first target Bluetooth device from the remote name request queue based on the signal strength values of a plurality of candidate Bluetooth devices in the remote name request queue; the first target Bluetooth device is a Bluetooth device with a high signal strength value in the remote name request queue.
[0181] The request sending module is configured to send a remote name request to the first target Bluetooth device to obtain the device name of the first target Bluetooth device.
[0182] In some embodiments of the present application, the device display apparatus further comprises:
[0183] The information saving module is configured to save the second device information corresponding to the first target Bluetooth device to the local.
[0184] In some embodiments of the present application, the device display apparatus further comprises:
[0185] a second determining module configured to determine a third target Bluetooth device from the plurality of second target Bluetooth devices based on a saving time of the third device information in the local device if the storage space occupied by the third device information is greater than the preset threshold; the third target Bluetooth device is a Bluetooth device with a high saving time in the plurality of second target Bluetooth devices.
[0186] a second determining module configured to determine a third target Bluetooth device from the plurality of second target Bluetooth devices based on a saving time of the third device information in the local device if the storage space occupied by the third device information is greater than the preset threshold; the third target Bluetooth device is a Bluetooth device with a high saving time in the plurality of second target Bluetooth devices.
[0187] a second deleting module configured to delete the device information of the third target Bluetooth device from the local device.
[0188] The embodiments of the present application also provide a terminal device which integrates any of the device display apparatuses provided by the embodiments of the present application. The terminal device comprises:
[0189] one or more processors;
[0190] a memory; and
[0191] one or more application programs, wherein the one or more application programs are stored in the memory and configured to execute the steps in the device display method in any of the device display method embodiments by the processor.
[0192] The embodiments of the present application also provide a terminal device which integrates any of the device display apparatuses provided by the embodiments of the present application. As shown in FIG. 7, a structure schematic diagram of the terminal device related to the embodiments of the present application is shown, specifically:
[0193] The terminal device can include a processor 801 with one or more processing cores, a memory 802 with one or more computer readable storage media, a power supply 803, and an input unit 804, and the like. Those skilled in the art can understand that the structure of the terminal device shown in FIG. 7 does not constitute a limitation on the terminal device, and can include more or fewer components than the diagram, or combine certain components, or different component arrangements. Among them:
[0194] The processor 801 is the control center of the terminal device, connects all parts of the terminal device through various interfaces and lines, executes various functions of the terminal device and processes data by running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, thereby overall monitoring the terminal device. Optionally, the processor 801 can include one or more processing cores; preferably, the processor 801 can integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 801.
[0195] The memory 802 can be used to store software programs and modules, and the processor 801 executes various functions and data processing by running the software programs and modules stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, application programs required by at least one function (such as sound playing function, image playing function, etc.), etc.; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 802 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, flash memory device, or other volatile solid-state memory device. Accordingly, the memory 802 can also include a memory controller to provide the processor 801 with access to the memory 802.
[0196] The terminal device also includes a power supply 803 for supplying power to various components, and preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so as to realize functions such as management of charging, discharging and power consumption management through the power management system. The power supply 803 can also include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator, etc. Any component.
[0197] The terminal device can also include an input unit 804, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0198] Although not shown, the terminal device can also include a display unit, etc., which will not be described here. Specifically, in the present embodiment, the processor 801 in the terminal device will load the executable file corresponding to the process of one or more than one application program into the memory 802 according to the following instructions, and run the application program stored in the memory 802 by the processor 801, thereby realizing various functions, as follows:
[0199] obtaining a first signal strength value of the first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period;
[0200] determining, based on the first signal strength value and the second signal strength value, a device display time of the first device information corresponding to the first Bluetooth device in the device list;
[0201] if the display time of the first device information in the device list exceeds the device display time, deleting the first device information from the device list.
[0202] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0203] To this end, the embodiments of the present application provide a computer readable storage medium, which can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. A computer program is stored on the storage medium, and the computer program is loaded by a processor to execute the steps in any device display method provided by the embodiments of the present application. For example, the computer program loaded by the processor can execute the following steps:
[0204] obtaining a first signal strength value of the first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period;
[0205] determining, based on the first signal strength value and the second signal strength value, a device display time of the first device information corresponding to the first Bluetooth device in the device list;
[0206] if the display time of the first device information in the device list exceeds the device display time, deleting the first device information from the device list.
[0207] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the detailed description of other embodiments above, which will not be repeated here.
[0208] In practice, the above various units or structures can be implemented as independent entities, or combined as the same or several entities, and the specific implementation of the above various units or structures can be referred to the method embodiments above, which will not be repeated here.
[0209] The specific implementation of the above various operations can be referred to the embodiments above, which will not be repeated here.
[0210] The device display method, device and terminal device provided by the embodiments of the present application are described in detail above, and the principle and implementation manner of the present application are described by applying specific examples; the above embodiment description is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, the specific implementation manner and application range can be changed according to the idea of the present application, and the above description should not be understood as the limitation of the present application.
Claims
1. A device display method, wherein, The method comprises: obtaining a first signal strength value of a first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period; based on the first signal strength value and the second signal strength value, determining a device display time of first device information corresponding to the first Bluetooth device in a device list; if the display time of the first device information in the device list exceeds the device display time, deleting the first device information from the device list.
2. The method of claim 1, wherein, The method comprises: comparing the first signal strength value with the second signal strength value; if the second signal strength value is greater than or equal to the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display duration; if the second signal strength value is less than the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on a first signal strength difference value; the first signal strength difference value is an absolute value of a difference between the first signal strength value and the second signal strength value.
3. The method of claim 2, wherein, The method comprises: comparing the first signal strength difference value with a preset first strength threshold value; if the first signal strength difference value is greater than the first strength threshold value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset second display duration; the second display duration is less than the first display duration; if the first signal strength difference value is less than or equal to the first strength threshold value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and the first display duration.
4. The method of claim 1, wherein, The method comprises: comparing the first signal strength value with the second signal strength value; if the second signal strength value is greater than or equal to the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display duration; if the second signal strength value is less than the first signal strength value, determining the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset second display duration; wherein the second display duration is less than the first display duration.
5. The method of claim 1, wherein, The method further comprises, after determining the first device information corresponding to the first Bluetooth device in the device list based on the first signal strength value and the second signal strength value: obtaining a third signal strength value of the first Bluetooth device at a third scanning time, the third scanning time being different from the first scanning time and the second scanning time in the same scanning period; updating the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value.
6. The method of claim 5, wherein, The updating the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value comprises: comparing the third signal strength value with the second signal strength value; if the third signal strength value is greater than or equal to the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, updating the device display time of the first device information in the device list based on the third scanning time and a preset first display duration; if the third signal strength value is less than the second signal strength value and the second signal strength value is greater than or equal to the first signal strength value, updating the device display time of the first device information in the device list based on a second signal strength difference value, the second signal strength difference value being an absolute value of a difference between the third signal strength value and the second signal strength value; if the third signal strength value is less than the second signal strength value and the second signal strength value is less than the first signal strength value, updating the device display time of the first device information in the device list based on a first signal strength difference value and the second signal strength difference value, the first signal strength difference value being an absolute value of a difference between the first signal strength value and the second signal strength value.
7. The method of claim 6, wherein, The updating the device display time of the first device information in the device list based on the second signal strength difference value comprises: if the second signal strength difference value is greater than a preset first intensity threshold value, updating the device display time of the first device information in the device list based on the third scanning time and a preset second display duration, the second display duration being less than the first display duration; if the second signal strength difference value is less than or equal to the first intensity threshold value, updating the device display time of the first device information in the device list based on the third scanning time and the first display duration.
8. The method of claim 7, wherein, The updating the device display time of the first device information in the device list based on the first signal strength difference value and the second signal strength difference value comprises: if the second signal strength difference value is less than or equal to the first intensity threshold value and / or the first signal strength difference value is less than or equal to the first intensity threshold value, updating the device display time of the first device information in the device list based on the third scanning time and the second display duration; if the second signal strength difference value is greater than the first intensity threshold value and / or the first signal strength difference value is greater than the first intensity threshold value, updating the device display time of the first device information in the device list based on the third scanning time and the first display duration. If the second signal strength difference is greater than the first strength threshold and the first signal strength difference is greater than the first strength threshold, the first device information is deleted from the device list.
9. The method according to any one of claims 1 to 8, wherein, The method further comprises: determining whether the first device information is stored locally; if the first device information is not stored locally, comparing the first signal strength value with a preset second strength threshold; if the first signal strength value is greater than or equal to the second strength threshold and the first Bluetooth device is not in the remote name request queue, adding the first Bluetooth device to the remote name request queue; if the first signal strength value is less than the second strength threshold and the first Bluetooth device is in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
10. The method of claim 9, wherein, When the first device information is not stored locally, the first Bluetooth device is characterized as a Bluetooth device that has not obtained a device name; when the first device information is stored locally, the first Bluetooth device is characterized as a Bluetooth device that has obtained a device name.
11. The method of claim 9, wherein, The method further comprises: determining a first target Bluetooth device from the remote name request queue based on the signal strength values of multiple candidate Bluetooth devices in the remote name request queue; the first target Bluetooth device is a Bluetooth device with a high signal strength value in the remote name request queue; sending a remote name request to the first target Bluetooth device to obtain the device name of the first target Bluetooth device.
12. The method of claim 11, wherein, After determining the first target Bluetooth device from the remote name request queue based on the signal strength values of multiple candidate Bluetooth devices in the remote name request queue, the method further comprises: saving second device information corresponding to the first target Bluetooth device to the local.
13. The method of claim 12, wherein, Before saving the second device information corresponding to the first target Bluetooth device to the local, the method further comprises: determining whether the storage space occupied by third device information corresponding to multiple second target Bluetooth devices in the local is greater than a preset threshold; if the storage space occupied by the third device information is greater than the preset threshold, determining a third target Bluetooth device from the multiple second target Bluetooth devices based on the save time of the third device information in the local; the third target Bluetooth device is a Bluetooth device with a high save time in the multiple second target Bluetooth devices; deleting the device information of the third target Bluetooth device from the local.
14. The method of claim 13, wherein, The multiple second target Bluetooth devices are Bluetooth devices that have obtained a device name and are stored in the local.
15. The method of claim 1, wherein, After obtaining the second signal strength value, the method comprises: determining whether the first device information is stored locally, if the first device information is not stored locally, comparing the second signal strength value with a preset second strength threshold; if the second signal strength value is greater than or equal to the second strength threshold and the first Bluetooth device is not in the remote name request queue, adding the first Bluetooth device to the remote name request queue; if the second signal strength value is less than the second strength threshold and the first Bluetooth device exists in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
16. The method of claim 5, wherein, After the third signal strength value is acquired, comprising: determining whether the first device information is stored locally, if the first device information is not stored locally, comparing the third signal strength value with a preset second strength threshold; if the third signal strength value is greater than or equal to the second strength threshold and the first Bluetooth device does not exist in the remote name request queue, adding the first Bluetooth device to the remote name request queue; if the third signal strength value is less than the second strength threshold and the first Bluetooth device exists in the remote name request queue, deleting the first Bluetooth device from the remote name request queue.
17. An apparatus display device, wherein, comprising: a first acquisition module, configured to acquire a first signal strength value of a first Bluetooth device at a first scanning time and a second signal strength value of the first Bluetooth device at a second scanning time; the first scanning time and the second scanning time are two different scanning times in a same scanning period; a time determination module, configured to determine a device display time of first device information corresponding to the first Bluetooth device in a device list based on the first signal strength value and the second signal strength value; a device display module, configured to delete the first device information from the device list if the display time of the first device information in the device list exceeds the device display time.
18. The device display apparatus of claim 17, wherein, The time determination module is specifically configured to: compare the first signal strength value with the second signal strength value; if the second signal strength value is greater than or equal to the first signal strength value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on the second scanning time and a preset first display duration; if the second signal strength value is less than the first signal strength value, determine the device display time of the first device information corresponding to the first Bluetooth device in the device list based on a first signal strength difference value; the first signal strength difference value is an absolute value of a difference between the first signal strength value and the second signal strength value.
19. The device display apparatus according to claim 17, wherein The device display apparatus further comprises: a second acquisition module, configured to acquire a third signal strength value of the first Bluetooth device at a third scanning time; the third scanning time is a scanning time different from the first scanning time and the second scanning time in the same scanning period; a time updating module, configured to update the device display time of the first device information in the device list based on the first signal strength value, the second signal strength value and the third signal strength value.
20. A terminal device, wherein, The terminal device comprises: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the device display method in any one of claims 1 to 16.
Citation Information
Patent Citations
Method and device for automatically removing unavailable equipment in Bluetooth list
CN112714427A
Bluetooth scanning control method, mobile terminal and storage medium
CN113727313A
Method, system and device for reducing wifi delay and computer readable storage medium
CN115835332A
Equipment display method and device, terminal equipment and computer readable storage medium
CN119052763A
Method for searching and connecting bluetooth devices and apparatus using the same
US20100190440A1