Method for generating a bluetooth random address and related electronic device
By delegating the generation and updating of the Bluetooth Host's Identity Resolution Key (IRK) to the sensor control center or Bluetooth Controller, the power consumption problem of the AP chip caused by the Bluetooth Host's periodic RPA updates is solved, thereby improving the AP chip's performance and device standby time.
Patent Information
- Application Number
- CN202111555506.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2041-12-17
AI Technical Summary
When Bluetooth is enabled, the Bluetooth host periodically updates the Random Private Address (RPA), causing the AP chip to wake up frequently, increasing power consumption and affecting performance.
The generation and updating of the Identity Resolution Key (IRK) is delegated to the sensor control center or Bluetooth controller, which can periodically update the RPA, thereby reducing the power consumption of the AP chip.
By reducing the number of wake-up cycles of the AP chip, power consumption is reduced, thereby improving the performance of the AP chip and the standby time of electronic devices.
Smart Images

Figure CN116266908B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of Bluetooth communication, and in particular to a method for generating a Bluetooth random address and related electronic equipment. BACKGROUND
[0002] With the wide use of electronic equipment, the use of Bluetooth is also increasing. Bluetooth is a wireless radio technology that supports short-range communication (generally within 10m) between devices. It enables wireless information exchange between a variety of devices, including mobile phones, PDAs, wireless headsets, notebook computers, and related peripherals. Using Bluetooth technology, communication between mobile communication terminal devices can be effectively simplified, and communication between devices and the Internet can also be successfully simplified, so that data transmission becomes more rapid and efficient, and wireless communication is broadened. In addition, as a small-range wireless connection technology, Bluetooth enables convenient, flexible, secure, low-cost, and low-power data communication and voice communication between devices, so it is one of the mainstream technologies for implementing Personal Area Network (PAN) communication. SUMMARY
[0003] Embodiments of the present application provide a method for generating a Bluetooth random address and related electronic equipment, which solves the problem that in the case of Bluetooth function being turned on, the Bluetooth Host deployed on the AP chip wakes up the AP chip due to periodic updating of the RPA, which in turn causes the power consumption of the AP chip to increase, thereby affecting the working performance of the AP chip.
[0004] In a first aspect, embodiments of the present application provide a method for generating a Bluetooth random address, applied to an electronic device including a Bluetooth Host and a Bluetooth module. The method includes: the Bluetooth Host generating an identity resolution key; in the case that the electronic device meets a first condition, the Bluetooth Host sending the identity resolution key to the Bluetooth module; the first condition being a condition for triggering the electronic device to reduce power consumption; the Bluetooth module generating a resolvable private address (RPA) based on the identity resolution key (IRK), and periodically updating the RPA based on the IRK; in the case that the Bluetooth Host is to perform Bluetooth service, the Bluetooth Host sending an RPA request to the Bluetooth module; the Bluetooth module sending the latest updated RPA to the Bluetooth Host; and the Bluetooth Host performing Bluetooth service based on the latest updated RPA.
[0005] In the above embodiment, after generating the IRK, the Bluetooth Host can send the IRK to the Bluetooth module (the Bluetooth module is the sensor control center or the Bluetooth Controller), and the sensor control center or the Bluetooth Controller can periodically update the RPA based on the IRK sent by the Bluetooth Host. In the case that the Bluetooth Host needs to perform Bluetooth service, the sensor control center or the Bluetooth Controller can send the latest updated RPA to the Bluetooth Host, so that the Bluetooth Host can perform Bluetooth service. Since the power consumed by the sensor control center / Bluetooth Controller to update the RPA is less than the power consumed by the Bluetooth Host to update the RPA, the function of updating the RPA is downgraded to the sensor control center / Bluetooth Controller, which can reduce the power consumption of the AP chip and further improve the working performance of the AP chip.
[0006] With reference to the first aspect, in a possible implementation, the Bluetooth module is the Bluetooth Controller or the sensor control center.
[0007] With reference to the first aspect, in a possible implementation, the first condition is that: the electronic device currently has no running application program; or, the current power of the electronic device is lower than a first threshold; or, in the application programs currently running on the electronic device, the number of high-power consumption application programs is greater than or equal to a second threshold; wherein the high-power consumption application program is an application program that has more than or equal to M times of standby times in N times of standby times in a historical time period, and the power consumption ratio is more than a third threshold. With reference to the first aspect, in a possible implementation, the Bluetooth module generates a resolvable private address RPA based on the identity resolution key IRK, and periodically updates the RPA based on the IRK, and further comprises: when the first condition is that the electronic device currently has no running application program, detecting whether the electronic device has a running application program in a timely manner; if it is detected that the electronic device has a running application program, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate the RPA based on the identity resolution key, and to update the RPA based on the identity resolution key in a timely manner. In this way, when there is an application program that needs to use the RPA to perform Bluetooth service, the application program can directly call the RPA from the AP chip to perform Bluetooth service.
[0008] With reference to the first aspect, in a possible implementation manner, after the Bluetooth module generates the resolvable private address RPA based on the identity resolution key IRK and periodically updates the RPA based on the IRK, the method further includes: when the first condition is that the current power of the electronic device is lower than a first threshold, detecting the power of the electronic device; and if it is detected that the power of the electronic device is greater than or equal to the first threshold, sending, by the Bluetooth module, first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate the RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key. In this way, since the power consumed by the Bluetooth module in updating the RPA is less than the power consumed by the Bluetooth Host, the Bluetooth Host can decentralize the function of updating the RPA to the Bluetooth module, thereby reducing the power consumption of the AP chip, reducing the consumption of the power, and prolonging the standby time of the electronic device.
[0009] With reference to the first aspect, in a possible implementation manner, after the Bluetooth module generates the resolvable private address RPA based on the identity resolution key IRK and periodically updates the RPA based on the IRK, the method further includes: when the first condition is that the number of high-power consumption application programs in the application programs currently running on the electronic device is greater than or equal to a second threshold, detecting the number of the high-power consumption application programs running on the electronic device; and if it is detected that the number is less than the second threshold, sending, by the Bluetooth module, second indication information to the Bluetooth Host; the second indication information is used to instruct the Bluetooth Host to generate the RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key. In this way, in the case that the current AP chip has high power consumption, the Bluetooth Host can decentralize the function of periodically updating the RPA to the sensor control center, thereby reducing the power consumption of the AP chip, improving the work efficiency of the AP chip, and prolonging the standby time of the electronic device.
[0010] In a second aspect, an embodiment of the present application provides an electronic device, which includes a memory, a first processor, a Bluetooth module, and a touch screen; the touch screen is configured to display content; the memory is configured to store a computer program including program instructions; the first processor is configured to invoke the program instructions, generate an identity resolution key, and send the identity resolution key to the Bluetooth module when the electronic device meets a first condition; the Bluetooth module is configured to generate a resolvable private address RPA based on the identity resolution key IRK and periodically update the RPA based on the IRK; the first processor is configured to send an RPA request to the Bluetooth module when the first processor is to perform a Bluetooth service; the Bluetooth module is configured to send the latest updated RPA to the first processor; and the first processor is configured to perform the Bluetooth service based on the latest updated RPA.
[0011] With reference to the second aspect, in a possible implementation manner, when the first condition is that the electronic device currently has no running application program, the electronic device is detected whether there is a running application program; if it is detected that the electronic device has a running application program, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate the RPA based on the identity resolution key and to update the RPA based on the identity resolution key in a timing manner.
[0012] With reference to the second aspect, in a possible implementation manner, when the first condition is that the current power of the electronic device is lower than a first threshold, the power of the electronic device is detected in a timing manner; if it is detected that the power of the electronic device is greater than or equal to the first threshold, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate the RPA based on the identity resolution key and to update the RPA based on the identity resolution key in a timing manner.
[0013] With reference to the second aspect, in a possible implementation manner, when the first condition is that the number of high-power consumption application programs in the application programs currently running on the electronic device is greater than or equal to a second threshold, the Bluetooth module detects the number of the high-power consumption application programs running on the electronic device in a timing manner; if it is detected that the number is less than the second threshold, the Bluetooth module sends second indication information to the Bluetooth Host; the second indication information is used to instruct the Bluetooth Host to generate the RPA based on the identity resolution key and to update the RPA based on the identity resolution key in a timing manner.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a first processor, a Bluetooth module and a touch screen; the memory is configured to store computer program codes, the computer program codes include computer instructions, when the first processor executes the computer instructions, the electronic device executes the method in the first aspect or any possible implementation manner of the first aspect, when the Bluetooth module executes the computer instructions, the electronic device executes the method in the first aspect or any possible implementation manner of the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and includes one or more processors, which are configured to invoke computer instructions to make the electronic device execute the method in the first aspect or any possible implementation manner of the first aspect.
[0016] In a fifth aspect, an embodiment of the present application provides a computer program product including instructions, when the computer program product is executed on an electronic device, the electronic device executes the method in the first aspect or any possible implementation manner of the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, including instructions, when the instructions are executed on an electronic device, causing the electronic device to perform the method in the first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 is a hardware structure schematic diagram of an electronic device 100 provided by an embodiment of the present application;
[0019] Figure 2 is a Bluetooth architecture diagram of the electronic device 100 provided by an embodiment of the present application;
[0020] Figures 3A-3D is an exemplary user interface diagram of a group of electronic devices 100 provided by an embodiment of the present application;
[0021] Figure 4 is a flowchart of a Bluetooth random address generation method provided by an embodiment of the present application;
[0022] Figure 5 is a flowchart of another Bluetooth random address generation method provided by an embodiment of the present application;
[0023] Figure 6 is a flowchart of another Bluetooth random address generation method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. In this document, the phrase "embodiments" means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase at various places in the specification does not necessarily mean the same embodiments, nor is it mutually exclusive or alternative to other embodiments. It is obvious for those skilled in the art to understand that the embodiments described in this document can be combined with other embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0025] The terms "first", "second", "third", etc. in the specification and claims of this application and the drawings are used to distinguish different objects, not to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a series of steps or units are included, or optionally, other steps or units not listed are also included, or optionally, other steps or units inherent in the process, method, product or equipment are also included.
[0026] Only part of the drawings related to the present application is shown in the drawings, not all. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe each operation (or step) as a sequential process, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, etc.
[0027] The terms "component", "module", "system", "unit" and the like used in the present specification are used to represent computer-related entities, hardware, firmware, combinations of hardware and software, software or software in execution. For example, the unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable, an execution thread, a program and / or distributed between two or more computers. In addition, these units can be executed from various computer readable media having various data structures stored thereon. The units can communicate, for example, according to a signal having one or more data packets (e.g. from a second unit interacting with another unit of a local system, a distributed system and / or a network. For example, the Internet interacts with other systems through signals. For example, through signals with other systems.
[0028] First, the terms related to the embodiments of the present application are exemplified, but not limited.
[0029] 1、Bluetooth physical address (MAC address): A Bluetooth device can have two types of addresses at the same time, namely public device address (Public Device Address, PDA) and random device address (Random Device Address, RDA). For Bluetooth devices, the public device address is a 48-bit number called "48-bit universal LAN MAC address". The address needs to be applied to IEEE and has uniqueness, which can be used to identify Bluetooth devices. However, with the continuous popularity of Bluetooth technology and the increasing number of Bluetooth users, the number of PDAs is obviously not enough, and the specific reasons are as follows:
[0030] (1) The public device address needs to be purchased from IEEE, which requires an expense.
[0031] (2) The application and management of the public device address is relatively complicated and complex, and the number of Bluetooth devices is large, which increases the maintenance cost.
[0032] (3) Security factor. A large part of the application scenarios of Bluetooth is broadcast communication, which means that as long as the address of the device is known, all information can be obtained, which is very unsafe. Therefore, the fixed device address increases the risk of information leakage.
[0033] In order to solve the above problems, Bluetooth protocol adds a new type of address: random device address, that is, the device address is not fixedly allocated, but is randomly generated after the device starts. According to different purposes, the random device address is divided into static device address (Static Device Address, SDA) and private device address (Private Device Address, PDA).
[0034] The static device address is a random address generated when the device is powered on, which has 48 bits, the highest two bits are "11", and the remaining 46 bits are a random number, which cannot be all 0 or all 1, which can guarantee the uniqueness of the device address, and since the address is randomly generated, it can solve the problems of cost and maintenance caused by the application of public device address.
[0035] The private device address improves the reliability and security of the Bluetooth address through two ways of timing update and address encryption. According to whether the device address is encrypted, the private address is divided into non-resolvable private address (Non-resolvable Private Address, NRPA) and resolvable private address (Resolvable Private Address, RPA).
[0036] The resolvable private address is generated using a random number and an Identity Resolving Key (IRK), so it can only be scanned by devices with the same IRK, thus preventing it from being scanned and tracked by unknown devices.
[0037] 2. Identity Resolving Key (IRK): Used to generate and resolve RPA.
[0038] 3. Sensor Hub (SH): It can control the sensors in real time while the CPU is in sleep mode, thereby reducing power consumption. In addition, the sensor hub can also fuse data from different types of sensors to achieve functions that can only be achieved by combining data from multiple sensors.
[0039] Below, in conjunction with Figure 1 This application describes the hardware structure of an electronic device involved in its embodiments, which has Bluetooth functionality. Please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiments of this application.
[0040] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc. It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0041] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP chip), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0042] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0043] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0044] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the same device as at least part of the modules of the processor 110.
[0045] The wireless communication module 160 can provide a solution for wireless communication including a wireless local area network (WLAN) (e.g., a Wi-Fi network), Bluetooth (BT), BLE broadcasting, a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which is applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.
[0046] The electronic device 100 implements a display function through a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing, which is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0047] The display 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel can employ a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include 1 or N displays 194, N being a positive integer greater than 1.
[0048] The electronic device 100 can implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display 194, an application processor, and the like.
[0049] ISP is used to process the data feedback by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and conversion into a visible image to the naked eye. ISP can also optimize the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, ISP can be provided in the camera 193.
[0050] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0051] NPU is a neural network (NN) calculation processor, which learns from the structure of biological neural networks, such as the transmission mode between human brain neurons, and can quickly process input information and continuously self-learn. Through NPU, the electronic device 100 can realize intelligent cognition and other applications, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0052] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.
[0053] The audio module 170 is used to convert digital audio information into analog audio signals, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or part of the functions of the audio module 170 can be provided in the processor 110.
[0054] The speaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0055] The receiver 170B, also known as a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a phone or voice message, the receiver 170B can be held close to the ear to listen to the voice.
[0056] Microphone 170C, also called "microphone", "microphone", is used to convert sound signal into electrical signal. When making a call or sending voice message, the user can make a sound by approaching the microphone 170C with the mouth, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, it can also realize the function of noise reduction. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, which can realize the functions of collecting sound signals, noise reduction, identifying sound sources, realizing directional recording, etc.
[0057] The pressure sensor 180A is used to sense the pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be provided on the display screen 194.
[0058] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude by the air pressure value measured by the air pressure sensor 180C, and assists in positioning and navigation.
[0059] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0060] The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (usually three axes). When the electronic device 100 is stationary, it can detect the size and direction of gravity. It can also be used to identify the posture of the electronic device, applied to landscape / portrait screen switching, pedometer, etc.
[0061] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint shooting, fingerprint answering phone, etc.
[0062] The touch sensor 180K, also called "touch panel". The touch sensor 180K can be provided on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. The display screen 194 can provide visual output related to the touch operation. In other embodiments, the touch sensor 180K can also be provided on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0063] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals of the human body sound part vibration bone block.
[0064] The above Figure 1 The embodiment describes the hardware structure of the electronic device 100. Below, in conjunction with... Figure 2 This section introduces the Bluetooth architecture of electronic device 100. For example... Figure 2 As shown, the Bluetooth architecture of the electronic device 100 includes an application layer, an application processor layer, and a Bluetooth chip layer.
[0065] The application layer includes a Bluetooth application 201; the Bluetooth application can be used to receive user commands, such as receiving user touch, click or long press operations.
[0066] The application processor layer includes a Bluetooth host 202. In this embodiment, the Bluetooth host stores protocols used for communication via Bluetooth Low Energy (BLE), such as the BLE protocol and the Generic Access Profile (GAP) for generating the IRK. It is understood that the Bluetooth host is the core part of the Bluetooth protocol stack, used to specify secure connections, responsible for protocol or channel multiplexing, and providing interface support for upper-layer applications. In this embodiment, after the electronic device 100 activates the Bluetooth function, the Bluetooth host can generate an IRK based on the GAP protocol and periodically update the RPA based on the IRK and a random number.
[0067] In other embodiments, after the electronic device starts the Bluetooth function, the Bluetooth Host can generate an IRK based on the GAP protocol and send the IRK to the controller or sensor control center, which will then update the RPA periodically based on the IRK.
[0068] The Bluetooth chip layer includes the controller 203, which can also be understood as the Bluetooth chip. The Bluetooth chip contains a radio frequency (RF) module and a link layer.
[0069] RF modules can be used to implement the analog and digital parts related to radio frequency (RF), performing the most basic data transmission and reception. In other words, RF can be used to handle tasks related to radio frequency signals (e.g., receiving / transmitting data packets over the air).
[0070] The link layer can determine broadcast channels and data transmission channels, enabling the electronic device 100 to reliably receive and / or transmit data on RF-supported frequency bands. Additionally, the link layer can determine the Bluetooth state, such as scanning and initiating states. In scanning state, the terminal can receive data through the broadcast channel (e.g., receiving BLE broadcast packets). In initiating state, the terminal only receives and processes connection confirmation data sent by the device, and does not receive or process BLE broadcast packets.
[0071] The Bluetooth Host and Bluetooth Controller can communicate via a physical interface, namely the Host Controller Interface (HCI). For example, the Bluetooth Controller can send data to the Bluetooth Host via the HCI, and the Bluetooth Host can send commands and data to the Bluetooth Controller via the HCI.
[0072] Understandable, regarding Figure 2 The Bluetooth architecture of the electronic device 100 shown belongs to the Host+Controller dual-chip standard architecture, that is, the Bluetooth Host is deployed on the processor (Application Processor, AP) chip, and the Bluetooth Controller is deployed on the Bluetooth chip. The Bluetooth architecture of the electronic device 100 can also be other architectures.
[0073] For example, the Bluetooth architecture of electronic device 100 can also be a single-chip architecture, where the Bluetooth Host and Bluetooth Controller are integrated onto a single chip. Communication between the Bluetooth Host and Bluetooth Controller does not require a physical interface (HCI) and can be achieved directly through a logical interface (such as an application programming interface). Alternatively, the Bluetooth architecture of electronic device 100 can also be a custom dual-chip architecture, where the Bluetooth Host and Bluetooth Controller communicate via a physical interface (HCI), but the communication protocol used is defined by the manufacturer.
[0074] It is understood that the methods provided in this application are also applicable to other Bluetooth architectures (such as single-chip architecture or custom dual-chip architecture) other than the Host+Controller dual-chip standard architecture, and this application does not impose any limitations on them.
[0075] Since the advent of Bluetooth technology, it has not only solved many data transmission problems, but also opened the door to wireless life, and has been favored by various intelligent devices. However, this technology brings convenience to our life, but also brings some security problems. Among them, the most serious problem is that the address of the Bluetooth device is leaked. The Bluetooth address in the Bluetooth device is unique. Once the user's Bluetooth address is parsed by a third-party user, the third-party user can obtain the user's Bluetooth data based on the Bluetooth address. In the process of Bluetooth communication between the user and other users, the third-party user can listen to or even tamper with the content of the two parties, and can also obtain the user's Bluetooth data, thereby causing the problem of user privacy leakage.
[0076] At present, in the field of Bluetooth technology, the widely used Bluetooth address is a resolvable private address (RPA). The RPA is a private device address generated by an identity resolution key (IRK). The identity resolution key updates the RPA regularly. After the update is completed, the RPA before the update loses its function. A third-party user cannot determine the Bluetooth device through the RPA before the update, which greatly improves the security of Bluetooth technology.
[0077] Before the Android R version, the Bluetooth Host updates the RPA every 15 minutes based on the IRK. Since the Bluetooth Host is deployed on the AP chip, in the case that the Bluetooth function is turned on and the AP chip is in sleep state, the Bluetooth Host will wake up the AP chip every 15 minutes. After the AP chip is woken up, the application deployed on the AP chip will also be woken up, thereby increasing the power consumption of the AP chip.
[0078] After the R version, in order to ensure security, the Bluetooth Host deployed on the AP chip will update the RPA within 7-15 minutes (1 random address is needed for the current BLE pairing connection, and 2 random addresses are needed for system application broadcast). This means that the timers of the 3 random addresses may wake up the AP chip 3-6 times within 7-15 minutes, which increases the number of times the AP chip is woken up, thereby increasing the number of times the application deployed on the AP chip is woken up, and making the AP chip consume more power, which greatly affects the working performance of the AP chip.
[0079] In order to solve the problem that the Bluetooth Host consumes the power consumption of the AP chip due to the periodic updating of the RPA, and further affects the working performance of the AP chip when the electronic device 100 starts the Bluetooth function, the embodiment of the present application provides a Bluetooth random address generation method, which comprises the following steps: after generating the IRK, the Bluetooth Host can send the IRK to the sensor control center or the Bluetooth Controller, and the sensor control center or the Bluetooth Controller periodically updates the RPA based on the IRK sent by the Bluetooth Host; in the case that the Bluetooth Host needs to perform Bluetooth service, the sensor control center or the Bluetooth Controller can send the latest updated RPA to the Bluetooth Host, so that the Bluetooth Host can perform Bluetooth service. Since the power consumed by the sensor control center / Bluetooth Controller to update the RPA is less than the power consumed by the Bluetooth Host to update the RPA, the Bluetooth Host can reduce the power consumption of the AP chip by decentralizing the function of updating the RPA to the sensor control center / Bluetooth Controller, and further improve the working performance of the AP chip.
[0080] Next, the application scenario of the Bluetooth random address generation method provided by the embodiment of the present application will be described. Figures 3A-3D The application scenario of the Bluetooth random address generation method provided by the embodiment of the present application will be described. Figures 3A-3D is an exemplary user interface diagram of a group of electronic devices 100 provided by the embodiment of the present application, in which Figures 3A-3D The electronic device 100 and the electronic device 200 are included in the group of electronic devices 100 and the electronic device 200 can be connected through Bluetooth.
[0081] Figure 3A is the main interface of the electronic device 100, which includes a settings icon 301 and other application icons. When the electronic device 100 detects an input operation (for example, a single click) on the settings icon 301, the electronic device 100 displays a user interface 31 as shown in Figure 3B .
[0082] As shown in Figure 3B , the user interface 31 includes a Bluetooth settings icon 311. When the electronic device 100 detects an input operation (for example, a single click) on the Bluetooth settings icon 311, the electronic device 100 displays a user interface 32 as shown in Figure 3C .
[0083] As shown in Figure 3CAs shown, the user interface 32 includes a Bluetooth enable control 321 and a Bluetooth device display area 322. When the electronic device 100 detects a click operation on the Bluetooth enable control 321, it responds to the operation and enables the Bluetooth function. At this time, the electronic device 100 can pair and connect with other Bluetooth devices. The Bluetooth device display area 322 is used to display the device names of Bluetooth devices that the electronic device 100 has connected to. For example, in the Bluetooth device display area 322, the device name "A10" is the device name of the electronic device 200. When the electronic device 100 detects a click operation on "A10", it responds to the operation and establishes a Bluetooth connection with the electronic device 200. After a successful connection, the electronic device 100 displays the following: Figure 3D The user interface shown is 33.
[0084] like Figure 3D As shown, the user interface 33 is the interface after the electronic device 100 and the electronic device 200 are successfully connected via Bluetooth. From the Bluetooth device display area 332, it can be seen that the device display icon of "A10" displays the words "connected", and the user interface 33 displays the Bluetooth icon 331.
[0085] Below, in conjunction with Figure 4 The specific process of a Bluetooth random address generation method proposed in the embodiments of this application is described below. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a flowchart of a Bluetooth random address generation method provided in an embodiment of this application. When the electronic device has Bluetooth enabled, before the AP chip goes into sleep mode, the Bluetooth Host can send its generated Identity Resolution Key (IRK) to the sensor control center. During the AP chip's sleep mode (where AP chip sleep mode means that the application in the AP chip is not running), the sensor control center periodically updates the RPA based on the IRK sent by the Bluetooth Host. When the AP chip is woken up and needs to use the RPA for Bluetooth services, the sensor control center can send the latest updated RPA to the Bluetooth Host. The specific process is as follows:
[0086] Step S401: The Bluetooth Host generates an identity resolution key using an encryption algorithm.
[0087] Specifically, after the electronic device enables Bluetooth, the Bluetooth Host generates an IRK using an encryption algorithm. This IRK is used to generate and periodically update the RPA.
[0088] For example, the user can click the Bluetooth application icon in the electronic device, and the electronic device starts the Bluetooth function in response to the user's operation. It can be understood that the above example only exemplarily shows the scenario of starting the Bluetooth function by clicking, and does not constitute a limitation on the embodiments of the present application. In some embodiments, the network application can also be started by other operations. Figure 3B For the user interface 31, as shown in Figure 3B the Bluetooth start icon can be clicked in the user interface 31, so that the Bluetooth connection icon shown in Figure 3C is displayed, which is used to represent that the current electronic device has started the Bluetooth function.
[0089] For example, the Bluetooth Host can generate the IRK through the Aes_128 function, that is, IRK=Aes_128(rand, a, b). Wherein, rand is a random number generated by the Bluetooth Host based on a random number function, a is a first parameter required by the Bluetooth Host to generate the IRK, and b is a second parameter required by the Bluetooth Host to generate the IRK.
[0090] It should be understood that the above only exemplarily describes the encryption algorithm for generating the IRK by the Bluetooth Host, and should not constitute a limitation on the protection scope of the embodiments of the present application. The Bluetooth Host can also calculate the IRK through other encryption algorithms, and the embodiments of the present application do not limit the type of encryption algorithm used by the Bluetooth Host.
[0091] Step S402: The Bluetooth Host sends the identity resolution key generated by it to the sensor control center.
[0092] Specifically, after generating the IRK, the Bluetooth Host can send the IRK generated by it to the sensor control center, so that the sensor control center can generate and update the RPA based on the IRK generated by the Bluetooth Host. The Bluetooth Host can send the IRK to the sensor control center through an interface and a communication protocol defined by the Bluetooth Host and the sensor control center. For example, the Bluetooth Host can send the IRK to the sensor control center through an Inter-Integrated Circuit (I2C) interface and a related communication protocol, or can send the IRK to the sensor control center through other interfaces. The embodiments of the present application do not limit the specific communication mode between the Bluetooth Host and the sensor control center.
[0093] Step S403: The sensor control center generates the RPA based on the identity resolution key.
[0094] Specifically, after receiving the identity resolution key sent by the Bluetooth Host, the sensor control center generates the RPA. For example, the sensor control center can update the RPA by the function Generate_RPA(IRK, Random). Wherein, Random is a random number generated by the sensor control center based on a random function.
[0095] After receiving the identity resolution key sent by the Bluetooth Host, the sensor control center can start a timer Timer, which can periodically trigger the sensor control center to update the RPA.
[0096] Step S404: The timer periodically triggers the sensor control center to update the RPA.
[0097] Specifically, after the sensor control center starts the Timer, the Timer periodically triggers the sensor control center to update the RPA based on the identity resolution key. For example, the Timer can send a trigger instruction to the sensor control center every 6 minutes, and the sensor control center can update the RPA by the function Generate_RPA(IRK, Random) after receiving the trigger instruction.
[0098] Step S405: The Bluetooth Host sends an RPA request to the sensor control center.
[0099] Specifically, when there is an application in the AP chip that needs to use the RPA for Bluetooth business, the Bluetooth Host can send an RPA request to the sensor control center. The RPA request is used to instruct the sensor control center to send its latest updated RPA to the Bluetooth Host, so that the application deployed on the AP chip can use the RPA for Bluetooth business. After receiving the RPA request sent by the Bluetooth Host, the sensor control center sends the latest updated RPA to the Bluetooth Host, so that the application deployed in the AP chip can use the RPA for corresponding Bluetooth business. The sensor control center can send the RPA to the Bluetooth Host through a self-defined interface and communication protocol between the Bluetooth Host, for example, the sensor control center can send the updated RPA to the sensor control center through an Inter-Integrated Circuit (I2C) interface and related communication protocol, or can use other interfaces to send the updated RPA to the Bluetooth Host, and the specific communication mode between the sensor control center and the Bluetooth Host is not limited by the embodiments of the application. After receiving the RPA sent by the sensor control center, the Bluetooth Host calls the RPA by the application in the AP chip that needs to perform Bluetooth business (for example, Bluetooth pairing), and sends the RPA to the Bluetooth Controller, and uses the RPA address to perform business broadcast through the Bluetooth Controller, thereby completing the related Bluetooth business of the application.
[0100] For example, the Bluetooth Host can send the RPA to the Bluetooth Controller by calling a Host Controller Interface (HCI), or can call other interfaces to send the RPA to the Controller for broadcast, and the type of interface called by the Bluetooth Host to send the RPA to the Bluetooth Controller is not limited by the embodiments of the application.
[0101] Step S406: The sensor control center sends the latest updated RPA to the Bluetooth Host.
[0102] Step S407: The Bluetooth Host uses the RPA to perform business broadcast through the Bluetooth Controller.
[0103] Specifically, after receiving the RPA sent by the sensor control center, the application on the AP chip that has Bluetooth business needs calls the RPA, and then uses the RPA to perform business broadcast through the Bluetooth Controller, thereby realizing the Bluetooth business of the application.
[0104] In some embodiments, in the case that the application program on the AP chip needs to use the RPA for Bluetooth business and the Bluetooth Host does not perform the task of periodically updating the RPA, the Bluetooth Host can directly send an RPA request to the sensor control center, the RPA request including identification information of the application program that needs to use the RPA for Bluetooth business, the RPA request being used to instruct the sensor control center to send its latest updated RPA to the Bluetooth Controller, so that the application program that needs to perform Bluetooth business can use the RPA through the Bluetooth Controller to broadcast business and perform related Bluetooth business.
[0105] Optionally, in the case that the AP chip is in a sleep state, in the process of the sensor control center periodically updating the RPA based on the identity resolution key sent by the Bluetooth Host, the sensor control center can monitor the state of the AP chip, and when the sensor control center detects that there is an application program running, the sensor control center can send first indication information to the Bluetooth Host, the first indication information being used to instruct the Bluetooth Host to periodically update the RPA based on the IRK, and the sensor control center no longer performs the task of periodically updating the RPA, that is, the sensor control center returns the functions of generating and updating the RPA to the Bluetooth Host. In this way, when there is an application program that needs to use the RPA for Bluetooth business, the application program can directly call the RPA from the AP chip.
[0106] Optionally, in the case that there is no running application program in the AP chip, the electronic device can analyze the user's application use preference of the user in a historical time period (for example, in the last 3 months) based on user data, thereby predicting which applications the user uses in which time period, and thereby predicting which time periods the AP chip is likely to be in an active state. In the time period in which the AP chip is likely to be in an active state, the sensor control center can reissue the task of periodically updating the RPA to the Bluetooth Host.
[0107] For example, the electronic device can analyze, according to user data in the last 3 months, that the user will use the electronic device to play music in the time period from 15:00 to 16:00 every day, and the electronic device can predict that the music application is in a running state (the AP chip is not in a sleep state) in the time period from 15:00 to 16:00. Therefore, the sensor control center can reissue the task of periodically updating the RPA to the Bluetooth Host at 15:00. In this way, when there is an application program that needs to use the RPA for Bluetooth business, the application program can directly call the RPA from the AP chip.
[0108] In the embodiment of the present application, in the case that the electronic device starts the Bluetooth function, the AP chip sends the IRK generated by the Bluetooth Host to the sensor control center before the AP chip is in the sleep state, so that the sensor control center can generate the RPA based on the IRK sent by the Bluetooth Host and periodically update the RPA. Since the power consumption required by the sensor control center to update the RPA is far less than the power consumption required by the Bluetooth Host to update the RPA, the function of the Bluetooth Host to update the RPA is decentralized to the sensor control center, which can effectively avoid the problem that the AP chip is woken up due to the need to periodically update the RPA when the AP chip is in the sleep state, thereby increasing the power consumption of the AP chip and improving the working performance of the AP chip.
[0109] The above Figure 4 The embodiment introduces the specific process of the function of the Bluetooth Host to periodically update the RPA being decentralized to the sensor control center in the case that the electronic device starts the Bluetooth function. In some embodiments, the Bluetooth Host decentralizes the function of periodically updating the RPA to the Bluetooth Controller. The process will be described below in combination with Figure 5 The process will be described below in combination with Figure 5 , Figure 5 is a flowchart of another Bluetooth random address generation method provided by the embodiment of the present application. In the case that the electronic device starts the Bluetooth function, the AP chip sends the identity resolution key (IRK) generated by the Bluetooth Host to the Bluetooth Controller before the AP chip is in the sleep state. The Bluetooth Controller periodically updates the RPA based on the IRK sent by the Bluetooth Host in the AP chip during the sleep process of the AP chip. In the case that the AP chip is woken up and the AP chip needs to use the RPA for Bluetooth business, the Bluetooth Controller sends the latest updated RPA to the Bluetooth Host in the AP chip. The specific process is as follows:
[0110] Step S501: The Bluetooth Host generates an identity resolution key through an encryption algorithm.
[0111] Step S502: The Bluetooth Host sends the identity resolution key generated by the Bluetooth Host to the Bluetooth Controller.
[0112] Step S503: The Bluetooth Controller generates the RPA based on the identity resolution key.
[0113] Step S504: The timer periodically triggers the Bluetooth Controller to update the RPA.
[0114] Steps S501-S504 refer to steps S401-S404 in the above Figure 4 embodiment, which will not be described herein again.
[0115] Step S505: The Bluetooth Host sends an RPA request to the Bluetooth Controller.
[0116] Specifically, when there is an application in the AP chip that needs to use the RPA for Bluetooth service, the Bluetooth Host can send an RPA request to the Bluetooth Controller. The RPA request is used to instruct the sensor control center to send its latest updated RPA to the Bluetooth Host, so that the application deployed on the AP chip can use the RPA for Bluetooth service. After receiving the RPA request sent by the Bluetooth Host, the Bluetooth Controller sends the latest updated RPA to the Bluetooth Host, so that the application deployed in the AP chip can use the RPA for corresponding Bluetooth service. The Bluetooth Controller can send the RPA to the Bluetooth Host by calling the Host Controller Interface (HCI), or can call other interfaces to send the RPA to the Bluetooth Host. The type of interface called by the Bluetooth Controller to send the RPA to the Bluetooth Host is not limited in the embodiments of the present application. After the Bluetooth Host receives the RPA sent by the Bluetooth Controller, the application with Bluetooth service requirement calls the RPA and broadcasts the RPA through the Bluetooth Controller, thereby realizing Bluetooth service.
[0117] Step S506: The Bluetooth Controller sends the latest updated RPA to the Bluetooth Host.
[0118] Step S507: The Bluetooth Host uses the RPA for service broadcast through the Bluetooth Controller.
[0119] Specifically, after the Bluetooth Host receives the RPA sent by the Bluetooth Controller, the application on the AP chip with Bluetooth service requirement calls the RPA, and then broadcasts the RPA through the Bluetooth Controller, thereby realizing Bluetooth service of the application.
[0120] In some embodiments, when the application on the AP chip needs to use the RPA for Bluetooth service and the Bluetooth Host does not perform the periodic RPA updating task, the Bluetooth Host can directly send a Bluetooth service request instruction to the Controller. The Bluetooth service request instruction includes the identification information of the application that needs to use the RPA for Bluetooth service, and the Bluetooth service request instruction is used to instruct the Bluetooth Controller to broadcast the RPA, so that the application that needs to perform Bluetooth service can use the RPA for service broadcast through the Bluetooth Controller, and perform related Bluetooth service.
[0121] Optionally, in the process of periodically updating the RPA based on the identity resolution key sent by the Bluetooth Host, the Bluetooth Controller can monitor the state of the AP chip. When the Bluetooth Controller detects that the AP chip has recovered from the sleep state to the wake-up state, the Bluetooth Controller can send an RPA update request to the Bluetooth Host, which indicates that the Bluetooth Host performs the task of periodically updating the RPA. The Bluetooth Controller no longer performs the task of periodically updating the RPA, that is, the Bluetooth Controller returns the functions of generating and updating the RPA to the Bluetooth Host. In this way, when there is an application that needs to use the RPA for Bluetooth business, the application can directly call the RPA from the AP chip.
[0122] Optionally, the electronic device can analyze the user's application usage preferences in a period of time (for example, 3 months) based on user data, thereby predicting which applications the user uses in which time period, and predicting which time period the AP chip is likely to be active. In the time period when the AP chip is likely to be active, the Bluetooth Controller can reissue the task of periodically updating the RPA to the Bluetooth Host. For example, the electronic device can analyze, according to the user data in the last 3 months, that the user will use the electronic device to play music in the time period from 15:00 to 16:00 every day. The electronic device can predict that the music application is in a running state (the AP chip is not in a sleep state) in the time period from 15:00 to 16:00, and therefore the Bluetooth Controller can reissue the task of periodically updating the RPA to the Bluetooth Host at 15:00. In this way, when there is an application that needs to use the RPA for Bluetooth business, the application can directly call the RPA from the AP chip.
[0123] The above Figures 4-5 Embodiments introduce that before the AP chip enters the sleep mode, the Bluetooth Host transfers the function of periodically updating the RPA to the sensor control center or the Bluetooth Controller, so as to prevent the AP chip from being repeatedly woken up during the sleep process due to the periodic updating of the RPA by the Bluetooth Host, thereby greatly increasing the power consumption of the AP chip. In the case that the electronic device opens the Bluetooth function and the AP chip is in a working state, the AP chip can determine whether to transfer the function of periodically updating the RPA by the Bluetooth Host to the sensor control center / Bluetooth Controller according to the current power consumption. Next, combined with Figure 6The following is an example of periodically updating the RPA function under the Bluetooth Host to the sensor control center. Please refer to Figure 6 , Figure 6 is a flowchart of another Bluetooth random address generation method provided by an embodiment of the present application. In the flowchart of Figure 6 , the AP chip is in a working state, and the specific flow is as follows:
[0124] Step S601: The Bluetooth Host generates an identity resolution key through an encryption algorithm.
[0125] Specifically, for the specific implementation process of step S601, please refer to step S401, which will not be described here in detail.
[0126] Step S602: Determine whether the identity resolution key is to be sent to the sensor control center based on the current power consumption parameter of the electronic device.
[0127] Specifically, the current power consumption parameter of the electronic device can be the current power of the electronic device battery. When the current power of the battery is less than a first threshold value, the Bluetooth Host can push down the function of periodically updating the RPA to the sensor control center, that is, the Bluetooth Host sends the IRK to the sensor control center. The first threshold value can be obtained based on historical data, can be obtained based on experience value, and can be obtained based on experimental data, and the present application does not limit this.
[0128] For example, when the power of the electronic device is less than 10%, the Bluetooth Host can send the IRK generated by it to the sensor control center, and the sensor control center updates the RPA based on the IRK every 7 minutes. When there is an application program that needs to use the RPA to perform Bluetooth business, the sensor control center can send the latest updated RPA to the Bluetooth Host, so that the application program can perform Bluetooth business based on the RPA.
[0129] Since the power consumption required by the Bluetooth Host to periodically update the RPA is much greater than the power consumption required by the sensor control center to periodically update the RPA, therefore, in the case of insufficient power of the electronic device, the Bluetooth Host can reduce the overall power consumption of the electronic device and prolong the standby time of the electronic device by pushing down the RPA update function to the sensor control center.
[0130] In some embodiments, the power consumption parameter of the electronic device can be the number of high-power-consuming applications in the application currently running on the electronic device. The electronic device can analyze the power consumption of the application in a period of time (for example, in the last 3 months) based on user data / system data, and divide the application into high-power-consuming applications and non-high-power-consuming applications according to the power consumption of the application. When the number of high-power-consuming applications in the application currently running on the electronic device is greater than or equal to a second threshold value, the Bluetooth Host can send the IRK to the sensor control center.
[0131] For example, the standby times N of the electronic device in a historical period of time (for example, in the last 3 months) and the percentage of the power consumption of the application in each standby process can be counted. If there is an application whose percentage of power consumption in more than or equal to M standby processes is greater than a third threshold value (for example, 30%), the application is marked as a high-power-consuming application, otherwise, the application is marked as a non-high-power-consuming application. If the number of high-power-consuming applications currently running on the AP chip is greater than or equal to a second threshold value (for example, the second threshold value is 3), the Bluetooth Host sends the IRK to the sensor control center, so that the sensor control center can generate the RPA based on the IRK and periodically update the RPA.
[0132] Step S603: In the case of determining to send the identity resolution key to the sensor control center, the Bluetooth Host sends the identity resolution key to the sensor control center.
[0133] Step S604: The sensor control center generates the RPA based on the identity resolution key.
[0134] Step S605: The timer periodically triggers the sensor control center to update the RPA.
[0135] Step S606: The Bluetooth Host sends the RPA request to the sensor control center.
[0136] Step S607: The sensor control center sends the latest updated RPA to the Bluetooth Host.
[0137] Step S608: The Bluetooth Host uses the RPA for service broadcast through the Bluetooth Controller.
[0138] For specific processes of steps S603-S608, please refer to steps S402-S407, which will not be repeated here.
[0139] It should be understood that step S601 can be performed before step S602, or can be performed after step S602, as long as step S601 is performed before step S603, and the application embodiment does not limit the execution order of step S601 and step S602.
[0140] In some embodiments, in the case that the application program on the AP chip needs to use RPA for Bluetooth business and the Bluetooth Host does not perform the task of periodically updating RPA, the Bluetooth Host can directly send a Bluetooth business request instruction to the sensor control center, the Bluetooth business request instruction including the identification information of the application program that needs to use RPA for Bluetooth business, the Bluetooth business request instruction being used to instruct the sensor control center to send its latest updated RPA to the Bluetooth Controller, so that the application program that needs to perform Bluetooth business can use the RPA to perform business broadcast through the Bluetooth Controller, and perform related Bluetooth business.
[0141] Optionally, in the case that the AP chip is in the sleep state, in the process of periodically updating the RPA by the sensor control center based on the identity resolution key sent by the Bluetooth Host, the sensor control center can monitor the state of the AP chip, and when the sensor control center detects that the AP chip is restored from the sleep state to the wake-up state, the sensor control center can send second indication information to the Bluetooth Host, the second indication information being used to instruct the Bluetooth Host to perform the task of periodically updating the RPA, and the sensor control center no longer performs the task of periodically updating the RPA, that is, the sensor control center returns the functions of generating and updating the RPA to the Bluetooth Host. In this way, when there is an application program that needs to use RPA for Bluetooth business, the application program can directly call the RPA from the AP chip.
[0142] Optionally, in the case that the AP chip is in the sleep state, the electronic device can analyze the user's application use preference of the user in a period of time (for example, 3 months) based on the user data, thereby predicting which applications the user uses in which time period, and thereby predicting which time periods the AP chip is likely to be in the active state. In the time period in which the AP chip is likely to be in the active state, the sensor control center can reissue the task of periodically updating the RPA to the Bluetooth Host. For related details, please refer to Figure 4 The corresponding contents in the embodiments are not described here again.
[0143] In the embodiment of the present application, when the Bluetooth function is enabled and the AP chip is in the working state, the AP chip can determine whether the function of the Bluetooth Host updating the RPA regularly needs to be downgraded to the sensor control center / Bluetooth Controller according to the current power consumption. If the current power consumption of the AP chip is high, the function of the Bluetooth Host updating the RPA regularly is downgraded to the sensor control center, so as to reduce the power consumption of the AP chip, improve the working efficiency of the AP chip, and prolong the standby time of the electronic device.
[0144] In the above embodiments, all or part of the processes or functions can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the processes or functions can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk) and the like.
[0145] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be instructed by a computer program to complete the relevant hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium mentioned above includes ROM or random access memory (RAM), magnetic disk or optical disk and various media that can store program codes.
[0146] In summary, the above description is only an embodiment of the technical scheme of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a Bluetooth random address, characterized in that, The method is applied to an electronic device including a Bluetooth Host and a Bluetooth module, and comprises the following steps: The Bluetooth Host generates an identity resolution key; When the electronic device meets a first condition, the Bluetooth Host sends the identity resolution key to the Bluetooth module; the first condition is a condition triggering the electronic device to reduce power consumption; The Bluetooth module generates a resolvable private address (RPA) based on the identity resolution key (IRK) and periodically updates the RPA based on the IRK; When the Bluetooth Host is to perform Bluetooth service, the Bluetooth Host sends an RPA request to the Bluetooth module; The Bluetooth module sends the latest updated RPA to the Bluetooth Host; The Bluetooth Host performs Bluetooth service based on the latest updated RPA.
2. The method of claim 1, wherein, The Bluetooth module is a Bluetooth Controller or a sensor control center.
3. The method according to any one of claims 1 to 2, wherein, The first condition is: The electronic device currently has no running application program; Or, the current power of the electronic device is lower than a first threshold value; Or, among the application programs currently running on the electronic device, the number of high-power consumption application programs is greater than or equal to a second threshold value; Wherein, the high-power consumption application program is an application program that has more than or equal to M times of standby times in N times of standby times in a historical time period, and the power consumption ratio exceeds a third threshold value.
4. The method of claim 3, wherein, After the Bluetooth module generates a resolvable private address (RPA) based on the identity resolution key (IRK) and periodically updates the RPA based on the IRK, it further comprises: When the first condition is that the electronic device currently has no running application program, the electronic device is detected whether there is a running application program; If it is detected that the electronic device has a running application program, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate an RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key.
5. The method of claim 3, wherein, After the Bluetooth module generates a resolvable private address (RPA) based on the identity resolution key (IRK) and periodically updates the RPA based on the IRK, it further comprises: When the first condition is that the current power of the electronic device is lower than a first threshold value, the power of the electronic device is detected; If it is detected that the power of the electronic device is greater than or equal to the first threshold value, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate an RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key.
6. The method of claim 3, wherein, After the Bluetooth module generates a resolvable private address (RPA) based on the identity resolution key (IRK) and periodically updates the RPA based on the IRK, it further comprises: When the first condition is that, among the application programs currently running on the electronic device, the number of high-power consumption application programs is greater than or equal to a second threshold value, the number of high-power consumption application programs running on the electronic device is detected; If the number is detected to be less than the second threshold, the Bluetooth module sends second indication information to the Bluetooth Host; the second indication information is used to instruct the Bluetooth Host to generate an RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key.
7. An electronic device, comprising: Comprise: a memory, a first processor, a Bluetooth module and a touch screen; the first processor comprises a Bluetooth Host, wherein: the touch screen is used to display content; the memory is used to store a computer program, the computer program comprising program instructions; the first processor is used to call the program instructions to generate an identity resolution key; in the case that the electronic device meets a first condition, the Bluetooth Host sends the identity resolution key to the Bluetooth module; the Bluetooth module is used to generate a resolvable private address RPA based on the identity resolution key IRK and to periodically update the RPA based on the IRK; in the case that the Bluetooth Host is to perform Bluetooth service, the Bluetooth Host sends an RPA request to the Bluetooth module; the Bluetooth module sends the latest updated RPA to the Bluetooth Host; the Bluetooth Host performs Bluetooth service based on the latest updated RPA.
8. The electronic device of claim 7, wherein, After the Bluetooth module generates a resolvable private address RPA based on the identity resolution key IRK and periodically updates the RPA based on the IRK, it further comprises: when the first condition is that the electronic device currently has no running application program, it is detected whether the electronic device has a running application program; if it is detected that the electronic device has a running application program, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate an RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key.
9. The electronic device of claim 7, wherein, After the Bluetooth module generates a resolvable private address RPA based on the identity resolution key IRK and periodically updates the RPA based on the IRK, it further comprises: when the first condition is that the current power of the electronic device is less than a first threshold, it is detected whether the power of the electronic device is greater than or equal to the first threshold; if it is detected that the power of the electronic device is greater than or equal to the first threshold, the Bluetooth module sends first indication information to the Bluetooth Host; the first indication information is used to instruct the Bluetooth Host to generate an RPA based on the identity resolution key and to periodically update the RPA based on the identity resolution key.
10. The electronic device of claim 7, wherein, After the Bluetooth module generates a resolvable private address RPA based on the identity resolution key IRK and periodically updates the RPA based on the IRK, it further comprises: when the first condition is that the number of high-power application programs in the application programs currently running on the electronic device is greater than or equal to a second threshold, it is detected whether the number of high-power application programs running on the electronic device is greater than or equal to the second threshold; If the number is detected to be less than the second threshold, the Bluetooth module sends second indication information to the Bluetooth Host; the second indication information is used to instruct the Bluetooth Host to generate an RPA based on the identity resolution key and to update the RPA based on the identity resolution key.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-6.
12. A computer program product comprising instructions, characterized in that, When the computer program product runs on the electronic device, the electronic device is caused to execute the method in any one of claims 1-6.
Citation Information
Patent Citations
Bluetooth low energy hostless private address resolution
US20160099936A1
Establishing a bluetooth classic connection using an existing bluetooth low energy connection
US20160262193A1