Method and device for device discovery

By using keys to encrypt and decrypt data across devices from different vendors, the problem of device misidentification is solved, ensuring the accuracy and reliability of device discovery and avoiding the problem of devices becoming unusable after connection.

CN116208950BActive Publication Date: 2025-11-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310139051.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-12
Publication Date
2025-11-25
Estimated Expiration
2040-08-12

AI Technical Summary

Technical Problem

When interconnecting devices from different vendors, there is a problem that devices from different vendors may not recognize the same identifier in a consistent way, which may cause the device to be mistakenly identified as supporting a certain application protocol and thus become unusable.

Method used

By encrypting and decrypting data using a key between the first and second devices, it is possible to verify whether the device uses a specific application protocol and ensure the consistency of the encrypted and decrypted data to determine whether the device supports the protocol.

Benefits of technology

This avoids the problem of devices becoming unusable due to misjudgment after being connected, and improves the accuracy and reliability of device discovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208950B_ABST
    Figure CN116208950B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method and device for device discovery, the method comprising: a first device encrypting first data by a first key to obtain first verification information, wherein the first key is one of a pair of keys corresponding to a first application protocol; and the first device sending first information to a second device, wherein the first information comprises the first verification information, and the first verification information is used by the second device to determine whether the first device uses the first application protocol.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application No. 202080100978.9, titled "Method and device for device discovery", filed on August 12, 2020. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the field of communication, and more particularly, to a method and device for device discovery. BACKGROUND

[0003] In some scenarios, an electronic device wants to establish a connection with another device supporting a certain application protocol or a certain function. In a specific implementation, the device discovers a surrounding device supporting the function through device discovery, and then selects a device to establish a connection.

[0004] Devices of the same manufacturer have a unified identification for the same application protocol, which does not cause ambiguity in understanding between devices. However, in the case of interconnection of cross-manufacturer devices, there may be a problem that devices of different manufacturers have inconsistent identification for the same identification. Therefore, how to determine whether a device uses a certain application protocol is a problem to be solved. SUMMARY

[0005] Embodiments of the present application provide a method and device for device discovery, which can verify whether a device uses a specific application protocol, thereby avoiding the problem of inaccessibility after access.

[0006] In a first aspect, a method for device discovery is provided, which includes: a first device encrypting first data through a first key to obtain first verification information, wherein the first key is one of a pair of keys corresponding to a first application protocol;

[0007] The first device sends first information to a second device, wherein the first information includes the first verification information, and the first verification information is used by the second device to determine whether the first device uses the first application protocol.

[0008] In a second aspect, a method for device discovery is provided, which includes: a first device processing first data through a first algorithm to obtain first verification information; and the first device sending first information to a second device, wherein the first information includes the first verification information, and the first verification information is used by the second device to determine whether the first device uses a first application protocol.

[0009] In a third aspect, a method for device discovery is provided, which includes: receiving, by a second device, first information sent by a first device, the first information including first verification information, wherein the first verification information is obtained by encrypting first data by a first key; decrypting the first verification information by a second key to obtain second data, wherein the first key and the second key are a pair of keys corresponding to a first application protocol; obtaining the first data; and determining whether the first device uses the first application protocol according to whether the first data and the second data are consistent.

[0010] In a fourth aspect, a method for device discovery is provided, which includes: receiving, by a second device, first information sent by a first device, the first information including first verification information, wherein the first verification information is obtained by processing first data by a first algorithm; obtaining the first data;

[0011] processing the first data by the first algorithm to obtain second verification information; and determining whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent.

[0012] In a fifth aspect, a device for device discovery is provided, which is configured to perform the method in the first aspect or any of the implementation manners thereof.

[0013] Specifically, the device includes functional modules configured to perform the method in the first aspect to the second aspect or any of the implementation manners thereof.

[0014] In a sixth aspect, a device for device discovery is provided, which is configured to perform the method in the second aspect or any of the implementation manners thereof.

[0015] Specifically, the device includes functional modules configured to perform the method in the third aspect to the fourth aspect or any of the implementation manners thereof.

[0016] In a seventh aspect, a device for device discovery is provided, which includes a processor and a memory. The memory is configured to store a computer program, and the processor is configured to invoke and run the computer program stored in the memory to perform the method in the first aspect to the fourth aspect or any of the implementation manners thereof.

[0017] In an eighth aspect, a chip is provided, which is configured to implement the method in any of the first aspect to the fourth aspect or any of the implementation manners thereof. Specifically, the chip includes a processor configured to invoke and run a computer program from a memory, so that a device installed with the chip performs the method in any of the first aspect to the fourth aspect or any of the implementation manners thereof.

[0018] In a ninth aspect, a computer-readable storage medium is provided for storing a computer program, which causes a computer to execute the method in any one of the first aspect to the fourth aspect or the implementation manners thereof.

[0019] In a tenth aspect, a computer program product is provided, comprising computer program instructions, which causes a computer to execute the method in any one of the first aspect to the fourth aspect or the implementation manners thereof.

[0020] In an eleventh aspect, a computer program is provided, which, when running on a computer, causes the computer to execute the method in any one of the first aspect to the fourth aspect or the implementation manners thereof.

[0021] Based on the technical solution in the first aspect, the devices can verify whether the devices support a certain application protocol by encrypting and decrypting data through a pair of keys corresponding to the first application protocol, and since the pair of keys corresponding to the first application protocol has a constraint relationship, verifying through the pair of keys is conducive to avoiding the problem that the device cannot be used after access due to misjudgment. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 is a schematic flowchart of a method for device discovery according to an embodiment of the present application.

[0023] Figures 2-4 is a schematic flowchart of a method for device discovery according to an embodiment of the present application.

[0024] Figure 5 is a schematic flowchart of a method for device discovery according to another embodiment of the present application.

[0025] Figure 6 is a schematic block diagram of a device for device discovery according to an embodiment of the present application.

[0026] Figure 7 is a schematic block diagram of a device for device discovery according to another embodiment of the present application.

[0027] Figure 8 is a schematic block diagram of a device for device discovery according to yet another embodiment of the present application.

[0028] Figure 9 is a schematic block diagram of a device for device discovery according to still another embodiment of the present application.

[0029] Figure 10 is a schematic block diagram of a device for device discovery according to an embodiment of the present application.

