Communication method, device and computer device based on Bluetooth security device

By receiving user identity information, judging geographical location, generating encryption offsets and calculating transmission time range, the problem of low communication security of Bluetooth devices is solved and higher data security is achieved.

CN115474183BActive Publication Date: 2024-11-29SHENZHEN DINGSHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211099982.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2024-11-29
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

Bluetooth devices are less secure when conducting communication transmission and are susceptible to unauthorized access or theft.

Method used

By receiving user identity information and judging that it is consistent with the preset information, enable Bluetooth transmission function; obtaining geographical information to determine whether it is in a secure area; sending an inquiry signal to the Bluetooth communication device, generating random numbers and encryption offsets, pairing and data encryption ; Calculate the transmission time range and judge the security of the transmission environment.

Benefits of technology

Improves the security of Bluetooth transmission data, prevents thieves from stealing data in non-secure areas, and ensures that data is difficult to access unauthorized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474183B_ABST
    Figure CN115474183B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of Bluetooth communication, and discloses a communication method, device and computer device based on Bluetooth security equipment. By receiving user identity information, it is possible to judge whether the Bluetooth security equipment is in the hands of the user based on the user identity information. If the user identity information is consistent with the preset identity information, the Bluetooth transmission function is turned on; by obtaining the geographical information of the Bluetooth security equipment, it is possible to judge whether it is in a safe area based on the geographical information, thereby further enhancing the security of the Bluetooth security equipment; by comparing a first encryption offset with a second encryption offset, if they are consistent, the Bluetooth communication equipment is trusted and paired with it; by judging whether there is a stealing party in the transmission channel through the transmission time, it is made very difficult for the transmitted data to be unauthorizedly accessed or stolen, thereby improving the security of Bluetooth transmission data to a large extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Bluetooth communication, and in particular to a communication method, device and computer device based on Bluetooth security equipment. Background Art

[0002] Bluetooth technology was proposed by the Bluetooth Special Interest Group (BluetoothSIG) and is a wireless interface technology used for data communication and information interaction between short-range electronic devices. Due to its low cost, low power, small module size, and strong openness, it has become a common technology for achieving short-range connections of electronic products. So far, Bluetooth technology has gone through multiple versions from V1.1 to V5.2. Starting from version V4.0, the Bluetooth protocol specification also includes three types of Bluetooth technologies, namely traditional Bluetooth (Basic Rate / Enhanced Data Rate, BR / EDR), low energy Bluetooth (Low Energy, LE) and high-speed Bluetooth. Among them, low energy Bluetooth is widely used because of its long standby time, fast connection speed, and low peak power of transmission and reception.

[0003] Traditional Bluetooth (BR / EDR) technology uses the frequency band of 2.4GHz to 2.4835GHz for communication. In this frequency band, Bluetooth can reduce interference and attenuation through frequency hopping transmission, but it cannot guarantee sufficient transmission security. Therefore, during the data transmission process of Bluetooth devices, data can be easily accessed without authorization or stolen. Summary of the invention

[0004] The present application provides a communication method based on a Bluetooth security device, aiming to solve the technical problem of low security when the Bluetooth device is performing communication transmission.

[0005] The present application provides a communication method based on a Bluetooth security device, which is applied to a Bluetooth security device, including:

[0006] Receiving user identity information, and determining whether the user identity information is consistent with preset identity information;

[0007] If the user identity information is consistent with the preset identity information, the Bluetooth transmission function is enabled;

[0008] Obtaining the current geographical information, and determining whether the current location is in a safe area based on the geographical information;

[0009] If the current area belongs to a safe area, sending an inquiry signal to the Bluetooth communication device, wherein the Bluetooth communication device generates a random number according to the inquiry signal, and generates a first encryption offset according to the random number;

[0010] receiving the random number and the first encryption offset sent by the Bluetooth communication device, and calculating a second encryption offset according to the random number;

[0011] Determine whether the value of the second encryption offset is equal to the value of the first encryption offset, and if the value of the second encryption offset is equal to the value of the first encryption offset, establish pairing with the Bluetooth communication device;

[0012] Acquiring transmission data, and encrypting the transmission data to obtain encrypted data;

[0013] Acquire the address information of the Bluetooth communication device, and calculate the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information;

