Bluetooth equipment identification method and device, electronic equipment and computer storage medium

By obtaining the capability information of the Bluetooth device and determining whether it has the ability to report the battery power, the problem of poor recognition accuracy of vehicle-mounted Bluetooth devices in the prior art is solved, and more accurate recognition of Bluetooth devices is achieved.

CN119996979APending Publication Date: 2025-05-13GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510111738.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, vehicle-mounted Bluetooth devices do not define their own Bluetooth device type in accordance with standard specifications, resulting in poor accuracy of standard vehicle-mounted Bluetooth device identification schemes.

Method used

By obtaining the capability information of the Bluetooth device when establishing a Bluetooth connection with the Bluetooth device, and when the capability information indicates that the Bluetooth device does not have the ability to report the battery power, it is determined that the Bluetooth device is an on-board device.

Benefits of technology

Improve the accuracy of Bluetooth device recognition and can accurately screen out vehicle-mounted devices in Bluetooth devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996979A_ABST
    Figure CN119996979A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a Bluetooth equipment identification method, which comprises the following steps: under the condition that Bluetooth connection with Bluetooth equipment is established, obtaining the capability information of the Bluetooth equipment based on the Bluetooth connection, and under the condition that the capability information indicates that the Bluetooth equipment does not have the capability of reporting the electric quantity of a battery, determining that the Bluetooth equipment is vehicle-mounted equipment. The embodiment of the invention also provides a Bluetooth equipment identification device, electronic equipment and a computer storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a Bluetooth device identification technology, and more particularly to a Bluetooth device identification method, device, electronic device and computer storage medium. Background Art

[0002] At present, the in-vehicle Bluetooth device market has a large stock. Due to the fact that the Bluetooth protocol version used by in-vehicle Bluetooth devices is relatively old and there are non-standard protocols, the problem of poor compatibility between mobile phones and in-vehicle Bluetooth devices is quite prominent, which has introduced many abnormal problems of in-vehicle Bluetooth functions. Therefore, whether the mobile phone can accurately identify whether the connected Bluetooth device is a car device plays an important role in solving the compatibility problem of mobile phone Bluetooth.

[0003] Using the identification scheme in the related art, since many in-vehicle Bluetooth devices on the market do not define their own Bluetooth device types according to standard specifications, the standard in-vehicle Bluetooth device identification scheme has poor accuracy. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, electronic device and computer storage medium for identifying a Bluetooth device, which can improve the accuracy of identifying a Bluetooth device.

[0005] The technical solution of this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for identifying a Bluetooth device, comprising:

[0007] When establishing a Bluetooth connection with a Bluetooth device, acquiring capability information of the Bluetooth device based on the Bluetooth connection;

[0008] When the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

[0009] In a second aspect, an embodiment of the present application provides an identification device for a Bluetooth device, comprising:

[0010] An acquisition module, configured to acquire capability information of the Bluetooth device based on the Bluetooth connection when a Bluetooth connection is established with the Bluetooth device;

[0011] When the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a storage medium storing instructions executable by the processor; the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the Bluetooth device identification method described in one or more of the above embodiments is executed.

[0013] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processor executes the Bluetooth device identification method described in one or more of the above embodiments.

[0014] The embodiments of the present application provide a method, apparatus, electronic device and computer storage medium for identifying a Bluetooth device. When a Bluetooth connection is established with a Bluetooth device, capability information of the Bluetooth device is obtained based on the Bluetooth connection. When the capability information indicates that the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device. That is to say, in the embodiments of the present application, by obtaining capability information of a Bluetooth device that has been connected to the electronic device, when the capability information indicates that the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device. In this way, by using the above-mentioned acquisition of the capability information of the Bluetooth device to know whether the Bluetooth device has the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device when the Bluetooth device does not have the ability to report the battery power. This makes it possible to accurately screen out vehicle-mounted devices from among the Bluetooth devices, thereby improving the accuracy of identifying the Bluetooth device. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A schematic diagram of a flow chart of an optional method for identifying a Bluetooth device provided in an embodiment of the present application;

[0016] Figure 2 A flowchart of a method for identifying a Bluetooth device in the related art;

[0017] Figure 3 A flowchart of an example of an optional method for identifying a Bluetooth device provided in an embodiment of the present application;

[0018] Figure 4 A schematic diagram of the structure of an optional Bluetooth device identification device provided in an embodiment of the present application;