[0030] Figure 11is a schematic block diagram of a chip according to an embodiment of the application. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the application will be described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, but not all of the embodiments of the application. All other embodiments obtained by a person of ordinary skill in the art without creative effort on the basis of the embodiments in the application belong to the scope of protection of the application.

[0032] The identification of the devices of the same manufacturer for the same application protocol is uniform, and does not cause ambiguity in understanding between the devices. However, in the case of interconnection of cross-manufacturer devices, for example, a mobile phone of manufacturer A, a Bluetooth bracelet of manufacturers B, C, and D, manufacturers A, B, and C use the same application protocol P1, and the application protocol P1 specifies that the additional data in the manufacturer specific data contains an identifier "ID1", and the broadcast data of the bracelet of manufacturers B and C contain the identifier "P1". The mobile phone of manufacturer A can identify the identifier "ID1" according to the specification of the application protocol P1, and thus determine that the bracelet of manufacturers B and C uses the application protocol P1. However, if manufacturer D uses an application protocol P2 unknown to manufacturer A, and the additional data in the manufacturer specific data of the broadcast data of the bracelet of manufacturer D also contains the identifier "ID1", the mobile phone of manufacturer A may mistakenly determine that the application protocol used by the bracelet of manufacturer D is P1, and thus the mobile phone of manufacturer A first prompts the user that the bracelet of manufacturer D has the function (for example, a configuration function specified by the application protocol P1), and then the use problem occurs.

[0033] Figure 1 is a schematic flowchart of a method 100 for device discovery according to an embodiment of the application, as shown in Figure 1 The method 100 can include but is not limited to the following contents:

[0034] S101, a first device encrypts first data by using a first key to obtain first verification information;

[0035] S102, the first device sends first information to a second device, wherein the first information includes the first verification information;

[0036] S103, the second device decrypts the first verification information according to a second key to determine whether the first device uses a first application protocol, wherein the first key and the second key are a pair of keys corresponding to the first application protocol.

[0037] In the embodiments of the present application, the first device or peripheral device, the second device or master device, and the like. The second device wants to find a device supporting a first application protocol or a first function, wherein the first application protocol defines the attribute type and usage of the first function.

[0038] Optionally, in some embodiments, the first device can be a wearable device, which can also be referred to as a wearable smart device. The wearable device is a general term for devices that are designed and developed by applying wearable technology to daily wear, such as glasses, gloves, watches, clothing, and shoes. The wearable device is a portable device that can be directly worn on the body or integrated into the clothes or accessories of the user. The wearable device is not only a hardware device, but also a device that realizes powerful functions through software support and data interaction and cloud interaction. The general wearable smart device includes devices with full functions and large sizes, which can realize complete or partial functions without relying on a smart phone, such as a smart watch or smart glasses, and devices that focus on a certain application function and need to be used in cooperation with other devices, such as a smart phone, such as various smart bracelets and smart jewelry for monitoring vital signs.

[0039] Optionally, in some embodiments, the second device can be an electronic device, such as a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical treatment, a wireless terminal device in smart grid, a wireless terminal device in transportation safety, a wireless terminal device in smart city, or a wireless terminal device in smart home, and the like.

[0040] Optionally, in some embodiments, the first key and the second key can be a pair of asymmetric keys, that is, the first key and the second key are different. In this case, the first key is a first private key, and the second key is a first public key. The first public key and the first private key can be generated based on an asymmetric algorithm, such as a digital signature algorithm (DSA), an RSA algorithm, or an elliptic curve cryptography (ECC) algorithm, and the like.

[0041] Optionally, in some embodiments, the first key and the second key can be a pair of symmetric keys, i.e., the first key and the second key are the same, in which case, the first key and the second key can be generated based on a symmetric algorithm, such as Advanced Encryption Standard (AES), or Data Encryption Standard (DES), etc.

[0042] In a specific implementation, the encryption and decryption of data are performed by using an asymmetric key, which has higher security and lower probability of misjudgment, and is easier to implement by encrypting and decrypting data by using the key.

[0043] Hereinafter, the first key and the second key are taken as a first public key and a first private key as an example, and when symmetric key encryption is used, the first public key and the first private key can be replaced by the same key, and the present application is not limited thereto.

[0044] Optionally, in some embodiments, all manufacturers using the first application protocol save the same pair of keys, for example, the same pair of keys can be generated by a protocol maker and issued to manufacturers.

[0045] Optionally, in some other embodiments, each manufacturer using the first application protocol can also generate a pair of keys corresponding to itself, for example, the first private key K1 is kept by the manufacturer itself, and the first public key K2 is published in a specific public channel, so that when the second device needs to decrypt data, the first public key K2 corresponding to the manufacturer can be obtained from the specific public channel according to the manufacturer identifier in the data sent by the first device, so as to realize the decryption of the data.

[0046] It should be understood that, in the embodiments of the present application, the pair of keys corresponding to the first application protocol can be a pair of keys shared by all manufacturers using the first application protocol, or can also be a pair of keys corresponding to the manufacturer of the first device among the manufacturers using the first application protocol, and the present application is not limited thereto.

[0047] In some embodiments of the present application, the first device encrypts the first data by using the first private key K1 to obtain the first verification information, and further sends the first information to the second device, wherein the first information includes the first verification information, so that the second device receiving the first information can parse the first information to obtain the first verification information, and then decrypt the first verification information according to the first public key K2 to determine whether the first device uses the first application protocol.

[0048] Specifically, the second device can acquire first data, decrypt the first verification information by the first public key K2 to obtain second data, and further determine whether the first device uses the first application protocol according to whether the first data and the second data are consistent. For example, if the first data and the second data are consistent, it is determined that the first device uses the first application protocol, or in other words, the first device has the first function. For another example, if the first data and the second data are inconsistent, it is determined that the first device does not use the first application protocol, or in other words, the first device does not have the first function. Further, the second device can prompt the user that the first device has the first function, so that the user can trigger the second device to establish a connection with the first device to use the first function of the first device.

[0049] Optionally, the first data can be specific data or a hash digest of the specific data, that is, the first data can be original data of the specific data, or data obtained by processing the specific data, for example, hash digest algorithm processing.

[0050] In some embodiments, the specific data includes at least one of the following:

[0051] Specific identification, predefined data, at least part of the data in the first information.

