Discovery method and apparatus based on bluetooth device, and device, storage medium and product

By generating encrypted and signed identity signatures and broadcasting Bluetooth messages using a classic Bluetooth module, the problems of insufficient security and broadcast range in the Bluetooth device discovery process are solved, achieving higher security and information carrying capacity, and improving the performance of Bluetooth calls and instant messaging.

WO2026016957A1PCT designated stage Publication Date: 2026-01-22GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/107849
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-18
Filing Date
2025-07-10
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

In the current Bluetooth device discovery process, Bluetooth messages have low security, especially mobile phone numbers, which are easily reverse engineered, leading to user privacy leaks. In addition, BLE has a small effective broadcast range and limited information carrying capacity.

Method used

By determining the identity of the Bluetooth device, a first identity feature is generated and a second identity feature is generated using a salted string. This is then combined with a classic Bluetooth module to broadcast Bluetooth messages, which carry encrypted and signed data, thereby improving the security of the identity and the broadcast range.

Benefits of technology

It improves the security and broadcast range of the Bluetooth discovery process, enhances user privacy protection, increases information carrying capacity, and improves the performance of Bluetooth calls and instant messaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025107849_22012026_PF_FP_ABST
    Figure CN2025107849_22012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of Bluetooth communications. Provided are a discovery method and apparatus based on a Bluetooth device, and a device, a storage medium and a product. The method comprises: determining an identity identifier of a first Bluetooth device, wherein the identity identifier is used for identifying an identity of the first Bluetooth device when same communicates with a second Bluetooth device; on the basis of the identity identifier, determining a first identity characteristic word; on the basis of the first identity characteristic word and a salted character string, determining a second identity characteristic word; on the basis of the first identity characteristic word and the second identity characteristic word, generating a broadcast parameter of the first Bluetooth device; and broadcasting a Bluetooth message by means of a classic Bluetooth module, which is comprised in the first Bluetooth device, wherein the Bluetooth message carries the broadcast parameter, such that the second Bluetooth device performs a discovery service on the basis of the broadcast parameter. In the present application, a Bluetooth message is broadcast on the basis of a classic Bluetooth module, thereby increasing the distance for using the discovery method based on a Bluetooth device, and also increasing the volume of data carried by the Bluetooth message; moreover, the present application achieves better encryption security.
Need to check novelty before this filing date? Find Prior Art

Description

Bluetooth device-based discovery method, device, apparatus, storage medium and product

[0001] The present application claims priority from the Chinese patent application No. 202410973637.2 filed on July 18, 2024 and entitled "Bluetooth device-based discovery method, device, apparatus, storage medium and product", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of Bluetooth communication technology, and in particular to a Bluetooth device-based discovery method, device, apparatus, storage medium and product. BACKGROUND

[0003] With the development of Bluetooth communication technology, two Bluetooth devices can communicate through Bluetooth. Before communicating through Bluetooth, a discovery process needs to be performed between the two Bluetooth devices, that is, a first Bluetooth device needs to discover a second Bluetooth device, so as to establish a Bluetooth communication link with the second Bluetooth device, and communicate with the second Bluetooth device through the Bluetooth communication link. SUMMARY

[0004] The embodiments of the present application provide a Bluetooth device-based discovery method, device, apparatus, storage medium and product, which can improve the security of Bluetooth discovery based on broadcast parameters. The technical solution is as follows:

[0005] In one aspect, a Bluetooth device-based discovery method is provided, which includes:

[0006] determining an identity of a first Bluetooth device, the identity being used to identify the identity of the first Bluetooth device for communication with a second Bluetooth device;

[0007] determining a first identity feature word based on the identity;

[0008] determining a second identity feature word based on the first identity feature word and a salted string;

[0009] generating a broadcast parameter of the first Bluetooth device based on the first identity feature word and the second identity feature word;

[0010] broadcasting a Bluetooth packet by a classic Bluetooth module included in the first Bluetooth device, the Bluetooth packet carrying the broadcast parameter, so that the second Bluetooth device performs discovery service based on the broadcast parameter.

[0011] In another aspect, a Bluetooth device-based discovery method is provided, which includes:

[0012] receive, by a classic Bluetooth module included in the second Bluetooth device, a Bluetooth message of the first Bluetooth device;

[0013] analyze the Bluetooth message to obtain broadcast parameters of the first Bluetooth device, the broadcast parameters comprising a first identity feature word and a second identity feature word, the first identity feature word being determined by the first Bluetooth device based on an identity identifier, and the second identity feature word being determined by the first Bluetooth device based on the first identity feature word and a salted string;

[0014] discover the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device.

[0015] In another aspect, a Bluetooth device-based discovery apparatus is provided, the apparatus comprising:

[0016] a first determination module configured to determine an identity identifier of a first Bluetooth device, the identity identifier being used to identify an identity of the first Bluetooth device for communication with a second Bluetooth device;

[0017] a second determination module configured to determine a first identity feature word based on the identity identifier;

[0018] a third determination module configured to determine a second identity feature word based on the first identity feature word and a salted string;

[0019] a generation module configured to generate broadcast parameters of the first Bluetooth device based on the first identity feature word and the second identity feature word;

[0020] a broadcast module configured to broadcast, by a classic Bluetooth module included in the first Bluetooth device, a Bluetooth message carrying the broadcast parameters, so that a second Bluetooth device discovers a service based on the broadcast parameters.

[0021] In another aspect, a Bluetooth device-based discovery apparatus is provided, the apparatus comprising:

[0022] a receiving module configured to receive, by a classic Bluetooth module included in the second Bluetooth device, a Bluetooth message of the first Bluetooth device;

[0023] an analyzing module configured to analyze the Bluetooth message to obtain broadcast parameters of the first Bluetooth device, the broadcast parameters comprising a first identity feature word and a second identity feature word, the first identity feature word being determined by the first Bluetooth device based on an identity identifier, and the second identity feature word being determined by the first Bluetooth device based on the first identity feature word and a salted string;

[0024] a discovering module configured to discover the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device.

[0025] In another aspect, a Bluetooth device is provided, which includes a processor and a memory having at least one program code stored therein, the at least one program code being loaded and executed by the processor to implement the Bluetooth device-based discovery method as described above.

[0026] In another aspect, a computer-readable storage medium is provided, which has at least one program code stored therein, the at least one program code being loaded and executed by a processor to implement the Bluetooth device-based discovery method as described above.

[0027] In another aspect, a computer program product is provided, which has at least one program code stored therein, the at least one program code being used to be executed by a processor to implement the Bluetooth device-based discovery method as described above. BRIEF DESCRIPTION OF DRAWINGS

[0028] FIG. 1 shows a schematic diagram of an implementation environment of the Bluetooth device-based discovery method according to an example embodiment of the present application;

[0029] FIG. 2 shows a flowchart of the Bluetooth device-based discovery method according to an example embodiment of the present application;

[0030] FIG. 3 shows a flowchart of the Bluetooth device-based discovery method according to another example embodiment of the present application;

[0031] FIG. 4 shows a flowchart of the Bluetooth device-based discovery method according to another example embodiment of the present application;

[0032] FIG. 5 shows a flowchart of the Bluetooth device-based discovery method according to another example embodiment of the present application;

[0033] FIG. 6 shows a block diagram of a Bluetooth device-based discovery apparatus according to an example embodiment of the present application;

[0034] FIG. 7 shows a block diagram of a Bluetooth device-based discovery apparatus according to another example embodiment of the present application;

[0035] FIG. 8 shows a block diagram of a Bluetooth device according to an example embodiment of the present application. DETAILED DESCRIPTION

[0036] For the purpose of making the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0037] The "multiple" mentioned in the present document refers to two or more than two. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A existing alone, A and B existing together, and B existing alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.

[0038] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the identity and other characteristic words of the Bluetooth device involved in the present application are obtained under full authorization.

[0039] In the embodiments of the present application, the following technical solutions are provided:

[0040] A discovery method based on a Bluetooth device, wherein the method comprises:

[0041] Determine the identity of the first Bluetooth device, the identity is used to identify the identity of the first Bluetooth device and the second Bluetooth device for communication;

[0042] Based on the identity, determine the first identity characteristic word;

[0043] Based on the first identity characteristic word and the salted string, determine the second identity characteristic word;

[0044] Based on the first identity characteristic word and the second identity characteristic word, generate the broadcast parameter of the first Bluetooth device;