[0019] Figure 5 A schematic diagram of the structure of an optional electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0021] In the relevant technology, based on the standard Bluetooth device type identification scheme, each Bluetooth manufacturer needs to supplement the private identification scheme to improve the identification accuracy and coverage of Bluetooth vehicle-mounted devices. The general supplementary identification method can be vehicle-mounted identification through features such as Bluetooth device name matching, Bluetooth address segment matching, Bluetooth device profile capability matching and / or Bluetooth interconnection protocol support capabilities.

[0022] However, the above method has a technical problem of poor accuracy in identifying Bluetooth devices.

[0023] In view of the technical problem that the recognition of Bluetooth devices in the related art has poor accuracy, the embodiment of the present application provides a method for identifying a Bluetooth device. Figure 1 A flowchart of an optional method for identifying a Bluetooth device provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the identification method of the Bluetooth device may include:

[0024] S101: When a Bluetooth connection is established with a Bluetooth device, acquiring capability information of the Bluetooth device based on the Bluetooth connection;

[0025] In order to improve the accuracy of identifying Bluetooth devices, in an embodiment of the present application, when an electronic device establishes a Bluetooth connection with a Bluetooth device, capability information of the Bluetooth device is obtained based on the Bluetooth connection. Here, the electronic device establishes a Bluetooth connection with the Bluetooth device, which can be done manually or by the electronic device using an intelligent method. Here, the embodiment of the present application does not make any specific limitations on this.

[0026] When an electronic device establishes a Bluetooth connection with a Bluetooth device, based on the Bluetooth connection, the electronic device obtains capability information of the Bluetooth device. Here, the electronic device can obtain the capability information of the Bluetooth device by inquiry, and can also obtain the capability information of the Bluetooth device by active reporting by the Bluetooth device. Here, the embodiments of the present application do not make specific limitations on this.

[0027] Among them, the capability information of the above-mentioned Bluetooth device may include whether the Bluetooth device has profile capability, and may also include whether it has the ability to report battery power. Of course, it may also include other capability information. Here, the embodiment of the present application does not make specific limitations on this.

[0028] It should be noted that in addition to obtaining the capability information of the Bluetooth device based on the Bluetooth connection, the electronic device can also obtain the type of the Bluetooth device based on the above Bluetooth connection to determine whether the Bluetooth device is a vehicle-mounted device. Here, the embodiment of the present application does not make specific limitations on this.

[0029] S102: When the capability information indicates that the Bluetooth device does not have the capability to report the battery power, determine that the Bluetooth device is a vehicle-mounted device.

[0030] The capability information of the Bluetooth device may be acquired through the above S101. In S102, the electronic device may know the capability of the Bluetooth device based on the acquired capability information of the Bluetooth device, and determine whether the Bluetooth device is a vehicle-mounted device based on the acquired capability information of the Bluetooth device.

[0031] Among them, based on the capability information of the Bluetooth device, it is judged whether the capability information indicates that the Bluetooth device does not have the ability to report the battery power. If so, it is determined that the Bluetooth device is a vehicle-mounted device; if not, it is determined that the Bluetooth device is not a vehicle-mounted device.

[0032] That is to say, for a Bluetooth device that has the ability to report battery power, it can be determined that the Bluetooth device is not a vehicle-mounted device. For a Bluetooth device that does not have the ability to report battery power, it can be determined that the Bluetooth device is a vehicle-mounted device. In this way, by identifying Bluetooth devices based on whether they have the ability to report battery power, vehicle-mounted devices can be screened out, thereby improving the accuracy of identifying Bluetooth devices.

[0033] In order to determine whether the Bluetooth device is a vehicle-mounted device, in an optional embodiment, S102 may include:

[0034] Based on the Bluetooth connection, obtain the first type of the Bluetooth device;

[0035] When the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have a capability of reporting battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

[0036] It can be understood that when an electronic device establishes a Bluetooth connection with a Bluetooth device, the first type of the Bluetooth device is obtained based on the Bluetooth connection, wherein the first type here can be referred to as the main type of the Bluetooth device, which is the type with the highest priority among the types of Bluetooth devices. Here, when checking whether the first type of the Bluetooth device is an audio type, two results can be obtained, one is that the first type of the Bluetooth device is an audio type, and the other is that the first type of the Bluetooth device is not an audio type.