[0052] As some examples, the specific identification includes at least one of the following:

[0053] Protocol name and protocol version number of the first application protocol.

[0054] In some embodiments, if the specific data is specific identification or predefined data, the second device can learn such data according to an agreement or from a public channel, in which case the specific identification and predefined data can not be included in the first information.

[0055] In some embodiments, the specific data is at least part of the first information, i.e., the first verification information is generated according to the data in the first information. In this case, after receiving the first information, the second device can obtain the specific data from the first information. If the first verification information is encrypted according to the specific data, i.e., the first data and the specific data are the same, the second device can decrypt the first verification information to obtain second data, and compare the first data and the second data to determine whether they are consistent. Alternatively, if the first verification information is encrypted according to the hash digest data of the specific data, i.e., the first data is the hash digest data of the specific data, the second device can decrypt the first verification information to obtain second data, calculate the hash digest of the specific data to obtain third data, and compare the third data and the second data to determine whether they are consistent.

[0056] Optionally, in the embodiments of the present application, the first information can be transmitted through a connection realized by any protocol supporting the interaction between devices.

[0057] As an example, the first information is broadcast data based on the Bluetooth Low Energy (BLE) protocol.

[0058] As another example, the first information is a beacon frame based on the Wireless Fidelity (WIFI, or WI-FI) protocol. For example, the first verification information is contained in the Service Set Identifier (SSID) field and / or the vendor-defined field in the beacon frame.

[0059] It should be noted that, since the maximum length of the broadcast data (AdvData) and the scan response data (ScanRspData) in the broadcast data packet of BLE is 31 bytes, accordingly, it is required that the length of the first verification information generated after encryption is not more than 31 bytes, which implicitly requires that the length of the specific data is not more than 31 bytes, and an asymmetric algorithm with a key length not greater than 31 bytes is used.

[0060] Similarly, if the SSID field of the beacon frame is used to carry the first verification information, since the maximum length of the SSID field of the beacon frame is 32 bytes, accordingly, it is required that the length of the first verification information generated after encryption is not more than 32 bytes, which implicitly requires that the length of the specific data is not more than 32 bytes, and an asymmetric algorithm with a key length not greater than 32 bytes is used.

[0061] Based on this, as another example, a first generic attribute protocol (Generic Attribute Profile) service, denoted as GS1, can be defined for verifying whether the first device uses the first application protocol, and the first information can be carried by characteristic data of the GS1.

[0062] Since the length of the characteristic data of the GS1 can be set to be relatively long, the first information is carried by the characteristic data of the GS1, and the length of the first information is less limited, and thus the selection of the encryption algorithm and the specific data is more flexible.

[0063] In the embodiments of the present application, the generic attribute protocol is abbreviated as GATT protocol. The GATT protocol defines attribute types and specifies how to use them, including a framework of data transmission and storage and some basic operations. One profile can include one or more services; one service can include one or more characteristics; and one characteristic includes at least two attributes: one for declaration and the other for storing attribute values. Attributes, for example, include a universally unique identifier (UUID).

[0064] Optionally, in some embodiments, the first information can further include a first identifier, the first identifier being used to indicate that the first device uses the first application protocol. The first identifier can be used by the second device to predict whether the first device uses the first application protocol. In the case where the first information includes the first identifier, the second device further judges according to the first verification information.

[0065] In some embodiments, the first identifier includes at least one of the following:

[0066] a protocol name and a protocol version number of the first application protocol.

[0067] In the following, the method for device discovery according to the embodiments of the present application is described by taking a smart bracelet as the first device and a mobile phone as the second device as an example, but the embodiments of the present application are not limited thereto. Figures 2 to 4

[0068] Embodiment one: a device is identified by carrying encrypted data based on BLE broadcast data to implement the first application protocol or the first function

[0069] As shown in the figure, the specific execution process includes at least part of the following steps: Figure 2

[0070] S21, the smart bracelet uses a first private key K1 to encrypt data D1 to obtain first verification information, denoted as S1;

[0071] ​​In some embodiments, the data D2 includes at least one of the following:

[0072] A specific identifier, predefined data, and at least a portion of the data in the BLE broadcast data.

[0073] S22, the smart bracelet sets S1 into the BLE broadcast data, that is, the BLE broadcast data includes S1;

[0074] Optionally, in some embodiments, the smart bracelet may also set a first identifier in the BLE broadcast data at the same time, that is, the BLE broadcast data may include a first identifier and S1, the first identifier being used by the mobile phone to preliminarily determine whether the smart bracelet uses the first application protocol;

[0075] S23, smart bracelet broadcasts BLE broadcast data;

[0076] S24, the mobile phone receives and parses the BLE broadcast data sent by the smart bracelet, and obtains S1 from it;

[0077] Optionally, if the first application protocol specifies that the BLE broadcast data includes both the first identifier and S1, the mobile phone can check whether the BLE broadcast data contains the first identifier, and thus preliminarily determine whether the smart bracelet uses the first application protocol. If so, proceed to step S25; otherwise, determine that the aforementioned specific application protocol is not used.

[0078] S25, the first public key K2 of the mobile phone decrypts S1 to obtain D2;

[0079] S26, if D2 is consistent with the known data D1, it indicates that the smart bracelet is using the first application protocol; otherwise, it is not using the first application protocol.

[0080] Example 2: A device that uses a beacon frame based on the WIFI protocol to carry encrypted data identification implements the first application protocol or the first function.

[0081] like Figure 3 As shown, the specific execution process includes at least some of the following steps:

[0082] S31, the smart bracelet uses the first private key K1 to encrypt the data D1 to obtain the first verification information, denoted as S1;

[0083] In some embodiments, the data D2 includes at least one of the following:

[0084] A specific identifier, predefined data, and at least a portion of the data in the beacon frame.

[0085] S32, the smart bracelet starts a soft AP, and sets S1 to the SSID and / or the manufacturer-defined data field in the beacon frame;

[0086] Optionally, in some embodiments, the smart bracelet can also set a first identifier in the beacon frame, i.e., the beacon frame can include the first identifier and S1, and the first identifier is used by the mobile phone to preliminarily determine whether the smart bracelet uses the first application protocol;

[0087] S33, the smart bracelet broadcasts the beacon frame;

[0088] S34, the mobile phone receives and parses the beacon frame sent by the smart bracelet, and obtains S1 therefrom;