[0045] Broadcast a Bluetooth message through the classic Bluetooth module included in the first Bluetooth device, the Bluetooth message carries the broadcast parameter, so that the second Bluetooth device discovers the service based on the broadcast parameter.

[0046] In some embodiments, the broadcasting of the Bluetooth message through the classic Bluetooth module included in the first Bluetooth device comprises:

[0047] Encrypt the broadcast parameter to obtain ciphertext data of the broadcast parameter;

[0048] Sign the ciphertext data to obtain signature data;

[0049] Broadcast the Bluetooth message through the classic Bluetooth module included in the first Bluetooth device, the Bluetooth message carries the ciphertext data and the signature data.

[0050] In some embodiments, the generating the broadcast parameter of the first Bluetooth device based on the first identity signature and the second identity signature comprises:

[0051] composing the first identity signature and the second identity signature into an identity signature of the first Bluetooth device;

[0052] determining other signatures of the first Bluetooth device, the other signatures comprising at least one of a service signature of a current service, first name information of the first Bluetooth device, and communication permission information;

[0053] composing the identity signature and the other signatures into the broadcast parameter of the first Bluetooth device.

[0054] In some embodiments, the determining the second identity signature based on the first identity signature and a salted string comprises:

[0055] salt processing the first identity signature based on the salted string;

[0056] determining a hash value of the salt-processed first identity signature to obtain a first hash value;

[0057] extracting part of bytes in the first hash value to obtain the second identity signature.

[0058] In some embodiments, the determining the first identity signature based on the identity identifier comprises:

[0059] determining a hash value of the identity identifier to obtain a second hash value;

[0060] extracting part of bytes in the second hash value to obtain the first identity signature.

[0061] In some embodiments, the method further comprises:

[0062] receiving a call request sent by the second Bluetooth device, and performing Bluetooth call with the second Bluetooth device based on the call request, the call request being sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter; or,

[0063] receiving an instant messaging request sent by the second Bluetooth device, and performing instant messaging with the second Bluetooth device based on the instant messaging request, the instant messaging request being sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter.

[0064] A Bluetooth device discovery method, wherein the method comprises:

[0065] receiving, by a classic Bluetooth module included in the second Bluetooth device, a Bluetooth packet of the first Bluetooth device;

[0066] parsing the Bluetooth packet to obtain broadcast parameters of the first Bluetooth device, the broadcast parameters comprising a first identity feature word and a second identity feature word, the first identity feature word being determined by the first Bluetooth device based on an identity identifier, and the second identity feature word being determined by the first Bluetooth device based on the first identity feature word and a salted string;

[0067] discovering the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device.

[0068] In some embodiments, the broadcast parameters further comprise communication permission information.

[0069] The discovering the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device comprises:

[0070] In a case where the communication permission information of the first Bluetooth device is that a contact allows communication, performing identity matching on the first Bluetooth device based on a contact list of the second Bluetooth device and the first identity feature word and the second identity feature word, to obtain an identity matching result, the identity matching result being used to indicate whether an identity identifier of the first Bluetooth device is in the contact list of the second Bluetooth device.

[0071] In a case where the identity matching result indicates that the identity identifier of the first Bluetooth device is in the contact list of the second Bluetooth device, establishing a Bluetooth communication link between the first Bluetooth device and the second Bluetooth device.

[0072] In some embodiments, the performing identity matching on the first Bluetooth device based on the contact list of the second Bluetooth device and the first identity feature word and the second identity feature word to obtain an identity matching result comprises:

[0073] determining an identity list corresponding to the contact list of the second Bluetooth device, the identity list comprising first identity feature words corresponding to contacts included in the contact list;

[0074] In a case where there is a target identity feature word matching the first identity feature word of the first Bluetooth device in the identity list, determining a third identity feature word based on the target identity feature word and the salted string.

[0075] In a case where the second identity signature of the first Bluetooth device matches the third identity signature, the identity matching result is determined to indicate that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device.

[0076] In some embodiments, the Bluetooth message includes cipher data and signature data.

[0077] The parsing of the Bluetooth message to obtain the broadcast parameter of the first Bluetooth device includes:

[0078] The signature data is verified.

[0079] In a case where the signature data is verified, the cipher data is decrypted to obtain the broadcast parameter of the first Bluetooth device.

[0080] In some embodiments, the broadcast parameter further includes a service signature of a current service.

[0081] The method further includes:

[0082] In a case where the service signature is a signature corresponding to a call, a Bluetooth call is performed with the first Bluetooth device based on the Bluetooth communication link.

[0083] In a case where the service signature is a signature corresponding to instant messaging, instant messaging is performed with the first Bluetooth device based on the Bluetooth communication link.

[0084] In some embodiments, the broadcast parameter further includes first name information of the first Bluetooth device.

[0085] The method further includes:

[0086] In a case where the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, second name information is determined from the contact list of the second Bluetooth device, the second name information being name information of the second Bluetooth device set in the contact list of the second Bluetooth device, and the second name information is displayed in a current interface.

[0087] In a case where the identity matching result indicates that the identity of the first Bluetooth device is not in the contact list of the second Bluetooth device, the first name information is displayed in a current interface.

[0088] In the embodiment of the present application, the classic Bluetooth module of the first Bluetooth device broadcasts a Bluetooth message. On the one hand, since the classic Bluetooth module has a longer propagation distance and can carry more information, the classic Bluetooth module is used to broadcast the Bluetooth message, which can not only improve the use distance of the discovery method based on the Bluetooth device, but also improve the amount of data carried by the Bluetooth message. On the other hand, the first identity feature word is determined based on the identity identifier, and then the second identity feature word is determined based on the first identity feature word and the salted string, which is equivalent to encrypting the identity identifier twice, which can improve the security of the second identity feature word, thereby improving the security of the broadcast parameter generated based on the second identity feature word, and further improving the security of the Bluetooth discovery based on the broadcast parameter.

[0089] In the related art, the process in which the first Bluetooth device discovers the second Bluetooth device is as follows: the first Bluetooth device performs a hash operation on the mobile phone number of the first Bluetooth device, then intercepts 2 bytes of the hash value of the mobile phone number, and then broadcasts a Bluetooth message carrying the intercepted value of the hash value of the mobile phone number. The second Bluetooth device receives the Bluetooth message, determines whether it is a sender contact based on the intercepted value of the hash value of the mobile phone number of the first Bluetooth device, establishes a Bluetooth communication link with the first Bluetooth device in the case that it is a sender contact, and then the first Bluetooth device and the second Bluetooth device perform Bluetooth communication based on the Bluetooth communication link.

[0090] The Bluetooth message in the related art is usually broadcast by Bluetooth Low Energy (BLE), and the effective broadcast range of BLE is 10 meters and the information that can be carried is less. Moreover, the Bluetooth message carries the intercepted value of the hash value of the mobile phone number, and after an attacker captures the Bluetooth message, it is easy to obtain the mobile phone number of the first Bluetooth device based on the intercepted value of the hash value of the mobile phone number, thereby causing the leakage of the mobile phone number of the first Bluetooth device.

[0091] Please refer to FIG. 1, which shows a schematic diagram of an implementation environment of a discovery method based on a Bluetooth device according to an example embodiment of the present application. Referring to FIG. 1, the implementation environment includes a first Bluetooth device 101 and a second Bluetooth device 102. The first Bluetooth device 101 is a discovered device, and the second Bluetooth device 102 is a discovering device, that is, the first Bluetooth device 101 broadcasts a Bluetooth message to enable the second Bluetooth device 102 to discover the first Bluetooth device 101 based on the Bluetooth message, and then establish a Bluetooth communication link with the first Bluetooth device 101 to communicate with the second Bluetooth device 102 based on the Bluetooth communication link.

[0092] The first Bluetooth device 101 and the second Bluetooth device 102 each include a Bluetooth module. For ease of description, the Bluetooth module included in the first Bluetooth device 101 is referred to as a first Bluetooth module, and the Bluetooth module included in the second Bluetooth device 102 is referred to as a second Bluetooth module. That is, the first Bluetooth device 101 broadcasts a Bluetooth message through the first Bluetooth module, and the second Bluetooth device 102 receives the Bluetooth message through the second Bluetooth module. The first Bluetooth module and the second Bluetooth module can each be a Basic Rate / Enhanced Data Rate (BR / EDR) module. Since the broadcast distance of the BR / EDR module is relatively far, the effective broadcast range of the BR / EDR module is 30 meters, and the open limit distance is 150 meters. The effective broadcast range of Bluetooth Low Energy (BLE) is 10 meters. Therefore, the effective broadcast range of the BR / EDR module is much larger than the effective broadcast range of the BLE module, that is, the use distance can be increased by broadcasting the Bluetooth message through the BR / EDR module. In addition, the data amount of the classic Bluetooth module is larger, that is, the information carried by the Bluetooth message broadcast through the classic Bluetooth module is more.