[0014] Calculating a transmission time range of the encrypted data according to the transmission distance;

[0015] generating test data based on the encrypted data, and sending the test data to a Bluetooth communication device, wherein the Bluetooth communication device feeds back a received signal;

[0016] Calculate a second transmission time of the test data according to the received signal, and determine whether the second transmission time is within the transmission time range;

[0017] If the second transmission time is within the transmission time range, the encrypted data is sent to the Bluetooth communication device.

[0018] Preferably, the step of receiving user identity information and determining whether the user identity information is consistent with preset identity information, and if the user identity information is consistent with the preset identity information, enabling the Bluetooth transmission function comprises:

[0019] Receive user initialization identity password;

[0020] Convert the initialization identity password based on a hash algorithm to obtain a first identity hash value;

[0021] The first identity hash value is stored, but the initialization identity password is not stored;

[0022] Receiving user identity information, and generating a second identity hash value according to the user identity information;

[0023] Compare the first identity hash value as preset identity information with the second identity hash value;

[0024] If the second identity hash value is consistent with the preset identity information, the Bluetooth transmission function is enabled.

[0025] Preferably, the step of obtaining the current geographical information and determining whether the current area belongs to a safe area according to the geographical information includes:

[0026] Obtaining the current geographic information, wherein the geographic information includes: address information and window information;

[0027] Determining whether the address information belongs to a public area;

[0028] If the address information does not belong to a public area, determining whether the distance between the Bluetooth security device and the window is greater than a preset distance according to the window information;

[0029] If the distance between the Bluetooth safety device and the window is greater than a preset distance, it is determined that the current area belongs to a safe area.

[0030] Preferably, the step of receiving the random number and the first encryption offset sent by the Bluetooth communication device, and calculating the second encryption offset according to the random number comprises:

[0031] Obtain the dynamic PIN value, the address information of the Bluetooth communication device and the random number, and generate the initial key based on the E22 key algorithm;

[0032] The dynamic PIN value is concatenated with the initial key, and the result is calculated based on a hash algorithm, and the obtained value is used as a link key;

[0033] An encryption offset number is obtained, and a second encryption offset is obtained by performing calculation based on the E3 key algorithm according to the encryption offset number and the link key.

[0034] Preferably, the step of acquiring transmission data and encrypting the transmission data to obtain encrypted data comprises:

[0035] Get the serial number and current pairing time;

[0036] Acquire transmission data, and divide the transmission data into a plurality of data blocks;

[0037] The serial number is concatenated with the current pairing time, and is calculated based on a hash algorithm to obtain an encrypted hash value;

[0038] The encrypted hash value is added to each of the data blocks to obtain encrypted data.

[0039] Preferably, the step of calculating the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information comprises:

[0040] Get the current geographic information, where the geographic information is represented by X1, Y1, Z1;

[0041] Obtain address information of a Bluetooth communication device, wherein the address information is represented by X2, Y2, Z2;

[0042] The transmission distance is calculated based on the geographic information and address information, where the calculation formula is:

[0043] D=(X2-X1), (Y2-Y1), (Z2-Z1);

[0044] Where D represents the transmission distance.

[0045] Preferably, the step of calculating the transmission time range of the encrypted data according to the transmission distance comprises:

[0046] Get the memory capacity of encrypted data;

[0047] Get the current Bluetooth transmission speed per second;

[0048] Calculate the transmission time of encrypted data based on speed and memory capacity;

[0049] Get the error value;

[0050] A transmission time range is generated based on the error value.

[0051] The present application also provides a Bluetooth security device, comprising:

[0052] A first receiving module, used to receive user identity information and determine whether the user identity information is consistent with preset identity information;

[0053] An activation module, used to activate the Bluetooth transmission function if the user identity information is consistent with the preset identity information;

[0054] A first acquisition module is used to acquire the current geographical information and determine whether the current area belongs to a safe area according to the geographical information;

[0055] An inquiry module, configured to send an inquiry signal to a Bluetooth communication device if the current area belongs to a safe area, wherein the Bluetooth communication device generates a random number according to the inquiry signal, and generates a first encryption offset according to the random number;

[0056] A second receiving module, configured to receive the random number and the first encryption offset sent by the Bluetooth communication device, and calculate a second encryption offset according to the random number;