[0089] Optionally, if the first application protocol stipulates that the beacon frame includes both the first identifier and S1, the mobile phone can check whether the beacon frame includes the first identifier, and preliminarily determine whether the smart bracelet uses the first application protocol according to the result, and if yes, proceed to step S25, otherwise, determine that the first application protocol is not used.

[0090] S35, the mobile phone decrypts S1 using the first public key K2 to obtain D2;

[0091] S36, if D2 is consistent with the known data D1, it indicates that the smart bracelet uses the first application protocol, otherwise, the first application protocol is not used.

[0092] Optionally, if S1 is encrypted using the hash digest data H1 of data D1, when verifying the signature S1, the mobile phone needs to decrypt S1 to obtain H2, and needs to calculate the hash digest of D1 to obtain H3, and then the mobile phone compares H2 and H3, if they are consistent, the verification is passed, otherwise, the verification fails.

[0093] Embodiment three: define a first generic attribute protocol GATT service, denoted as GS1, for verifying whether the first device uses the first application protocol, and the first information can be carried by the characteristic data of GS1.

[0094] As shown in Figure 4 , the specific execution process includes at least part of the following steps:

[0095] First, define a first GATT service, denoted as GS1, for verifying whether the first device uses the first application protocol, and the first GATT service includes a first characteristic A1 for saving and transmitting the encrypted first verification information S1, and optionally, a second characteristic A2 for saving and transmitting data D1.

[0096] Optionally, the UUID of the GS1 can be customized by the manufacturer of the device.

[0097] S41, the first device implements the function of the GS1, and sets the UUID of the GS1 to the BLE broadcast data;

[0098] S42, the first device broadcasts the BLE broadcast data;

[0099] S43, the second device receives and parses the BLE broadcast data of the first device, and obtains the UUID of the GS1;

[0100] S44, the second device establishes a GATT connection with the first device;

[0101] S45, the second device obtains the service list of the first device, checks whether the service list contains the service of the UUID, if not, it is determined that the specific application protocol is not used, if yes, the subsequent process is executed.

[0102] S46, the smart bracelet uses the first private key K1 to encrypt the data D1 to obtain the first verification information S1, and sets S1 as part or all of the characteristic value of A1;

[0103] Optionally, the specific identifier, the pre-defined data, at least part of the data in the characteristic value data of the first characteristic A1, at least part of the data in the characteristic value data of the second characteristic A2, and at least part of the data in the BLE broadcast data sent by the first device.

[0104] S47, the second device obtains the characteristic value data of the first characteristic A1 in the service of the UUID;

[0105] S48, the first device returns the characteristic value data of the first characteristic A1.

[0106] It should be understood that the characteristic value data of the first characteristic A1 can be generated before S47, or can also be generated after S47, which is not limited by the present application.

[0107] S49, if the acquisition fails, it is determined that the first device does not use the first application protocol; or

[0108] S50, if the acquisition is successful, further obtain S1 in A1, parse S1 according to the first public key K2, and obtain D2.

[0109] S51, if D2 is consistent with the known data D1, it is indicated that the smart bracelet uses the first application protocol, otherwise the first application protocol is not used.

[0110] Optionally, in the above three embodiments, if the S1 is encrypted by the hash digest data H1 of the data D1, the mobile phone needs to decrypt the S1 to obtain H2, and needs to calculate the hash digest of D1 to obtain H3, and then the mobile phone compares H2 and H3, if they are consistent, the verification is passed, otherwise the verification fails.

[0111] Optionally, in the above three embodiments, the symmetric encryption algorithm (such as AES, DES, etc.) and the symmetric key (i.e. the key K1 and K2 in the above process) can be used instead of the above-mentioned asymmetric encryption algorithm and asymmetric key. That is, the first device uses the key K1 to symmetrically encrypt the data D1 to obtain S1, and the mobile phone uses K2 (equal to K1) to decrypt S1 to obtain the data D2 when verifying, if D2 is the same as D1, the verification is passed, otherwise the verification fails.

[0112] Figure 5 is a schematic flow chart of a method 500 for device discovery according to another embodiment of the present application, as shown in Figure 5 The method 500 can include but is not limited to the following:

[0113] S510, a first device processes first data by a first algorithm to obtain first verification information;

[0114] S520, the first device sends first information to a second device, wherein the first information includes the first verification information;

[0115] S530, obtaining the first data;

[0116] S540, processing the first data by the first algorithm to obtain second verification information;

[0117] S550, determining whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent.

[0118] Optionally, in some embodiments, the first algorithm can be a hash digest algorithm, or can also be other processing algorithms, and the present application is not limited thereto.

[0119] It should be understood that the difference between the method 500 and the above-mentioned embodiment 100 is that the encryption and decryption of the first data by the secret key is replaced by the processing of the first data by the first algorithm, and other implementation manners are similar, and for the sake of brevity, they are not described here.

[0120] Optionally, in some embodiments, the first information is BLE broadcast data based on Bluetooth Low Energy (BLE) protocol.

[0121] Optionally, in some embodiments, the first data comprises at least one of:

[0122] a specific identity, predefined data, at least part of data in the BLE broadcast data.

[0123] Optionally, in some embodiments, the first information is a beacon frame based on a wireless fidelity (Wi-Fi) protocol.

[0124] Optionally, in some embodiments, the first verification information is contained in a service set identifier (SSID) field and / or a vendor-defined field in the beacon frame.

[0125] Optionally, in some embodiments, the first data comprises at least one of:

[0126] a specific identity, predefined data, at least part of data in the beacon frame.

[0127] Optionally, in some embodiments, the specific identity comprises at least one of:

[0128] a protocol name and a protocol version number of the first application protocol.

[0129] Optionally, in some embodiments, the first information further comprises a first identity, which is used to indicate that the first device uses the first application protocol.

[0130] Optionally, the first information is characteristic data of a first generic attribute profile (GATT) service.

[0131] Optionally, in some embodiments, the first data comprises at least one of:

[0132] a specific identity, predefined data, at least part of characteristic value data of a first characteristic of the first GATT service, at least part of characteristic value data of a second characteristic of the first GATT service, at least part of BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

[0133] Optionally, in some embodiments, the specific identity comprises at least one of:

