BLE device information acquisition method and apparatus, device, and storage medium

CN114697924BActive Publication Date: 2026-10-13SUZHOU 360 INTELLIGENT SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011609736.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2026-10-13
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于提供一种BLE设备信息获取方法、装置、设备及存储介质,旨在解决现有技术无法在不连接BLE设备的情况下简单、准确的获取BLE设备的设备信息的技术问题

Benefits of technology

[0025]本发明通过采集至少一个BLE设备与主设备之间的通信数据;对所述通信数据进行解析,以获得所述通信数据对应的服务标识信息及设备基础信息;根据所述设备基础信息将所述通信数据进行分组,以获得所述BLE设备对应的通信数据子集;根据所述通信数据子集中各个通信数据对应的服务标识信息确定所述BLE设备对应的设备信息。由于是采集BLE设备与主设备之间的通信数据,不需要与BLE设备进行连接,获取服务标识信息及设备基础信息,根据设备基础信息对通信数据进行分组,以确定各个BLE设备对应的通信数据子集,而由于服务标识信息在通信过程中始终是保持一致的,因此,通过服务标识信息即可确定BLE设备对应的设备信息。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114697924B_ABST
    Figure CN114697924B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of Internet of Things, and discloses a BLE device information acquisition method and device, equipment and storage medium. The application collects communication data between at least one BLE device and a master device, analyzes the communication data to obtain service identification information and device basic information corresponding to the communication data, groups the communication data according to the device basic information to obtain a communication data subset corresponding to the BLE device, and determines device information corresponding to the BLE device according to the service identification information corresponding to each communication data in the communication data subset. Since the communication data between the BLE device and the master device is collected, the BLE device does not need to be connected, and since the service identification information corresponding to each service is consistent during the communication between the BLE device and the master device, the device information corresponding to the BLE device can be determined through the service identification information of each communication data in the communication data subset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a method, apparatus, device, and storage medium for acquiring BLE device information. Background Technology

[0002] Bluetooth Low Energy (BLE) is a low-cost, low-power wireless solution widely used in IoT devices. IoT devices using BLE are called BLE devices. During use, BLE devices with malicious behavior or security vulnerabilities often emerge. If security management software needs to detect BLE devices with malicious behavior or security vulnerabilities in advance, it needs to obtain and analyze the device information of the BLE device. However, in actual use, if the security management software connects to the BLE device and then obtains the device information, it will consume a lot of time, and the connection will also make it vulnerable to malicious attacks. Therefore, connecting to the BLE device first and then obtaining the device information is not practical. As for how to identify the device information of BLE devices without connecting to the BLE device, the existing technology proposes to identify them by the MAC address of the BLE device. However, since products from different batches of the same manufacturer may have different MAC addresses, constant compatibility is required, which is very complicated.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for acquiring BLE device information, aiming to solve the technical problem that existing technologies cannot easily and accurately acquire BLE device information without connecting to the BLE device.

[0005] To achieve the above objectives, the present invention provides a method for acquiring BLE device information, the method comprising the following steps: Collect communication data between at least one BLE device and the master device; The communication data is parsed to obtain the service identification information and basic device information corresponding to the communication data; The communication data is grouped according to the device basic information to obtain a subset of communication data corresponding to the BLE device; The device information corresponding to the BLE device is determined based on the service identifier information corresponding to each communication data in the communication data subset.

[0006] Optionally, before the step of collecting communication data between at least one BLE device and the master device, the method further includes: Obtain the communication channel between the BLE device and the master device; Accordingly, the step of collecting communication data between at least one BLE device and the master device includes: The communication data between at least one BLE device and the master device is collected in the communication channel.

[0007] Optionally, before the step of acquiring communication data between at least one BLE device and the master device in the communication channel, the method further includes: Detect whether broadcast data issued by a BLE device exists in the communication channel; When broadcast data published by a BLE device exists in the communication channel, the step of collecting communication data between at least one BLE device and the master device in the communication channel is performed.

[0008] Optionally, the step of determining the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset includes: Obtain the service identifier information corresponding to each communication data in the communication data subset; Based on the service identifier information, the service information corresponding to each communication data is searched in the standard service identifier mapping table; Match each service identifier with the preset service identifier; When a service identifier that matches the preset service identifier exists, the communication data corresponding to the matching service identifier is obtained and used as the target communication data. The device information corresponding to the BLE device is determined based on the target communication data and the service information.

[0009] Optionally, the step of determining the device information corresponding to the BLE device based on the target communication data and the service information includes: The target communication data is parsed to determine the device manufacturer information and device model information corresponding to the BLE device; The device information corresponding to the BLE device is constructed based on the service information, the device manufacturer information, and the device model information.