[0093] The first Bluetooth device 101 can be any device having a classic Bluetooth module, for example, a mobile phone, a tablet computer, a vehicle-mounted terminal, a smart wearable device (such as a smart watch or a smart bracelet), and the like. The second Bluetooth device 102 can also be any device having a classic Bluetooth module, for example, a mobile phone, a tablet computer, a vehicle-mounted terminal, a smart wearable device (such as a smart watch or a smart bracelet), and the like.

[0094] Please refer to FIG. 2, which shows a flowchart of a Bluetooth device-based discovery method according to an example embodiment of the present application. The execution subject of the embodiment of the present application can be the first Bluetooth device. Referring to FIG. 2, the method includes the following steps.

[0095] Step 201: Determine the identity of the first Bluetooth device. The identity is used to identify the identity of the first Bluetooth device in communication with the second Bluetooth device.

[0096] Before performing this step, the first Bluetooth device first turns on the classic Bluetooth module and turns on Bluetooth visibility, so that other Bluetooth devices can discover the first Bluetooth device based on the Bluetooth visibility of the first Bluetooth device. In this step, the first Bluetooth device determines the identity of the first Bluetooth device. The identity can be set based on the current service; for example, if the current service is a call service, the identity can be a mobile phone number; for another example, if the current service is instant messaging, the identity can be a mobile phone number or a number set in an instant messaging application.

[0097] Step 202: determining the first identity feature word based on the identity identifier.

[0098] The first Bluetooth device determines a hash value of the identity identifier, obtains a second hash value, and intercepts part of bytes of the second hash value to obtain the first identity feature word. The hash algorithm for determining the hash value of the identity identifier by the first Bluetooth device can be a 256-bit secure hash algorithm (SHA256) algorithm, and the first identity feature word MD1 = SHA256(NUM), wherein NUM represents the identity identifier (for example, a mobile phone number). In addition, in the case where the identity identifier is a mobile phone number, the mobile phone number is usually in binary data format. Therefore, before determining the hash value of the identity identifier, the first Bluetooth device standardizes the mobile phone number to form a mobile phone number in a raw standard format, and then determines the hash value of the mobile phone number in the raw standard format. The raw standard format refers to a decimal format.

[0099] In some embodiments, the number of bytes of the second hash value that are intercepted can be set and changed as needed, and the number of bytes is not specifically limited in the embodiments of the present application. For example, the number of bytes is 2, that is, the first identity feature word is obtained by intercepting 2 bytes of the second hash value. In addition, the interception position of the 2 bytes can also be set and changed as needed, and the interception position is not specifically limited in the embodiments of the present application. For example, the last 2 bytes or the first 2 bytes of the second hash value can be intercepted, and the last 2 bytes of the second hash value are taken as an example for description in the embodiments of the present application.

[0100] Step 203: determining the second identity feature word based on the first identity feature word and the salted string.

[0101] The first identity feature word is subjected to salt processing based on the salted string, a hash value of the first identity feature word after the salt processing is determined to obtain a first hash value, and part of bytes in the first hash value is intercepted to obtain the second identity feature word. The hash algorithm for determining the hash value of the first identity feature word after the salt processing by the first Bluetooth device can be an SHA256 algorithm, and the second identity feature word MD2 = SHA256(MD1 + SALT), wherein SALT represents the salted string, and MD1 represents the first identity feature word. In the embodiments of the present application, the salted string is 8 bytes, and the salted string can be a string randomly generated by the first Bluetooth device, so that the randomness of the salted string is increased, and the security of the second identity feature word determined based on the salted string is improved.

[0102] In some embodiments, the number of bytes of the first hash value to be intercepted can be set and changed as needed, and in the embodiments of the present application, the number of bytes is not specifically limited; for example, the number of bytes is 2, that is, the second identity feature word is obtained by intercepting 2 bytes of the first hash value. Moreover, the interception position of 2 bytes can also be set and changed as needed, and in the embodiments of the present application, the interception position is not specifically limited; for example, the last 2 bytes or the first 2 bytes of the first hash value can be intercepted, and in the embodiments of the present application, the last 2 bytes of the first hash value are taken as an example for description.

[0103] Step 204: generating the broadcast parameter of the first Bluetooth device based on the first identity feature word and the second identity feature word.

[0104] The first identity feature word and the second identity feature word form the identity feature word (MD=MD1+MD2) of the first Bluetooth device; other feature words of the first Bluetooth device are determined, and the other feature words include at least one of the service feature word of the current service, the first name information of the first Bluetooth device, and the communication permission information; the identity feature word and the other feature words form the broadcast parameter of the first Bluetooth device.

[0105] The service feature word of the current service is used to represent the service type of the current service; for example, the service feature word of the current service can be a feature word corresponding to a call or a feature word corresponding to instant messaging. The first name information of the first Bluetooth device can be the nickname of the first Bluetooth device, and the nickname of the first Bluetooth device can be set by a user using the first Bluetooth device. The communication permission information is that a contact allows communication or anyone allows communication. For ease of description, the Bluetooth device receiving the broadcast parameter is referred to as a second Bluetooth device, and the contact allowing communication means that the first Bluetooth device is allowed to communicate with the second Bluetooth device in the case that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device. The anyone allowing communication means that the second Bluetooth device is allowed to communicate with the first Bluetooth device as long as the second Bluetooth device receives the broadcast parameter.

[0106] In the embodiments of the present application, since the first identity feature word is a 2-byte feature word (2 bytes of the second hash value), and the second identity feature word is a 2-byte feature word (2 bytes of the first hash value); therefore, the identity feature word formed by the first identity feature word and the second identity feature word is a 4-byte feature word, that is, the identity of the first Bluetooth device is identified by double hashing, so that the second Bluetooth device can compare and verify whether the first Bluetooth device is a contact of the second Bluetooth device based on the 4-byte feature word, greatly improving the comparison accuracy and avoiding the situation of contact matching failure.

[0107] Step 205: broadcasting, by the classic Bluetooth module included in the first Bluetooth device, a Bluetooth message, the Bluetooth message carrying a broadcast parameter, so that the second Bluetooth device discovers a service based on the broadcast parameter.

[0108] The broadcast parameter is encrypted to obtain ciphertext data of the broadcast parameter; the ciphertext data is signed to obtain signature data; and the classic Bluetooth module included in the first Bluetooth device broadcasts a Bluetooth message, the Bluetooth message carrying the ciphertext data and the signature data. In the embodiment of the application, since the broadcast parameter (obtained based on the identity) is encrypted and signed, the identity of the first Bluetooth device exists in the form of ciphertext in the broadcast, and an attacker cannot reverse the identity of the first Bluetooth device, thereby ensuring user privacy.

[0109] The step of broadcasting, by the classic Bluetooth module included in the first Bluetooth device, a Bluetooth message can be: sending, to the classic Bluetooth module included in the first Bluetooth device, a Bluetooth message, so that the classic Bluetooth module broadcasts the Bluetooth message, so that the second Bluetooth device, after receiving the Bluetooth message, analyzes the Bluetooth message to obtain the broadcast parameter, and then discovers a service based on the broadcast parameter. Since the broadcast distance of the classic Bluetooth module is far, and the effective broadcast range of the classic Bluetooth module is 30 meters and the open limit distance is 150 meters, which is much larger than the 10-meter range of BLE, the use distance can be improved by broadcasting the Bluetooth message through the classic Bluetooth module. Moreover, the classic Bluetooth module has a larger data volume, that is, the classic Bluetooth module broadcasts the Bluetooth message carrying more information.

[0110] After the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter, the second Bluetooth device communicates with the first Bluetooth device, which includes Bluetooth calling and instant messaging. In the case of Bluetooth calling, the process can be: the first Bluetooth device receives a calling request sent by the second Bluetooth device, and performs Bluetooth calling with the second Bluetooth device based on the calling request. The calling request is sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter. In the embodiment of the application, since the classic Bluetooth module has a longer propagation distance and can carry more information, broadcasting the Bluetooth message based on the classic Bluetooth module not only improves the use distance of the discovery method based on the Bluetooth device, but also improves the data volume carried by the Bluetooth message, thereby improving the performance of Bluetooth calling based on the classic Bluetooth module.