[0134] a protocol name and a protocol version number of the first application protocol.

[0135] Optionally, in some embodiments, the method 500 further comprises:

[0136] The first device sends BLE broadcast data to the second device, the BLE broadcast data comprising a universally unique identifier UUID of the first GATT service.

[0137] Optionally, in some embodiments, the first information is characteristic data of a first generic attribute protocol GATT service.

[0138] Optionally, in some embodiments, the first data comprises at least one of:

[0139] a specific identity, predefined data, at least part of characteristic value data of a first characteristic of the first GATT service, at least part of characteristic value data of a second characteristic of the first GATT service, at least part of BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

[0140] Optionally, in some embodiments, the specific identity comprises at least one of:

[0141] a protocol name and a protocol version number of the first application protocol.

[0142] Optionally, in some embodiments, the method 500 further comprises:

[0143] If the first data fails to be acquired, it is determined that the first device does not use the first application protocol.

[0144] Optionally, in some embodiments, the method 500 further comprises:

[0145] The second device receives BLE broadcast data sent by the first device, the BLE broadcast data comprising a universally unique identifier UUID of the first GATT service.

[0146] Optionally, in some embodiments, the method 500 further comprises: the second device acquiring a service list of the first device.

[0147] Optionally, in some embodiments, the determining whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent comprises:

[0148] If the service list comprises the UUID of the first GATT service, determining whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent.

[0149] Optionally, in some embodiments, the method 500 further comprises:

[0150] If the service list does not include the UUID of the first GATT service, it is determined that the first device does not use the first application protocol.

[0151] The method embodiments of the present application are described in detail above, Figures 1 to 5 The device embodiments of the present application are described in detail below, Figures 6 to 11 It should be understood that the device embodiments correspond to the method embodiments, and similar descriptions can be referred to the method embodiments.

[0152] Figure 6 A schematic block diagram of a device 600 for device discovery according to embodiments of the present application is shown. As Figure 6 The device 600 includes a processing unit 610 configured to encrypt first data by a first key to obtain first verification information, wherein the first key is one of a pair of keys corresponding to a first application protocol.

[0153] A communication unit 620 configured to send first information to a second device, wherein the first information includes the first verification information, and the first verification information is used by the second device to determine whether the first device uses the first application protocol.

[0154] In some embodiments, the first information is Bluetooth Low Energy (BLE) broadcast data based on a BLE protocol.

[0155] In some embodiments, the first data is specific data or a hash digest of the specific data, wherein the specific data includes at least one of:

[0156] a specific identity, predefined data, and at least part of the BLE broadcast data.

[0157] In some embodiments, the first information is a beacon frame based on a Wireless Fidelity (WIFI) protocol.

[0158] In some embodiments, the first verification information is contained in a Service Set Identifier (SSID) field and / or a vendor-defined field in the beacon frame.

[0159] In some embodiments, the first data is specific data or a hash digest of the specific data, wherein the specific data includes at least one of:

[0160] a specific identity, predefined data, and at least part of the beacon frame.

[0161] In some embodiments, the specific identity includes at least one of:

[0162] a protocol name and a protocol version number of the first application protocol.

[0163] In some embodiments, the first information further comprises a first identifier, the first identifier indicating that the first device uses the first application protocol.

[0164] In some embodiments, the first information is characteristic data of a first generic attribute protocol (GATT) service, the first GATT service being used to verify whether the first device uses the first application protocol.

[0165] In some embodiments, the first data is specific data or a hash digest of the specific data, wherein the specific data is at least one of:

[0166] a specific identifier, predefined data, at least part of characteristic value data of a first characteristic of the first GATT service, at least part of characteristic value data of a second characteristic of the first GATT service, at least part of BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

[0167] In some embodiments, the specific identifier comprises at least one of:

[0168] a protocol name and a protocol version number of the first application protocol.

[0169] In some embodiments, the communication unit is further configured to:

[0170] send BLE broadcast data to the second device, the BLE broadcast data comprising a universal unique identifier (UUID) of the first GATT service.

[0171] In some embodiments, the pair of keys corresponding to the first application protocol is a pair of asymmetric keys determined based on an asymmetric algorithm, or a pair of symmetric keys determined based on a symmetric algorithm.

[0172] Optionally, in some embodiments, the communication unit can be a communication interface or a transceiver, or an input / output interface of a communication chip or a system on chip. The processing unit can be one or more processors.

[0173] It should be understood that the device 600 according to the embodiments of the present application can correspond to the first device in the method embodiments of the present application, and the above and other operations and / or functions of each unit in the device 600 for device discovery are respectively used to implement the corresponding processes of the first device in the method embodiments of the present application, and will not be repeated here for brevity. Figures 1 to 4 The corresponding processes of the first device in the illustrated method, for brevity, will not be repeated here.

[0174] Figure 7 A schematic block diagram of a device 700 for device discovery is shown according to embodiments of the present application. As shown, the device 700 comprises: Figure 7

[0175] a communication unit 710 configured to receive first information transmitted by a first device, the first information comprising first verification information, wherein the first verification information is obtained by encrypting first data using a first key;

[0176] a processing unit 720 configured to decrypt the first verification information using a second key to obtain second data, wherein the first key and the second key are a pair of keys corresponding to a first application protocol, to obtain the first data, and

[0177] determine whether the first device uses the first application protocol according to whether the first data and the second data are consistent.

[0178] Optionally, in some embodiments, the first information is Bluetooth Low Energy (BLE) broadcast data based on a BLE protocol.

[0179] Optionally, in some embodiments, the first data is specific data or a hash digest data of the specific data, wherein the specific data comprises at least one of:

[0180] a specific identifier, predefined data, at least part of the BLE broadcast data.

[0181] Optionally, in some embodiments, the first information is a beacon frame based on a Wireless Fidelity (WIFI) protocol.

[0182] Optionally, in some embodiments, the first verification information is contained in a Service Set Identifier (SSID) field and / or a vendor-defined field in the beacon frame.

[0183] Optionally, in some embodiments, the first data is specific data or a hash digest data of the specific data, wherein the specific data comprises at least one of:

[0184] a specific identifier, predefined data, at least part of the beacon frame.

[0185] Optionally, in some embodiments, the specific identifier comprises at least one of:

[0186] a protocol name and a protocol version number of the first application protocol.