[0037] Here, if the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have the ability to report battery power, it can be determined that the Bluetooth device is a vehicle-mounted device. If the first type of the Bluetooth device is not an audio type, it can be determined that the Bluetooth device is not a vehicle-mounted device.

[0038] In this way, the first type of the Bluetooth device and whether the Bluetooth device has the ability to report the battery power are used together to determine whether the Bluetooth device is a vehicle-mounted device, thereby improving the accuracy of identifying the Bluetooth device.

[0039] Further, in order to determine whether the Bluetooth device is a vehicle-mounted device, in an optional embodiment, when the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have the ability to report the battery power, determining that the Bluetooth device is a vehicle-mounted device may include:

[0040] Based on the Bluetooth connection, obtaining a second type of the Bluetooth device;

[0041] When the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not an in-vehicle audio type, and the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is an in-vehicle device.

[0042] It can be understood that when an electronic device establishes a Bluetooth connection with a Bluetooth device, based on the connection, in addition to obtaining the first type of the Bluetooth device, it is also necessary to obtain the second type of the Bluetooth device, where the first type here can be called the primary type of the Bluetooth device, and the second type can be called the secondary type, where the priority of the first type is higher than the priority of the second type.

[0043] That is to say, the first type is the type with the highest priority among the types of Bluetooth devices, and the second type is a type with a lower priority than the first type. Here, the first type of Bluetooth device is the audio type, and it is necessary to further check whether the second type is the car audio type.

[0044] Here, two results can be obtained. The first is that the first type of the Bluetooth device is the audio type and the second type of the Bluetooth device is the vehicle audio type. In this case, the Bluetooth device can be directly determined to be a vehicle device. The second is that the first type of the Bluetooth device is the audio type and the second type of the Bluetooth device is not the vehicle audio type. The Bluetooth device can be further identified by combining whether the Bluetooth device has the ability to report the battery power.

[0045] Wherein, when the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be a vehicle device. When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the Bluetooth device has the ability to report the battery power, the Bluetooth device is determined not to be a vehicle device.

[0046] In this way, the first type of the Bluetooth device, the second type and whether the Bluetooth device has the ability to report the battery power can be used together to determine whether the Bluetooth device is a vehicle-mounted device, which can further improve the accuracy of Bluetooth device identification.

[0047] Furthermore, in order to determine whether the Bluetooth device is a vehicle-mounted device, in an optional embodiment, when the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not a vehicle-mounted audio type, and the capability information indicates that the Bluetooth device does not have the ability to report the battery power, determining that the Bluetooth device is a vehicle-mounted device may include:

[0048] When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has Bluetooth profile capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report battery power, the Bluetooth device is determined to be a vehicle-mounted device.

[0049] It can be understood that when an electronic device establishes a Bluetooth connection with a Bluetooth device, based on the connection, in addition to obtaining the first type of the Bluetooth device and the second type of the Bluetooth device, it is also necessary to obtain whether the Bluetooth device has Bluetooth profile capability.

[0050] Here, whether the Bluetooth device has the Bluetooth profile capability can be obtained by querying the Bluetooth device based on the above-mentioned Bluetooth connection, or by actively reporting the Bluetooth profile capability of the Bluetooth device. The embodiments of the present application do not make specific limitations on this.

[0051] Here, by obtaining whether the Bluetooth device has the Bluetooth profile capability, two results can be obtained. The first is that the first type of the Bluetooth device is the audio type, and the second type of the Bluetooth device is not the vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the Bluetooth profile capability. In this case, it can be directly determined that the Bluetooth device is not a vehicle device. The second is that the first type of the Bluetooth device is the audio type, and the second type of the Bluetooth device is not the vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has the Bluetooth profile capability. The Bluetooth device can be further identified in combination with whether the Bluetooth device has the ability to report the battery power.

[0052] Wherein, when the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle-mounted audio type, and the Bluetooth device has a Bluetooth profile capability, and the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device. When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle-mounted audio type, and the Bluetooth device has a Bluetooth profile capability, and the Bluetooth device has the ability to report the battery power, the Bluetooth device is determined not to be a vehicle-mounted device.

[0053] In this way, the first type of the Bluetooth device, the second type, whether the Bluetooth device has the Bluetooth profile capability and whether the Bluetooth device has the ability to report the battery power can be used together to determine whether the Bluetooth device is a vehicle-mounted device, which can further improve the accuracy of Bluetooth device identification.