[0010] Optionally, after the step of matching each service identifier information with a preset service identifier, the method further includes: When no service identifier information that successfully matches the preset service identifier does not exist, the service identifier information that cannot be found in the standard service identifier mapping table will be used as the custom service identifier information. Based on the custom service identifier information and the preset custom identifier mapping table, determine the device manufacturer information, device model information, and custom service information; The device information corresponding to the BLE device is constructed based on the service information, the device manufacturer information, the device model information, and the custom service information.

[0011] Optionally, before the step of determining the device information corresponding to the BLE device based on the target communication data and the service information, the method further includes: Service identifiers that cannot be found in the standard service identifier mapping table will be used as custom service identifiers. Accordingly, the step of determining the device information corresponding to the BLE device based on the target communication data and the service information includes: The device information corresponding to the BLE device is determined based on the custom service identifier information, the target communication data, the service information, and the preset custom identifier mapping table.

[0012] Optionally, the step of determining the device information corresponding to the BLE device based on the custom service identifier information, the target communication data, the service information, and the preset custom identifier mapping table includes: The custom service information is determined based on the custom service identifier information and the preset custom identifier mapping table; The device manufacturer information and device model information corresponding to the BLE device are determined based on the custom service identifier information, the target communication data, and the preset custom identifier mapping table. The device information corresponding to the BLE device is constructed based on the service information, the custom service information, the device manufacturer information, and the device model information.

[0013] Optionally, the step of determining the device manufacturer information and device model information corresponding to the BLE device based on the custom service identifier information, the target communication data, and the preset custom identifier mapping table includes: The first device manufacturer information and the first device model information are determined based on the custom service identifier information and the preset custom identifier mapping table. The target communication data is parsed to determine the second device manufacturer information and the second device model information; The device manufacturer information corresponding to the BLE device is determined based on the first device manufacturer information and the second device manufacturer information. The device model information corresponding to the BLE device is determined based on the first device model information and the second device model information.

[0014] Optionally, before the step of collecting communication data between at least one BLE device and the master device, the method further includes: Collect equipment information on BLE devices manufactured by various BLE device manufacturers; A preset custom identifier mapping table is constructed based on the device information.

[0015] Optionally, the step of constructing a preset custom identifier mapping table based on the device information includes: The device information is analyzed to determine the custom service information and custom service identifier information corresponding to each device model; A preset custom identifier mapping table is constructed based on the custom service identifier information and the custom service information.

[0016] Optionally, after the step of determining the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset, the method further includes: The device information corresponding to the BLE device is analyzed to determine whether there are any potential risks; When a potential risk exists, a risk warning report is generated and displayed.

[0017] Furthermore, to achieve the above objectives, the present invention also proposes a BLE device information acquisition device, which includes the following modules: The data acquisition module is used to acquire communication data between at least one BLE device and the master device; The data parsing module is used to parse the communication data to obtain the service identification information and basic device information corresponding to the communication data; The data grouping module is used to group the communication data according to the device basic information to obtain a subset of communication data corresponding to the BLE device; The information confirmation module is used to determine the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset.

[0018] Optionally, the data acquisition module is also used to acquire the communication channel between the BLE device and the host device; The data acquisition module is also used to acquire communication data between at least one BLE device and the master device in the communication channel.

[0019] Optionally, the data acquisition module is further configured to acquire the communication channel between the BLE device and the master device; detect whether there is broadcast data published by the BLE device in the communication channel; and when there is broadcast data published by the BLE device in the communication channel, perform the step of acquiring communication data between at least one BLE device and the master device in the communication channel.

[0020] Optionally, the information confirmation module is further configured to: obtain service identifier information corresponding to each communication data in the communication data subset; search for service information corresponding to each communication data in a standard service identifier mapping table based on the service identifier information; match each service identifier information with a preset service identifier; when there is service identifier information that successfully matches the preset service identifier, obtain the communication data corresponding to the successfully matched service identifier information as the target communication data; and determine the device information corresponding to the BLE device based on the target communication data and the service information.

[0021] Optionally, the information confirmation module is further configured to parse the target communication data to determine the device manufacturer information and device model information corresponding to the BLE device; and to construct the device information corresponding to the BLE device based on the service information, the device manufacturer information and the device model information.

[0022] Optionally, the information confirmation module is further configured to, when no service identifier information that successfully matches the preset service identifier does not exist, use the service identifier information that cannot be found in the standard service identifier mapping table as the custom service identifier information; determine the device manufacturer information, device model information and custom service information based on the custom service identifier information and the preset custom identifier mapping table; and construct the device information corresponding to the BLE device based on the service information, the device manufacturer information, the device model information and the custom service information.

[0023] Furthermore, to achieve the above objectives, the present invention also proposes a BLE device information acquisition device, which includes: a memory, a processor, and a BLE device information acquisition program stored in the memory and executable on the processor. When the BLE device information acquisition program is executed, it implements the steps of the BLE device information acquisition method described above.

[0024] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a BLE device information acquisition program, wherein the BLE device information acquisition program, when executed, implements the steps of the BLE device information acquisition method as described above.