[0187] Optionally, in some embodiments, the processing unit 720 is configured to:

[0188] ​In a case that the first information comprises a first identifier, determining whether the first device uses the first application protocol according to whether the first data and the second data are consistent, wherein the first identifier is used to indicate that the first device uses the first application protocol.

[0189] Optionally, in some embodiments, the first identifier comprises at least one of:

[0190] a protocol name and a protocol version number of the first application protocol.

[0191] Optionally, in some embodiments, the first information is characteristic data of a first generic attribute protocol (GATT) service.

[0192] Optionally, in some embodiments, the first data is specific data or a hash digest data of the specific data, wherein the specific data is at least one of:

[0193] a specific identifier, predefined data, at least part of characteristic value data of a first characteristic of the first GATT service, at least part of characteristic value data of a second characteristic of the first GATT service, at least part of BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

[0194] Optionally, in some embodiments, the specific identifier comprises at least one of:

[0195] a protocol name and a protocol version number of the first application protocol.

[0196] Optionally, in some embodiments, the processing unit 720 is further configured to:

[0197] obtain the first data from characteristic data of the first GATT service.

[0198] Optionally, in some embodiments, the processing unit 720 is further configured to:

[0199] if the first data fails to be obtained, determine that the first device does not use the first application protocol.

[0200] Optionally, in some embodiments, the communication unit 710 is further configured to:

[0201] send BLE broadcast data to a second device, wherein the BLE broadcast data comprises a universal unique identifier (UUID) of the first GATT service.

[0202] Optionally, in some embodiments, the processing unit 720 is further configured to:

[0203] obtaining a service list of the first device.

[0204] Optionally, in some embodiments, the processing unit is further configured to:

[0205] if the service list comprises the UUID of the first GATT service, determining whether the first device uses the first application protocol according to whether the first data and the second data are consistent.

[0206] Optionally, in some embodiments, the processing unit 720 is further configured to:

[0207] if the service list does not comprise the UUID of the first GATT service, determining that the first device does not use the first application protocol.

[0208] Optionally, in some embodiments, the pair of keys corresponding to the first application protocol is a pair of asymmetric keys determined based on an asymmetric algorithm, or a pair of symmetric keys determined based on a symmetric algorithm.

[0209] Optionally, in some embodiments, the communication unit can be a communication interface or a transceiver, or an input / output interface of a communication chip or a system on chip. The processing unit can be one or more processors.

[0210] It should be understood that the device 700 according to the embodiments of the present application can correspond to the second device in the method embodiments of the present application, and the above and other operations and / or functions of each unit in the device 700 for device discovery are respectively used to implement the corresponding procedures of the second device in the method embodiments of the present application, which will not be repeated here for brevity. Figures 1 to 4 The method shown in the method embodiments of the present application, which will not be repeated here for brevity.

[0211] Figure 8 A schematic block diagram of a device 800 for device discovery according to an embodiment of the present application is shown. As shown in the figure, the device 800 comprises: Figure 8 A processing unit 810, configured to process first data by a first algorithm to obtain first verification information.

[0212] A communication unit 820, configured to send first information to a second device, wherein the first information comprises the first verification information, and the first verification information is used by the second device to determine whether the first device uses a first application protocol.

[0213] Optionally, in some embodiments, the first information is BLE broadcast data based on a Bluetooth Low Energy (BLE) protocol.

[0214]

[0215] ​Optionally, in some embodiments, the first data comprises at least one of:

[0216] a specific identity, predefined data, at least part of data in the BLE broadcast data.

[0217] Optionally, in some embodiments, the first information is a beacon frame based on a wireless fidelity (Wi-Fi) protocol.

[0218] Optionally, in some embodiments, the first verification information is contained in a service set identifier (SSID) field and / or a vendor-defined field in the beacon frame.

[0219] Optionally, in some embodiments, the first data comprises at least one of:

[0220] a specific identity, predefined data, at least part of data in the beacon frame.

[0221] Optionally, in some embodiments, the specific identity comprises at least one of:

[0222] a protocol name and a protocol version number of the first application protocol.

[0223] Optionally, in some embodiments, the first information further comprises a first identity, which is used to indicate that the first device uses the first application protocol.

[0224] Optionally, in some embodiments, the first information is characteristic data of a first generic attribute profile (GATT) service.

[0225] Optionally, in some embodiments, the first data comprises at least one of:

[0226] a specific identity, predefined data, at least part of characteristic value data of a first characteristic of the first GATT service, at least part of characteristic value data of a second characteristic of the first GATT service, and at least part of BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

[0227] Optionally, in some embodiments, the specific identity comprises at least one of:

[0228] a protocol name and a protocol version number of the first application protocol.

[0229] Optionally, in some embodiments, the communication unit 820 is further configured to send, to a second device, BLE broadcast data comprising a universal unique identifier (UUID) of the first GATT service.

[0230] Optionally, in some embodiments, the first algorithm is a hash digest algorithm.

[0231] Optionally, in some embodiments, the communication unit can be a communication interface or a transceiver, or an input / output interface of a communication chip or system on chip. The processing unit can be one or more processors.

[0232] It should be understood that the device 800 according to the embodiments of the present application can correspond to the first device in the method embodiments of the present application, and the above and other operations and / or functions of each unit in the device 800 for device discovery are respectively implemented to achieve the corresponding flow of the first device in the method shown in the embodiments of the present application, which will not be repeated here for brevity. Figure 5

[0233] Figure 9 A schematic block diagram of a device 900 for device discovery according to the embodiments of the present application is shown. As shown, the device 900 includes a communication unit 910 configured to receive first information sent by a first device, the first information including first verification information, wherein the first verification information is obtained by processing first data by a first algorithm. Figure 9

[0234] A processing unit 920 configured to obtain the first data.

[0235] process the first data by the first algorithm to obtain second verification information, and determine whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent.

[0236] Optionally, in some embodiments, the first information is a broadcast data packet based on a Bluetooth Low Energy (BLE) protocol.

[0237] Optionally, in some embodiments, the first data includes at least one of the following:

[0238] a specific identifier, predefined data, and at least part of data in the BLE broadcast data.

[0239] Optionally, in some embodiments, the first information is a beacon frame based on a Wireless Fidelity (Wi-Fi) protocol.

