Identity recognition information generation method and device of Bluetooth equipment and electronic equipment

By extracting the timestamp sequence of broadcast packets from Bluetooth devices, cross-layer fingerprints are generated for identity recognition, solving the security and stability issues of low-power Bluetooth device identity recognition and achieving highly accurate and long-term stable device recognition.

CN122002296APending Publication Date: 2026-05-08HANGZHOU INST FOR ADVANCED STUDY UCAS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU INST FOR ADVANCED STUDY UCAS
Filing Date
2025-12-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, the identification methods for Bluetooth Low Energy devices suffer from problems such as easily forged payload information, poor security, and poor stability of data packet signal characteristics, resulting in low identification accuracy.

Method used

By extracting the timestamp sequence of broadcast packets from Bluetooth devices, the broadcast event interval is determined and classified. Combining the broadcast event interval parameter, broadcast delay generation parameter, and time drift value, a cross-layer fingerprint is generated for identity recognition.

Benefits of technology

It achieves highly accurate and stable identification of Bluetooth devices, supports electromagnetic monitoring and security auditing, avoids the impact of system errors, and has long-term stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122002296A_ABST
    Figure CN122002296A_ABST
Patent Text Reader

Abstract

The invention discloses an identity recognition information generation method and device of Bluetooth equipment and electronic equipment, and relates to the technical field of electromagnetic supervision safety, and the method comprises the steps: determining a broadcast event interval and an interval type according to a timestamp sequence of a broadcast packet; determining a broadcast event interval parameter, a broadcast delay generation parameter and a time drift value according to the broadcast event interval and the jump discontinuity point in the interval category; and obtaining the identity recognition information of the Bluetooth equipment by combining the parameters. The problems that identity recognition information generated according to load information is prone to failure or counterfeiting and poor in safety, and identity recognition information generated according to the characteristics of data packet signals is low in accuracy and poor in stability can be solved. According to the method, broadcast event interval parameters are extracted from an application layer, broadcast delay generation parameters are extracted from a protocol layer, time drift values are extracted from a hardware layer, cross-layer fingerprints are jointly formed to serve as identity recognition information, the identity recognition information has long-term stability, and accurate, stable and repeatable recognition can be conducted on Bluetooth equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electromagnetic regulatory security technology, specifically to a method, apparatus, and electronic device for generating identification information for Bluetooth devices. Background Technology

[0002] Bluetooth Low Energy (BLE) is widely used in smartphones, computers, headphones, fitness trackers, smart home devices, and more. Most BLE devices employ a random address strategy; however, malicious devices can exploit this mechanism to hide their actual addresses, making it difficult for regulators to effectively monitor BLE devices, analyze abnormal traffic, and identify potentially high-risk communications. Therefore, identifying BLE devices is a crucial means of ensuring electromagnetic security.

[0003] Currently, fingerprints can be created using the specificity of the payload information carried by Bluetooth Low Energy broadcast packets or data packets, and these fingerprints can be used as identification information for Bluetooth devices. Alternatively, features such as CFO (Carrier Frequency Offset) and RSSI (Received Signal Strength Indicator) of the data packet signal can be extracted for device identification. However, the specificity of payload information is easily eliminated, and payload information is extremely easy to forge. Malicious devices can still impersonate legitimate devices and evade supervision by forging this field. In addition, the features of data packet signals have poor stability, are difficult to extract, and are prone to introducing errors, affecting the accuracy of identification.

[0004] Therefore, the related technologies suffer from problems such as the vulnerability or forgery of identity information generated based on payload information, poor security, and low accuracy and stability in generating identity information based on the characteristics of data packet signals. Summary of the Invention

[0005] In view of this, the present invention provides a method, apparatus and electronic device for generating identification information of Bluetooth devices, in order to solve the problems that identification information generated based on payload information is prone to failure or counterfeiting and has poor security, and that identification information generated based on the characteristics of data packet signals has low accuracy and poor stability.

[0006] In a first aspect, this application provides a method for generating identification information for a Bluetooth device, the method comprising: Based on the timestamp sequence of broadcast packets from Bluetooth devices, the broadcast event interval is determined and classified to obtain a first preset number of interval categories; Based on the broadcast event interval in the interval category, determine the broadcast event interval parameter, where the broadcast event interval parameter is used to determine the numerical range of the broadcast event interval; Based on the jump discontinuities in the broadcast event interval, a second preset number of clusters are determined, and the broadcast delay generation parameters are determined based on the average interval of the broadcast event interval in the clusters. The time drift value is obtained based on the broadcast event interval parameter, the average interval, and the broadcast delay generation parameter; By combining the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value, the identification information of the Bluetooth device can be obtained.

[0007] Secondly, this application provides an identification information generation device for a Bluetooth device, the device comprising: The interval determination module is used to determine the broadcast event interval based on the timestamp sequence of the broadcast packets of the Bluetooth device, and to classify the broadcast event intervals to obtain a first preset number of interval categories; The first parameter determination module is used to determine the broadcast event interval parameter based on the broadcast event interval in the interval category, wherein the broadcast event interval parameter is used to determine the numerical range of the broadcast event interval; The second parameter determination module is used to determine a second preset number of clusters based on the jump discontinuities in the broadcast event interval, and to determine the broadcast delay generation parameter based on the average interval of the broadcast event interval in the cluster. The third parameter determination module is used to obtain the time drift value based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter. The information generation module combines the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value to obtain the identification information of the Bluetooth device.

[0008] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the Bluetooth device identification information generation method of the first aspect or any corresponding embodiment described above.

[0009] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the Bluetooth device identification information generation method of the first aspect or any corresponding embodiment described above.

[0010] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the Bluetooth device identification information generation method of the first aspect or any corresponding embodiment described above.