[0057] A judging module, used for judging whether the value of the second encrypted offset is equal to the value of the first encrypted offset, and if the value of the second encrypted offset is equal to the value of the first encrypted offset, pairing is established with the Bluetooth communication device;

[0058] A second acquisition module is used to acquire transmission data and encrypt the transmission data to obtain encrypted data;

[0059] A third acquisition module, used to acquire the address information of the Bluetooth communication device, and calculate the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information;

[0060] A first calculation module, used to calculate the transmission time range of the encrypted data according to the transmission distance;

[0061] A generating module, configured to generate test data based on the encrypted data, and send the test data to a Bluetooth communication device, wherein the Bluetooth communication device feeds back a receiving signal;

[0062] A second calculation module, used for calculating a second transmission time of the test data according to the received signal, and determining whether the second transmission time is within the transmission time range;

[0063] A sending module is used to send the encrypted data to the Bluetooth communication device if the second transmission time is within the transmission time range.

[0064] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0065] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0066] The beneficial effects of the present application are as follows: by receiving user identity information, it is possible to determine whether the Bluetooth security device is in the hands of the user based on the user identity information. If the user identity information is consistent with the preset identity information, the Bluetooth transmission function is turned on; by obtaining the geographic information of the Bluetooth security device, it is possible to determine whether it is in a safe area based on the geographic information, which can prevent thieves from stealing data in non-safe areas, further enhancing the security of the Bluetooth security device; by comparing the first encryption offset with the second encryption offset, if they are consistent, the Bluetooth communication device is trusted and paired with it; by calculating the transmission time range and the second transmission time of the test data, it is possible to determine whether there is a thief in the transmission channel through the transmission time. If the second transmission time is within the transmission time range, it means that the current transmission environment is safe. At this time, the transmission data is transmitted to the Bluetooth communication device, making it very difficult for the transmission data to be unauthorizedly accessed or stolen, which can improve the security of Bluetooth transmission data to a large extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present application.

[0068] Figure 2 Schematic diagram of the device structure of an embodiment of the present application.

[0069] Figure 3 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.

[0070] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0071] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0072] like Figure 1 As shown, the present application provides a communication method based on a Bluetooth security device, which is applied to a Bluetooth security device, including:

[0073] S1. Receive user identity information and determine whether the user identity information is consistent with preset identity information;

[0074] S2. If the user identity information is consistent with the preset identity information, enable the Bluetooth transmission function;

[0075] S3, obtaining the current geographical information, and determining whether the current location is a safe area according to the geographical information;

[0076] S4. If the current area belongs to a safe area, send an inquiry signal to the Bluetooth communication device, wherein the Bluetooth communication device generates a random number according to the inquiry signal, and generates a first encryption offset according to the random number;

[0077] S5, receiving the random number and the first encryption offset sent by the Bluetooth communication device, and calculating a second encryption offset according to the random number;

[0078] S6, determining whether the value of the second encryption offset is equal to the value of the first encryption offset, and if the value of the second encryption offset is equal to the value of the first encryption offset, establishing pairing with the Bluetooth communication device;

[0079] S7, acquiring transmission data, and encrypting the transmission data to obtain encrypted data;

[0080] S8, obtaining the address information of the Bluetooth communication device, and calculating the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information;

[0081] S9, calculating the transmission time range of the encrypted data according to the transmission distance;

[0082] S10, generating test data based on the encrypted data, and sending the test data to a Bluetooth communication device, wherein the Bluetooth communication device feeds back a received signal;

[0083] S11, calculating a second transmission time of the test data according to the received signal, and determining whether the second transmission time is within the transmission time range;

[0084] S12: If the second transmission time is within the transmission time range, send the encrypted data to the Bluetooth communication device.