[0025] This invention collects communication data between at least one BLE device and a master device; parses the communication data to obtain service identification information and basic device information corresponding to the communication data; groups the communication data according to the basic device information to obtain a subset of communication data corresponding to each BLE device; and determines the device information corresponding to each BLE device based on the service identification information corresponding to each piece of communication data in the subset. Since it collects communication data between the BLE device and the master device, it does not require connecting to the BLE device to obtain service identification information and basic device information. Grouping the communication data according to the basic device information to determine the subset of communication data corresponding to each BLE device is not necessary. Furthermore, because the service identification information remains consistent throughout the communication process, the device information corresponding to each BLE device can be determined solely through the service identification information. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the structure of an electronic device in the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the BLE device information acquisition method of the present invention; Figure 3 This is a flowchart illustrating the second embodiment of the BLE device information acquisition method of the present invention; Figure 4 This is a flowchart illustrating the third embodiment of the BLE device information acquisition method of the present invention; Figure 5 This is a structural block diagram of the first embodiment of the BLE device information acquisition device of the present invention.

[0027] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0028] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0029] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of the BLE device information acquisition device in the hardware operating environment involved in the embodiment of the present invention.

[0030] like Figure 1As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0031] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0032] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a BLE device information acquisition program.

[0033] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the BLE device information acquisition device. The electronic device calls the BLE device information acquisition program stored in the memory 1005 through the processor 1001 and executes the BLE device information acquisition method provided in the embodiment of the present invention.

[0034] This invention provides a method for obtaining BLE device information, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of a BLE device information acquisition method according to the present invention.

[0035] In this embodiment, the BLE device information acquisition method includes the following steps: Step S10: Collect communication data between at least one BLE device and the master device; It should be noted that the execution subject of this embodiment can be the BLE device information acquisition device. The BLE device information acquisition device can be a personal computer, server, mobile phone or other electronic device, or a device that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the BLE device information acquisition device is used as an example to describe the BLE device information acquisition method of the present invention.

[0036] It should be noted that the master device can be any device that needs to connect to BLE devices in actual IoT use, such as mobile phones, computers, etc. One master device can connect to multiple BLE devices simultaneously. The communication data can be data generated by wireless communication after the BLE device connects to the master device, or it can be broadcast data published by the BLE device before connecting to the master device. The communication data can include request data and response data during the communication process.

[0037] In practical use, communication data between the BLE device and the host device can be collected by over-the-air packet capture, or other means can be used to collect communication data between the BLE device and the host device. This embodiment does not limit this.

[0038] Step S20: Parse the communication data to obtain the service identifier information and basic device information corresponding to the communication data; It should be noted that when a BLE device communicates with a host device, the communication data may contain the BLE device's basic device information and service identification information. The basic device information may include the device name, device ID, hardware version number, software version number, and device serial number. The service identification information may be the identifier information of the services provided by the BLE device, such as the UUID corresponding to the service. Therefore, the communication data can be parsed to extract the service identification information and basic device information.

[0039] Step S30: Group the communication data according to the device basic information to obtain a subset of communication data corresponding to the BLE device; Understandably, the basic device information may include information such as device identifier, device serial number, and device name. Therefore, each BLE device can be distinguished based on the basic device information to determine how many BLE devices' communication data were collected. At the same time, the communication data can be grouped to determine the communication data corresponding to each BLE device and to construct a subset of the communication data.

[0040] For example, if a total of 80 communication data points are collected, and the basic device information corresponding to each communication data point is analyzed, it is determined that there are 5 BLE devices with corresponding communication data points of 10, 30, 20, 10, and 10 respectively. Then, the communication data can be grouped to construct a subset of communication data corresponding to each BLE device, with each subset containing 10, 30, 20, 10, and 10 data points respectively.

[0041] Step S40: Determine the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset.

[0042] It should be noted that device information may include the service type, device type, and device model of the BLE device. When BLE devices communicate with the host device, they are based on the GATT (Generic Attribute Profile) protocol. The GATT protocol is a universal specification for data in Bluetooth connections. During the communication process between the BLE device and the host device, the service identifier information of each service remains unchanged. Therefore, based on the service identifier information, the various services of the BLE device can be identified, and then the corresponding device information of the BLE device can be obtained by analyzing the identification results.

[0043] Furthermore, in order to promptly identify potential risks associated with BLE devices, this embodiment may further include the following step after step S40: The device information corresponding to the BLE device is analyzed to determine whether there are any potential risks; if there are potential risks, a risk warning report is generated and displayed.

[0044] Understandably, after obtaining device information from surrounding BLE devices, analysis can be performed on the information of each BLE device to determine whether there are potential risks, such as: just-work mode, weak encryption algorithms, whether the device model already has known vulnerabilities, etc. Then, a risk warning report is generated based on the identified potential risks, and the warning report is displayed so that operators can clearly understand the potential risks and avoid them.

