Bluetooth filtering method and related device
By adding Bluetooth filtering conditions to the first chip of the electronic device, unnecessary Bluetooth message reporting is reduced, the problem of high power consumption in the hyper-terminal service is solved, and power consumption is reduced and energy efficiency is improved.
Patent Information
- Application Number
- PCT/CN2024/079253
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-25
- Filing Date
- 2024-02-29
- Publication Date
- 2025-03-06
AI Technical Summary
In hyper-terminal service, electronic devices need to continuously discover and report peripheral Bluetooth devices, resulting in a large number of messages and extremely high power consumption.
By adding filtering conditions to the first chip of the electronic device, receiving and determining whether the Bluetooth information meets the filtering conditions, and if it is satisfied, it will be reported to the application layer to reduce unnecessary Bluetooth message reporting.
It effectively reduces the number of reported Bluetooth messages, reduces the power consumption of electronic devices, and improves the energy efficiency performance of the device.
Smart Images

Figure CN2024079253_06032025_PF_FP_ABST
Abstract
Description
Bluetooth filtering method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 25, 2023, with application number 202311084280.4 and application name “Bluetooth Filtering Method and Related Equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of wireless communications, and in particular to a Bluetooth filtering method and related equipment. Background Art
[0003] With the rapid development of Bluetooth technology, more and more manufacturers are using Bluetooth to implement super terminal services for personal computers (PCs). For example, the mobile phone and PC can perform super call services and the mobile phone and PC can perform super keyboard and mouse services. The super call service between the mobile phone and PC means that after the mobile phone and PC are connected via Bluetooth, when the mobile phone receives a call request, the PC will also prompt the call request. The user can accept the call request on the mobile phone or PC and make the call through the mobile phone or PC. The super keyboard and mouse service between the mobile phone and PC means that after the mobile phone and PC are connected via Bluetooth, the keyboard and mouse connected to the PC can be used on both the PC and the mobile phone at the same time. For example, the user can use the mouse to operate on the PC and also use the mouse to operate on the mobile phone.
[0004] The aforementioned super terminal service is a self-discovery and self-organizing service, which means that the electronic device needs to continuously discover and report surrounding Bluetooth devices. Since the electronic device reports all scanned or monitored Bluetooth messages, the large number of reported Bluetooth messages leads to extremely high power consumption of the electronic device.
[0005] Summary of the Invention
[0006] The present application provides a Bluetooth filtering method and related equipment, which can reduce the number of reported Bluetooth messages and reduce the power consumption of electronic devices.
[0007] In a first aspect, some embodiments of the present application provide a Bluetooth filtering method. The method is applied to a first chip in an electronic device, the electronic device comprising the first chip and a second chip, the second chip being a chip that interacts with an application layer through an operating system. The Bluetooth filtering method may include: receiving Bluetooth information sent by a Bluetooth device, where the Bluetooth information is information sent by a Bluetooth device scanned by the electronic device during active scanning, or information sent by a Bluetooth device monitored by the electronic device during passive scanning; determining whether the Bluetooth information meets a Bluetooth filtering condition; and if the Bluetooth information meets the Bluetooth filtering condition, reporting the Bluetooth information to the application layer.
[0008] By using the above method, filtering conditions are added to the newly added first chip to filter both Bluetooth information scanned by the electronic device during active scanning and Bluetooth information monitored by the electronic device during passive scanning. This reduces the number of reported Bluetooth messages and saves power consumption of the electronic device.
[0009] In one possible implementation, the Bluetooth information is reported to the application layer through a dedicated channel between the first chip and the application layer, wherein the Bluetooth information is reported through the dedicated channel without passing through the operating system.
[0010] Through the above method, the first chip and the application layer interact through a dedicated channel, so that the first chip does not need to wake up the operating system when reporting Bluetooth information, saving energy consumption during the reporting process.
[0011] In a possible implementation, the Bluetooth filtering condition is set by the user through the application layer.
[0012] Through the above method, users can customize Bluetooth filtering conditions, making the Bluetooth filtering conditions more flexible and rich.
[0013] In a possible implementation, the Bluetooth filtering condition includes that the account information of the Bluetooth device is the same as the account information of the electronic device, and the Bluetooth information is the account information of the Bluetooth device.
[0014] Through the above method, the devices logged in with the same account are usually the devices of the same user. Therefore, setting the Bluetooth filtering condition to the same account information of the Bluetooth device and the electronic device can accurately filter Bluetooth information.
[0015] In one possible implementation, the Bluetooth information includes a device identifier corresponding to the Bluetooth device; before determining whether the Bluetooth information meets the Bluetooth filtering conditions, the Bluetooth filtering method further includes: determining whether the device identifier corresponding to the Bluetooth device exists in a Bluetooth discard list; if it exists in the Bluetooth discard list, discarding the Bluetooth information; if it does not exist in the Bluetooth discard list, determining whether the Bluetooth information meets the Bluetooth filtering conditions.
[0016] Through the above method, before determining whether the Bluetooth information meets the Bluetooth filtering conditions, it is first determined whether the Bluetooth information exists in the Bluetooth discard list, and multiple filtering is performed to make the filtered Bluetooth information more accurate.
[0017] In a possible implementation, after the Bluetooth information is reported to the application layer, the device identifier in the Bluetooth discard list is the device identifier of the Bluetooth device that the user chooses to disconnect the Bluetooth connection with the electronic device.
[0018] Through the above method, when a user manually disconnects a Bluetooth device connected to an electronic device, the disconnected Bluetooth device is added to the Bluetooth discard list, thereby preventing the electronic device from automatically connecting to the Bluetooth device after the user manually disconnects the Bluetooth device.
[0019] In one possible implementation, the device identifiers of the Bluetooth devices in the Bluetooth discard list correspond one-to-one to the timers; the first timer corresponding to the device identifier of the first Bluetooth device is started when the device identifier of the first Bluetooth device is added to the Bluetooth discard list; the device identifier of the first Bluetooth device is the device identifier of any Bluetooth device in the Bluetooth discard list; the method also includes: if the first timer times out, the device identifier of the first Bluetooth device is deleted from the Bluetooth discard list.
[0020] Through the above method, the device identification of the Bluetooth device in the Bluetooth discard list has time validity, so that after a period of time, the electronic device can still establish a Bluetooth connection with the Bluetooth device in the Bluetooth discard list.
[0021] In one possible implementation, if the Bluetooth information does not meet the Bluetooth filtering condition, the Bluetooth information is discarded.
[0022] In a second aspect, the present application provides an electronic device. The electronic device includes: one or more processors and one or more memories; the one or more memories are coupled to the one or more processors, the memories are used to store computer program code, the computer program code including computer instructions, and the one or more processors invoke the computer instructions to cause the terminal device to perform the method described in the first aspect or any one of the implementations of the first aspect.
[0023] In a third aspect, the present application provides a computer storage medium comprising computer instructions, which, when executed on a terminal device, cause the terminal device to execute the method described in the first aspect or any one of the implementations of the first aspect.
[0024] In a fourth aspect, an embodiment of the present application provides a chip. The chip can be applied to a terminal device, and the chip includes one or more processors, the processors being configured to invoke computer instructions to cause the terminal device to execute the method described in the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] FIG1A is a system architecture diagram of a Bluetooth filtering system provided by an embodiment of the present application;
[0026] FIG1B is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0027] FIG1C is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0028] FIG2 is a schematic diagram of a flow chart of a Bluetooth filtering method provided in an embodiment of the present application;
[0029] FIG3A is a schematic diagram of a Bluetooth setting interface provided in an embodiment of the present application;
[0030] FIG3B is a schematic diagram of another Bluetooth setting interface provided in an embodiment of the present application;
[0031] FIG4 is a schematic diagram of another Bluetooth filtering method provided in an embodiment of the present application;
[0032] FIG5 is a flow chart of another Bluetooth filtering method provided in an embodiment of the present application;
[0033] FIG6 is a schematic diagram of an interface when a Bluetooth device is disconnected according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0035] It should be understood that the terms "first," "second," and the like in the specification, claims, and drawings of this application are used to distinguish between different objects, rather than to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0036] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0037] In order to better understand the embodiments of the present application, some professional terms involved in the embodiments of the present application are first introduced below:
[0038] Bluetooth: Bluetooth technology is an open global standard for wireless data and voice communications. It's a specialized short-range wireless technology that establishes a communication environment for fixed and mobile devices based on low-cost, short-range wireless connections. This radio technology supports short-range communication (generally within 10 meters) and enables wireless information exchange between a wide range of devices, including mobile phones, wireless headsets, laptops, and related peripherals. Bluetooth technology effectively simplifies communication between mobile communication terminals.
[0039] Active scanning and passive scanning are steps in the Bluetooth Low Energy (BLE) connection establishment process. Active scanning involves the central device initiating a scan to search for nearby peripheral devices. Passive scanning involves the central device discovering peripheral devices while broadcasting their information. Scanning can obtain information such as the device's unique identifier and device name.
[0040] Hyperterminal: A hyperterminal integrates the capabilities of multiple terminals through distributed technology and stores them in a virtual hardware resource pool. It then centrally manages, schedules, and integrates the capabilities of each terminal based on business needs to provide external services, enabling fast connections, mutual assistance, and resource sharing between different terminals.
[0041] The super terminal may include core devices / central devices, and collaborative devices / associated devices. The core device is the control center of the super terminal system, carrying functions such as device management, service management, and service scheduling. The core device is connected to one or more associated devices to form a super terminal. The associated device can be an electronic device that is located in the same communication network as the core device (such as a mobile phone), for example, an electronic device that is located on the same WiFi network. The associated device can also be an electronic device whose login account is the same as the login account of the core device, or an electronic device whose login account belongs to the same group as the login account of the core device (such as a family account). The associated device can also be an electronic device that establishes a trusted relationship (or pairing) with the core device through other means, such as an electronic device that has been paired with Bluetooth, an electronic device that has been connected to a hotspot shared by a mobile phone, or a mobile phone that has been connected to the hotspot of the electronic device.
[0042] Different associated devices connect and work together with the core device to achieve different functions. For example, a core device (a mobile phone) and an associated device (a laptop) form a hyperterminal, enabling screen projection of the phone's interface onto the laptop; a core device (a mobile phone) and an associated device (a smart speaker) form a hyperterminal, enabling remote control of the smart speaker from the phone, and so on.
[0043] The following is an introduction to the Bluetooth system involved in the embodiments of the present application:
[0044] FIG1A shows a schematic diagram of the system architecture of a possible, non-restrictive Bluetooth filtering method. As shown in FIG1A , the system includes an electronic device and three Bluetooth devices: Bluetooth device 1, Bluetooth device 2, and Bluetooth device 3. The electronic device and Bluetooth device 1, Bluetooth device 2, and Bluetooth device 3 all have Bluetooth functionality. The electronic device can perform data transmission with Bluetooth device 1, Bluetooth device 2, and Bluetooth device 3, respectively. The electronic device can discover Bluetooth device 1, Bluetooth device 2, and Bluetooth device 3 through active scanning or passive scanning. FIG1A only shows three Bluetooth devices, and the Bluetooth system can include more Bluetooth devices. This application does not limit the number of Bluetooth devices.
[0045] The electronic device may also be referred to as a terminal, user equipment (UE), mobile station, mobile terminal, etc. The electronic device can be widely used in various scenarios, such as device-to-device (D2D), vehicle-to-everything (V2X) communication, machine-type communication (MTC), Internet of Things (IOT), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grid, smart furniture, smart office, smart wearable, smart transportation, smart city, etc. The electronic device may be a mobile phone, tablet computer, computer with wireless transceiver function, wearable device, vehicle, drone, helicopter, airplane, ship, robot, robotic arm, smart home device, etc. The Bluetooth device may be a mobile phone, keyboard, mouse, tablet computer, computer, wearable device, vehicle, drone, etc., which has Bluetooth function.
[0046] The electronic device and the Bluetooth device can perform a super terminal service, specifically, a super call service and a super key and mouse service. The super terminal service can refer to the introduction of the super terminal mentioned above.
[0047] A hardware structure of an electronic device is shown in FIG1B , and may include: a first chip, a second chip, a wireless communication module 1 , and a wireless communication module 2 .
[0048] It is understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more components than shown in the figure, for example, the electronic device may also include a battery, a display, a speaker, a headphone jack, etc., or combine certain components, separate certain components, or arrange the components differently. The components shown in Figure 1B can be implemented in hardware, software, or a combination of software and hardware.
[0049] Among them, the first chip includes a processor 1, and the processor 1 may include one or more processing units, for example: the processor may include an application processor (AP), a modem processor (Modem, also known as a baseband processor), a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural network processor (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. The processor is the nerve center and command center of the terminal. The controller can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0050] The second chip includes a processor 2, which may be the same processor as the processor 1 or a processor different from the processor 1 and having a greater computing capability than the processor 1. Similarly, the processor 2 may also include one or more processing units. This application will not further describe the processing units.
[0051] The wireless communication function of the electronic device can be implemented by a wireless communication module. In some embodiments, the electronic device further includes an antenna 1 and an antenna 2. The antenna 1 of the electronic device is coupled to the wireless communication module 1, and the antenna 2 of the electronic device is coupled to the wireless communication module 2, so that the electronic device can communicate with other terminals via wireless communication technology.
[0052] The wireless communication module 1 and the wireless communication module 2 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to electronic devices. The wireless communication module can be one or more devices that integrate at least one communication processing module. The wireless communication module receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor. The wireless communication module can also receive signals to be sent from the processor, frequency modulate them, amplify them, and convert them into electromagnetic waves for radiation through the antenna.
[0053] Furthermore, operating systems run on the above components, such as the OS developed by Apple and the Windows operating system developed by Microsoft.
[0054] A software structure for an electronic device is shown in FIG1C . As shown in FIG1C , the top layer in the software structure is the application layer, which can include a series of application packages. The application packages can include applications such as gallery, calendar, Bluetooth, music, and video. In this electronic device, data is transmitted between the first chip and the application layer via a dedicated channel. For example, the first chip reports to the application layer via an application programming interface (API), and data is transmitted between the second chip and the application layer via an operating system. The operating system can be, for example, the Windows operating system developed by Microsoft.
[0055] The first chip includes a Bluetooth module that provides Bluetooth functionality and a WiFi module that provides WiFi functionality. Similarly, the second chip also includes a Bluetooth module that provides Bluetooth functionality and a WiFi module that provides WiFi functionality. In the first chip, the Bluetooth module of the first chip includes a Bluetooth driver, a Bluetooth protocol stack, and Bluetooth firmware. The Bluetooth driver is driver software that allows a computer to connect to other Bluetooth devices. The Bluetooth protocol stack is a set of defined protocol specifications that aim to allow Bluetooth applications that comply with the specifications to operate with each other. The Bluetooth firmware is a program written into a programmable read-only memory.
[0056] The following further introduces the Bluetooth filtering method provided in the embodiment of the present application:
[0057] Please refer to Figure 2, which is a flow chart of a Bluetooth filtering method provided by an embodiment of the present application. The Bluetooth filtering method is applied to a first chip in an electronic device, the electronic device having a first chip and a second chip, the second chip being a chip that interacts with the application layer through the operating system.
[0058] 201. A first chip receives Bluetooth information sent by a Bluetooth device. The Bluetooth information is information sent by a Bluetooth device scanned by the electronic device during active scanning, or information sent by a Bluetooth device monitored by the electronic device during passive scanning.
[0059] Among them, active scanning and passive scanning can be referred to the above introduction, and this application will not be repeated here. The Bluetooth device and the electronic device both have Bluetooth functionality. The Bluetooth device can be a mobile phone, keyboard, mouse, tablet computer, watch, or other device with Bluetooth functionality.
[0060] The Bluetooth information of the Bluetooth device may be one or more of the following information: device name of the Bluetooth device, account information of the Bluetooth device, device identifier, physical address (Media Access Control, MAC) of the Bluetooth device, etc. Specifically, the Bluetooth information of the Bluetooth device is information that needs to be reported in information sent by the Bluetooth device.
[0061] 202. The first chip determines whether the Bluetooth information meets the Bluetooth filtering condition.
[0062] In a possible embodiment, the Bluetooth filtering condition includes that the account information of the Bluetooth device is the same as the account information of the electronic device, and the Bluetooth information is the account information of the Bluetooth device.
[0063] The account information of the Bluetooth device is the brand account logged in by the Bluetooth device. When the Bluetooth device and the electronic device log in to the same brand account, the account information of the Bluetooth device is the same as the account information of the electronic device, and the Bluetooth information meets the Bluetooth filtering condition.
[0064] Through the above method, the devices logged in with the same account are usually the devices of the same user. Therefore, setting the Bluetooth filtering condition to the same account information of the Bluetooth device and the electronic device can accurately filter Bluetooth information.
[0065] Optionally, the Bluetooth filtering condition further includes account information of the Bluetooth device and account information of the electronic device as associated account information.
[0066] Among them, the account information of the Bluetooth device can be found in the above introduction and will not be repeated here. When the brand account logged in by the Bluetooth device is a family sharing account of the brand account logged in by the electronic device, the account information of the Bluetooth device and the account information of the electronic device are associated account information.
[0067] For example, the brand account logged into the electronic device is brand account A, specifically the mother's computer. The brand account logged into the Bluetooth device is brand account B, specifically the father's phone. Because the mother set brand account B as the family shared account for brand account A, the account information of the Bluetooth device and the electronic device are linked.
[0068] Optionally, in addition to the above two filtering conditions, the Bluetooth filtering condition can also be other filtering conditions. For example, the device name of the Bluetooth device and the device name of the electronic device have the same key nouns. For example, the device name of the Bluetooth device is user A's mobile phone, and the device name of the electronic device is user A's computer. The device name of the Bluetooth device and the device name of the electronic device have the same key noun: user A, then the Bluetooth information is considered to meet the Bluetooth filtering condition. On the contrary, if the device name of the Bluetooth device is user A's mobile phone, and the device name of the electronic device is user B's computer, and the device name of the Bluetooth device and the device name of the electronic device do not have the same key nouns, then the Bluetooth information is considered to not meet the Bluetooth filtering condition. This application does not limit the filtering conditions.
[0069] Optionally, the Bluetooth filtering condition can also be multiple Bluetooth filtering conditions. When there are multiple Bluetooth filtering conditions, there are two situations: one is that when the Bluetooth information meets multiple Bluetooth filtering conditions at the same time, the Bluetooth information will not be filtered; the other is that when the Bluetooth information meets any one of the multiple Bluetooth filtering conditions, the Bluetooth information will not be filtered. The following examples illustrate the two situations respectively:
[0070] If a Bluetooth message meets multiple Bluetooth filtering conditions simultaneously, it will not be filtered. For example, if multiple Bluetooth filtering conditions are Bluetooth filtering conditions A, Bluetooth filtering condition B, and Bluetooth filtering condition C, the Bluetooth message will be filtered if it only meets Bluetooth filtering conditions A and B; it will be filtered if it only meets Bluetooth filtering condition A; and it will not be filtered if it meets Bluetooth filtering conditions A, B, and C.
[0071] If a Bluetooth message meets any one of multiple Bluetooth filtering conditions, the message will not be filtered. For example, the multiple Bluetooth filtering conditions are Bluetooth filtering condition A, Bluetooth filtering condition B, and Bluetooth filtering condition C. If the Bluetooth message only meets Bluetooth filtering condition A and Bluetooth filtering condition B, the message will not be filtered; if the Bluetooth message only meets Bluetooth filtering condition A, the message will not be filtered; if the Bluetooth message does not meet Bluetooth filtering condition A, Bluetooth filtering condition B, and Bluetooth filtering condition C, the message will be filtered.
[0072] In a possible embodiment, the Bluetooth filtering condition is set by the user through the application layer.
[0073] For example, the user sets the Bluetooth device with MAC address A and MAC address B to meet the Bluetooth filtering condition through the application layer. If the MAC address of the Bluetooth device is MAC address A, the Bluetooth information of the Bluetooth device meets the Bluetooth filtering condition.
[0074] In one possible embodiment, a user can use the Bluetooth settings interface of an electronic device to select one or more Bluetooth filter conditions from a plurality of pre-set filter conditions. For example, the pre-set conditions include: Bluetooth filter condition A, Bluetooth filter condition B, and Bluetooth filter condition C. The user can select Bluetooth filter condition A, and the application layer sends Bluetooth filter condition A to the first chip via a dedicated channel.
[0075] The Bluetooth setting interface described above may be as shown in FIG3A , where the user can turn on switches corresponding to a plurality of preset filter conditions (such as the switches marked 301 in FIG3A ) to set the filter conditions in the first chip of the electronic device. Alternatively, as shown in FIG3B , the user can select corresponding Bluetooth filter conditions (such as the options marked 302 in FIG3B ) to set the filter conditions in the first chip of the electronic device.
[0076] The above-mentioned Figures 3A and 3B are only for example, and this application does not limit the specific interface diagrams of the Bluetooth setting interface.
[0077] Optionally, the Bluetooth filtering condition may be a filtering condition pre-set in the system by a developer.
[0078] Optionally, the Bluetooth filter conditions can be a combination of the Bluetooth filter conditions pre-set by the developer in the system and the Bluetooth filter conditions customized by the user. For example, the developer pre-sets Bluetooth filter condition A, and the user customizes the additional Bluetooth filter conditions. Alternatively, the developer pre-sets Bluetooth filter conditions, and the user customizes the additional Bluetooth filter conditions. The following examples illustrate these two situations:
[0079] Case 1: The developer pre-sets Bluetooth filter condition A, and the user customizes and supplements Bluetooth filter condition B.
[0080] The Bluetooth information meets the Bluetooth filtering conditions preset by the developer, or meets the Bluetooth filtering conditions customized by the user.
[0081] For example, the developer pre-sets the Bluetooth filtering condition in the system as the Bluetooth device's account information being the same as the electronic device's account information, and the user customizes the Bluetooth filtering condition as Bluetooth devices with MAC addresses A and B. If the Bluetooth device's account information is the same as the electronic device's account information, and the Bluetooth device's MAC address is MAC address C, then the Bluetooth information of the Bluetooth device meets the Bluetooth filtering condition; if the Bluetooth device's account information is different from the electronic device's account information, and the Bluetooth device's MAC address is MAC address A, then the Bluetooth information of the Bluetooth device meets the Bluetooth filtering condition.
[0082] Alternatively, the Bluetooth information meets the Bluetooth filtering condition preset by the developer and the Bluetooth filtering condition customized by the user.
[0083] For example, the developer pre-sets the Bluetooth filtering condition in the system as the Bluetooth device's account information being the same as the electronic device's account information, and the user customizes the Bluetooth filtering condition as Bluetooth devices with MAC addresses A and B. If the Bluetooth device's account information is the same as the electronic device's account information, and the Bluetooth device's MAC address is MAC address C, then the Bluetooth information of the Bluetooth device does not meet the Bluetooth filtering condition; if the Bluetooth device's account information is the same as the electronic device's account information, and the Bluetooth device's MAC address is MAC address A, then the Bluetooth information of the Bluetooth device meets the Bluetooth filtering condition.
[0084] Case 2: The developer pre-sets Bluetooth filter condition A, and the user-defined Bluetooth filter condition B overrides the developer's pre-set Bluetooth filter condition A.
[0085] For example, the developer pre-sets the Bluetooth filtering condition in the system as the Bluetooth device's account information being the same as the electronic device's account information, and the user customizes the Bluetooth filtering condition as Bluetooth devices with MAC addresses A and B. If the Bluetooth device's account information is the same as the electronic device's account information, and the Bluetooth device's MAC address is MAC address C, then the Bluetooth information of the Bluetooth device does not meet the Bluetooth filtering condition; if the Bluetooth device's account information is different from the electronic device's account information, and the Bluetooth device's MAC address is MAC address A, then the Bluetooth information of the Bluetooth device meets the Bluetooth filtering condition. In other words, the overwritten Bluetooth filtering condition is Bluetooth filtering condition B, and the Bluetooth information only needs to meet Bluetooth filtering condition B.
[0086] 203. If the Bluetooth information meets the Bluetooth filtering condition, the first chip reports the Bluetooth information to the application layer.
[0087] In a possible embodiment, the first chip reports the Bluetooth information to the application layer through a dedicated channel between the first chip and the application layer, wherein the reporting of the Bluetooth information through the dedicated channel does not pass through the operating system.
[0088] When the operating system is in a dormant state, the operating system will not be awakened unless the operating system reports Bluetooth information. The dedicated channel is used to transmit data between the first chip and the application layer.
[0089] Optionally, if the Bluetooth information does not meet the Bluetooth filtering condition, the Bluetooth information is discarded.
[0090] For example, Figure 4 shows another schematic diagram of Bluetooth filtering provided by an embodiment of the present application. The first chip includes a Bluetooth driver, a Bluetooth protocol stack, and Bluetooth firmware. The arc marked 401 in Figure 4 indicates that when Bluetooth information does not meet the Bluetooth filtering conditions, the Bluetooth information is discarded. The straight line marked 402 in Figure 4 indicates that when Bluetooth information meets the Bluetooth filtering conditions, the Bluetooth information is reported.
[0091] Please refer to Figure 5, which is a flow chart of another Bluetooth filtering method provided by an embodiment of the present application. The Bluetooth information includes the device identifier corresponding to the Bluetooth device.
[0092] 501. A first chip receives Bluetooth information sent by a Bluetooth device. The Bluetooth information is information sent by a Bluetooth device scanned by the electronic device during active scanning, or information sent by a Bluetooth device monitored by the electronic device during passive scanning.
[0093] Please refer to the description of step 201 above for this step, which will not be repeated here in this application.
[0094] 502. The first chip determines whether the device identifier corresponding to the Bluetooth device exists in the Bluetooth discard list.
[0095] The Bluetooth discard list may be an empty list. If the Bluetooth discard list is not an empty list, the Bluetooth discard list includes at least one device identifier.
[0096] In a possible embodiment, the device identifier in the Bluetooth discard list is the device identifier of the Bluetooth device that the user chooses to disconnect the Bluetooth connection with the electronic device.
[0097] For example, the electronic device is connected to Bluetooth device A, Bluetooth device B, and Bluetooth device C. The user chooses to disconnect the electronic device from Bluetooth device C. The device identifier of Bluetooth device C is added to the Bluetooth discard list.
[0098] Among them, the interface for the user to choose to disconnect the Bluetooth device C can be as shown in Figure 6. The interface shown in Figure 6 is only for example, and this application does not limit the interface for the user to choose to disconnect the Bluetooth device C. As shown in Figure 6, the Bluetooth device C is the Bluetooth watch 601 marked with 601 in Figure 6. Click the icon of the Bluetooth watch 601 to display a pop-up window 602. Click the disconnect option in the pop-up window 602 to disconnect the Bluetooth watch 601 from the electronic device. After disconnection, the icon of the Bluetooth watch 601 no longer exists in the interface, or the icon of the Bluetooth watch 601 turns gray.
[0099] Through the above method, when a user manually disconnects a Bluetooth device connected to an electronic device, the disconnected Bluetooth device is added to the Bluetooth discard list, thereby preventing the electronic device from automatically connecting to the Bluetooth device after the user manually disconnects the Bluetooth device.
[0100] In a possible embodiment, the device identifiers of the Bluetooth devices in the Bluetooth discard list correspond one-to-one to the timers; the first timer corresponding to the device identifier of the first Bluetooth device is started when the device identifier of the first Bluetooth device is added to the Bluetooth discard list; the device identifier of the first Bluetooth device is the device identifier of any Bluetooth device in the Bluetooth discard list; the method also includes: if the first timer times out, the first chip deletes the device identifier of the first Bluetooth device from the Bluetooth discard list.
[0101] Each Bluetooth device ID in the Bluetooth discard list corresponds to a timer. For example, if the Bluetooth discard list includes Bluetooth device A and Bluetooth device B, Bluetooth device A corresponds to Timer A, which starts counting when Bluetooth device A is added to the Bluetooth discard list; Bluetooth device B corresponds to Timer B, which starts counting when Bluetooth device B is added to the Bluetooth discard list.
[0102] For example, when the device identifier of Bluetooth device C is added to the Bluetooth discard list, a timer is started. The timer starts counting from the time the device identifier of Bluetooth device C is added to the Bluetooth discard list. The timer is preset to time out after one hour. Therefore, the device identifier of Bluetooth device C is removed from the Bluetooth discard list one hour after being added to the Bluetooth discard list.
[0103] Through the above method, the device identification of the Bluetooth device in the Bluetooth discard list has time validity, so that after a period of time, the electronic device can still establish a Bluetooth connection with the Bluetooth device in the Bluetooth discard list.
[0104] 503. If the Bluetooth information exists in the Bluetooth discard list, the first chip discards the Bluetooth information.
[0105] 504. If the Bluetooth information does not exist in the Bluetooth discard list, the first chip determines whether the Bluetooth information meets the Bluetooth filtering condition.
[0106] 505. The first chip determines whether the Bluetooth information meets the Bluetooth filtering condition.
[0107] Please refer to the description of step 202 above for this step, which will not be described in detail in this application.
[0108] 506. If the Bluetooth information meets the Bluetooth filtering condition, the first chip reports the Bluetooth information to the application layer.
[0109] For this step, please refer to the description in step 203 above, which will not be described in detail in this application.
[0110] Some embodiments of the present application provide a chip system for use in a terminal device. The chip system includes at least one processor and an interface, wherein the interface is configured to receive instructions and transmit them to the at least one processor; the at least one processor executes the instructions, causing the terminal device to execute the paging message processing method described above. The chip system may be a modem, or a system on chip (SoC) including a modem, and the method described above may be implemented by a modem.
[0111] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0112] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A Bluetooth filtering method, characterized in that: A first chip is applied to an electronic device, the electronic device has a first chip and a second chip, the second chip is a chip that interacts with an application layer through an operating system, and the method includes: Receiving Bluetooth information sent by a Bluetooth device, where the Bluetooth information is information sent by the Bluetooth device scanned by the electronic device during active scanning, or information sent by the Bluetooth device monitored by the electronic device during passive scanning; Determining whether the Bluetooth information meets the Bluetooth filtering condition; If the Bluetooth information meets the Bluetooth filtering condition, the Bluetooth information is reported to the application layer.
2. The method according to claim 1, characterized in that The reporting the Bluetooth information to the application layer includes: The Bluetooth information is reported to the application layer through a dedicated channel between the first chip and the application layer, wherein the Bluetooth information is reported through the dedicated channel without passing through an operating system.
3. The method according to claim 1 or 2, characterized in that: The Bluetooth filtering condition is set by the user through the application layer.
4. The method according to any one of claims 1 to 3, characterized in that: The Bluetooth information includes account information of the Bluetooth device, and the Bluetooth filtering condition includes that the account information of the Bluetooth device is the same as the account information of the electronic device.
5. The method according to any one of claims 1 to 4, characterized in that: The Bluetooth information includes a device identifier corresponding to the Bluetooth device; Before determining whether the Bluetooth information satisfies the Bluetooth filtering condition, the method further includes: Determine whether the device identifier corresponding to the Bluetooth device exists in the Bluetooth discard list; If the Bluetooth information exists in the Bluetooth discard list, the Bluetooth information is discarded; If the Bluetooth information does not exist in the Bluetooth discard list, it is determined whether the Bluetooth information meets the Bluetooth filtering condition.
6. The method according to claim 5, characterized in that The device identifiers in the Bluetooth discard list are device identifiers of Bluetooth devices that the user chooses to disconnect the Bluetooth connection with the electronic device.
7. The method according to claim 6, characterized in that The device identifiers of the Bluetooth devices in the Bluetooth discard list correspond to the timers one by one; the first timer corresponding to the device identifier of the first Bluetooth device is started when the device identifier of the first Bluetooth device is added to the Bluetooth discard list; the device identifier of the first Bluetooth device is the device identifier of any Bluetooth device in the Bluetooth discard list; The method further comprises: If the first timer times out, the device identification of the first Bluetooth device is deleted from the Bluetooth discard list.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: If the Bluetooth information does not meet the Bluetooth filtering condition, the Bluetooth information is discarded.
9. An electronic device, comprising one or more memories and one or more processors, characterized in that: The memory is used to store a computer program; the processor is used to call the computer program so that the electronic device executes the method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that: include: Computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data processing method, Bluetooth module, electronic equipment and readable storage medium
CN110784830A
Bluetooth scanning method and device, equipment and computer readable storage medium
CN111491279A
Communication system, short-range radio communication network and wearable apparatus
JP2017135647A