[0054] Regarding the above-mentioned Bluetooth profile capabilities, in an optional embodiment, the Bluetooth profile capabilities may include one or more of the following: capabilities based on the Hands-Free Profile (HFP), capabilities based on the Advanced Audio Distribution Profile (A2DP), capabilities based on the Phone Book Access Profile (PBAP), and capabilities based on the Message Access Profile (MAP).

[0055] It can be understood that the above-mentioned HFP-based capabilities are used to realize the calling function between Bluetooth devices; the above-mentioned A2DP-based capabilities are used to realize high-quality audio transmission, including stereo music; the above-mentioned PBAP-based capabilities are used to access and share contact information via Bluetooth; the above-mentioned MAP-based capabilities are used to access and share SMS, MMS and other messages via Bluetooth.

[0056] The Bluetooth profile capability may include one or more of the HFP-based capability, A2DP-based capability, PBAP-based capability, and MAP-based capability. When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not an in-vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has one or more of the HFP-based capability, A2DP-based capability, PBAP-based capability, and MAP-based capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be an in-vehicle device.

[0057] In this way, one or more of the above-mentioned HFP-based capabilities, A2DP-based capabilities, PBAP-based capabilities, and MAP-based capabilities may be used as Bluetooth profile capabilities, which helps to further improve the accuracy of Bluetooth device identification.

[0058] In addition, based on the above four factors together to determine whether the Bluetooth device is a vehicle-mounted device, in an optional embodiment, when the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle-mounted audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has a Bluetooth profile capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report the battery power, determining that the Bluetooth device is a vehicle-mounted device may include:

[0059] When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has a Bluetooth profile capability, determining the device type to which the Bluetooth device belongs;

[0060] When the device type to which the Bluetooth device belongs is not a preset device type and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

[0061] It can be understood that when the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has Bluetooth profile capability, the electronic device can determine the device type to which the Bluetooth device belongs; here, the electronic device can directly obtain the device type of the Bluetooth device from the Bluetooth device side based on the Bluetooth connection, or the electronic device can obtain the name of the Bluetooth device and determine the device type to which the Bluetooth device belongs based on the name. The preset device types here can include television (Television, TV) devices, smart screen devices, and the like.

[0062] Here, it is possible to determine whether the device type to which the Bluetooth device belongs is a preset device type, for example, when the preset device type is a smart screen device, after judgment, if it is no, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report the battery power, it is determined that the Bluetooth device is a vehicle-mounted device. If it is yes, it can be directly determined that the Bluetooth device is not a vehicle-mounted device.

[0063] In this way, in addition to using the above four together to determine whether the Bluetooth device is a vehicle-mounted device, it is also possible to combine whether the device type of the Bluetooth device is a preset device type with the four together to determine whether the Bluetooth device is a vehicle-mounted device. In this way, the accuracy of Bluetooth device identification is greatly improved.

[0064] In order to obtain whether the Bluetooth device has the ability to report the battery power, in an optional embodiment, obtaining the capability information of the Bluetooth device based on the Bluetooth connection may include:

[0065] Sending an inquiry request to the Bluetooth device based on the Bluetooth connection;

[0066] A response message to the inquiry request is received;

[0067] According to the response message, the capability information of the Bluetooth device is determined.

[0068] It can be understood that based on the Bluetooth connection between the electronic device and the Bluetooth device, an inquiry request is sent to the Bluetooth device, wherein the inquiry request is used to inquire about the battery power of the Bluetooth device. In other words, an inquiry request for inquiring about the battery power of the Bluetooth device is sent to the Bluetooth device based on the Bluetooth connection.

[0069] The electronic device receives a response message from the inquiry request, and then determines the capability information of the Bluetooth device according to the response message. In this way, by actively inquiring the Bluetooth device to determine whether the Bluetooth device has the ability to report the battery power, the capability information of the Bluetooth device can be obtained, which helps to improve the accuracy of Bluetooth device identification.

[0070] In order to determine the capability information of the Bluetooth device after receiving the response message, in an optional embodiment, determining the capability information of the Bluetooth device according to the response message may include:

[0071] In the case where the response message indicates the battery level of the Bluetooth device, determining that the Bluetooth device has the capability to report the battery level;

[0072] When the response message indicates that the battery power of the Bluetooth device cannot be obtained, it is determined that the Bluetooth device has the capability of reporting the battery power.