[0045] This embodiment collects communication data between at least one BLE device and a master device; parses the communication data to obtain service identifier information and basic device information corresponding to the communication data; groups the communication data according to the basic device information to obtain a subset of communication data corresponding to the BLE device; and determines the device information corresponding to the BLE device based on the service identifier information corresponding to each piece of communication data in the subset of communication data. Since it collects communication data between the BLE device and the master device, no connection to the BLE device is required. Because the service identifier information corresponding to each service remains consistent throughout the communication process between the BLE device and the master device, the device information corresponding to the BLE device can be determined through the service identifier information of each piece of communication data in the subset of communication data.

[0046] refer to Figure 3 , Figure 3 This is a flowchart illustrating a second embodiment of a BLE device information acquisition method according to the present invention.

[0047] Based on the first embodiment described above, the BLE device information acquisition method of this embodiment further includes, before step S10: Step S01: Obtain the communication channel between the BLE device and the master device; It should be noted that communication channels are the pathways for data transmission. In computer networks, channels are divided into physical channels and logical channels. BLE devices generally use fixed communication channels when communicating with the host device. For example, in practical applications, Bluetooth typically uses wireless broadcast channels 37, 38, and 39.

[0048] Accordingly, the step of collecting communication data between at least one BLE device and the master device includes: Step S10': Collect communication data between at least one BLE device and the master device in the communication channel.

[0049] It should be noted that if communication data from all communication channels is collected directly, communication data from other wireless devices may be collected. This data is noisy, and collecting a large amount of data will make noise reduction more complicated. Therefore, communication data between the BLE device and the host device can be collected from the communication channels commonly used for communication between the BLE device and the host device, which can reduce unnecessary noise data.

[0050] Furthermore, to save resources, this embodiment may include the following steps before step S10': Detect whether broadcast data published by a BLE device exists in the communication channel; if broadcast data published by a BLE device exists in the communication channel, perform the step of collecting communication data between at least one BLE device and the master device in the communication channel.

[0051] It should be noted that BLE devices broadcast data to their surroundings. If broadcast data from a BLE device is present in the communication channel, it indicates the presence of a BLE device in the vicinity, and data collection between the BLE device and the main device can continue. If no broadcast data is present in the communication channel, it indicates the absence of a BLE device in the vicinity, and data collection can be stopped, thus conserving device resources.

[0052] This embodiment acquires the communication channel between the BLE device and the host device; and collects communication data between at least one BLE device and the host device within this communication channel. Since there is a fixed communication channel for communication between the BLE device and the host device, collecting communication data within this fixed channel avoids collecting large amounts of noisy data, thus accelerating the data processing flow. Furthermore, this embodiment detects the presence of broadcast data from the BLE device within the communication channel before collecting the communication data. If broadcast data from the BLE device is present, then the communication data between the BLE device and the host device is collected. Because the presence of a BLE device can be determined through broadcast data, confirming the presence of broadcast data (i.e., the presence of a BLE device) before collecting communication data avoids unnecessary resource consumption.

[0053] refer to Figure 4 , Figure 4 This is a flowchart illustrating a third embodiment of a BLE device information acquisition method according to the present invention.

[0054] Based on the first embodiment described above, step S40 of the BLE device information acquisition method in this embodiment specifically includes: Step S401: Obtain the service identifier information corresponding to each communication data in the communication data subset; It is understandable that communication data may include service identifier information of the service being communicated. Therefore, the service identifier information in the communication data can be extracted and used as the service identifier information corresponding to the communication data.

[0055] Step S402: Search for the service information corresponding to each communication data in the standard service identifier mapping table based on the service identifier information; It should be noted that BLE devices communicate with the host device based on the GATT protocol. The GATT protocol defines a standard service identifier mapping table, which can include service information corresponding to each service identifier. The service information can include service descriptions, service formats, and other information. Therefore, the service information corresponding to each communication data can be found in the standard service identifier mapping table based on the service identifier information.

[0056] Step S403: Match each service identifier with the preset service identifier; It should be noted that the GATT protocol defines services for transmitting device information. Therefore, the service identifier of the service for transmitting device information can be used as the default service identifier. For example, the service identifier for the heart rate service is 180D, the service identifier for the battery service is 180F, and the service identifier for the device information service is 180A. Then, 180A can be used as the default service identifier.

[0057] Step S404: When there is service identifier information that successfully matches the preset service identifier, obtain the communication data corresponding to the successfully matched service identifier information as the target communication data; It is understandable that when there is service identifier information that successfully matches the preset service identifier, it means that there is data corresponding to the device information service in the communication data subset corresponding to the BLE device. Therefore, the communication data corresponding to the successfully matched service identifier information, that is, the data corresponding to the device information service, can be used as the target communication data.

[0058] Step S405: Determine the device information corresponding to the BLE device based on the target communication data and the service information.

[0059] It should be noted that device information may include BLE device service information, manufacturer information, and device model. The target communication data corresponds to the device information service, which can be a service where the BLE device informs the host device of its manufacturer, device model, and other information. Therefore, the device information corresponding to the BLE device can be determined based on the target communication data and service information.