[0111] In the case of instant communication, the process can be: receiving an instant communication request sent by the second Bluetooth device, and performing instant communication with the second Bluetooth device based on the instant communication request. The instant communication request is sent by the second Bluetooth device to the first Bluetooth device after discovering the first Bluetooth device based on the broadcast parameter. In the embodiments of the present application, since the classic Bluetooth module has a longer propagation distance and can carry more information, the classic Bluetooth module can be used to broadcast Bluetooth messages, which can not only improve the use distance of the Bluetooth device discovery method, but also improve the data amount carried by the Bluetooth message, thereby improving the performance of instant communication based on the classic Bluetooth module.

[0112] In the embodiments of the present application, the classic Bluetooth module of the first Bluetooth device broadcasts a Bluetooth message. On the one hand, since the classic Bluetooth module has a longer propagation distance and can carry more information, the classic Bluetooth module can be used to broadcast Bluetooth messages, which can not only improve the use distance of the Bluetooth device discovery method, but also improve the data amount carried by the Bluetooth message. On the other hand, the first identity feature word is determined based on the identity identifier, and the second identity feature word is determined based on the first identity feature word and the salted string. This is equivalent to encrypting the identity identifier twice, which can improve the security of the second identity feature word, thereby improving the security of the broadcast parameter generated based on the second identity feature word, and further improving the security of the Bluetooth discovery based on the broadcast parameter.

[0113] Please refer to FIG. 3, which shows a flowchart of a Bluetooth device discovery method according to an example embodiment of the present application. The execution subject of the embodiments of the present application can be a second Bluetooth device. Referring to FIG. 3, the method includes:

[0114] Step 301: receiving a Bluetooth message of a first Bluetooth device by a classic Bluetooth module included in the second Bluetooth device.

[0115] The second Bluetooth device displays a Bluetooth search interface, searches for a Bluetooth device based on the Bluetooth search interface, receives a Bluetooth message of the first Bluetooth device by a classic Bluetooth module included in the second Bluetooth device after searching for the first Bluetooth device, and then performs step 302.

[0116] Step 302: analyzing the Bluetooth message to obtain a broadcast parameter of the first Bluetooth device, the broadcast parameter including a first identity feature word and a second identity feature word, the first identity feature word being determined by the first Bluetooth device based on an identity identifier, and the second identity feature word being determined by the first Bluetooth device based on the first identity feature word and a salted string.

[0117] The broadcast parameter can further include other feature words, and the other feature words include at least one of a service feature word of a current service, first name information of the first Bluetooth device, and communication permission information. The service feature word of the current service can be a feature word corresponding to a call or a feature word corresponding to instant messaging. The first name information of the first Bluetooth device can be a nickname of the first Bluetooth device, and the nickname of the first Bluetooth device can be set by a user using the first Bluetooth device. The communication permission information indicates that a contact is allowed to communicate or anyone is allowed to communicate.

[0118] Since the first Bluetooth device broadcasts the Bluetooth message after encrypting and signing the broadcast parameter, that is, the Bluetooth message carries ciphertext data and signature data, accordingly, the step of analyzing the Bluetooth message to obtain the broadcast parameter of the first Bluetooth device can be: verifying the signature of the signature data; in the case that the signature verification of the signature data is passed, decrypting the ciphertext data to obtain the broadcast parameter of the first Bluetooth device; in the case that the signature verification of the signature data is not passed, it is indicated that the Bluetooth message is tampered in the broadcasting process, and the Bluetooth message is discarded.

[0119] In the embodiment of the application, the first Bluetooth device broadcasts a Bluetooth message, and the second Bluetooth device performs Bluetooth discovery; and the Bluetooth message broadcasted by the first Bluetooth device carries a hash value of an identity identifier, and the hash value of the identity identifier is encrypted and signed, so that the second Bluetooth device verifies and decrypts the identity identifier, completes contact-based device matching, and provides a preliminary trusted basis for the next step of the user to dial a Bluetooth call.

[0120] Step 303: discovering the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device.

[0121] The second Bluetooth device establishes a Bluetooth communication link with the first Bluetooth device based on the first identity feature word and the second identity feature word, and subsequently communicates with the first Bluetooth device based on the Bluetooth communication link.

[0122] In the embodiment of the application, since the first identity feature word is determined based on the identity identifier, and the second identity feature word is determined based on the first identity feature word and the salted string, which is equivalent to twice encryption of the identity identifier, the security of the second identity feature word can be improved, and the security of the broadcast parameter generated based on the second identity feature word can be improved, and the security of the Bluetooth discovery based on the broadcast parameter can be improved.

[0123] Please refer to FIG. 4, which shows a flowchart of a Bluetooth device-based discovery method according to an example embodiment of the application. Referring to FIG. 4, the method includes:

[0124] Step 401: The first Bluetooth device determines an identity of the first Bluetooth device, the identity being used to identify the identity of the first Bluetooth device in communication with the second Bluetooth device.

[0125] In some embodiments, the present step is the same as step 201, which will not be repeated here. For example, refer to FIG. 5, the first Bluetooth device turns on the classic Bluetooth module and turns on the Bluetooth visibility.

[0126] Step 402: The first Bluetooth device determines a first identity feature word based on the identity.

[0127] In some embodiments, the present step is the same as step 202, which will not be repeated here.

[0128] Step 403: The first Bluetooth device determines a second identity feature word based on the first identity feature word and the salted string.

[0129] In some embodiments, the present step is the same as step 203, which will not be repeated here.

[0130] Step 404: The first Bluetooth device combines the first identity feature word and the second identity feature word to form an identity feature word of the first Bluetooth device.

[0131] In the embodiments of the present application, since the first identity feature word is a 2-byte feature word (2 bytes of the second hash value) and the second identity feature word is a 2-byte feature word (2 bytes of the first hash value), the identity feature word formed by combining the first identity feature word and the second identity feature word is a 4-byte feature word, that is, the identity of the first Bluetooth device is identified by double hashing, so that the second Bluetooth device can verify whether the first Bluetooth device is a contact of the second Bluetooth device based on comparison of the 4-byte feature word, which greatly improves the comparison accuracy and avoids the situation of contact matching failure.

[0132] Step 405: The first Bluetooth device determines other feature words of the first Bluetooth device, and combines the identity feature word and the other feature words to form a broadcast parameter of the first Bluetooth device.

[0133] The other feature word includes at least one of a service feature word of a current service, first name information of the first Bluetooth device, and communication permission information. The service feature word of the current service can be a feature word corresponding to a call or a feature word corresponding to instant messaging. The first name information of the first Bluetooth device can be a nickname of the first Bluetooth device, and the nickname of the first Bluetooth device can be set by a user using the first Bluetooth device. The communication permission information is that a contact allows communication or anyone allows communication. For the convenience of description, the Bluetooth device receiving the broadcast parameter is referred to as a second Bluetooth device, and the contact allowing communication means that the second Bluetooth device is allowed to communicate with the first Bluetooth device in the case that an identity of the first Bluetooth device is in a contact list of the second Bluetooth device. The anyone allowing communication means that the second Bluetooth device is allowed to communicate with the first Bluetooth device as long as the second Bluetooth device receives the broadcast parameter. For example, please continue to refer to FIG. 5, the first Bluetooth device constructs the broadcast parameter, and the broadcast parameter includes the identity feature word, the first name information, the service feature word, and the communication permission information.

[0134] Step 406: The first Bluetooth device encrypts the broadcast parameter to obtain ciphertext data of the broadcast parameter.

[0135] The broadcast parameter is encrypted to obtain ciphertext data of the broadcast parameter; the ciphertext data is signed to obtain signature data; and a Bluetooth message is broadcasted, and the Bluetooth message carries the ciphertext data and the signature data. Each Bluetooth device is written with a secret key when it is manufactured; in this step, the first Bluetooth device encrypts the broadcast parameter based on the written secret key to obtain the ciphertext data of the broadcast parameter. In the embodiment of the present application, since the broadcast parameter (obtained based on the identity) is encrypted and signed, the identity of the first Bluetooth device exists in the broadcast in ciphertext, and an attacker cannot reversely obtain the identity of the first Bluetooth device, thereby ensuring user privacy.