[0073] It can be understood that after receiving the response message, the electronic device can know through the response message whether the Bluetooth device has the ability to report the battery power. Specifically, when the response message indicates the battery power of the Bluetooth device, that is, after the Bluetooth device receives the inquiry message, and the inquiry message includes the battery power of the Bluetooth device, then it is determined that the response message indicates the battery power of the Bluetooth device, and at this time it is determined that the Bluetooth device has the ability to report the battery power.

[0074] When the response message indicates that the battery power of the Bluetooth device cannot be obtained, that is, after the Bluetooth device receives the inquiry message, the inquiry message does not include the battery power of the Bluetooth device, then it is determined that the response message indicates that the battery power of the Bluetooth device cannot be obtained. At this time, it is determined that the Bluetooth device does not have the ability to report the battery power.

[0075] In this way, whether the Bluetooth device has the ability to report the battery power can be determined through the information indicated by the above response message, so as to obtain the capability information of the Bluetooth device, which is helpful to improve the accuracy of identifying the Bluetooth device.

[0076] In addition, in order to obtain whether the Bluetooth device has the ability to report the battery power, in an optional embodiment, obtaining the capability information of the Bluetooth device based on the Bluetooth connection may include:

[0077] When the battery power is received from the Bluetooth device based on the Bluetooth connection, it is determined that the Bluetooth device has the capability of reporting the battery power.

[0078] It can be understood that after an electronic device establishes a Bluetooth connection with a Bluetooth device, the Bluetooth device can actively report its own battery power to the electronic device, so that the electronic device receives the battery power from the Bluetooth device based on the Bluetooth connection. In this way, it can be determined that the Bluetooth device has the ability to report the battery power to obtain the capability information of the Bluetooth device.

[0079] In this way, determining the capability information of the Bluetooth device by actively reporting by the Bluetooth device helps to improve the accuracy of identifying the Bluetooth device.

[0080] The following example is used to describe the method for identifying a Bluetooth device described in one or more of the above embodiments.

[0081] Figure 2 FIG. 1 is a flow chart of a method for identifying a Bluetooth device in the related art. Figure 2 As shown, taking the electronic device as a mobile phone 21 and the Bluetooth device as a remote device 22 as an example, the mobile phone 21 establishes a Bluetooth connection with the remote device 22 .

[0082] The mobile phone 21 may use one or more of the following methods to identify whether the remote device 22 is a vehicle-mounted device:

[0083] Among them, the first method is: the mobile phone 21 obtains the Bluetooth type (BluetoothClass) of the remote device 22, and determines whether the BluetoothClass is a car audio type (AUDIO_VIDEO_CAR_AUDIO). If yes, it is determined that the remote device 22 is a car device.

[0084] The second method is: the mobile phone 21 obtains the device name of the remote device 22, and determines whether the device name is a preset field, for example, "AA", "BB" and other fields. If yes, it is determined that the remote device 22 is a vehicle-mounted device.

[0085] The third method is: the mobile phone 21 obtains the device name and profile capability of the remote device 22, determines whether the device name is a preset field, for example, "AA", "BB" and other fields, and determines whether the profile capability includes MAP-based capabilities and PBAP-based capabilities. If both are yes, it is determined that the remote device 22 is a vehicle-mounted device.

[0086] The fourth method is: the mobile phone 21 obtains the vehicle-machine interconnection protocol supported by the remote device 22, and determines whether the supported vehicle-machine interconnection protocol is a preset protocol. If yes, it is determined that the remote device 22 is a vehicle-mounted device.

[0087] However, the mobile phone 21 uses one or more of the above methods to identify the remote device 22, which has the following problems:

[0088] (1) Identification error. For example, a device such as headphones may be identified as a vehicle-mounted device.

[0089] Specifically, especially for audio devices that support name modification, recognition errors occur. For example, "CC's airpods" matches CC's car name, resulting in recognition errors.

[0090] (2) Incomplete coverage.

[0091] For example: when performing name matching, the vehicle name database cannot cover all vehicle Bluetooth devices, and some emerging brands or niche brand vehicles cannot be accurately identified; when matching Bluetooth address segments, new models do not update the address segments to the database in real time and cannot be accurately identified.