[0060] In practical use, the target communication data can be parsed to determine the device manufacturer information and device model information corresponding to the BLE device; the device information corresponding to the BLE device can be constructed based on the service information, the device manufacturer information and the device model information.

[0061] It is understandable that the target communication data can be communication data generated by the device information service of the BLE device. The target communication data can contain device manufacturer information and device model information. Therefore, the target communication data can be parsed to extract the device manufacturer information and device model information from the target communication data, and then the device information corresponding to the BLE device can be constructed based on the service information, device manufacturer information and device model information.

[0062] Furthermore, in order to still obtain the device information of the BLE device when no target communication data is collected, this implementation step S403 may further include: If no service identifier information successfully matches the preset service identifier, the service identifier information that cannot be found in the standard service identifier mapping table will be used as the custom service identifier information; the device manufacturer information, device model information and custom service information will be determined based on the custom service identifier information and the preset custom identifier mapping table; the device information corresponding to the BLE device will be constructed based on the service information, the device manufacturer information, the device model information and the custom service information.

[0063] It should be noted that BLE device manufacturers may also provide custom services during the production process—additional services beyond the standard services. The service identifiers for these services cannot be found in the standard service identifier mapping table. Furthermore, even if the service type is the same, the corresponding service identifiers will differ between manufacturers. Manufacturers may also provide different custom services for different types of devices. The preset custom identifier mapping table can be constructed by collecting custom services and their identifiers from various device manufacturers. When no service identifier matches the preset one—that is, when no communication data corresponding to the device information service is collected—the custom service information can be searched in the preset custom identifier mapping table based on the custom service identifier. Then, the device manufacturer and model information of the BLE device can be determined based on the custom service information.

[0064] For example, BLE device A has four custom service identifiers: A, B, C, and D. Based on these identifiers, the corresponding custom services found in the preset custom identifier mapping table are F1, F2, F3, and F4. However, only BLE devices of model F manufactured by manufacturer E have all four custom services (F1, F2, F3, and F4) in the preset custom identifier mapping table. Therefore, it can be determined that the manufacturer of BLE device A is E, and the device model is F.

[0065] Furthermore, to more accurately determine the device information corresponding to the BLE device, this embodiment may include the following steps before step S405: Service identifiers that cannot be found in the standard service identifier mapping table will be used as custom service identifiers.

[0066] It is understandable that service identifiers that cannot be found in the standard service representation mapping table are service identifiers customized by the BLE device manufacturer.

[0067] Accordingly, step S405 may include: Step S405': Determine the device information corresponding to the BLE device based on the custom service identifier information, the target communication data, the service information, and the preset custom identifier mapping table.

[0068] It should be noted that the target communication data is data generated by the device information service. The device information of the BLE device can be obtained from the target communication data. However, occasionally, BLE devices may be disguised. For example, a BLE device manufactured by manufacturer A may have device information from manufacturer B included in the target communication data.

[0069] Furthermore, to illustrate how to determine the device information corresponding to the BLE device, step S405' of this embodiment may include: Custom service information is determined based on the custom service identifier information and the preset custom identifier mapping table; device manufacturer information and device model information corresponding to the BLE device are determined based on the custom service identifier information, the target communication data and the preset custom identifier mapping table; device information corresponding to the BLE device is constructed based on the service information, the custom service information, the device manufacturer information and the device model information.

[0070] It is understandable that the device manufacturer and model information corresponding to the BLE device can be obtained through the target communication data. The device manufacturer and model information corresponding to the BLE device can also be determined through the custom service identifier information and the preset custom identifier mapping table. Therefore, the device manufacturer and model information determined by the custom service identifier information and the preset custom identifier mapping table can be used to verify the device manufacturer and model information in the target communication data, so as to obtain the device manufacturer information corresponding to the BLE device more accurately.

[0071] Furthermore, to illustrate how to determine the device manufacturer information and device model information corresponding to the BLE device based on the custom service identifier information, the target communication data, and the preset custom identifier mapping table, this embodiment's steps for determining the device manufacturer information and device model information corresponding to the BLE device based on the custom service identifier information, the target communication data, and the preset custom identifier mapping table may include: The first device manufacturer information and the first device model information are determined based on the custom service identifier information and the preset custom identifier mapping table; the target communication data is parsed to determine the second device manufacturer information and the second device model information; the device manufacturer information corresponding to the BLE device is determined based on the first device manufacturer information and the second device manufacturer information; and the device model information corresponding to the BLE device is determined based on the first device model information and the second device model information.

[0072] It should be noted that if the device manufacturer information of the BLE device obtained in the target communication data is inconsistent with the device manufacturer information of the BLE device determined by the custom service identifier information and the preset custom identifier mapping table, it can be said that the device manufacturer information in the target communication data is spoofed. Therefore, the device manufacturer information of the BLE device determined by the custom service identifier information and the preset custom identifier mapping table can be used as the device manufacturer information corresponding to the BLE device. The process for determining the device model information and device manufacturer information is basically the same as that for determining the device manufacturer information, and will not be repeated here.