[0085] As described in the above steps S1-S12, firstly, by receiving the user identity information, it is possible to determine whether the Bluetooth security device is in the hands of the user based on the user identity information. If the user identity information is consistent with the preset identity information, the Bluetooth transmission function is turned on; by obtaining the geographical information of the Bluetooth security device, it is possible to determine whether it is in a safe area based on the geographical information, which can prevent thieves from stealing data in non-safe areas and further enhance the security of the Bluetooth security device; in order to confirm the identity information of the recipient of the transmitted data, that is, the Bluetooth communication device, and avoid transmitting the data to the disguised party, an inquiry signal is sent to the Bluetooth device, and a random number generated based on the inquiry signal is received. In this way, a second encryption offset can be generated based on the random number, and the Bluetooth communication device will generate a first encryption offset based on the random number. The first encrypted offset is compared with the second encrypted offset. If they are consistent, the Bluetooth communication device is trusted and paired with it. In order to prevent the thief from intercepting the transmission data in the middle of the transmission during the transmission process, the transmission data is encrypted, and the transmission time range and the second transmission time of the test data are calculated. In this way, it can be judged by the transmission time whether there is a thief in the transmission channel. If the second transmission time is within the transmission time range, it means that the current transmission environment is safe. At this time, the transmission data is transmitted to the Bluetooth communication device. If it is not within the transmission time range, it means that the current transmission environment is not safe, and the encrypted data is not transmitted to the Bluetooth communication device. In this way, the transmission data is very difficult to be accessed or stolen without authorization, which can improve the security of Bluetooth transmission data to a large extent.

[0086] In one embodiment, the step of receiving user identity information and determining whether the user identity information is consistent with preset identity information, and if the user identity information is consistent with the preset identity information, enabling the Bluetooth transmission function S1S2 includes:

[0087] S21, receiving the user's initialization identity password;

[0088] S22, converting the initialization identity password based on a hash algorithm to obtain a first identity hash value;

[0089] S23: Store the first identity hash value, but do not store the initialization identity password;

[0090] S24, receiving user identity information, and generating a second identity hash value according to the user identity information;

[0091] S25. Compare the first identity hash value as preset identity information with the second identity hash value;

[0092] S26. If the second identity hash value is consistent with the preset identity information, enable the Bluetooth transmission function.

[0093] As described in the above steps S21-S26, although the Bluetooth address of each Bluetooth security device is different, the Bluetooth security devices will transmit Bluetooth addresses to each other during the communication process. Therefore, the thief can obtain the Bluetooth address by eavesdropping on the communication process, and then disguise as a Bluetooth security device based on the Bluetooth address to achieve data theft. Therefore, in order to reduce the possibility of data theft, this embodiment first receives the user's initialization identity password, and converts the initialization identity password based on a hash algorithm (such as HASHMD5) to obtain a first identity hash value. When using the Bluetooth security device for data transmission, the user can input the user identity information, which is the user's initialization identity password. After input, the Bluetooth security device converts it based on the hash algorithm to obtain a second identity hash value, so that the first identity hash value can be compared with the second identity hash value. The identity hash values ​​are compared, and if they are consistent, the Bluetooth transmission function is turned on; it should be noted that, since the hash algorithm can turn the initialization identity password into an irreversible ciphertext, that is, the first identity hash value, only the first identity hash value can be stored, and the user initialization identity password is not stored. In this way, even if the thief obtains the first identity hash value through technical means, it is difficult to reverse the initialization identity password based on the first identity hash value, and when performing hash conversion, even if one character is wrong, the converted hash value is different. Therefore, by setting the user initialization identity password and performing hash conversion on it, it can prevent the thief from directly disguising himself when the Bluetooth address is obtained, and even if the Bluetooth security device is lost, the Bluetooth transmission function cannot be turned on without the user initialization identity password, which greatly enhances the security of data transmission. More preferably, the number of times to receive user identity information can be set, for example, only 5 passwords can be entered. If all 5 times are wrong, the Bluetooth transmission function is locked, so as to prevent the eavesdropper from trying it through exhaustive method.

[0094] In one embodiment, the step S3 of obtaining the current geographical information and determining whether the current location belongs to a safe area according to the geographical information includes:

[0095] S31, obtaining current geographical information, wherein the geographical information includes: address information and window information;

[0096] S32, determining whether the address information belongs to a public area;

[0097] S33, if the address information does not belong to a public area, determining whether the distance between the Bluetooth security device and the window is greater than a preset distance according to the window information;

[0098] S34: If the distance between the Bluetooth security device and the window is greater than a preset distance, it is determined that the current area belongs to a safe area.