[0136] Step 407: The first Bluetooth device signs the ciphertext data to obtain signature data, and a Bluetooth message is broadcasted by a classic Bluetooth module included in the first Bluetooth device, and the Bluetooth message carries the ciphertext data and the signature data.

[0137] The first Bluetooth device sends a Bluetooth message to a classic Bluetooth module included in the first Bluetooth device, so that the classic Bluetooth module broadcasts the Bluetooth message, and the Bluetooth message carries the ciphertext data and the signature data.

[0138] For example, please continue to refer to FIG. 5, the first Bluetooth device encrypts the broadcast parameter to obtain ciphertext data, signs the ciphertext data to obtain signature data, and then constructs a Bluetooth message based on the ciphertext data and the signature data, and then broadcasts the Bluetooth message through BR / EDR.

[0139] Since the broadcast distance of the classic Bluetooth module is far, and the effective broadcast range of the classic Bluetooth module is 30 meters, and the open limit distance is 150 meters, which is much larger than the 10-meter range of BLE, therefore, the broadcast of the Bluetooth message through the classic Bluetooth module can improve the use distance. Moreover, the data volume of the classic Bluetooth module is larger, that is, the information carried by the Bluetooth message broadcast through the classic Bluetooth module is more.

[0140] The total length of the Bluetooth message is 68 bytes, and the Bluetooth message carries not only the ciphertext data and the signature data, but also the protocol header information and the security check information, as shown in Table 1 below. The protocol header information includes the protocol name, the protocol version number and the load type. The protocol name occupies 1 byte, and the protocol name is AF. The protocol version number occupies 1 byte, and the protocol version number is expressed as 0bVV101RX, wherein VV represents the version number of the OAF broadcast protocol = 00, 1101 represents that the broadcast is a service broadcast at this time, R represents a reserved field, X represents an extension header, and X defaults to 0. The load type occupies 1 byte, and the load type is expressed as 0b0000_0111, which represents a network-free communication service. The form of the ciphertext data and the signature data in the Bluetooth message includes the service characteristic UUID, Len, the service content, flag & sale and the identity characteristic word. The service characteristic UUID occupies 1 byte, and the service characteristic UUID is expressed as 0b0000_0002, which represents the service characteristic related to the network-free communication. Len occupies 1 byte, and Len is expressed as 0x??, which represents the service field length. The service field length depends on the number of cards inserted into the first Bluetooth device (a mobile phone). The number of mobile phone cards can be 0, 1 or 2. The service content occupies 1 byte, and the service content is expressed as 0b0000_0002, which represents the network-free communication service. flag & sale occupies 1 byte, and flag & sale is expressed as [0:1], wherein 0b00 represents 0 phone cards, 0b01 represents 1 phone card, 0b10 represents 2 phone cards, [2] represents the communication permission information, the communication permission information is 0, which means that anyone is allowed to communicate, the communication permission information is 1, which means that the contact person is allowed to communicate, and [3:7] represents the salted string. The second hash value h1 = sha (identity 1, which can be the phone number 1 at this time), and the first hash value s1 = sha (salt | h1). When the first Bluetooth device includes two phone cards, the third hash value = sha (identity 2, which can be the phone number 2 at this time), and the fourth hash value s2 = sha (salt | h2). The identity characteristic word of the first mobile phone card occupies 4 bytes, and the identity characteristic word is expressed as MD1 [-2:] | MD2 [-2:]. The identity characteristic word of the second mobile phone card occupies 4 bytes, and the identity characteristic word is expressed as MD1 [-2:] | MD2 [-2:].

[0141] The security check information includes a service security feature UUID, a timestamp, an initialization vector, and a signature. The service security feature UUID occupies 1 byte, and the service security feature UUID is represented as 0b0000_0001. The timestamp occupies 4 bytes. The timestamp is carried in the Bluetooth message to prevent replay. A Bluetooth message is valid if the system time of a receiving party is within 15 minutes of the timestamp in the broadcast, and otherwise the Bluetooth message is considered invalid by the receiving party. The initialization vector occupies 16 bytes. The initialization vector is used by a sending party to encrypt broadcast parameters, and the initialization vector is also used by a receiving party to decrypt ciphertext data. The signature occupies 32 bytes. The signature is used by the sending party to sign the ciphertext data, and the signature is also used by the receiving party to verify the signature data.

[0142] Table 1

[0143] Step 408: The second Bluetooth device receives the Bluetooth message through a classic Bluetooth module included in the second Bluetooth device, and verifies the signature data.

[0144] The Bluetooth message carries the signature. In this step, the second Bluetooth device verifies the signature data based on the signature carried in the Bluetooth message, to verify whether the signature data is tampered with in the broadcast process. If the verification of the signature data is passed, it is determined that the signature data is not tampered with in the broadcast process, and step 409 is performed. If the verification of the signature data is not passed, it is determined that the signature data is tampered with in the broadcast process, and the Bluetooth message is discarded.

[0145] Step 409: In the case where the verification of the signature data is passed, the second Bluetooth device decrypts the ciphertext data to obtain the broadcast parameters of the first Bluetooth device. The broadcast parameters include a first identity feature word, a second identity feature word, and communication permission information.

[0146] Each Bluetooth device is written with a secret key when it is manufactured. In this step, the second Bluetooth device decrypts the ciphertext data based on the written secret key to obtain the broadcast parameters of the first Bluetooth device. The broadcast parameters include a first identity feature word, a second identity feature word, and communication permission information. The communication permission information is contact allowed communication or anyone allowed communication. In the case where the communication permission information is contact allowed communication, step 410 is performed. In the case where the communication permission information is anyone allowed communication, a Bluetooth communication link is established between the second Bluetooth device and the first Bluetooth device, and communication is performed with the first Bluetooth device based on the Bluetooth communication link.

[0147] Step 410: In the case that the communication permission information of the first Bluetooth device is contact permission communication, the second Bluetooth device performs identity matching on the first Bluetooth device based on the contact list of the second Bluetooth device and the first identity feature word and the second identity feature word, to obtain an identity matching result.

[0148] The identity matching result is used to indicate whether the identity of the first Bluetooth device is in the contact list of the second Bluetooth device. This step can be implemented through the following steps (1) to (4), comprising:

[0149] (1) The second Bluetooth device determines an identity list corresponding to the contact list of the second Bluetooth device, and the identity list includes the first identity feature word corresponding to the contact included in the contact list.

[0150] Since the first Bluetooth device uses a two-time hashing method when determining the identity feature word, the first identity identification is subjected to a hash operation to obtain a second hash value, and the first identity feature word is obtained by intercepting 2 bytes of the second hash value. However, since the collision space of the first identity feature word is large, the second Bluetooth device can combine the contacts included in the contact list to reduce the collision space. Moreover, since the algorithm of the hash operation is fixed, the second Bluetooth device can calculate the first identity feature word corresponding to each contact in advance, and when receiving the Bluetooth message, it is not necessary to calculate the first identity feature word corresponding to each contact, but only a comparison is needed, thereby improving the performance of contact matching. Accordingly, before this step, the second Bluetooth device determines the first identity feature word corresponding to the contact included in the contact list of the second Bluetooth device, and then stores the first identity feature word corresponding to the contact included in the contact list in the identity list, and then stores the identity list locally. In this step, the second Bluetooth device obtains the stored identity list.

[0151] In some embodiments, the step of the second Bluetooth device determining the first identity feature word corresponding to the contact included in the contact list of the second Bluetooth device can be: the second Bluetooth device forms a mobile phone number of the contact included in the contact list into a mobile phone number of an original standard format after standardization, and then determines a hash value of the mobile phone number of the original standard format, and obtains the first identity feature word corresponding to the contact by intercepting the last 2 bytes of the obtained hash value. Moreover, the mobile phone number of the contact and the first identity feature word corresponding to the contact are saved one by one in the identity list. Moreover, in the case that there is a target identity feature word matching the first identity feature word of the first Bluetooth device in the identity list, step (2) is performed to perform the next matching calculation.

[0152] (2) In the case that there is a target identity feature word matching the first identity feature word of the first Bluetooth device in the identity list, the second Bluetooth device determines a third identity feature word based on the target identity feature word and the salted string.

[0153] The salted string is carried in the Bluetooth message; therefore, the second Bluetooth device performs salted processing on the target identity feature word based on the salted string, determines a hash value of the target identity feature word after salted processing, and obtains a third identity feature word by intercepting part of the obtained hash value. For example, the second Bluetooth device intercepts the last 2 bytes of the obtained hash value to obtain the third identity feature word.