[0011] This application addresses the problems of Bluetooth device identification information. The method determines broadcast event intervals based on the timestamp sequence of broadcast packets, classifies these intervals into categories, determines broadcast event interval parameters based on these categories, determines the average interval value and broadcast delay generation parameters based on the jump discontinuities within the broadcast event intervals, and obtains a time drift value based on the broadcast event interval parameters, average interval value, and broadcast delay generation parameters. Combining these parameters yields the identification information of the Bluetooth device. This solves the problems of easily failing or being forged, resulting in poor security, and the low accuracy and instability of identification information generated based on data packet signal characteristics. The method extracts broadcast event interval parameters from the application layer, broadcast delay generation parameters from the protocol layer, and time drift values ​​from the hardware layer, collectively forming a cross-layer fingerprint. Using this cross-layer fingerprint as identification information enables highly accurate identification of individual Bluetooth devices. By avoiding the influence of system errors during parameter extraction, the identification information exhibits long-term stability, allowing for stable and repeatable identification of Bluetooth devices, thus supporting electromagnetic surveillance and security auditing tasks. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0013] Figure 1 This is a flowchart illustrating a method for generating identification information of a Bluetooth device according to an embodiment of this application; Figure 2 This is a flowchart of multi-layer fingerprint construction and fingerprint matching according to an embodiment of this application; Figure 3 This is a schematic diagram of the fingerprint extraction process according to an embodiment of this application; Figure 4 This is a schematic diagram illustrating the process of determining broadcast delay generation parameters according to an embodiment of this application; Figure 5 This is a structural block diagram of a Bluetooth device identification information generation apparatus according to an embodiment of this application; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0016] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0017] With the development of wireless communication technology, Bluetooth Low Energy (BLE), as a representative of short-range communication, is widely used in smartphones, computers, headphones, fitness trackers, and smart home devices due to its low power consumption and good adaptability. Most Bluetooth Low Energy devices employ a random address strategy, using a random value as their MAC (Media Access Control Address) address during broadcasting, connection processes, and communication, changing it every 10-15 minutes. Malicious devices can exploit this mechanism to hide their actual address, making it difficult for regulators to effectively monitor Bluetooth devices, analyze abnormal traffic, and identify potentially high-risk communications. Therefore, to ensure electromagnetic security, it is necessary to identify Bluetooth Low Energy devices. Existing technologies mainly employ two methods for identifying Bluetooth Low Energy devices: application-layer data-driven fingerprint recognition and physical-layer signal feature-driven fingerprint recognition.

[0018] Application-layer data-driven fingerprinting establishes fingerprints based on the specificity of the payload information carried by Bluetooth Low Energy (BLE) broadcast packets or data packets. For example, it extracts feature fields from the broadcast packet payload that remain unchanged before and after MAC address changes; it obtains the device's GATT (General Attribute Specification) profile, which may contain specific fields such as device type and device name, and uses the values ​​of these fields as fingerprints. Physical-layer signal feature-driven fingerprinting identifies devices by extracting features from data packet signals that reflect the hardware's fingerprint. For example, it identifies different device models by extracting CFO (Carrier Frequency Offset) and I / Q imbalance features; it links classic Bluetooth data packets and BLE data packets of dual-mode Bluetooth devices (which simultaneously support classic and BLE) protocol stacks (the smallest time scale for Bluetooth) by aligning the time slots of both protocol stacks, using the classic Bluetooth address for device identification; and it identifies stationary devices by observing changes in the RSSI (Receiver Signal Strength Index) of the data packets.

[0019] However, existing technologies have significant shortcomings in practical applications within electromagnetic regulation scenarios. Application-layer data-driven fingerprinting is easily modified through anonymization, eliminating field specificity, and these fields are easily forged. Malicious devices can still evade regulation by forging these fields to mimic a legitimate device. Physical-layer signal feature-driven fingerprinting relies solely on acquired signal features, but these features are unstable, difficult to extract, and prone to errors, affecting accuracy. For example, the "device name" field used for fingerprinting in GATT can be uniformly anonymized to the same information, thus losing its ability to identify individual devices. CFO features are easily affected by temperature and change drastically, while RSSI features are affected by location and multipath effects, making them difficult to maintain stability. In summary, existing methods do not simultaneously possess both fine-grained discrimination and good stability.

[0020] Based on the above, this application provides a method for generating identification information for Bluetooth devices. By extracting the hyperparameters of the application and protocol stack, as well as the device's clock precision, from the broadcast interval of Bluetooth broadcast packets, this method uses fingerprints. These parameters are highly coupled to the chip model and the individual chip. This fingerprint can be used to identify Bluetooth device chips and individual devices. Furthermore, by incorporating a switching point identification algorithm during fingerprint extraction, fingerprints can be extracted for a single device under different broadcast service operations. This method extracts cross-layer fingerprints of "application + protocol + hardware," resulting in fingerprints with long-term stability, enabling highly accurate identification of Bluetooth chips and individual Bluetooth devices, achieving individual-level accuracy. This method can solve the problem of stable and repeatable terminal identification under conditions of low-power Bluetooth device address randomization and broadcast payload anonymization, and supports electromagnetic surveillance and security auditing.

[0021] According to an embodiment of this application, an embodiment of a method for generating identification information of a Bluetooth device is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0022] This embodiment provides a method for generating identification information for a Bluetooth device. Figure 1 This is a flowchart of a method for generating identification information of a Bluetooth device according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps: Step S101: Determine the broadcast event interval based on the timestamp sequence of the broadcast packets of the Bluetooth device, and classify the broadcast event intervals to obtain a first preset number of interval categories.

[0023] Specifically, this embodiment can use any device capable of capturing Bluetooth broadcast packets to capture the broadcast packets of the Bluetooth device, and use a general Bluetooth broadcast packet parser to parse the broadcast packets, such as open-source hardware Ubertooth One, software-defined radio (SDR), etc.

[0024] Obtain the timestamp sequence of broadcast packets. For example, the timestamp sequence of n broadcasts from the same MAC address is: .

[0025] Based on the timestamp sequence, determine the broadcast event interval, for example: the interval between observed broadcast events. It can be obtained from the first difference of the timestamp sequence, denoted as .

[0026] The broadcast event intervals are categorized to obtain a first preset number of interval categories, and then categorized for all... Assign a class label Numerical range, for example: interval category The numerical range satisfies: in 10000 or other integers. Broadcast event intervals within the same numerical range will be grouped into the same interval category.

[0027] After this step is completed, the original broadcast timestamp sequence is divided into several interval categories, each containing a time interval sequence generated by the same valid broadcast service. All subsequent steps are applied to each interval category.

[0028] Step S102: Determine the broadcast event interval parameter based on the broadcast event interval in the interval category, wherein the broadcast event interval parameter is used to determine the numerical range of the broadcast event interval.