[0092] The implementation logic of this example is: in addition to the basic audio (Audio) support capability, the in-vehicle Bluetooth device has another significant feature, namely: supporting four profile capabilities based on HFP+A2DP+PBAP+MAP, and not supporting the reporting of Bluetooth device battery power.

[0093] Based on the above characteristics, the following in-vehicle Bluetooth device identification logic is developed.

[0094] Figure 3 A flowchart of an example of an optional method for identifying a Bluetooth device provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the method may include:

[0095] S301: The mobile phone establishes a Bluetooth connection with the remote device;

[0096] S302: The mobile phone determines whether the Major Class of the remote device is Audio. If yes, execute S307; if no, execute S308;

[0097] S303: The mobile phone determines whether the Minor Class of the remote device is Audio. If yes, execute S307; if no, execute S304;

[0098] Specifically, after the mobile phone is connected to the remote device, the Class of the remote device is obtained, including the Major Class (equivalent to the above-mentioned first type) and the Minor Class (equivalent to the above-mentioned second type).

[0099] If the Major Class of the remote device is not of the Audio type, it is determined that it is not a vehicle-mounted device. The Major Class of a vehicle-mounted device must be of the Audio type. Otherwise, if the Minor Class of the remote device is not of the Car Audio type, it means that the device has been correctly configured as a Class device, and it is determined to be a vehicle-mounted device. Otherwise, execute S304.

[0100] S304: The mobile phone determines whether the remote device supports the capabilities based on HFP / A2DP / PBAP / MAP at the same time. If yes, execute S305; if no, execute S308;

[0101] Among them, the mobile phone obtains the Profile capability of the remote device. If the capabilities based on HFP / A2DP / PBAP / MAP are not supported at the same time, it is determined that the remote device is not a vehicle-mounted device. The reason is that vehicle-mounted devices generally support media audio streaming (A2DP), telephone voice streaming (HFP), contact sharing and call record synchronization (PBAP) functions and information access (MAP) capabilities. Otherwise, execute S305.

[0102] S305: The mobile phone determines whether the device type of the remote device is a "smart screen" feature? If yes, execute S308; if no, execute S306;

[0103] Among them, some other types have similar features as above and need to be excluded, such as smart screen devices, etc. Then execute S306.

[0104] S306: The mobile phone determines whether the remote device has the ability to report the battery power. If yes, execute S308; if no, execute S307.

[0105] After HFP is connected, determine whether the source device has reported battery information. If so, determine that it is a vehicle-mounted device. The reason is that after the vehicle-mounted device is turned on, its power supply is not independent and cannot report its own battery information. Otherwise, it is determined that it is not a vehicle-mounted device. End.

[0106] This example can independently identify the vehicle solution, or it can be combined with the existing vehicle identification solution to improve the identification accuracy and coverage of the vehicle Bluetooth device. In this example, after the vehicle identification capability is improved, Bluetooth can provide this capability to other modules to support the intelligent matching of other modules in vehicle-related scenarios. For example, Near Field Communication (NFC) car key automatic matching, automatic opening of Bluetooth hotspot when approaching the vehicle and other smart scenarios.

[0107] This example uses the Bluetooth device profile support capability and battery power reporting capability to determine whether the device is a vehicle-mounted Bluetooth device. The judgment capability does not require a preset database (name + address segment), does not require long-term database maintenance, and is automatically updated according to the Bluetooth device capabilities.

[0108] It can be seen that this example identifies whether the device is an in-vehicle Bluetooth device based on the device Class type definition, profile support capability characteristics, and Bluetooth device battery power characteristics, thereby improving the Bluetooth compatibility experience. It does not need to rely on the in-vehicle identification database, thus avoiding in-vehicle identification errors caused by operations such as untimely database updates and users actively modifying device names, saving costs and improving in-vehicle identification accuracy.

[0109] An embodiment of the present application provides a method for identifying a Bluetooth device. When a Bluetooth connection is established with a Bluetooth device, capability information of the Bluetooth device is obtained based on the Bluetooth connection. When the capability information indicates that the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device. That is to say, in an embodiment of the present application, by obtaining capability information of a Bluetooth device that has been connected to the electronic device, when the capability information indicates that the Bluetooth device does not have the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device. In this way, by using the above-mentioned acquisition of the capability information of the Bluetooth device to know whether the Bluetooth device has the ability to report the battery power, the Bluetooth device is determined to be a vehicle-mounted device when the Bluetooth device does not have the ability to report the battery power. This makes it possible to accurately screen out vehicle-mounted devices from among the Bluetooth devices, thereby improving the accuracy of identifying the Bluetooth device.