[0099] As described in the above steps S31-S34, in order to enhance the security of data transmission of Bluetooth security devices, the geographical information of the Bluetooth security device is obtained, so that it can be determined based on the geographical information whether the current area belongs to a safe area. First, the address information of the Bluetooth security device can be obtained, and it can be determined whether it belongs to a public area according to the address information. For example, it can be determined by the keywords in the address information. When the address information contains shopping malls, supermarkets, airports, etc., it can be determined as a public area. When the address information contains gardens, parks, and communities, it can be determined as a non-public area. This can prevent the thief from intercepting the secret key information in the public area. When the user is in a non-public area, in order to prevent The anti-theft party obtains the information of the Bluetooth security device based on antenna technology. Therefore, it is necessary to obtain the window information. The acquisition method can be in the form of a questionnaire. For example, asking whether the current position is by the window. If it is by the window, then asking how much distance there is between the window and the window. If the distance is greater than the preset distance, it is determined that the current area is a safe area. The window position information and the position information of the Bluetooth security device can also be obtained to calculate the distance between the two. If it is less than the preset distance, a reminder is issued to the user so that the user can move the position of the Bluetooth security device. This allows the Bluetooth security device to be paired in a relatively safe area, making it difficult for the thief to easily intercept the information of the Bluetooth security device.

[0100] In one embodiment, the step S5 of receiving the random number and the first encryption offset sent by the Bluetooth communication device and calculating the second encryption offset according to the random number includes:

[0101] S51, obtaining a dynamic PIN value, address information of a Bluetooth communication device, and a random number, and generating an initial key based on an E22 key algorithm;

[0102] S52, concatenating the dynamic PIN value with the initial key, and calculating based on a hash algorithm, and using the obtained value as a link key;

[0103] S53: Obtain an encryption offset number, and calculate based on the E3 key algorithm according to the encryption offset number and the link key to obtain a second encryption offset.

[0104] As described in the above steps S51-S53, in order to reduce the memory for storing keys, two Bluetooth devices usually only use one unit key for communication. Therefore, a Bluetooth device uses one unit key as a link key when communicating with any other Bluetooth device. This allows the thief to obtain its link key by establishing a communication connection with the Bluetooth device, and then disguises itself as a Bluetooth device to communicate with other Bluetooth devices, so as to easily steal information. Based on this, this embodiment obtains a dynamic PIN code, generates an initial key based on the dynamic PIN code, a random number, and the address information of the Bluetooth communication device, and then generates a link key based on the dynamic PIN code and the initial key based on a hash algorithm. Since the dynamic PIN code is different each time, the link key generated each time is also different. This can improve the security of the Bluetooth security device, and the link key generated based on the hash algorithm can improve the security of the PIN code; then obtain the encryption offset number, and calculate the second encryption offset based on the encryption offset number and the link key based on the E3 key algorithm. This facilitates the Bluetooth security device to judge and compare the second encryption offset with the first encryption offset according to the value of the second encryption offset, thereby authorizing the Bluetooth communication device and starting Bluetooth pairing. It should be noted that the calculation method of the first encryption offset is the same as the calculation method of the second encryption offset, which will not be repeated here.

[0105] In one embodiment, the step S7 of acquiring transmission data and encrypting the transmission data to obtain encrypted data includes:

[0106] S71, obtaining the serial number and the current pairing time;

[0107] S72, acquiring transmission data, and dividing the transmission data into a plurality of data blocks;

[0108] S73, concatenating the serial number with the current pairing time, and calculating based on a hash algorithm to obtain an encrypted hash value;

[0109] S74. Add the encrypted hash value to each of the data blocks to obtain encrypted data.

[0110] As described in the above steps S71-S74, by adding the serial number and the current pairing time as encrypted hash values ​​into the data block, the transmission data can be encrypted. Since the serial number and the current pairing time are only known by both parties, it is also convenient for the Bluetooth communication device to determine whether the currently received transmission data is sent by the Bluetooth security transmission device based on the encrypted hash value, and it is also convenient to decrypt the transmission data through the serial number and the current pairing time.

[0111] In one embodiment, the step S8 of calculating the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information includes:

[0112] S81, obtaining the current geographical information, where the geographical information is represented by X1, Y1, Z1;

[0113] S82, obtaining address information of the Bluetooth communication device, where the address information is represented by X2, Y2, Z2;