[0029] Specifically, this step is used to extract the application layer fingerprint. Based on the broadcast event interval in the interval category, the minimum broadcast event interval parameter is extracted ( ) and maximum broadcast event interval parameter ( Broadcast event interval parameter () This includes minimum and maximum broadcast event interval parameters, which determine the numerical range of the broadcast event interval. The broadcast event interval parameter is used as an application layer fingerprint.

[0030] Step S103: Determine a second preset number of clusters based on the jump discontinuities in the broadcast event intervals, and determine the broadcast delay generation parameters based on the average interval of the broadcast event intervals in the clusters.

[0031] Specifically, this step is used to extract protocol layer fingerprints, for example, by using broadcast delay generation parameters as protocol layer fingerprints.

[0032] Identify jump discontinuities within broadcast event intervals. For example, if the difference between two adjacent broadcast event intervals is greater than 1µs, a jump discontinuity is considered to exist between them. Cluster the broadcast event intervals based on these jump discontinuities, determining a second preset number of clusters (one or more). Each cluster contains multiple broadcast event intervals; determine the average interval value for each cluster. , This represents the average interval of the i-th cluster.

[0033] Based on the average interval Extract `advDelay` and its generation parameter `K` from the broadcast event intervals. `K` is the broadcast delay generation parameter. For example, the average interval value... Sort the data and calculate the average interval of the sorted data. Perform a lookup operation to calculate the result. ;according to Design an equation to be optimized with K, and make the equation reach the optimization objective by modifying the value of K, and use the K at this time as the broadcast delay generation parameter.

[0034] Step S104: Obtain the time drift value based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter.

[0035] Specifically, this step is used to extract hardware layer fingerprints, for example, using time drift caused by clock precision as a hardware layer fingerprint.

[0036] Time drift, caused by clock precision, is a specific type of hardware fingerprint. This is achieved by extracting broadcast event interval parameters and average interval values. After generating the broadcast delay parameter K, the time drift value can be calculated using formulas, such as calculating the average value for each interval. The difference between the minimum broadcast event interval parameter and the broadcast event interval parameter is used to calculate the sum of the differences under all clusters. The sum of the differences is then used to perform a modulo operation with the broadcast delay generation parameter K. The result is divided by the total number of clusters, and the final result is used as the time drift value (offset).

[0037] Step S105: Combine the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value to obtain the identification information of the Bluetooth device.

[0038] Specifically, by combining the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value, the identification information of the Bluetooth device is obtained. For example, for each broadcast packet with a MAC address, due to the service switching point, several (n) identification information entries for the Bluetooth device can be generated. Each identification information entry is generated by the application fingerprint. The protocol fingerprint (K) and hardware fingerprint (offset) are components of the device fingerprint. In other words, the identification information is the device fingerprint. As shown in formula (1).

[0039] (1) The above process is as follows Figure 2 As shown, broadcast packet sniffing and broadcast time interval extraction are performed. The broadcast interval is used as the application layer fingerprint, the protocol fingerprint is generated based on the random delay, and the fingerprint is generated based on the time offset. The application layer fingerprint (broadcast interval parameter), the protocol layer fingerprint (random delay generation parameter K), and the hardware layer fingerprint (average time offset) are obtained, thus completing the construction of multi-layer fingerprints.

[0040] The Bluetooth device identification information generation method provided in this embodiment determines the broadcast event interval based on the timestamp sequence of broadcast packets, classifies the broadcast event intervals to obtain interval categories, determines broadcast event interval parameters based on the broadcast event intervals in the interval categories, determines the interval average value and broadcast delay generation parameters based on the jump discontinuities in the broadcast event intervals, obtains the time drift value based on the broadcast event interval parameters, the interval average value, and the broadcast delay generation parameters, and combines the broadcast event interval parameters, the broadcast delay generation parameters, and the time drift value to obtain the Bluetooth device identification information. This method extracts broadcast event interval parameters from the application layer, broadcast delay generation parameters from the protocol layer, and time drift values ​​from the hardware layer, collectively forming a cross-layer fingerprint. Using this cross-layer fingerprint as identification information enables highly accurate identification of individual Bluetooth devices. By avoiding the influence of system errors during parameter extraction, the identification information has long-term stability, allowing for stable and repeatable identification of Bluetooth devices, thus supporting electromagnetic surveillance and security auditing tasks. It solves the problems of identification information generated based on payload information being prone to failure or forgery and having poor security, and the low accuracy and poor stability of identification information generated based on data packet signal characteristics.

[0041] As an optional embodiment, before determining the broadcast event interval based on the timestamp sequence of broadcast packets from the Bluetooth device, the method further includes: Capture broadcast packets to be filtered from Bluetooth devices; Use the broadcast packets to be filtered, whose broadcast type is the target broadcast type, as intermediate broadcast packets; Parse the intermediate broadcast packets to obtain the parsing results, and perform data integrity verification on the intermediate broadcast packets based on the parsing results; The intermediate broadcast packet that passes the verification will be used as the broadcast packet; The broadcast packets are grouped according to their broadcast addresses to obtain a third preset number of broadcast packet combinations, wherein the broadcast packets in the broadcast packet combination have the same broadcast address.

[0042] Specifically, this embodiment can be implemented using any device capable of capturing Bluetooth broadcast packets, with the captured Bluetooth device's broadcast packets serving as the broadcast packets to be screened.

[0043] Target broadcast types include: connectable and scannable non-directional broadcast (ADV_IND), non-connectable and scannable non-directional broadcast (ADV_SCAN_IND), and non-connectable and non-scannable broadcast (ADV_NONCONN_IND).

[0044] Broadcast packets of the target broadcast type are used as intermediate broadcast packets, meaning only broadcast packets of the target broadcast type are retained, and broadcast packets of other types are not retained.

[0045] Parse intermediate broadcast packets to obtain the parsing results. For example, use a general Bluetooth broadcast packet parser to parse intermediate broadcast packets and obtain the parsing results, such as open-source hardware Ubertooth One and Software-Defined Radio (SDR).

[0046] Based on the parsing results, perform data integrity verification on the intermediate broadcast packets, for example, by performing CRC verification on the intermediate broadcast packets.

[0047] Intermediate broadcast packets that pass verification are used as broadcast packets; that is, broadcast packets with correct CRC verification are retained, while broadcast packets that fail verification are not retained. Finally, the remaining broadcasts are grouped by the broadcast address field for subsequent fingerprint generation. The broadcast address, for example, is a MAC address. The broadcast packets are grouped according to their broadcast addresses to obtain a third preset number of broadcast packet combinations, where the broadcast packets in each combination share the same broadcast address. This third preset number represents multiple combinations; no specific limit is imposed here.

[0048] The above process is as follows Figure 3 As shown, broadcast packets are captured and then grouped into three groups: MAC1, MAC2, and MAC3.

[0049] In this embodiment of the application, the solution filters target Bluetooth broadcast types, verifies packet data integrity, groups by broadcast address, filters invalid packets, and ensures data reliability, thereby providing accurate data for subsequent Bluetooth device fingerprint generation and improving the accuracy and efficiency of fingerprint recognition.

[0050] As an optional embodiment, after grouping the broadcast packets according to their broadcast addresses to obtain a third preset number of broadcast packet combinations, the method further includes: Based on the broadcast packets in the broadcast packet combination, obtain the timestamp sequence; Perform first-order difference calculation on the timestamp sequence to obtain the first calculation result, and obtain the broadcast event interval based on the first calculation result; Obtain existing interval categories, and determine the reference value range based on the value of the broadcast event interval in the existing interval categories and the first parameter; If the broadcast event interval is not within the reference value range, create a new interval category; If the broadcast event interval is within the reference value range, add the broadcast event interval to the existing interval category; Based on the existing interval categories and the newly added interval categories, a first preset number of interval categories are obtained; Obtain the service switching point in the interval category, and divide the broadcast stream corresponding to the interval category into broadcast stream segments based on the service switching point. The identity recognition information includes the sub-identity recognition information corresponding to the broadcast stream segments.

[0051] Specifically, the timestamp sequence is obtained based on the broadcast packets in the broadcast packet combination. For example, the timestamp sequence of n broadcasts from the same MAC address is: .

[0052] Perform first-order difference calculation on the timestamp sequence to obtain the first calculation result, and then obtain the broadcast event interval based on the first calculation result. For example: the observed interval of broadcast events It can be obtained from the first difference of the timestamp sequence, denoted as .

[0053] Retrieve existing interval categories, and determine a reference value range based on the broadcast event interval values ​​within those categories and the first parameter. For example: Interval Category For existing interval categories, the broadcast event interval values ​​in existing interval categories include the minimum interval. and maximum interval The first parameter is , It must be 10000 or another integer. Refer to the range of values, for example: .

[0054] From broadcast event interval Begin with intervals for all broadcast events. Assign a class label That is, the interval between broadcast events Classify them. The allocation rule is: for ,like ,kind , The number of existing classes, and the broadcast event interval. In interval category Within the corresponding reference value range, then let The broadcast event interval will be added to an existing interval category. .

[0055] If the broadcast event interval is not within the reference value range, create a new interval category, for example: Create a new interval category ,make . .in, It records the starting point of each class during its creation. .

[0056] The existing interval categories and the newly added interval categories are combined to form the first preset number of interval categories.

[0057] Perform a validity check on each interval category, for example: for interval category ,when When: ,Right now The number of broadcast event intervals included is greater than ,but It is a valid class. This is the switching point for the service, where N and L have values ​​of 20 and 11, respectively.

[0058] Get the service switch point in the interval category , For interval category The first broadcast event interval. Based on the service switching point, the broadcast stream corresponding to the interval category is divided into broadcast stream segments, where the identity information includes the sub-identity information corresponding to the broadcast stream segments.

[0059] After this step, the original broadcast timestamp sequence is divided into several valid classes, each containing a time interval sequence generated by the same valid broadcast service. All subsequent steps are applied to each class. The above process is as follows: Figure 3 As shown, the switching point is identified.

[0060] In this embodiment, by incorporating a switching point recognition algorithm during fingerprint extraction, fingerprints for a single device under different broadcast services can be extracted. This solution, by processing broadcast packet timestamp intervals, classifying interval categories, and identifying service switching points, divides the broadcast stream into segments, enabling the extraction of fingerprints for the same device under different broadcast services, thus improving the accuracy of device identification and adaptability to multiple service scenarios.

[0061] As an optional embodiment, the broadcast event interval parameter is determined based on the broadcast event interval in the interval category, including: Among the broadcast event intervals included in the interval category, determine the first broadcast event interval with the largest value and the second broadcast event interval with the smallest value; The first target parameter is obtained based on the ratio of the first broadcast event interval to the second parameter and the second parameter. The second target parameter is obtained based on the ratio of the second broadcast event interval to the second parameter, the second parameter, and the third parameter; Based on the first target parameter and the second target parameter, the broadcast event interval parameter is obtained.

[0062] Specifically, among the broadcast event intervals included in the interval category, the first broadcast event interval with the largest value and the second broadcast event interval with the smallest value are determined. For example, if the interval category is... The interval between the first broadcast events is The interval between the second broadcast events is .

[0063] The second parameter is, for example, 625 or other integers, and the ratio of the first broadcast event interval to the second parameter is [value missing]. The first target parameter is obtained based on the ratio of the first broadcast event interval to the second parameter and the second parameter. ), as shown in formula (2).