[0073] Furthermore, to facilitate the determination of the device manufacturer and model information corresponding to the BLE device based on the custom service identifier information, this embodiment may include the following step before step S10: Collect equipment information of BLE devices manufactured by various BLE device manufacturers; construct a preset custom identifier mapping table based on the equipment information.

[0074] It should be noted that by collecting and analyzing equipment information of different models of BLE devices produced by various BLE device manufacturers, the custom services and custom service identifiers corresponding to different models and manufacturers of BLE devices can be determined. Then, a preset custom identifier mapping table can be constructed to facilitate querying the custom services corresponding to the custom service identifier information of BLE devices, and then determining the corresponding device manufacturer and device model of BLE devices through the custom services.

[0075] In practical use, a preset custom identifier mapping table can be constructed based on the device information to analyze the device information and determine the custom service information and custom service identifier information corresponding to each device model; and a preset custom identifier mapping table can be constructed based on the custom service identifier information and the custom service information.

[0076] For example, if equipment manufacturer A has three models of BLE equipment: B, C, and D, and the custom services for B are F1 and F2 with corresponding custom service identifiers T1 and T2, the custom services for C are F1, F2, and F3 with corresponding custom service identifiers T1, T2, and T3, and the custom services for D are F1, F2, F3, and F4 with corresponding custom service identifiers T1, T2, T3, and T4, then a preset custom identifier mapping table can be constructed based on the custom services and custom service identifiers corresponding to each model of BLE equipment.

[0077] This embodiment obtains service identifier information corresponding to each communication data in a subset of communication data; searches for the corresponding service information in a standard service identifier mapping table based on the service identifier information; matches each service identifier information with a preset service identifier; when a service identifier information that successfully matches the preset service identifier exists, obtains the communication data corresponding to the successfully matched service identifier information as the target communication data; and determines the device information corresponding to the BLE device based on the target communication data and the service information. Since the preset service identifier is the service identifier corresponding to the device information service, the target communication data is the communication data generated by the device information service of the BLE device. The device manufacturer information and device model information corresponding to the BLE device can be obtained through the target communication data. Therefore, the device information corresponding to the BLE device can be quickly determined through the target communication data and the service information.

[0078] Furthermore, this embodiment of the invention also proposes a storage medium storing a BLE device information acquisition program, which, when executed by a processor, implements the steps of the BLE device information acquisition method described above.

[0079] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the BLE device information acquisition device of the present invention.

[0080] like Figure 5 As shown, the BLE device information acquisition device proposed in this embodiment of the invention includes: Data acquisition module 501 is used to acquire communication data between at least one BLE device and the master device; The data parsing module 502 is used to parse the communication data to obtain the service identification information and basic device information corresponding to the communication data; The data grouping module 503 is used to group the communication data according to the device basic information to obtain a subset of communication data corresponding to the BLE device; The information confirmation module 504 is used to determine the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset.

[0081] This embodiment collects communication data between at least one BLE device and a master device; parses the communication data to obtain service identification information and basic device information corresponding to the communication data; groups the communication data according to the basic device information to obtain a subset of communication data corresponding to each BLE device; and determines the device information corresponding to each BLE device based on the service identification information corresponding to each piece of communication data in the subset. Since it collects communication data between the BLE device and the master device, it does not require connecting to the BLE device to obtain service identification information and basic device information. Grouping the communication data according to the basic device information to determine the subset of communication data corresponding to each BLE device is not necessary. Furthermore, because the service identification information remains consistent throughout the communication process, the device information corresponding to each BLE device can be determined solely through the service identification information.

[0082] Furthermore, the data acquisition module 501 is also used to acquire the communication channel between the BLE device and the host device; The data acquisition module 501 is also used to acquire communication data between at least one BLE device and the master device in the communication channel.

[0083] Furthermore, the data acquisition module 501 is also used to detect whether there is broadcast data published by a BLE device in the communication channel; when there is broadcast data published by a BLE device in the communication channel, the step of acquiring communication data between at least one BLE device and the master device in the communication channel is performed.

[0084] Furthermore, the information confirmation module 504 is also used to obtain service identifier information corresponding to each communication data in the communication data subset; search for service information corresponding to each communication data in a standard service identifier mapping table according to the service identifier information; match each service identifier information with a preset service identifier; when there is service identifier information that successfully matches the preset service identifier, obtain the communication data corresponding to the successfully matched service identifier information as the target communication data; and determine the device information corresponding to the BLE device according to the target communication data and the service information.

[0085] Furthermore, the information confirmation module 504 is also used to parse the target communication data to determine the device manufacturer information and device model information corresponding to the BLE device; and to construct the device information corresponding to the BLE device based on the service information, the device manufacturer information and the device model information.