[0110] Based on the same inventive concept as the above-mentioned embodiment, the embodiment of the present application provides an identification device for a Bluetooth device. Figure 4 A schematic diagram of the structure of an optional Bluetooth device identification device provided in an embodiment of the present application, such as Figure 4 As shown, the identification device of the Bluetooth device includes: an acquisition module 41 and a determination module 42; wherein,

[0111] An acquisition module 41 is used to acquire capability information of the Bluetooth device based on the Bluetooth connection when a Bluetooth connection is established with the Bluetooth device;

[0112] The determination module 42 is configured to determine that the Bluetooth device is a vehicle-mounted device when the capability information indicates that the Bluetooth device does not have the capability to report the battery power.

[0113] In an optional embodiment, the determination module 42 is specifically configured to:

[0114] Based on the Bluetooth connection, obtain the first type of the Bluetooth device;

[0115] When the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have a capability of reporting battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

[0116] In an optional embodiment, when the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have the capability to report the battery power, the determining module 42 determines that the Bluetooth device is a vehicle-mounted device, including:

[0117] Based on the Bluetooth connection, obtaining a second type of the Bluetooth device; wherein the priority of the first type is higher than the priority of the second type;

[0118] When the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not an in-vehicle audio type, and the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is an in-vehicle device.

[0119] In an optional embodiment, when the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not a vehicle audio type, and the capability information indicates that the Bluetooth device does not have the ability to report the battery power, the determination module 42 determines that the Bluetooth device is a vehicle-mounted device, including:

[0120] When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has Bluetooth profile capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report battery power, the Bluetooth device is determined to be a vehicle-mounted device.

[0121] In an optional embodiment, the Bluetooth profile capability includes one or more of the following:

[0122] HFP-based capabilities, A2DP-based capabilities, PBAP-based capabilities, MAP-based capabilities.

[0123] In an optional embodiment, when the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not a vehicle-mounted audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has a Bluetooth profile capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report the battery power, the determination module 42 determines that the Bluetooth device is a vehicle-mounted device, including:

[0124] When the first type of the Bluetooth device is an audio type, and the second type of the Bluetooth device is not a vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has a Bluetooth profile capability, determining the device type to which the Bluetooth device belongs;

[0125] When the device type to which the Bluetooth device belongs is not a preset device type and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

[0126] In an optional embodiment, the acquisition module 41 acquires the capability information of the Bluetooth device based on the Bluetooth connection, including:

[0127] Sending an inquiry request to the Bluetooth device based on the Bluetooth connection; wherein the inquiry request is used to inquire about the battery power of the Bluetooth device;

[0128] A response message to the inquiry request is received;

[0129] According to the response message, the capability information of the Bluetooth device is determined.

[0130] In an optional embodiment, the acquisition module 41 determines the capability information of the Bluetooth device according to the response message, including:

[0131] In the case where the response message indicates the battery level of the Bluetooth device, determining that the Bluetooth device has the capability to report the battery level;

[0132] When the response message indicates that the battery power of the Bluetooth device cannot be obtained, it is determined that the Bluetooth device has the capability of reporting the battery power.

[0133] In an optional embodiment, the acquisition module 41 acquires the capability information of the Bluetooth device based on the Bluetooth connection, including:

[0134] When the battery power is received from the Bluetooth device based on the Bluetooth connection, it is determined that the Bluetooth device has the capability of reporting the battery power.

[0135] In practical applications, the acquisition module 41 and the determination module 42 may be implemented by a processor located on an identification device of the Bluetooth device, specifically a CPU, a microprocessor (Microprocessor Unit, MPU), a digital signal processor (Digital Signal Processing, DSP) or a field programmable gate array (Field Programmable Gate Array, FPGA) and the like.

[0136] Figure 5 A schematic diagram of the structure of an optional electronic device provided in an embodiment of the present application, such as Figure 5 As shown, an embodiment of the present application provides an electronic device 500, including:

[0137] A processor 51 and a storage medium 52 storing instructions executable by the processor; the storage medium 52 relies on the processor 51 to perform operations through a communication bus 53, and when the instructions are executed by the processor, the Bluetooth device identification method executed by the processor side in one or more of the above embodiments is executed.