[0240] Optionally, the first verification information is contained in a Service Set Identifier (SSID) field and / or a vendor-defined field in the beacon frame.

[0241] Optionally, in some embodiments, the first data includes at least one of the following:

[0242] ​​a specific identifier, predefined data, at least part of data in the beacon frame.

[0243] Optionally, in some embodiments, the specific identifier comprises at least one of:

[0244] a protocol name and a protocol version number of the first application protocol.

[0245] Optionally, the processing unit 920 is further configured to: in a case where the first information comprises a first identifier, determine whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent, wherein the first identifier is used to indicate that the first device uses the first application protocol.

[0246] Optionally, in some embodiments, the first identifier comprises at least one of:

[0247] a protocol name and a protocol version number of the first application protocol.

[0248] Optionally, in some embodiments, the first information is characteristic data of a first Generic Attribute Profile (GATT) service.

[0249] Optionally, in some embodiments, the first data comprises at least one of: a specific identifier, predefined data, at least part of characteristic value data of a first characteristic of the first GATT service, at least part of characteristic value data of a second characteristic of the first GATT service, at least part of BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

[0250] Optionally, in some embodiments, the specific identifier comprises at least one of:

[0251] a protocol name and a protocol version number of the first application protocol.

[0252] Optionally, in some embodiments, the processing unit 920 is further configured to:

[0253] if the first data fails to be acquired, determine that the first device does not use the first application protocol.

[0254] Optionally, in some embodiments, the communication unit 910 is further configured to: receive BLE broadcast data sent by the first device, wherein the BLE broadcast data comprises a Universally Unique Identifier (UUID) of the first GATT service.

[0255] Optionally, in some embodiments, the communication unit 910 is further configured to: obtain the service list of the first device.

[0256] Optionally, in some embodiments, the processing unit 920 is further configured to:

[0257] If the service list includes the UUID of the first GATT service, determine whether the first device uses the first application protocol based on whether the first verification information and the second verification information are consistent.

[0258] Optionally, in some embodiments, the processing unit 920 is further configured to: determine that the first device does not use the first application protocol if the service list does not include the UUID of the first GATT service.

[0259] Optionally, in some embodiments, the first algorithm is a hash digest algorithm.

[0260] Optionally, in some embodiments, the communication unit may be a communication interface or transceiver, or an input / output interface of a communication chip or system-on-a-chip. The processing unit may be one or more processors.

[0261] It should be understood that the device 900 according to the embodiments of this application may correspond to the second device in the method embodiments of this application, and the above and other operations and / or functions of each unit in the device 900 for device discovery are respectively for implementing Figure 5 The corresponding process for the second device in the method shown will not be elaborated here for the sake of brevity.

[0262] Figure 10 This is a schematic structural diagram of a device 1000 for device discovery provided in an embodiment of this application. Figure 10 The communication device 1000 shown includes a processor 1010, which can call and run computer programs from memory to implement the methods in the embodiments of this application.

[0263] Optionally, such as Figure 10 As shown, the communication device 1000 may further include a memory 1020. The processor 1010 can retrieve and run computer programs from the memory 1020 to implement the methods described in this embodiment. The memory 1020 may be a separate device independent of the processor 1010, or it may be integrated into the processor 1010.

[0264] Optionally, such as Figure 10As shown, the communication device 1000 can further include a transceiver 1030, which can be controlled by the processor 1010 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1030 can include a transmitter and a receiver. The transceiver 1030 can further include an antenna, and the number of antennas can be one or more.

[0265] Optionally, the communication device 1000 can be specifically a first device or a second device of the embodiments of the present application, and the communication device 1000 can implement the corresponding procedures implemented by the first device or the second device in various methods of the embodiments of the present application. For the sake of brevity, details are not described herein.

[0266] Optionally, the communication device 1000 can be specifically a first device or a second device of the embodiments of the present application, and the communication device 1000 can implement the corresponding procedures implemented by the first device or the second device in various methods of the embodiments of the present application. For the sake of brevity, details are not described herein.

[0267] Figure 11 is a schematic structural diagram of a chip of the embodiments of the present application. Figure 11 The chip 1100 shown includes a processor 1110, which can call and run a computer program from a memory to implement the method in the embodiments of the present application.

[0268] Optionally, as Figure 10 The chip 1100 shown can further include a memory 1120. The processor 1110 can call and run a computer program from the memory 1120 to implement the method in the embodiments of the present application.

[0269] The memory 1120 can be a separate device independent of the processor 1110, or can be integrated in the processor 1110.

[0270] Optionally, the chip 1100 can further include an input interface 1130. The processor 1110 can control the input interface 1130 to communicate with other devices or chips, specifically, to obtain information or data sent by other devices or chips.

[0271] Optionally, the chip 1100 can further include an output interface 1140. The processor 1110 can control the output interface 1140 to communicate with other devices or chips, specifically, to output information or data to other devices or chips.

[0272] Optionally, the chip 1100 can be applied to the first device in the embodiments of the present application, and the chip 1100 can implement the corresponding processes implemented by the first device in the various methods of the embodiments of the present application. For brevity, details are not repeated here.

[0273] Optionally, the chip 1100 can be applied to the second device in the embodiments of the present application, and the chip 1100 can implement the corresponding processes implemented by the second device in the various methods of the embodiments of the present application. For brevity, details are not repeated here.

[0274] Optionally, the device mentioned in the embodiments of the present application can also be a chip. For example, it can be a system-on-chip, a system chip, a chip system, or a system-on-chip, etc.

[0275] The embodiments of the present application also provide a communication system. The communication system includes a device for device discovery and a device for device discovery. Wherein, the device for device discovery can be used to implement the corresponding functions of the device for device discovery in the above-mentioned methods, and the device for device discovery can be used to implement the corresponding functions of the device for device discovery in the above-mentioned methods. For brevity, details are not repeated here.

[0276] It should be understood that the processor of the embodiments of the present application can be an integrated circuit chip with processing capability of signals. In the implementation process, each step of the above-mentioned method embodiments can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor mentioned above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware code processor execution, or executed by hardware and software modules in the code processor. The software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above-mentioned method.

[0277] It is to be understood that the memory in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM). It should be noted that the memory of the system and method described herein is intended to include, but not limited to, these and any other suitable types of memory.