[0086] Furthermore, the information confirmation module 504 is also used to, when there is no service identifier information that successfully matches the preset service identifier, use the service identifier information that cannot be found in the standard service identifier mapping table as the custom service identifier information; determine the device manufacturer information, device model information and custom service information according to the custom service identifier information and the preset custom identifier mapping table; and construct the device information corresponding to the BLE device according to the service information, the device manufacturer information, the device model information and the custom service information.

[0087] Furthermore, the information confirmation module 504 is also used to use service identifier information that cannot be found in the standard service identifier mapping table as custom service identifier information; The information confirmation module 504 is further configured to determine the device information corresponding to the BLE device based on the custom service identifier information, the target communication data, the service information, and the preset custom identifier mapping table.

[0088] Furthermore, the information confirmation module 504 is also used to determine custom service information based on the custom service identifier information and the preset custom identifier mapping table; determine the device manufacturer information and device model information corresponding to the BLE device based on the custom service identifier information, the target communication data and the preset custom identifier mapping table; and construct the device information corresponding to the BLE device based on the service information, the custom service information, the device manufacturer information and the device model information.

[0089] Furthermore, the information confirmation module 504 is also used to determine the first device manufacturer information and the first device model information based on the custom service identifier information and the preset custom identifier mapping table; parse the target communication data to determine the second device manufacturer information and the second device model information; determine the device manufacturer information corresponding to the BLE device based on the first device manufacturer information and the second device manufacturer information; and determine the device model information corresponding to the BLE device based on the first device model information and the second device model information.

[0090] Furthermore, the data acquisition module 501 is also used to collect equipment information of BLE devices produced by various BLE device manufacturers; and to construct a preset custom identifier mapping table based on the equipment information.

[0091] Furthermore, the data acquisition module 501 is also used to analyze the device information to determine the custom service information and custom service identifier information corresponding to each device model; and to construct a preset custom identifier mapping table based on the custom service identifier information and the custom service information.

[0092] Furthermore, the information confirmation module 504 is also used to analyze the device information corresponding to the BLE device to determine whether there is a potential risk; when there is a potential risk, a risk warning report is generated and displayed.

[0093] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0094] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0095] In addition, for technical details not described in detail in this embodiment, please refer to the BLE device information acquisition method provided in any embodiment of the present invention, which will not be repeated here.

[0096] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0097] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0099] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for acquiring BLE device information, characterized in that, The BLE device information acquisition method includes the following steps: Collect communication data between at least one BLE device and the master device; The communication data is parsed to obtain the service identification information and basic device information corresponding to the communication data; The communication data is grouped according to the device basic information to obtain a subset of communication data corresponding to the BLE device; The device information corresponding to the BLE device is determined based on the service identifier information corresponding to each communication data in the communication data subset. The step of determining the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset includes: Obtain the service identifier information corresponding to each communication data in the communication data subset; Based on the service identifier information, the service information corresponding to each communication data is searched in the standard service identifier mapping table; Match each service identifier with the preset service identifier; When a service identifier that matches the preset service identifier exists, the communication data corresponding to the matching service identifier is obtained and used as the target communication data. The device information corresponding to the BLE device is determined based on the target communication data and the service information. The step of determining the device information corresponding to the BLE device based on the target communication data and the service information includes: The target communication data is parsed to determine the device manufacturer information and device model information corresponding to the BLE device; The device information corresponding to the BLE device is constructed based on the service information, the device manufacturer information, and the device model information.

2. The BLE device information acquisition method as described in claim 1, characterized in that, Before the step of collecting communication data between at least one BLE device and the master device, the method further includes: Obtain the communication channel between the BLE device and the master device; Accordingly, the step of collecting communication data between at least one BLE device and the master device includes: The communication data between at least one BLE device and the master device is collected in the communication channel.

3. The BLE device information acquisition method as described in claim 2, characterized in that, Before the step of acquiring communication data between at least one BLE device and the master device in the communication channel, the method further includes: Detect whether broadcast data issued by a BLE device exists in the communication channel; When broadcast data published by a BLE device exists in the communication channel, the step of collecting communication data between at least one BLE device and the master device in the communication channel is performed.

4. The BLE device information acquisition method as described in claim 1, characterized in that, After the step of matching each service identifier information with a preset service identifier, the method further includes: When no service identifier information that successfully matches the preset service identifier does not exist, the service identifier information that cannot be found in the standard service identifier mapping table will be used as the custom service identifier information. Based on the custom service identifier information and the preset custom identifier mapping table, determine the device manufacturer information, device model information, and custom service information; The device information corresponding to the BLE device is constructed based on the service information, the device manufacturer information, the device model information, and the custom service information.