[0064] (2) The third parameter is, for example, 10000 or other integers, and the ratio of the second broadcast event interval to the second parameter is... The second target parameter is obtained based on the ratio of the second broadcast event interval to the second parameter, the second parameter, and the third parameter. As shown in formula (3).

[0065] (3) By integrating the first and second target parameters, the broadcast event interval parameter is obtained. That is, in this embodiment, the minimum and maximum broadcast event interval parameters are extracted to form the application layer fingerprint. The above process is as follows: Figure 3 As shown, the broadcast time interval sequence (from broadcast A) and the broadcast time interval sequence (from broadcast B) are obtained. The application fingerprint is extracted from the broadcast time interval sequence to obtain the application layer fingerprint.

[0066] In this embodiment, the extreme values ​​of broadcast event intervals within the interval category are extracted, and standardized calculations are performed in combination with parameters to generate application-layer fingerprints. This provides accurate and stable application-layer feature support for Bluetooth device identification, improving identification efficiency and accuracy.

[0067] As an optional embodiment, a second preset number of clusters are determined based on the jump discontinuities in the broadcast event intervals, and broadcast delay generation parameters are determined based on the average interval of the broadcast event intervals in the clusters, including: The broadcast event intervals are sorted according to a preset order, and the data difference between adjacent broadcast event intervals is determined. The jump discontinuity point is determined based on the interval between adjacent broadcast events where the data difference is greater than a preset threshold; Clustering of broadcast event intervals based on jump discontinuities yields a second preset number of clusters. Determine the average interval of broadcast event intervals in the cluster and generate a sequence of average intervals containing the average intervals; Perform a difference operation on the interval average sequence to obtain the average difference; Based on the average difference and the parameters to be optimized, an equation to be optimized is generated. By adjusting the values ​​of the parameters to be optimized within a preset range, the equation to be optimized is made to achieve the optimization target. The parameters to be optimized that enable the equation to achieve the optimization objective will be used as the broadcast delay generation parameters.

[0068] Specifically, in this embodiment, after extracting the fingerprint at the application layer, an attempt is made to extract advDelay and its generation parameter K from the broadcast event interval.

[0069] For each observed broadcast event interval ,satisfy: .

[0070] Where advInterval is the broadcast interval, RND is a random integer, K is the parameter for generating advDelay, offset is the time drift caused by the device clock, and error is the random error.

[0071] Preset orders include, for example, ascending order, descending order, etc. Broadcast event intervals are sorted according to the preset order, and then clustered by identifying jump breakpoints to obtain m distinct clusters.

[0072] The method for identifying jump discontinuities includes: first, determining the data difference between adjacent broadcast event intervals; determining a preset threshold, such as 1µs or a value between 0.5 and 1.5µs; and then identifying jump discontinuities based on adjacent broadcast event intervals where the data difference is greater than the preset threshold. Jump discontinuities exist between adjacent broadcast event intervals where the data difference is greater than the preset threshold.