[0114] S83. Calculate the transmission distance according to the geographic information and the address information, wherein the calculation formula is:

[0115] D=(X2-X1), (Y2-Y1), (Z2-Z1);

[0116] Where D represents the transmission distance.

[0117] As described in the above steps S81-S83, by obtaining the geographic coordinates of the two, the distance between the two can be accurately calculated.

[0118] In one embodiment, the step S9 of calculating the transmission time range of the encrypted data according to the transmission distance includes:

[0119] S91, obtaining the memory capacity of the encrypted data;

[0120] S92, obtaining the current Bluetooth transmission speed per second;

[0121] S93, calculating the transmission time of the encrypted data according to the speed and the memory capacity;

[0122] S94, obtaining an error value;

[0123] S95. Generate a transmission time range based on the error value.

[0124] As described in the above steps S91-S95, the transmission time can be calculated by dividing the memory capacity by the speed, and the interval of the transmission time range can be generated by obtaining the error value, such as plus or minus 2S.

[0125] The present application also provides a Bluetooth security device, comprising:

[0126] The first receiving module 1 is used to receive user identity information and determine whether the user identity information is consistent with preset identity information;

[0127] An activation module 2 is used to activate the Bluetooth transmission function if the user identity information is consistent with the preset identity information;

[0128] The first acquisition module 3 is used to acquire the current geographical information and determine whether the current area belongs to a safe area according to the geographical information;

[0129] An inquiry module 4 is used to send an inquiry signal to the Bluetooth communication device if the current area belongs to a safe area, wherein the Bluetooth communication device generates a random number according to the inquiry signal, and generates a first encryption offset according to the random number;

[0130] A second receiving module 5, configured to receive the random number and the first encryption offset sent by the Bluetooth communication device, and calculate a second encryption offset according to the random number;

[0131] A judgment module 6 is used to judge whether the value of the second encryption offset is equal to the value of the first encryption offset, and if the value of the second encryption offset is equal to the value of the first encryption offset, pairing is established with the Bluetooth communication device;

[0132] The second acquisition module 7 is used to acquire the transmission data and encrypt the transmission data to obtain encrypted data;

[0133] A third acquisition module 8 is used to acquire the address information of the Bluetooth communication device and calculate the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information;

[0134] A first calculation module 9, used to calculate the transmission time range of the encrypted data according to the transmission distance;

[0135] A generating module 10, configured to generate test data based on the encrypted data, and send the test data to a Bluetooth communication device, wherein the Bluetooth communication device feeds back a received signal;

[0136] A second calculation module 11, used for calculating a second transmission time of the test data according to the received signal, and determining whether the second transmission time is within the transmission time range;

[0137] The sending module 12 is configured to send the encrypted data to the Bluetooth communication device if the second transmission time is within the transmission time range.

[0138] In one embodiment, the first receiving module 1 includes:

[0139] A first receiving unit, used to receive a user initialization identity password;

[0140] A first conversion unit, configured to convert the initialization identity password based on a hash algorithm to obtain a first identity hash value;

[0141] A storage unit, used to store the first identity hash value but not to store the initialization identity password;

[0142] A second receiving unit, configured to receive user identity information and generate a second identity hash value according to the user identity information;

[0143] a comparing unit, configured to compare the first identity hash value as preset identity information with the second identity hash value;

[0144] An enabling unit is used to enable the Bluetooth transmission function if the second identity hash value is consistent with the preset identity information.

[0145] In one embodiment, the first acquisition module 3 includes:

[0146] A first acquisition unit is used to acquire current geographical information, wherein the geographical information includes: address information and window information;

[0147] A first judging unit, used to judge whether the address information belongs to a public area;

[0148] A second judgment unit, configured to judge whether the distance between the Bluetooth security device and the window is greater than a preset distance according to the window information if the address information does not belong to a public area;

[0149] The safety area determination unit is used to determine that the current area belongs to a safety area if the distance between the Bluetooth safety device and the window is greater than a preset distance.

[0150] In one embodiment, the second receiving module 5 includes:

[0151] A second acquisition unit, used to acquire a dynamic PIN value, address information of a Bluetooth communication device, and a random number, and generate an initial key based on an E22 key algorithm;

[0152] A concatenation unit, configured to concatenate the dynamic PIN value with the initial key, perform calculation based on a hash algorithm, and use the obtained value as a link key;