[0154] The second Bluetooth device determines whether the second identity feature word and the third identity feature word match; in the case where the second identity feature word and the third identity feature word match, step (3) is performed; in the case where the second identity feature word and the third identity feature word do not match, the Bluetooth message is discarded.

[0155] (3) In the case where the second identity feature word and the third identity feature word of the first Bluetooth device match, the second Bluetooth device determines that the identity matching result indicates that the identity identifier of the first Bluetooth device is in the contact list of the second Bluetooth device.

[0156] For example, the contact list of the second Bluetooth device includes n contacts, and n is an integer greater than 0; the second Bluetooth device performs hash operation on the n contacts included in the contact list to generate hash values with a length of 32 bytes, and the last 2 bytes are intercepted to obtain MD 1, MD 2,…… MD n Then, MD 1, MD 2,…… MD n are compared with the first identity feature word MD1 respectively to determine whether MD 1, MD 2,…… MD n match MD1; for example, MD n matches MD1, it is determined that MD n2 = SHA256(MD n +SALT), SALT represents the salted string, and it is determined whether MD n2 matches the second identity feature word MD2; in the case where MD n2 matches MD2, it is determined that the identity matching result indicates that the identity identifier of the first Bluetooth device is in the contact list of the second Bluetooth device.

[0157] (4) In the case where the second identity feature word and the third identity feature word of the first Bluetooth device do not match, the second Bluetooth device determines that the identity matching result indicates that the identity identifier of the first Bluetooth device is not in the contact list of the second Bluetooth device.

[0158] Step 411: In a case where the identity matching result is used to indicate that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, a Bluetooth communication link is established between the second Bluetooth device and the first Bluetooth device.

[0159] Step 412: The broadcast parameter further includes first name information of the first Bluetooth device; and the second Bluetooth device displays the name information of the first Bluetooth device in the current interface based on the identity matching result.

[0160] In a case where the identity matching result is used to indicate that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, the second name information is determined from the contact list of the second Bluetooth device, the second name information being the name information of the second Bluetooth device set in the contact list of the second Bluetooth device, the second name information is displayed in the current interface; and the first Bluetooth device is displayed as a contact on the current interface to indicate that the first Bluetooth device is a trusted device. In a case where the identity matching result is used to indicate that the identity of the first Bluetooth device is not in the contact list of the second Bluetooth device, the first name information is displayed in the current interface; and the first Bluetooth device is displayed as a stranger on the current interface to indicate that the first Bluetooth device is an untrusted device.

[0161] In some embodiments, in a case where the communication permission information of the first Bluetooth device is contact permission communication, and the identity matching result is used to indicate that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, the step of determining the second name information from the contact list of the second Bluetooth device is performed; in a case where the communication permission information of the first Bluetooth device is contact permission communication, and the identity matching result is used to indicate that the identity of the first Bluetooth device is not in the contact list of the second Bluetooth device, the second Bluetooth device can not display the first name information of the first Bluetooth device.

[0162] In a case where the communication permission information of the first Bluetooth device is anyone permission communication, and the identity matching result is used to indicate that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, the step of determining the second name information from the contact list of the second Bluetooth device is performed; in a case where the communication permission information of the first Bluetooth device is contact permission communication, and the identity matching result is used to indicate that the identity of the first Bluetooth device is not in the contact list of the second Bluetooth device, the first name information is displayed in the current interface.

[0163] Step 413: The broadcast parameter further includes a service characteristic word of a current service, and the second Bluetooth device communicates with the first Bluetooth device based on the service characteristic word and the Bluetooth communication link.

[0164] In a case where the service characteristic word is a characteristic word corresponding to a call, the second Bluetooth device performs a Bluetooth call with the first Bluetooth device based on the Bluetooth communication link; in a case where the service characteristic word is a characteristic word corresponding to instant messaging, the second Bluetooth device performs instant messaging with the first Bluetooth device based on the Bluetooth communication link. In some embodiments, the step of the second Bluetooth device performing a Bluetooth call with the first Bluetooth device based on the Bluetooth communication link can be that the second Bluetooth device sends a call request to the first Bluetooth device based on the Bluetooth communication link; the first Bluetooth device receives the call request sent by the second Bluetooth device based on the Bluetooth communication link, and performs a Bluetooth call with the second Bluetooth device based on the call request. In some embodiments, the step of the second Bluetooth device performing instant messaging with the first Bluetooth device based on the Bluetooth communication link can be that the second Bluetooth device sends an instant messaging request to the first Bluetooth device based on the Bluetooth communication link; the first Bluetooth device receives the instant messaging request sent by the second Bluetooth device based on the Bluetooth communication link, and performs instant messaging with the second Bluetooth device based on the instant messaging request.

[0165] For example, please continue to refer to FIG. 5, the second Bluetooth device parses the Bluetooth message to obtain signature data and ciphertext data, verifies the signature of the signature data, in a case where the verification of the signature data is passed, decrypts the ciphertext data to obtain broadcast parameters, the broadcast parameters including identity characteristic words (the first identity characteristic word and the second identity characteristic word), the first name information, the service characteristic word and the communication permission information; in a case where the communication permission information is contact allowed communication, matching is performed based on the first identity characteristic word, the second identity characteristic value and the contact list of the second Bluetooth device; if the matching is a contact, the second name information and the identity identification (the phone number) are displayed; if the matching is a stranger, the stranger is displayed, and the first name information is displayed; in a case where the service characteristic word is a characteristic word corresponding to a call, the second Bluetooth device dials a Bluetooth phone to the first Bluetooth device.

[0166] In the embodiments of the present application, the first identity characteristic word is determined based on the identity identification, and then the second identity characteristic word is determined based on the first identity characteristic word and the salted string, which is equivalent to twice encryption of the identity identification, and can improve the security of the second identity characteristic word, thereby improving the security of the broadcast parameters generated based on the second identity characteristic word, and further improving the security of the Bluetooth discovery based on the broadcast parameters.

[0167] FIG. 6 shows a Bluetooth device-based discovery apparatus according to an example embodiment of the present application, which includes:

[0168] The first determination module 601 is configured to determine an identity identification of the first Bluetooth device, the identity identification being used to identify the identity of the first Bluetooth device in communication with the second Bluetooth device;

[0169] The second determining module 602 is configured to determine the first identity feature word based on the identity identifier.

[0170] The third determining module 603 is configured to determine the second identity feature word based on the first identity feature word and the salted string.

[0171] The generating module 604 is configured to generate the broadcast parameter of the first Bluetooth device based on the first identity feature word and the second identity feature word.

[0172] The broadcasting module 605 is configured to broadcast, by the classic Bluetooth module included in the first Bluetooth device, a Bluetooth packet carrying the broadcast parameter, so that the second Bluetooth device discovers the service based on the broadcast parameter.

[0173] In some embodiments, the broadcasting module 605 is configured to encrypt the broadcast parameter to obtain ciphertext data of the broadcast parameter; sign the ciphertext data to obtain signature data; and broadcast, by the classic Bluetooth module included in the first Bluetooth device, a Bluetooth packet carrying the ciphertext data and the signature data.

[0174] In some embodiments, the broadcasting module 605 is configured to send the Bluetooth packet to the classic Bluetooth module included in the first Bluetooth device, so that the classic Bluetooth module broadcasts the Bluetooth packet.

[0175] In some embodiments, the generating module 604 is configured to compose the first identity feature word and the second identity feature word into the identity feature word of the first Bluetooth device; determine other feature words of the first Bluetooth device, the other feature words including at least one of a service feature word of a current service, first name information of the first Bluetooth device, and communication permission information; and compose the identity feature word and the other feature words into the broadcast parameter of the first Bluetooth device.

[0176] In some embodiments, the third determining module 603 is configured to perform salt processing on the first identity feature word based on the salted string; determine a hash value of the first identity feature word after the salt processing to obtain a first hash value; and intercept part of bytes in the first hash value to obtain the second identity feature word.

[0177] In some embodiments, the second determining module 602 is configured to determine a hash value of the identity identifier to obtain a second hash value; and intercept part of bytes in the second hash value to obtain the first identity feature word.

[0178] In some embodiments, the apparatus further includes:

[0179] The first communication module is configured to receive a call request sent by the second Bluetooth device, and perform Bluetooth call with the second Bluetooth device based on the call request, the call request being sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter; or

[0180] The first communication module is configured to receive an instant messaging request sent by the second Bluetooth device, and perform instant messaging with the second Bluetooth device based on the instant messaging request. The instant messaging request is sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter.