[0138] It should be noted that, in actual application, the various components in the computer device are coupled together via the communication bus 53. It is understandable that the communication bus 53 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 53 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as communication buses 53.

[0139] An embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the Bluetooth device identification method described in one or more of the above embodiments.

[0140] Among them, the computer-readable storage medium can be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories.

[0141] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0142] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0145] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A method for identifying a Bluetooth device, characterized in that: include: When establishing a Bluetooth connection with a Bluetooth device, acquiring capability information of the Bluetooth device based on the Bluetooth connection; When the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

2. The method according to claim 1, characterized in that: When the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power, determining that the Bluetooth device is a vehicle-mounted device includes: Based on the Bluetooth connection, obtaining a first type of the Bluetooth device; When the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have a capability of reporting battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

3. The method according to claim 2, characterized in that The method of determining that the Bluetooth device is a vehicle-mounted device when the first type of the Bluetooth device is an audio type and the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power includes: Based on the Bluetooth connection, acquiring a second type of the Bluetooth device; wherein the priority of the first type is higher than the priority of the second type; When the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not the vehicle audio type, and the capability information indicates that the Bluetooth device does not have the ability to report the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

4. The method according to claim 3, characterized in that: The method of determining that the Bluetooth device is a vehicle-mounted device when the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not the vehicle-mounted audio type, and the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power includes: When the first type of the Bluetooth device is the audio type, and the second type of the Bluetooth device is not the vehicle-mounted audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has Bluetooth profile capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the ability to report battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

5. The method according to claim 4, characterized in that The Bluetooth profile capability includes one or more of the following: HFP-based capabilities, A2DP-based capabilities, PBAP-based capabilities, MAP-based capabilities.

6. The method according to claim 4, characterized in that The method of determining that the Bluetooth device is a vehicle-mounted device when the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not the vehicle-mounted audio type, the capability information of the Bluetooth device indicates that the Bluetooth device has a Bluetooth profile capability, and the capability information of the Bluetooth device indicates that the Bluetooth device does not have a capability of reporting a battery power level includes: When the first type of the Bluetooth device is an audio type, the second type of the Bluetooth device is not the vehicle audio type, and the capability information of the Bluetooth device indicates that the Bluetooth device has a Bluetooth profile capability, determining the device type to which the Bluetooth device belongs; When the device type to which the Bluetooth device belongs is not a preset device type and the capability information of the Bluetooth device indicates that the Bluetooth device does not have the capability of reporting the battery power, it is determined that the Bluetooth device is a vehicle-mounted device.

7. The method according to any one of claims 1 to 6, characterized in that: The acquiring capability information of the Bluetooth device based on the Bluetooth connection includes: Sending an inquiry request to the Bluetooth device based on the Bluetooth connection; wherein the inquiry request is used to inquire about the battery power of the Bluetooth device; receiving a response message to the query request; According to the response message, capability information of the Bluetooth device is determined.

8. The method according to claim 7, characterized in that The determining, according to the response message, capability information of the Bluetooth device includes: In a case where the response message indicates the battery power of the Bluetooth device, determining that the Bluetooth device has a capability of reporting the battery power; In a case where the response message indicates that the battery power of the Bluetooth device cannot be obtained, it is determined that the Bluetooth device has a capability of reporting the battery power.

9. The method according to any one of claims 1 to 6, characterized in that: The acquiring capability information of the Bluetooth device based on the Bluetooth connection includes: In a case where the battery power is received from the Bluetooth device based on the Bluetooth connection, it is determined that the Bluetooth device has a capability of reporting the battery power.

10. A Bluetooth device identification device, characterized in that: include: An acquisition module, configured to acquire capability information of the Bluetooth device based on the Bluetooth connection when a Bluetooth connection is established with the Bluetooth device; The determination module is used to determine that the Bluetooth device is a vehicle-mounted device when the capability information indicates that the Bluetooth device does not have the capability of reporting the battery power.

11. An electronic device, characterized in that: include: A processor and a storage medium storing instructions executable by the processor; The storage medium relies on the processor to perform operations through the communication bus, and when the instructions are executed by the processor, the Bluetooth device identification method described in any one of claims 1 to 9 is executed.

12. A computer storage medium, characterized in that: Executable instructions are stored, and when the executable instructions are executed by one or more processors, the processors execute the Bluetooth device identification method described in any one of claims 1 to 9.