[0153] The third acquisition unit is used to acquire an encryption offset number, and calculate based on the E3 key algorithm according to the encryption offset number and the link key to obtain a second encryption offset.

[0154] In one embodiment, the second acquisition module 7 includes:

[0155] A fourth obtaining unit, used to obtain a serial number and a current pairing time;

[0156] a fifth acquisition unit, configured to acquire transmission data and divide the transmission data into a plurality of data blocks;

[0157] An encrypted hash value unit, used to concatenate the serial number with the current pairing time and calculate based on a hash algorithm to obtain an encrypted hash value;

[0158] The encrypted data unit is used to add the encrypted hash value to each of the data blocks to obtain encrypted data.

[0159] In one embodiment, the third acquisition module 8 includes:

[0160] A sixth acquisition unit, used to acquire current geographic information, wherein the geographic information is represented by X1, Y1, Z1;

[0161] A seventh acquisition unit, used to acquire address information of the Bluetooth communication device, wherein the address information is represented by X2, Y2, Z2;

[0162] The transmission distance calculation unit is used to calculate the transmission distance according to the geographic information and the address information, wherein the calculation formula is:

[0163] D=(X2-X1), (Y2-Y1), (Z2-Z1);

[0164] Where D represents the transmission distance.

[0165] In one embodiment, the first calculation module 9 includes:

[0166] an eighth obtaining unit, used for obtaining the memory capacity of the encrypted data;

[0167] A ninth acquisition unit, used to acquire the current Bluetooth transmission speed per second;

[0168] The transmission time unit is used to calculate the transmission time of encrypted data according to the speed and memory capacity;

[0169] A tenth obtaining unit, used for obtaining an error value;

[0170] The transmission time range unit is used to generate a transmission time range based on the error value.

[0171] Each of the above modules and units is used to execute the corresponding steps in the above communication method based on Bluetooth security device. The specific implementation method thereof is described in the above method embodiment and will not be described in detail here.

[0172] like Figure 3 As shown, the present application also provides a computer device, which may be a server, and its internal structure may be as shown in Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store all data required for the process of the communication method based on the Bluetooth security device. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the communication method based on the Bluetooth security device is implemented.

[0173] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0174] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned communication methods based on a Bluetooth security device is implemented.

[0175] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0176] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0177] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A communication method based on a Bluetooth security device, applied to a Bluetooth security device, characterized in that: include: Receiving user identity information, and determining whether the user identity information is consistent with preset identity information; If the user identity information is consistent with the preset identity information, the Bluetooth transmission function is enabled; Obtaining the current geographical information, and determining whether the current location is in a safe area based on the geographical information; If the current area belongs to a safe area, sending an inquiry signal to the Bluetooth communication device, wherein the Bluetooth communication device generates a random number according to the inquiry signal, and generates a first encryption offset according to the random number; receiving the random number and the first encryption offset sent by the Bluetooth communication device, and calculating a second encryption offset according to the random number; Determine whether the value of the second encryption offset is equal to the value of the first encryption offset, and if the value of the second encryption offset is equal to the value of the first encryption offset, establish pairing with the Bluetooth communication device; Acquiring transmission data, and encrypting the transmission data to obtain encrypted data; Acquire the address information of the Bluetooth communication device, and calculate the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information; Calculating a transmission time range of the encrypted data according to the transmission distance; generating test data based on the encrypted data, and sending the test data to a Bluetooth communication device, wherein the Bluetooth communication device feeds back a received signal; Calculate a second transmission time of the test data according to the received signal, and determine whether the second transmission time is within the transmission time range; If the second transmission time is within the transmission time range, the encrypted data is sent to the Bluetooth communication device.

2. The communication method based on Bluetooth security device according to claim 1, characterized in that: The step of receiving user identity information and determining whether the user identity information is consistent with preset identity information, and if the user identity information is consistent with the preset identity information, enabling the Bluetooth transmission function includes: Receive user initialization identity password; Convert the initialization identity password based on a hash algorithm to obtain a first identity hash value; The first identity hash value is stored, but the initialization identity password is not stored; Receiving user identity information, and generating a second identity hash value according to the user identity information; Compare the first identity hash value as preset identity information with the second identity hash value; If the second identity hash value is consistent with the preset identity information, the Bluetooth transmission function is enabled.