5. The BLE device information acquisition method as described in claim 1, characterized in that, Before the step of determining the device information corresponding to the BLE device based on the target communication data and the service information, the method further includes: Service identifiers that cannot be found in the standard service identifier mapping table will be used as custom service identifiers. Accordingly, the step of determining the device information corresponding to the BLE device based on the target communication data and the service information includes: The device information corresponding to the BLE device is determined based on the custom service identifier information, the target communication data, the service information, and the preset custom identifier mapping table.

6. The BLE device information acquisition method as described in claim 5, characterized in that, The step of determining the device information corresponding to the BLE device based on the custom service identifier information, the target communication data, the service information, and the preset custom identifier mapping table includes: The custom service information is determined based on the custom service identifier information and the preset custom identifier mapping table; The device manufacturer information and device model information corresponding to the BLE device are determined based on the custom service identifier information, the target communication data, and the preset custom identifier mapping table. The device information corresponding to the BLE device is constructed based on the service information, the custom service information, the device manufacturer information, and the device model information.

7. The BLE device information acquisition method as described in claim 6, characterized in that, The step of determining the device manufacturer information and device model information corresponding to the BLE device based on the custom service identifier information, the target communication data, and the preset custom identifier mapping table includes: The first device manufacturer information and the first device model information are determined based on the custom service identifier information and the preset custom identifier mapping table. The target communication data is parsed to determine the second device manufacturer information and the second device model information; The device manufacturer information corresponding to the BLE device is determined based on the first device manufacturer information and the second device manufacturer information. The device model information corresponding to the BLE device is determined based on the first device model information and the second device model information.

8. The BLE device information acquisition method as described in claim 4 or 5, characterized in that, Before the step of collecting communication data between at least one BLE device and the master device, the method further includes: Collect equipment information on BLE devices manufactured by various BLE device manufacturers; A preset custom identifier mapping table is constructed based on the device information.

9. The BLE device information acquisition method as described in claim 8, characterized in that, The step of constructing a preset custom identifier mapping table based on the device information includes: The device information is analyzed to determine the custom service information and custom service identifier information corresponding to each device model; A preset custom identifier mapping table is constructed based on the custom service identifier information and the custom service information.

10. The BLE device information acquisition method according to any one of claims 1-7, characterized in that, After the step of determining the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset, the method further includes: The device information corresponding to the BLE device is analyzed to determine whether there are any potential risks; When a potential risk exists, a risk warning report is generated and displayed.

11. A BLE device information acquisition device, characterized in that, The BLE device information acquisition device includes the following modules: The data acquisition module is used to acquire communication data between at least one BLE device and the master device; The data parsing module is used to parse the communication data to obtain the service identification information and basic device information corresponding to the communication data; The data grouping module is used to group the communication data according to the device basic information to obtain a subset of communication data corresponding to the BLE device; The information confirmation module is used to determine the device information corresponding to the BLE device based on the service identifier information corresponding to each communication data in the communication data subset; The information confirmation module is further configured to: acquire service identifier information corresponding to each communication data in the communication data subset; search for service information corresponding to each communication data in a standard service identifier mapping table based on the service identifier information; match each service identifier information with a preset service identifier; when a service identifier information that successfully matches the preset service identifier exists, acquire the communication data corresponding to the successfully matched service identifier information as the target communication data; and determine the device information corresponding to the BLE device based on the target communication data and the service information. The information confirmation module is further configured to parse the target communication data to determine the device manufacturer information and device model information corresponding to the BLE device; and to construct the device information corresponding to the BLE device based on the service information, the device manufacturer information and the device model information.

12. The BLE device information acquisition device as described in claim 11, characterized in that, The data acquisition module is also used to acquire the communication channel between the BLE device and the host device; The data acquisition module is also used to acquire communication data between at least one BLE device and the master device in the communication channel.

13. The BLE device information acquisition device as described in claim 12, characterized in that, The data acquisition module is also used to detect whether there is broadcast data published by a BLE device in the communication channel; when there is broadcast data published by a BLE device in the communication channel, the step of acquiring communication data between at least one BLE device and the master device in the communication channel is performed.

14. The BLE device information acquisition device as described in claim 11, characterized in that, The information confirmation module is further configured to, when no service identifier information that successfully matches the preset service identifier does not exist, use the service identifier information that cannot be found in the standard service identifier mapping table as the custom service identifier information; determine the device manufacturer information, device model information and custom service information based on the custom service identifier information and the preset custom identifier mapping table; and construct the device information corresponding to the BLE device based on the service information, the device manufacturer information, the device model information and the custom service information.

15. A BLE device information acquisition device, characterized in that, The BLE device information acquisition device includes: a memory, a processor, and a BLE device information acquisition program stored in the memory and executable on the processor. When the BLE device information acquisition program is executed, it implements the steps of the BLE device information acquisition method as described in any one of claims 1-10.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a BLE device information acquisition program, which, when executed, implements the steps of the BLE device information acquisition method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Information providing method and mobile terminal therefor

    CN103856629A

  • Equipment discovery and Bluetooth broadcasting method and device, electronic equipment and storage medium

    CN112105009A