[0181] In the embodiments of the present application, the classic Bluetooth module of the first Bluetooth device broadcasts a Bluetooth message. On the one hand, since the classic Bluetooth module has a longer propagation distance and can carry more information, the use distance of the discovery method based on the Bluetooth device can be improved, and the amount of data carried by the Bluetooth message can be improved based on the classic Bluetooth module broadcasting the Bluetooth message. On the other hand, the first identity feature word is determined based on the identity identifier, and then the second identity feature word is determined based on the first identity feature word and the salted string. This is equivalent to encrypting the identity identifier twice, which can improve the security of the second identity feature word, thereby improving the security of the broadcast parameter generated based on the second identity feature word, and further improving the security of the Bluetooth discovery based on the broadcast parameter.

[0182] It should be noted that the discovery device based on the Bluetooth device provided in the above embodiments is only used as an example to illustrate the division of the above functional modules during the discovery based on the Bluetooth device. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the first Bluetooth device is divided into different functional modules to complete all or part of the functions described above. In addition, the discovery device based on the Bluetooth device provided in the above embodiments and the discovery method based on the Bluetooth device belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.

[0183] Please refer to FIG. 7, which shows a discovery device based on the Bluetooth device according to an example embodiment of the present application. The device includes:

[0184] The receiving module 701 is configured to receive a Bluetooth message of the first Bluetooth device through a classic Bluetooth module included in the second Bluetooth device.

[0185] The analysis module 702 is configured to analyze the Bluetooth message to obtain a broadcast parameter of the first Bluetooth device. The broadcast parameter includes a first identity feature word and a second identity feature word. The first identity feature word is determined by the first Bluetooth device based on an identity identifier. The second identity feature word is determined by the first Bluetooth device based on the first identity feature word and a salted string.

[0186] The discovery module 703 is configured to discover the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device.

[0187] In some embodiments, the broadcast parameter further includes communication permission information.

[0188] The discovery module 703 is configured to perform identity matching on the first Bluetooth device based on the contact list of the second Bluetooth device and the first identity feature word and the second identity feature word in a case where the communication permission information of the first Bluetooth device is contact permission communication, to obtain an identity matching result, the identity matching result being used to indicate whether the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, and to establish a Bluetooth communication link with the first Bluetooth device in a case where the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device.

[0189] In some embodiments, the discovery module 703 is configured to determine an identity list corresponding to the contact list of the second Bluetooth device, the identity list including a first identity feature word corresponding to a contact included in the contact list, to determine a third identity feature word based on the target identity feature word and the salted string in a case where the target identity feature word matching the first identity feature word of the first Bluetooth device exists in the identity list, and to determine that the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device in a case where the second identity feature word of the first Bluetooth device matches the third identity feature word.

[0190] In some embodiments, the Bluetooth message includes ciphertext data and signature data.

[0191] The analysis module 702 is configured to perform signature verification on the signature data, and to perform decryption on the ciphertext data to obtain the broadcast parameter of the first Bluetooth device in a case where the signature verification on the signature data is passed.

[0192] In some embodiments, the broadcast parameter further includes a service feature word of a current service.

[0193] The apparatus further includes:

[0194] The second communication module is configured to perform Bluetooth calling with the first Bluetooth device based on the Bluetooth communication link in a case where the service feature word is a feature word corresponding to calling, and to perform instant messaging with the first Bluetooth device based on the Bluetooth communication link in a case where the service feature word is a feature word corresponding to instant messaging.

[0195] In some embodiments, the broadcast parameter further includes first name information of the first Bluetooth device.

[0196] The apparatus further includes:

[0197] The display module is configured to: in a case where the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, determining second name information from the contact list of the second Bluetooth device, the second name information being name information of the second Bluetooth device set in the contact list of the second Bluetooth device, and displaying the second name information in the current interface; and in a case where the identity matching result indicates that the identity of the first Bluetooth device is not in the contact list of the second Bluetooth device, displaying the first name information in the current interface.

[0198] In the embodiments of the present application, since the first identity feature word is determined based on the identity identifier, and the second identity feature word is determined based on the first identity feature word and the salted string, which is equivalent to twice encryption of the identity identifier, the security of the second identity feature word can be improved, and thus the security of the broadcast parameter generated based on the second identity feature word can be improved, and the security of the Bluetooth discovery based on the broadcast parameter is further improved.

[0199] It should be noted that the Bluetooth device-based discovery apparatus provided in the above embodiments is only used as an example for the division of the above functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the second Bluetooth device is divided into different functional modules to complete all or part of the above-described functions. In addition, the Bluetooth device-based discovery apparatus and the Bluetooth device-based discovery method provided in the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be described here.

[0200] Please refer to FIG. 8, which shows a block diagram of a Bluetooth device 800 according to an example embodiment of the present application. The Bluetooth device 800 can be the first Bluetooth device or the second Bluetooth device. The Bluetooth device 800 in the present application can include one or more of the following components: a classic Bluetooth module 810, a processor 820, a memory 830, and a display screen 840.

[0201] The classic Bluetooth module 810 is configured to broadcast Bluetooth messages. The processor 820 can include one or more processing cores. The processor 820 connects various parts within the Bluetooth device 800 through various interfaces and lines, performs various functions of the Bluetooth device 800 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 830, and calling data stored in the memory 830. Alternatively, the processor 820 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 820 can be integrated with a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), and a modem. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs; the GPU is used to render and draw the content to be displayed by the display screen 840; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 820, but be implemented by a separate computer program product.

[0202] The memory 830 can include a random access memory (RAM) and can also include a read-only memory (ROM). Alternatively, the memory 830 includes a non-transitory computer-readable storage medium. The memory 830 can be configured to store instructions, programs, codes, code sets or instruction sets. The memory 830 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, etc.; and the data storage area can store data (such as audio data, a phone book) created according to the use of the Bluetooth device 800, etc.

[0203] The display screen 840 is a display component for displaying a user interface. Optionally, the display screen 840 is a display screen with a touch function, through which a user can perform a touch operation on the display screen 840 using a finger, a stylus or any other suitable object.

[0204] The display screen 840 is usually arranged on the front panel of the Bluetooth device 800. The display screen 840 can be designed as a full-screen, a curved screen, a special-shaped screen, a double-sided screen or a folding screen. The display screen 840 can also be designed as a combination of a full-screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., and the present embodiment does not limit this.

[0205] In addition, those skilled in the art can understand that the structure of the Bluetooth device 800 shown in the above-mentioned drawings does not constitute a limitation on the Bluetooth device 800, and the Bluetooth device 800 can include more or fewer components than those shown in the drawings, or combine certain components, or different component arrangements. For example, the Bluetooth device 800 also includes audio acquisition devices, speakers, radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WiFi) modules, power supplies and other components, which are not described here.

[0206] The embodiments of the present application also provide a computer readable medium, which stores at least one program code, the at least one program code is loaded and executed by a processor to implement the Bluetooth device-based discovery method shown in the above various embodiments.

[0207] The embodiments of the present application also provide a computer program product, which stores at least one program code, the at least one program code is loaded and executed by a processor to implement the Bluetooth device-based discovery method shown in the above various embodiments.

[0208] In some embodiments, the computer program product related to the embodiments of the present application can be deployed to execute on one Bluetooth device, or on multiple Bluetooth devices located in one place, or on multiple Bluetooth devices distributed in multiple places and interconnected through a communication network, and the multiple Bluetooth devices distributed in multiple places and interconnected through a communication network can constitute a blockchain system.

[0209] Those skilled in the art should be aware that, in the above one or more examples, the functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or code on the computer readable medium. The computer readable medium includes computer storage medium and communication medium, and the communication medium includes any medium that facilitates transfer of computer program from one place to another. The storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

[0210] The above only describes optional embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method of discovering Bluetooth devices based on, wherein, The method comprises: determining an identity of a first Bluetooth device, the identity being used to identify the identity of the first Bluetooth device for communication with a second Bluetooth device; determining a first identity feature word based on the identity; determining a second identity feature word based on the first identity feature word and a salted string; generating a broadcast parameter of the first Bluetooth device based on the first identity feature word and the second identity feature word; broadcasting a Bluetooth message by a classic Bluetooth module included in the first Bluetooth device, the Bluetooth message carrying the broadcast parameter, so that the second Bluetooth device discovers a service based on the broadcast parameter.