[0278] It should be understood that the above-mentioned memory is exemplary but not limiting, for example, the memory in the embodiments of the present application can also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and the like. That is, the memory in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.

[0279] The embodiment of the present application further provides a computer readable storage medium for storing the computer program.

[0280] Optionally, the computer readable storage medium can be applied to the first device or the second device in the embodiment of the present application, and the computer program makes the computer execute the corresponding process realized by the first device or the second device in the various methods of the embodiment of the present application, which will not be repeated here for the sake of brevity.

[0281] Optionally, the computer readable storage medium can be applied to the first device or the second device in the embodiment of the present application, and the computer program makes the computer execute the corresponding process realized by the first device or the second device in the various methods of the embodiment of the present application, which will not be repeated here for the sake of brevity.

[0282] The embodiment of the present application further provides a computer program product comprising computer program instructions.

[0283] Optionally, the computer program product can be applied to the first device or the second device in the embodiment of the present application, and the computer program instructions make the computer execute the corresponding process realized by the first device or the second device in the various methods of the embodiment of the present application, which will not be repeated here for the sake of brevity.

[0284] Optionally, the computer program product can be applied to the first device or the second device in the embodiment of the present application, and the computer program instructions make the computer execute the corresponding process realized by the first device or the second device in the various methods of the embodiment of the present application, which will not be repeated here for the sake of brevity.

[0285] The embodiment of the present application further provides a computer program.

[0286] Optionally, the computer program can be applied to the device for device discovery in the embodiment of the present application, and when the computer program runs on the computer, the computer program makes the computer execute the corresponding process realized by the device for device discovery in the various methods of the embodiment of the present application, which will not be repeated here for the sake of brevity.

[0287] Optionally, the computer program can be applied to the first device or the second device in the embodiment of the present application, and when the computer program runs on the computer, the computer program makes the computer execute the corresponding process realized by the first device or the second device in the various methods of the embodiment of the present application, which will not be repeated here for the sake of brevity.

[0288] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0289] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0290] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0291] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0292] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0293] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. For such understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a device for device discovery) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0294] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for device discovery, characterized by, The method comprises: The first device encrypts first data by a first key to obtain first verification information, wherein the first key is one of a pair of keys corresponding to a first application protocol; or the first device processes the first data by a first algorithm to obtain the first verification information; The first device sends first information to a second device, wherein the first information comprises the first verification information, and the first verification information is used by the second device to determine whether the first device uses the first application protocol; The method further comprises: The first device sets a first identifier in the first information, so that the second device determines whether the first device uses the first application protocol by determining whether the first identifier is included in the first information, wherein the first identifier is used to indicate that the first device uses the first application protocol.

2. The method of claim 1, wherein, The first information is BLE broadcast data based on a Bluetooth Low Energy (BLE) protocol; or The first information is a beacon frame based on a Wireless Fidelity (WIFI) protocol, and the first verification information is contained in a Service Set Identifier (SSID) field and / or a vendor-defined field in the beacon frame.

3. The method of claim 2, wherein, In the case where the first information is BLE broadcast data based on a Bluetooth Low Energy (BLE) protocol, the first data is specific data or a hash digest of the specific data, wherein the specific data comprises at least one of the following: a specific identifier, predefined data, and at least part of data in the BLE broadcast data; In the case where the first information is a beacon frame based on a Wireless Fidelity (WIFI) protocol, the first data is specific data or a hash digest of the specific data, wherein the specific data comprises at least one of the following: a specific identifier, predefined data, and at least part of data in the beacon frame.

4. The method according to any one of claims 1 to 3, characterized in that, The first information is characteristic data of a first Generic Attribute Protocol (GATT) service, and the first GATT service is used to verify whether the first device uses the first application protocol.

5. The method of claim 4, wherein, The first data is specific data or a hash digest of the specific data, wherein the specific data is at least one of the following: a specific identifier, predefined data, characteristic value data of a first characteristic of the first GATT service, characteristic value data of a second characteristic of the first GATT service, and at least part of data in BLE broadcast data sent by the first device, wherein the first characteristic is used to save and transmit the first verification information, and the second characteristic is used to save and transmit the specific data.

6. The method according to claim 3 or 5, characterized in that, The specific identifier comprises at least one of the following: a protocol name and a protocol version number of the first application protocol.

7. The method according to any one of claims 1-3, characterized in that, The method further comprises: The first device sends BLE broadcast data to the second device, and the BLE broadcast data comprises a Universally Unique Identifier (UUID) of the first GATT service.

8. The method of any one of claims 1-3, wherein the pair of keys corresponding to the first application protocol is a pair of asymmetric keys determined based on an asymmetric algorithm or a pair of symmetric keys determined based on a symmetric algorithm; and wherein the first algorithm is a hash digest algorithm.

9. A method for device discovery, characterized by, Comprising: receiving, by a second device, first information sent by a first device, the first information comprising first verification information, wherein the first verification information is obtained by encrypting first data by a first key; decrypting the first verification information by a second key to obtain second data, wherein the first key and the second key are a pair of keys corresponding to a first application protocol; obtaining the first data; determining whether the first device uses the first application protocol according to whether the first data and the second data are consistent; wherein the determining whether the first device uses the first application protocol according to whether the first data and the second data are consistent comprises: in a case where the first information further comprises a first identifier, the second device determines whether the first device uses the first application protocol by determining whether the first identifier is included in the first information, wherein the first identifier is used to indicate that the first device uses the first application protocol.

10. A method for device discovery, characterized by, Comprising: receiving, by a second device, first information sent by a first device, the first information comprising first verification information, wherein the first verification information is obtained by processing first data by a first algorithm; obtaining the first data; processing the first data by the first algorithm to obtain second verification information; determining whether the first device uses a first application protocol according to whether the first verification information and the second verification information are consistent; wherein the determining whether the first device uses the first application protocol according to whether the first verification information and the second verification information are consistent comprises: in a case where the first information further comprises a first identifier, the second device determines whether the first device uses the first application protocol by determining whether the first identifier is included in the first information, wherein the first identifier is used to indicate that the first device uses the first application protocol.

Citation Information

Patent Citations

  • Fast payment method, apparatus and system

    CN105741116A

  • Using Multiple Protocols In A Virtual Desktop Infrastructure

    CN107683461A

  • Identity authentication method, device, and storage medium

    CN108737971A