[0073] Clustering is performed on the broadcast event intervals based on the jump discontinuities to obtain a second preset number of clusters, where m represents multiple clusters and no specific number limit is imposed here.

[0074] For each cluster, the average value is selected as the representative of the cluster to reduce the interference of errors and determine the average interval of broadcast events in the cluster. , This represents the within-cluster mean of the i-th cluster.

[0075] Generate an interval average sequence containing interval averages, wherein the interval average sequence satisfies .

[0076] Perform a difference operation on the interval average sequence to eliminate advInterval and offset, and obtain the average difference ( ), .

[0077] The parameter to be optimized is K, and the difference in average value is Based on the difference in average values ​​and the parameters to be optimized, the equation to be optimized is generated, for example: formula (4).

[0078] (4) According to formula (4), the preset value range of the parameter K to be optimized is determined to be 0-10000, and K is an integer. By adjusting the value of the parameter to be optimized within the preset value range, the optimization equation can be made to achieve the optimization objective. The optimization objective is, for example: to make... The goal is to minimize the value of K. This means optimizing the value of K to achieve the optimization objective, which can be done simply by iterating through the data.

[0079] The parameters to be optimized that enable the equation to achieve the optimization objective will be used as broadcast delay generation parameters, for example: Figure 4 As shown, during the optimization of the K value, when K=1000... To obtain the minimum value, K=1000 is used as the broadcast delay generation parameter.

[0080] The above process is as follows Figure 3 As shown, sorting, clustering, filtering, and mean averaging are performed to obtain a typical value sequence; protocol fingerprint extraction is then performed to obtain the protocol fingerprint.

[0081] In this embodiment, clustering is completed by sorting broadcast event intervals and identifying jump discontinuities, the mean difference is calculated and the parameters are optimized, the broadcast delay generation parameter K is extracted, and a protocol layer fingerprint is formed to enhance the level and accuracy of Bluetooth device identification.

[0082] As an optional embodiment, the time drift value is obtained based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter, including: Obtain the first target parameter from the broadcast event interval parameter; Determine the difference between the average interval of each cluster and the first target parameter, and determine the sum of the differences of a second preset number of clusters; The second calculation result is obtained by performing a modulo operation on the sum of the differences and the broadcast delay generation parameters. The time drift value is obtained by comparing the second calculation result with the second preset quantity.

[0083] Specifically, the first target parameter is obtained from the broadcast event interval parameter. The first target parameter is, for example: .

[0084] Determine the difference between the mean margin of each cluster and the first target parameter. For example, the mean margin is... The difference is .

[0085] Determine the sum of the differences among a second preset number of clusters, for example: the second preset number is... The sum of the differences is .

[0086] Perform a modulo operation on the sum of the differences and the broadcast delay generation parameters. The second calculation result is obtained.

[0087] The time drift value is obtained based on the ratio of the second calculation result to the second preset quantity. ), as shown in formula (5).

[0088] (5) The above process is as follows Figure 3 As shown, hardware fingerprint extraction is performed to obtain the hardware fingerprint.

[0089] In this embodiment, by combining broadcast event interval parameters, cluster average values, and broadcast delay generation parameters, time drift values ​​are extracted through processes such as difference calculation and modulo operation to form a device hardware layer fingerprint, thereby improving the uniqueness and accuracy of Bluetooth device identification.

[0090] As an optional embodiment, after combining the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value to obtain the identification information of the Bluetooth device, the method further includes: Obtain reference identity information for candidate devices, which includes reference broadcast event interval parameters, reference broadcast delay generation parameters, and reference time drift values. The broadcast event interval parameter in the sub-identity information is compared with the reference broadcast event interval parameter, and the broadcast delay generation parameter in the sub-identity information is compared with the reference broadcast delay generation parameter. If the broadcast event interval parameter is equal to the reference broadcast event interval parameter, and the broadcast delay generation parameter is equal to the reference broadcast delay generation parameter, determine the similarity between the time drift value in the sub-identity information and the reference time drift value, and determine the average similarity of the similarity. Candidate devices with an average similarity greater than or equal to the threshold are selected as target devices, and Bluetooth devices are identified as target devices.

[0091] Specifically, the candidate devices are different models of Bluetooth devices. Reference identification information for the candidate devices is obtained, which includes a reference broadcast event interval parameter (…). ), Reference broadcast delay generation parameters ( ) and reference time drift value ( ).

[0092] Obtain reference identification information of candidate devices ( ),For example:

[0093] .

[0094] For each broadcast packet containing a set of MAC addresses, due to the service switching point, several (n) identification information entries for the Bluetooth device can be generated. Each identification information entry is generated by the application fingerprint. The protocol fingerprint (K) and hardware fingerprint (offset) are components of the device fingerprint. In other words, the identification information is the device fingerprint. ,For example: .

[0095] The process of matching identity information with reference identity information, for example: considering one of its fingerprints. fingerprints to be matched Fingerprint matching is performed sequentially. First, application fingerprint matching is performed, followed by protocol fingerprint matching. Then, for all fingerprints of the device that have passed the first two layers of matching, hardware fingerprint matching is performed uniformly. If all three layers of fingerprints match successfully, the device address MAC address is considered to be the device.

[0096] Strategies for matching application fingerprints include, for example, determining whether the broadcast interval parameter is consistent, i.e., determining whether the fingerprint originates from the MAC address. Are they respectively related to the fingerprint from the device? Equal. A strategy for matching protocol fingerprints is, for example, determining whether the parameters generated by `advDelay` are consistent, i.e., determining whether the fingerprint originates from the MAC address. Are they respectively related to the fingerprint from the device? Equal. A strategy for matching hardware fingerprints is, for example, to determine whether the average similarity score of the time drift of the fingerprint i of the device MAC and the fingerprint j of the device that have passed the first two layers of matching exceeds a threshold.

[0097] Based on the matching application fingerprint strategy and the matching protocol fingerprint strategy, the broadcast event interval parameter in the sub-identity information is compared with the reference broadcast event interval parameter, and the broadcast delay generation parameter in the sub-identity information is compared with the reference broadcast delay generation parameter.

[0098] If the broadcast event interval parameter is equal to the reference broadcast event interval parameter, and the broadcast delay generation parameter is equal to the reference broadcast delay generation parameter, the similarity between the time drift value in the sub-identity information and the reference time drift value is determined according to the hardware fingerprint matching strategy. For example: calculate the time drift value using formula (6). ) and reference time drift value ( The similarity between ).