2. The method of claim 1, wherein the broadcasting of the Bluetooth message by the classic Bluetooth module included in the first Bluetooth device comprises: encrypting the broadcast parameter to obtain ciphertext data of the broadcast parameter; signing the ciphertext data to obtain signature data; and broadcasting the Bluetooth message by the classic Bluetooth module included in the first Bluetooth device, the Bluetooth message carrying the ciphertext data and the signature data.

3. The method of claim 1, wherein the generating of the broadcast parameter of the first Bluetooth device based on the first identity feature word and the second identity feature word comprises: combining the first identity feature word and the second identity feature word to form an identity feature word of the first Bluetooth device; determining other feature words of the first Bluetooth device, the other feature words comprising at least one of a service feature word of a current service, first name information of the first Bluetooth device, and communication permission information; and combining the identity feature word and the other feature words to form the broadcast parameter of the first Bluetooth device.

4. The method of claim 1, wherein the determining of the second identity feature word based on the first identity feature word and the salted string comprises: salt processing the first identity feature word based on the salted string; determining a hash value of the salt-processed first identity feature word to obtain a first hash value; and extracting part of bytes in the first hash value to obtain the second identity feature word.

5. The method of claim 1, wherein the determining of the first identity feature word based on the identity comprises: determining a hash value of the identity to obtain a second hash value; and extracting part of bytes in the second hash value to obtain the first identity feature word.

6. The method of claim 1, further comprising: receiving a call request sent by the second Bluetooth device, and performing Bluetooth call with the second Bluetooth device based on the call request, the call request being sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter; or receiving an instant messaging request sent by the second Bluetooth device, and performing instant messaging with the second Bluetooth device based on the instant messaging request, the instant messaging request being sent by the second Bluetooth device to the first Bluetooth device after the second Bluetooth device discovers the first Bluetooth device based on the broadcast parameter.

7. A method of discovering Bluetooth devices, wherein, The method comprises: receiving, by a classic Bluetooth module included in the second Bluetooth device, a Bluetooth message of the first Bluetooth device; parsing the Bluetooth message to obtain broadcast parameters of the first Bluetooth device, the broadcast parameters comprising a first identity feature word and a second identity feature word, the first identity feature word being determined by the first Bluetooth device based on an identity, and the second identity feature word being determined by the first Bluetooth device based on the first identity feature word and a salted string; discovering the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device.

8. The method of claim 7, wherein the broadcast parameters further comprise communication permission information. The discovering the first Bluetooth device based on the first identity feature word and the second identity feature word of the first Bluetooth device comprises: in a case where the communication permission information of the first Bluetooth device is that a contact is allowed to communicate, performing identity matching on the first Bluetooth device based on a contact list of the second Bluetooth device and the first identity feature word and the second identity feature word, to obtain an identity matching result, the identity matching result being used to indicate whether the identity of the first Bluetooth device is in the contact list of the second Bluetooth device; in a case where the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, establishing a Bluetooth communication link between the first Bluetooth device and the second Bluetooth device.

9. The method of claim 8, wherein the performing identity matching on the first Bluetooth device based on the contact list of the second Bluetooth device and the first identity feature word and the second identity feature word, to obtain an identity matching result, comprises: determining an identity list corresponding to the contact list of the second Bluetooth device, the identity list comprising first identity feature words corresponding to contacts in the contact list; in a case where a target identity feature word matching the first identity feature word of the first Bluetooth device exists in the identity list, determining a third identity feature word based on the target identity feature word and the salted string; in a case where the second identity feature word of the first Bluetooth device matches the third identity feature word, determining that the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device.

10. The method of claim 7, wherein the Bluetooth message comprises ciphertext data and signature data. The parsing the Bluetooth message to obtain the broadcast parameters of the first Bluetooth device comprises: performing signature verification on the signature data; in a case where the signature verification on the signature data is passed, decrypting the ciphertext data to obtain the broadcast parameters of the first Bluetooth device.

11. The method of claim 8, wherein the broadcast parameters further comprise a service feature word of a current service. The method further comprises: in a case where the service feature word is a feature word corresponding to a call, performing a Bluetooth call with the first Bluetooth device based on the Bluetooth communication link. In a case where the service feature word corresponds to an instant messaging feature word, instant messaging is performed with the first Bluetooth device based on the Bluetooth communication link.

12. The method of claim 8, wherein the broadcast parameter further comprises first name information of the first Bluetooth device. The method further comprises: In a case where the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, second name information is determined from the contact list of the second Bluetooth device, the second name information being name information of the second Bluetooth device set in the contact list of the second Bluetooth device, and the second name information is displayed in the current interface; In a case where the identity matching result indicates that the identity of the first Bluetooth device is not in the contact list of the second Bluetooth device, the first name information is displayed in the current interface.

13. A device for discovering Bluetooth based devices, wherein, The apparatus comprises: A first determination module configured to determine an identity of a first Bluetooth device, the identity being used to identify an identity of the first Bluetooth device in communication with a second Bluetooth device; A second determination module configured to determine a first identity feature word based on the identity; A third determination module configured to determine a second identity feature word based on the first identity feature word and a salted string; A generation module configured to generate a broadcast parameter of the first Bluetooth device based on the first identity feature word and the second identity feature word; A broadcast module configured to broadcast a Bluetooth message by a classic Bluetooth module included in the first Bluetooth device, the Bluetooth message carrying the broadcast parameter, so that a second Bluetooth device discovers a service based on the broadcast parameter.

14. The apparatus of claim 13, wherein the broadcast module is configured to encrypt the broadcast parameter to obtain ciphertext data of the broadcast parameter, sign the ciphertext data to obtain signature data, and broadcast the Bluetooth message by the classic Bluetooth module included in the first Bluetooth device, the Bluetooth message carrying the ciphertext data and the signature data.

15. The apparatus of claim 13, wherein the generation module is configured to compose the first identity feature word and the second identity feature word into an identity feature word of the first Bluetooth device, determine other feature words of the first Bluetooth device, the other feature words comprising at least one of a service feature word of a current service, first name information of the first Bluetooth device, and communication permission information, and compose the identity feature word and the other feature words into the broadcast parameter of the first Bluetooth device.

16. A device for discovering Bluetooth based devices, wherein, The apparatus comprises: A receiving module configured to receive a Bluetooth message of a first Bluetooth device by a classic Bluetooth module included in a second Bluetooth device; An analysis module configured to analyze the Bluetooth message to obtain a broadcast parameter of the first Bluetooth device, the broadcast parameter comprising a first identity feature word and a second identity feature word, the first identity feature word being determined by the first Bluetooth device based on an identity, and the second identity feature word being determined by the first Bluetooth device based on the first identity feature word and a salted string. A discovering module is configured to discover the first Bluetooth device based on the first identity signature and the second identity signature of the first Bluetooth device.

17. The apparatus of claim 16, wherein, The broadcast parameter further comprises communication permission information. The discovering module is configured to, when the communication permission information of the first Bluetooth device is contact permission communication, perform identity matching on the first Bluetooth device based on the contact list of the second Bluetooth device and the first identity signature and the second identity signature, to obtain an identity matching result, the identity matching result being used to indicate whether the identity of the first Bluetooth device is in the contact list of the second Bluetooth device; and when the identity matching result indicates that the identity of the first Bluetooth device is in the contact list of the second Bluetooth device, establish a Bluetooth communication link between the first Bluetooth device and the second Bluetooth device.

18. A Bluetooth device, wherein, The Bluetooth device comprises a Bluetooth module, a processor and a memory, the memory stores at least one program code, the at least one program code is loaded and executed by the processor and the Bluetooth module, to implement the Bluetooth device-based discovering method as claimed in any one of claims 1 to 12.

19. A computer readable storage medium, wherein, The storage medium stores at least one program code, the at least one program code is loaded and executed by the processor, to implement the Bluetooth device-based discovering method as claimed in any one of claims 1 to 12.

20. A computer program product, wherein, The computer program product stores at least one program code, the at least one program code is used to be executed by the processor, to implement the Bluetooth device-based discovering method as claimed in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Bluetooth connection method and terminal

    CN109417758A

  • Bluetooth pairing method, device and system, electronic equipment and storage medium

    CN113840266A

  • Equipment authentication method and terminal equipment

    CN117135631A

  • Discovery method and device based on Bluetooth device, equipment, storage medium and product

    CN119031442A

  • Autonomous device authentication and compartment unlocking

    US11600125B1