CN-122002251-A - Bluetooth data processing method and related equipment
Abstract
The embodiment of the application is applied to the field of communication, and provides a Bluetooth data processing method and related equipment, wherein the method is applied to first electronic equipment and comprises the following steps: receiving a Bluetooth data packet sent by the second electronic device through Bluetooth connection between the first electronic device and the second electronic device, wherein the Bluetooth data packet carries a target identifier and target data; thawing the target application program under the condition that the target application program indicated by the target identifier is in a frozen state; and processing the target data through the unfrozen target application program. Based on the technical method, the timeliness of processing the data packet sent by the second electronic equipment and received by the Bluetooth by the application program can be ensured, and meanwhile, the power consumption of the electronic equipment is reduced.
Inventors
- Cong Xiangyue
- HUANG LEI
- GU QIMENG
- HUANG WEN
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241106
Claims (14)
- 1. A bluetooth data processing method, applied to a first electronic device, the method comprising: Receiving a Bluetooth data packet sent by the second electronic device through Bluetooth connection between the first electronic device and the second electronic device, wherein the Bluetooth data packet carries a target identifier and target data; Thawing the target application program under the condition that the target application program represented by the target identifier is in a frozen state; And processing the target data through the unfrozen target application program.
- 2. The method of claim 1, wherein the target application is frozen after the target application has processed the target data, and wherein the bluetooth connection exists between the first electronic device and the second electronic device when the target application is frozen.
- 3. The method of claim 1 or 2, wherein the first electronic device comprises a bluetooth module and a freeze control module; The method further comprises the steps of: after receiving the Bluetooth data packet through the Bluetooth module, sending the target data to the target application program; Transmitting a target application program identifier to the freezing control module through the Bluetooth module, wherein the target application program identifier is used for identifying the target application program, and the target application program identifier is determined according to the target identifier; and determining whether the target application program is in a frozen state or not according to the target application program identifier through the freezing control module.
- 4. A method according to claim 3, wherein the target identity is a target eigenvalue identity, the method further comprising: and determining the target application program identifier as the application program identifier corresponding to the target identifier according to the first corresponding relation between the characteristic value identifier and the application program identifier through the Bluetooth module.
- 5. The method according to claim 4, wherein in the case where the bluetooth connection is established based on a bluetooth low energy protocol, in the first correspondence, an application indicated by any one of the feature value identifiers has subscribed to update information of a feature value corresponding to the any one of the feature value identifiers in a bluetooth module, and the target data is a target feature value corresponding to the target feature value identifier.
- 6. The method of claim 5, wherein the bluetooth module comprises at least one generic attribute specification service, at least one characteristic value identifier maintained by each generic attribute specification service, at least one characteristic value identifier maintained by a target generic attribute specification service in the at least one generic attribute specification service comprising the target characteristic value identifier; The determining, by the bluetooth module, the target application identifier as the application identifier corresponding to the target identifier according to the first correspondence between the feature value identifier and the application identifier, includes: And determining, by the target generic attribute specification service, that the target application identifier is an application identifier corresponding to the target identifier according to the first correspondence, where the first correspondence represents an application identifier corresponding to each feature value identifier in at least one feature value identifier maintained by the target generic attribute specification service.
- 7. The method according to claim 5 or 6, wherein said sending the target data to the target application after receiving the bluetooth packet through the bluetooth module comprises: Sending first update information to the target application program through the Bluetooth module, wherein the first update information comprises the target characteristic value; And repeating the operation of sending the first update information to the target application program under the condition that the response to the first update information sent by the target application program is not received through the Bluetooth module until the response to the first update information sent by the target application program is received, and ending the operation of sending the first update information.
- 8. The method according to any of claims 3-7, wherein the target application identification is a user identification, a process identification or a package name of the target application.
- 9. The method according to any one of claims 3-8, wherein the bluetooth module further comprises a dotting module, and wherein the sending the target data to the target application and the target application identifier to the freeze control module after the bluetooth data packet is received by the bluetooth module comprises sending the target application identifier to the freeze control module by the dotting module.
- 10. The method according to any one of claims 1-9, further comprising: And processing the target data through the target application program under the condition that the target application program is in an operating state.
- 11. An electronic device comprising a processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program from the memory, causing the electronic device to perform the method of any one of claims 1 to 9.
- 12. A chip comprising a processor and a data interface, the processor reading instructions stored on a memory via the data interface to implement the method of any one of claims 1 to 9.
- 13. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for implementing the method of any one of claims 1 to 9.
- 14. A computer program product, characterized in that the electronic device is adapted to perform the method of any of claims 1-9 when the computer program product is run on the electronic device.
Description
Bluetooth data processing method and related equipment Technical Field The present application relates to the field of communications technologies, and in particular, to a bluetooth data processing method and related devices. Background With the popularization of external devices such as wearable devices (e.g., smart watches, bracelets), bluetooth headsets, and the like, more and more people begin to use the external devices to make calls, monitor data such as sports and health, switch songs played by the mobile phones, and the like. Bluetooth connection is established between electronic equipment such as a mobile phone and external equipment so as to realize communication between the electronic equipment and the external equipment. One or more application programs can be arranged in the electronic device, and data sent by the external device through the Bluetooth connection can be processed under the condition that the one or more application programs are in an operation state. However, the application program in the electronic device occupies more resources when in an operating state for a long time, so that larger power consumption is generated, and the duration of the electronic device is reduced. Disclosure of Invention The application provides a Bluetooth data processing method and related equipment, which can reduce the power consumption of electronic equipment while ensuring the timeliness of an application program for processing a data packet sent by second electronic equipment received through Bluetooth. A Bluetooth data processing method is applied to first electronic equipment and comprises the steps of receiving a Bluetooth data packet sent by second electronic equipment through Bluetooth connection between the first electronic equipment and the second electronic equipment, enabling the Bluetooth data packet to carry a target identifier and target data, thawing a target application program represented by the target identifier under the condition that the target application program is in a frozen state, and processing the target data through the target application program after thawing. By the Bluetooth data processing method, the application program can be in the frozen state under the condition that Bluetooth connection exists between the first electronic equipment and the second electronic equipment, and the power consumption of the electronic equipment is reduced. And after the Bluetooth data packet is received through the Bluetooth connection, according to the target identifier in the Bluetooth data packet, the application program indicated by the target identifier is timely unfrozen, so that the timeliness of the application program in processing the target data in the Bluetooth data packet sent by the second electronic equipment received through Bluetooth is ensured. In some possible implementations, after the target application processes the target data, the target application is frozen, and the bluetooth connection exists between the first electronic device and the second electronic device when the target application is frozen. Under the condition that the electronic equipment and other electronic equipment are connected through Bluetooth, application programs in the electronic equipment can be frozen, and therefore power consumption of the electronic equipment is reduced. In some possible implementations, the first electronic device includes a bluetooth module and a freezing control module, and the method further includes sending, after receiving the bluetooth packet through the bluetooth module, the target data to the target application program, and sending, to the freezing control module, a target application program identifier, where the target application program identifier is used to identify the target application program, and the target application program identifier is determined according to the target identifier, and determining, by the freezing control module, whether the target application program is in a frozen state according to the target application program identifier. In the bluetooth technology, after receiving a bluetooth data packet, a bluetooth module sends target data to a target application program indicated by a target identifier according to the target identifier in the bluetooth data packet. After determining the target application program, the Bluetooth module adds a step of sending a target application program identifier for identifying the target application program to the freezing control module, so that the freezing control module timely unfreezes the target application program in a frozen state. That is, the freezing control module obtains the target application program identifier, and multiplexes the process of determining the target application program by the bluetooth module, so that the method has stronger adaptability to the bluetooth technology. It should be understood that the target application identifier may be a target identifier, or may be an