[0099] (6) Determine the average similarity ( For example: using formula (7) to calculate The average similarity of 1 similarity.

[0100] (7) The threshold is a value between 0 and 1, such as 0.8, 0.9, or other values. Candidate devices with an average similarity greater than or equal to the threshold are selected as target devices, and the Bluetooth device is determined as the target device.

[0101] In this embodiment, a three-layer fingerprint sequential matching mechanism (application layer, protocol layer, and hardware layer) is adopted. First, the broadcast interval parameter and the delay generation parameter are compared. Then, the time drift value similarity is calculated and averaged. This is combined with a threshold to determine the target device. Multi-dimensional verification improves matching accuracy, and sequential matching reduces the false positive rate, enabling accurate identification of Bluetooth devices and ensuring the reliability and uniqueness of identity verification.

[0102] As an optional embodiment, before selecting candidate devices with an average similarity greater than or equal to a threshold as the target device, the method further includes: Obtain multiple reference time drift values ​​for a fourth preset number of candidate devices; Based on multiple reference time drift values ​​of candidate devices, multiple first sample pairs and multiple second sample pairs are generated, wherein the first sample pairs contain the reference time drift values ​​of the same candidate device, and the second sample pairs contain the reference time drift values ​​of different candidate devices. Determine the similarity between reference time drift values ​​in the first sample pair, and determine the similarity between reference time drift values ​​in the second sample pair; Obtain a preset number of candidate thresholds; Determine a first number of first samples with similarity greater than or equal to the candidate threshold, a second number of first samples with similarity less than the candidate threshold, a third number of second samples with similarity greater than or equal to the candidate threshold, and a fourth number of second samples with similarity less than the candidate threshold; Based on the first quantity and the fourth quantity, we obtain the first total quantity; based on the first quantity, the second quantity, the third quantity, and the fourth quantity, we obtain the second total quantity. The accuracy corresponding to the candidate threshold is determined based on the ratio of the first total and the second total. Among the candidate thresholds, the one with the highest accuracy is selected as the final threshold.

[0103] Specifically, for each model of Bluetooth device, the stability of the hardware fingerprint of an individual Bluetooth device and the dispersion of the hardware fingerprint of devices within the same model are different. Therefore, it is necessary to set a unique threshold for each model of Bluetooth device.

[0104] The fourth preset quantity represents multiple values, and no specific limit is set here. Multiple reference time drift values ​​are obtained from the fourth preset quantity of candidate devices. For example, N devices of the same model are selected. For each device, long-duration broadcast packets containing M MAC address changes are captured separately, and these M groups of broadcast packets are labeled to identify the collected device. Finally, a dataset of N devices and M groups of broadcast packets is formed. For each group of broadcast packets, the fingerprint is extracted using the method described above. Due to potential service switching points, each group of broadcast packets may generate multiple fingerprints. We only retain the fingerprints from all fingerprints where the application fingerprint appears most frequently. Assume that each device ultimately retains M' fingerprints. Finally, for all N devices, N*M' fingerprints are formed. These fingerprints have the same application fingerprint and protocol fingerprint, and they come from N devices. The fingerprints contain the reference time drift values ​​of each candidate device.

[0105] Based on multiple reference time drift values ​​of candidate devices, multiple first sample pairs and multiple second sample pairs are generated. A first sample pair is a positive sample pair, representing a sample pair consisting of a reference time drift value from device x and another reference time drift value from device x; that is, the first sample pair contains reference time drift values ​​from the same candidate device. A second sample pair is a negative sample pair, representing a sample pair consisting of a reference time drift value from device x and another reference time drift value from device y; that is, the second sample pair contains reference time drift values ​​from different candidate devices.

[0106] Determine the similarity between reference time drift values ​​in the first sample pair and the similarity between reference time drift values ​​in the second sample pair, for example, by calculating the similarity using formula (8).

[0107] (8) in, This represents the first time shift value in the sample pair. This represents the second time drift value in the sample pair.

[0108] Obtain a preset number of candidate thresholds. For example, the threshold starts from 0 and iterates to 1 with a step size of 0.001, for a total of 1000 iterations, resulting in 1000 candidate thresholds. Candidate thresholds include 0.001, 0.500, 0.999, etc.

[0109] If the similarity between the two time drift values ​​in a sample pair is greater than a threshold, then the sample pair is a positive case; otherwise, it is a negative case.

[0110] Determine a first number of samples with a similarity greater than or equal to the candidate threshold, a second number of samples with a similarity less than the candidate threshold, a third number of samples with a similarity greater than or equal to the candidate threshold, and a fourth number of samples with a similarity less than the candidate threshold. The first number is the true number (…). ), representing the number of positive sample pairs that are positive cases; the fourth number is the number of true negatives ( The first number represents the number of negative sample pairs that are negative cases; the second number represents false negatives. ), representing the number of positive sample pairs that are negative cases; the third number is false positives ( ), representing the number of negative sample pairs that are positive cases.

[0111] Based on the first quantity and the fourth quantity, the first total quantity is obtained. The first total quantity is Based on the first, second, third, and fourth quantities, the second total is obtained, which is: .

[0112] Based on the ratio of the first total and the second total, determine the accuracy corresponding to the candidate threshold. For example, as shown in formula (9).

[0113] (9) Among the candidate thresholds, the one with the highest accuracy is selected as the final threshold. For example, as shown in formula (10), the candidate threshold with the highest accuracy is... This threshold is used as a reference. This threshold is applied to the identification of this model of device.

[0114] (10) In this embodiment of the application, the scheme calculates the time drift similarity by constructing positive and negative sample pairs, traverses the candidate thresholds and selects the one with the highest accuracy as the optimal threshold, and customizes matching thresholds for different models of Bluetooth devices, which greatly improves the accuracy and adaptability of device identification and reduces the false judgment rate.

[0115] This embodiment also provides a Bluetooth device identification information generation apparatus, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0116] This embodiment provides a device for generating identification information for Bluetooth devices, such as... Figure 5 As shown, it includes: The interval determination module 501 is used to determine the broadcast event interval based on the timestamp sequence of the broadcast packets of the Bluetooth device, and classify the broadcast event intervals to obtain a first preset number of interval categories; The first parameter determination module 502 is used to determine the broadcast event interval parameter according to the broadcast event interval in the interval category, wherein the broadcast event interval parameter is used to determine the numerical range of the broadcast event interval; The second parameter determination module 503 is used to determine a second preset number of clusters based on the jump discontinuities in the broadcast event interval, and to determine the broadcast delay generation parameter based on the average interval of the broadcast event interval in the cluster. The third parameter determination module 504 is used to obtain the time drift value based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter. The information generation module 505 is used to combine the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value to obtain the identification information of the Bluetooth device.