3. The communication method based on Bluetooth security device according to claim 1, characterized in that: The step of obtaining the current geographical information and determining whether the current location belongs to a safe area according to the geographical information includes: Obtaining the current geographic information, wherein the geographic information includes: address information and window information; Determining whether the address information belongs to a public area; If the address information does not belong to a public area, determining whether the distance between the Bluetooth security device and the window is greater than a preset distance according to the window information; If the distance between the Bluetooth safety device and the window is greater than a preset distance, it is determined that the current area belongs to a safe area.

4. The communication method based on Bluetooth security device according to claim 1, characterized in that: The step of receiving the random number and the first encryption offset sent by the Bluetooth communication device, and calculating the second encryption offset according to the random number includes: Obtain the dynamic PIN value, the address information of the Bluetooth communication device and the random number, and generate the initial key based on the E22 key algorithm; The dynamic PIN value is concatenated with the initial key, and the result is calculated based on a hash algorithm, and the obtained value is used as a link key; An encryption offset number is obtained, and a second encryption offset is obtained by performing calculation based on the E3 key algorithm according to the encryption offset number and the link key.

5. The communication method based on Bluetooth security device according to claim 1, characterized in that: The step of acquiring transmission data and encrypting the transmission data to obtain encrypted data includes: Get the serial number and current pairing time; Acquire transmission data, and divide the transmission data into a plurality of data blocks; The serial number is concatenated with the current pairing time, and is calculated based on a hash algorithm to obtain an encrypted hash value; The encrypted hash value is added to each of the data blocks to obtain encrypted data.

6. The communication method based on Bluetooth security device according to claim 1, characterized in that: The step of calculating the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information comprises: Get the current geographic information, where the geographic information is represented by X1, Y1, Z1; Obtain address information of a Bluetooth communication device, wherein the address information is represented by X2, Y2, Z2; The transmission distance is calculated based on the geographic information and address information, where the calculation formula is: D=(X2-X1), (Y2-Y1), (Z2-Z1); Where D represents the transmission distance.

7. The communication method based on Bluetooth security device according to claim 1, characterized in that: The step of calculating the transmission time range of the encrypted data according to the transmission distance comprises: Get the memory capacity of encrypted data; Get the current Bluetooth transmission speed per second; Calculate the transmission time of encrypted data based on speed and memory capacity; Get the error value; A transmission time range is generated based on the error value.

8. A Bluetooth security device, characterized in that: include: A first receiving module, used to receive user identity information and determine whether the user identity information is consistent with preset identity information; An activation module, used to activate the Bluetooth transmission function if the user identity information is consistent with the preset identity information; A first acquisition module is used to acquire the current geographical information and determine whether the current area belongs to a safe area according to the geographical information; An inquiry module, configured to send an inquiry signal to a Bluetooth communication device if the current area belongs to a safe area, wherein the Bluetooth communication device generates a random number according to the inquiry signal, and generates a first encryption offset according to the random number; A second receiving module, configured to receive the random number and the first encryption offset sent by the Bluetooth communication device, and calculate a second encryption offset according to the random number; A judging module, configured to judge whether the value of the second encrypted offset is equal to the value of the first encrypted offset, and if the value of the second encrypted offset is equal to the value of the first encrypted offset, pairing is established with the Bluetooth communication device; A second acquisition module is used to acquire transmission data and encrypt the transmission data to obtain encrypted data; A third acquisition module, used to acquire the address information of the Bluetooth communication device, and calculate the transmission distance between the Bluetooth communication device and the Bluetooth communication device according to the address information; A first calculation module, used to calculate the transmission time range of the encrypted data according to the transmission distance; A generating module, configured to generate test data based on the encrypted data, and send the test data to a Bluetooth communication device, wherein the Bluetooth communication device feeds back a received signal; A second calculation module, used for calculating a second transmission time of the test data according to the received signal, and determining whether the second transmission time is within the transmission time range; A sending module is used to send the encrypted data to the Bluetooth communication device if the second transmission time is within the transmission time range.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for realizing Bluetooth pairing

    CN106851540A

  • Bluetooth anti-tracking method and device

    CN107317606A