[0117] In some alternative embodiments, the device further includes: The capture module is used to capture broadcast packets to be filtered from Bluetooth devices; The first setting module is used to use the broadcast packets to be filtered, whose broadcast type is the target broadcast type, as intermediate broadcast packets; The parsing module is used to parse intermediate broadcast packets, obtain parsing results, and perform data integrity verification on intermediate broadcast packets based on the parsing results; The second setting module is used to treat the verified intermediate broadcast packet as a broadcast packet. The grouping module is used to group broadcast packets according to their broadcast addresses to obtain a third preset number of broadcast packet combinations, wherein the broadcast packets in the broadcast packet combination have the same broadcast address.

[0118] In some alternative embodiments, the device further includes: The first module is used to obtain the timestamp sequence based on the broadcast packets in the broadcast packet combination; The calculation module is used to perform first-order difference calculation on the timestamp sequence to obtain the first calculation result, and to obtain the broadcast event interval based on the first calculation result; The first acquisition module is used to acquire existing interval categories and determine a reference value range based on the value of the broadcast event interval in the existing interval category and the first parameter. The first judgment module is used to create a new interval category if the broadcast event interval is not within the reference value range. The second judgment module is used to add the broadcast event interval to the existing interval category if the broadcast event interval is within the reference value range. The second obtaining module is used to obtain a first preset number of interval categories based on existing interval categories and newly added interval categories; The segmentation module is used to obtain the service switching point in the interval category and divide the broadcast stream corresponding to the interval category into broadcast stream segments according to the service switching point. The identity recognition information includes the sub-identity recognition information corresponding to the broadcast stream segments.

[0119] In some alternative implementations, the first parameter determination module 502 includes: The first determining unit is used to determine the first broadcast event interval with the largest value and the second broadcast event interval with the smallest value among the broadcast event intervals included in the interval category; The first obtaining unit is used to obtain the first target parameter based on the ratio of the first broadcast event interval to the second parameter and the second parameter; The second obtaining unit is used to obtain the second target parameter based on the ratio of the second broadcast event interval to the second parameter, the second parameter, and the third parameter; The third obtaining unit is used to obtain the broadcast event interval parameter based on the first target parameter and the second target parameter.

[0120] In some optional implementations, the second parameter determination module 503 includes: The second determining unit is used to sort the broadcast event intervals according to a preset order and determine the data difference between adjacent broadcast event intervals; The third determining unit is used to determine the jump discontinuity point based on the interval between adjacent broadcast events where the data difference is greater than a preset threshold. The fourth unit is used to perform clustering operations on the broadcast event intervals based on the jump discontinuities to obtain a second preset number of clusters; The generation unit is used to determine the average interval of broadcast event intervals in the cluster and generate a sequence of average intervals containing the average intervals. The first calculation unit is used to perform a difference operation on the interval average value sequence to obtain the average value difference; The optimization unit is used to generate an equation to be optimized based on the average difference and the parameter to be optimized, and to adjust the value of the parameter to be optimized within a preset range so that the equation to be optimized achieves the optimization target. The setting unit is used to take the parameters to be optimized that enable the equation to be optimized to achieve the optimization objective as the broadcast delay generation parameters.

[0121] In some optional implementations, the third parameter determination module 504 includes: The acquisition unit is used to acquire the first target parameter from the broadcast event interval parameter; The fourth determining unit is used to determine the difference between the average interval of each cluster and the first target parameter, and to determine the sum of the differences of a second preset number of clusters; The second calculation unit is used to perform modulo operations on the sum of differences and the broadcast delay generation parameters to obtain the second calculation result. The fifth obtaining unit is used to obtain the time drift value based on the ratio of the second calculation result to the second preset quantity.

[0122] In some alternative embodiments, the device further includes: The second acquisition module is used to acquire reference identity recognition information of candidate devices, wherein the reference identity recognition information includes reference broadcast event interval parameters, reference broadcast delay generation parameters, and reference time drift values; The comparison module is used to compare the broadcast event interval parameter in the sub-identity information with the reference broadcast event interval parameter, and to compare the broadcast delay generation parameter in the sub-identity information with the reference broadcast delay generation parameter. The third judgment module is used to determine the similarity between the time drift value in the sub-identity recognition information and the reference time drift value if the broadcast event interval parameter is equal to the reference broadcast event interval parameter and the broadcast delay generation parameter is equal to the reference broadcast delay generation parameter, and to determine the average similarity of the similarity. The first determining module is used to identify candidate devices with an average similarity greater than or equal to a threshold as target devices, and to determine the Bluetooth device as the target device.

[0123] In some alternative embodiments, the device further includes: The third acquisition module is used to acquire multiple reference time drift values ​​of a fourth preset number of candidate devices; The generation module is used to generate multiple first sample pairs and multiple second sample pairs based on multiple reference time drift values ​​of candidate devices. The first sample pairs contain reference time drift values ​​of the same candidate device, and the second sample pairs contain reference time drift values ​​of different candidate devices. The second determining module is used to determine the similarity between reference time drift values ​​in the first sample pair and to determine the similarity between reference time drift values ​​in the second sample pair. The fourth acquisition module is used to acquire a preset number of candidate thresholds; The third determining module is used to determine the first number of first samples with similarity greater than or equal to the candidate threshold, the second number of first samples with similarity less than the candidate threshold, the third number of second samples with similarity greater than or equal to the candidate threshold, and the fourth number of second samples with similarity less than the candidate threshold. The third module is used to obtain the first total quantity based on the first quantity and the fourth quantity, and to obtain the second total quantity based on the first quantity, the second quantity, the third quantity and the fourth quantity; The fourth determining module is used to determine the accuracy corresponding to the candidate threshold based on the ratio of the first total and the second total. The third setting module is used to select the candidate threshold with the highest accuracy from among the candidate thresholds.

[0124] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0125] In this embodiment, the Bluetooth device identification information generation device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0126] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0127] The following is a detailed reference. Figure 6 This diagram illustrates a suitable structural design for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of the electronic device. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0128] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0129] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a memory 608, or installed from a ROM 602. When the computer program is executed by the processor 601, it performs the functions defined in the Bluetooth device identification information generation method of the embodiments of the present invention.

[0130] Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0131] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the Bluetooth device identification information generation method shown in the above embodiments is implemented.

[0132] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0133] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for generating identification information for a Bluetooth device, characterized in that, The method includes: Based on the timestamp sequence of broadcast packets from Bluetooth devices, the broadcast event interval is determined, and the broadcast event intervals are classified to obtain a first preset number of interval categories; Based on the broadcast event interval in the interval category, a broadcast event interval parameter is determined, wherein the broadcast event interval parameter is used to determine the numerical range of the broadcast event interval; Based on the jump discontinuities in the broadcast event interval, a second preset number of clusters are determined, and the broadcast delay generation parameters are determined based on the average interval of the broadcast event intervals in the clusters. The time drift value is obtained based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter; The broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value are combined to obtain the identification information of the Bluetooth device.

2. The method according to claim 1, characterized in that, Before determining the broadcast event interval based on the timestamp sequence of broadcast packets from the Bluetooth device, the method further includes: Capture the broadcast packets to be filtered from the Bluetooth device; Use the broadcast packets to be filtered, whose broadcast type is the target broadcast type, as intermediate broadcast packets; The intermediate broadcast packet is parsed to obtain the parsing result, and the data integrity of the intermediate broadcast packet is verified based on the parsing result. The intermediate broadcast packet that passes the verification is used as the broadcast packet; The broadcast packets are grouped according to their broadcast addresses to obtain a third preset number of broadcast packet combinations, wherein the broadcast packets in the broadcast packet combination have the same broadcast address.

3. The method according to claim 2, characterized in that, After grouping the broadcast packets according to their broadcast addresses to obtain a third preset number of broadcast packet combinations, the method further includes: The timestamp sequence is obtained based on the broadcast packets in the broadcast packet combination; Perform a first-order difference calculation on the timestamp sequence to obtain a first calculation result, and obtain the broadcast event interval based on the first calculation result; Obtain existing interval categories, and determine a reference value range based on the value of the broadcast event interval in the existing interval categories and the first parameter; If the broadcast event interval is not within the reference value range, create a new interval category; If the broadcast event interval is within the reference value range, add the broadcast event interval to the existing interval category; Based on the existing interval categories and the newly added interval categories, the first preset number of interval categories are obtained; Obtain the service switching point in the interval category, and divide the broadcast stream corresponding to the interval category into broadcast stream segments according to the service switching point, wherein the identity recognition information includes the sub-identity recognition information corresponding to the broadcast stream segment.

4. The method according to claim 1, characterized in that, The step of determining the broadcast event interval parameter based on the broadcast event interval in the interval category includes: Among the broadcast event intervals included in the interval category, determine the first broadcast event interval with the largest value and the second broadcast event interval with the smallest value; The first target parameter is obtained based on the ratio of the first broadcast event interval to the second parameter and the second parameter; The second target parameter is obtained based on the ratio of the second broadcast event interval to the second parameter, the second parameter, and the third parameter; The broadcast event interval parameter is obtained based on the first target parameter and the second target parameter.

5. The method according to claim 1, characterized in that, The step of determining a second preset number of clusters based on the jump discontinuities in the broadcast event intervals, and determining the broadcast delay generation parameters based on the average interval of the broadcast event intervals in the clusters, includes: The broadcast event intervals are sorted according to a preset order, and the data difference between adjacent broadcast event intervals is determined. The jump discontinuity point is determined based on the interval between adjacent broadcast events where the data difference is greater than a preset threshold; Based on the jump discontinuity points, clustering operations are performed on the broadcast event intervals to obtain a second preset number of clusters; Determine the average interval of broadcast event intervals in the cluster, and generate an interval average sequence containing the average interval; Perform a difference operation on the interval average value sequence to obtain the average value difference; Based on the average difference and the parameter to be optimized, an equation to be optimized is generated. By adjusting the value of the parameter to be optimized within a preset range, the equation to be optimized achieves the optimization target. The parameters to be optimized that enable the equation to achieve the optimization objective are used as the broadcast delay generation parameters.

6. The method according to claim 4, characterized in that, The step of obtaining the time drift value based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter includes: Obtain the first target parameter from the broadcast event interval parameter; Determine the difference between the average interval of each cluster and the first target parameter, and determine the sum of the differences of a second preset number of clusters; A second calculation result is obtained by performing a modulo operation on the sum of the differences and the broadcast delay generation parameter; The time drift value is obtained based on the ratio of the second calculation result to the second preset quantity.

7. The method according to claim 3, characterized in that, After combining the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value to obtain the identification information of the Bluetooth device, the method further includes: Obtain reference identity information of candidate devices, wherein the reference identity information includes reference broadcast event interval parameters, reference broadcast delay generation parameters, and reference time drift values; The broadcast event interval parameter in the sub-identity information is compared with the reference broadcast event interval parameter, and the broadcast delay generation parameter in the sub-identity information is compared with the reference broadcast delay generation parameter; If the broadcast event interval parameter is equal to the reference broadcast event interval parameter, and the broadcast delay generation parameter is equal to the reference broadcast delay generation parameter, determine the similarity between the time drift value in the sub-identity information and the reference time drift value, and determine the average similarity of the similarity. Candidate devices with an average similarity greater than or equal to a threshold are selected as target devices, and the Bluetooth device is determined as the target device.

8. The method according to claim 7, characterized in that, Before selecting candidate devices with an average similarity greater than or equal to a threshold as target devices, the method further includes: Obtain multiple reference time drift values ​​for a fourth preset number of candidate devices; Based on the multiple reference time drift values ​​of the candidate devices, multiple first sample pairs and multiple second sample pairs are generated, wherein the first sample pairs contain the reference time drift values ​​of the same candidate device, and the second sample pairs contain the reference time drift values ​​of different candidate devices; Determine the similarity between reference time drift values ​​in the first sample pair, and determine the similarity between reference time drift values ​​in the second sample pair; Obtain a preset number of candidate thresholds; Determine a first number of first samples with a similarity greater than or equal to the candidate threshold, a second number of first samples with a similarity less than the candidate threshold, a third number of second samples with a similarity greater than or equal to the candidate threshold, and a fourth number of second samples with a similarity less than the candidate threshold; A first total quantity is obtained based on the first quantity and the fourth quantity; a second total quantity is obtained based on the first quantity, the second quantity, the third quantity, and the fourth quantity. The accuracy corresponding to the candidate threshold is determined based on the ratio of the first total and the second total. Among the candidate thresholds, the candidate threshold with the highest accuracy is selected as the threshold.

9. A device for generating identification information for a Bluetooth device, characterized in that, The device includes: An interval determination module is used to determine the broadcast event interval based on the timestamp sequence of the broadcast packets of the Bluetooth device, and to classify the broadcast event intervals to obtain a first preset number of interval categories; The first parameter determination module is used to determine a broadcast event interval parameter based on the broadcast event interval in the interval category, wherein the broadcast event interval parameter is used to determine the numerical range of the broadcast event interval; The second parameter determination module is used to determine a second preset number of clusters based on the jump discontinuities in the broadcast event interval, and to determine the broadcast delay generation parameter based on the average interval of the broadcast event interval in the cluster. The third parameter determination module is used to obtain the time drift value based on the broadcast event interval parameter, the average interval value, and the broadcast delay generation parameter; The information generation module is used to combine the broadcast event interval parameter, the broadcast delay generation parameter, and the time drift value to obtain the identification information of the Bluetooth device.

10. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the method for generating identification information of a Bluetooth device according to any one of claims 1 to 8.