Short-distance positioning method based on Bluetooth beacon device

By including plain text and cipher text information in the broadcast data packet of the Bluetooth beacon device and verified through the algorithm and key provided by the server, the security risks caused by the same cipher text in the prior art are solved, and the effect of improving information complexity and system security is achieved.

CN119946596APending Publication Date: 2025-05-06SHANGHAI RENWEI ELECTRONIC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510142962.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, the same ciphertext is sent for a long time, and the key is the same, and the device identification is the same. In this way, overly complex keys, ciphertexts and encryption methods cannot be set, because the processing capabilities of terminal devices are different, and can only be set to the minimum. The device can maintain security in a short period of time. In the long run, it is easy to be cracked and imitated by external factors, and the security is not high.

Method used

By including plain text and cipher text information in the broadcast data packet of the Bluetooth beacon device, the user terminal receives the information and verifies the algorithm and key provided by the server to finally determine the location result. Specific measures include: the plaintext information broadcast by the Bluetooth beacon device is a sequence of continuously increasing numbers, the ciphertext information is encrypted by the SHA-256 algorithm, the dynamic factor determines which digits are extracted from the basic ciphertext for specific calculations, and determines which digit of the calculation result should be placed in the ciphertext.

Benefits of technology

This increases the complexity of information, greatly increasing the difficulty of forgery and cracking. Through the unified management of the server keys and algorithms, as well as the time synchronization mechanism, the security and real-time nature of the system are further enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946596A_ABST
    Figure CN119946596A_ABST
Patent Text Reader

Abstract

The invention discloses a short-distance positioning method based on a Bluetooth beacon device, and relates to the technical field of Bluetooth communication, the Bluetooth beacon device, a user terminal and a server are included, and a broadcast data packet of the Bluetooth beacon device comprises plaintext and ciphertext information; the user terminal receives the information and verifies the information through an algorithm and a secret key provided by the server, the server records the last successful verification time of each Bluetooth beacon device, and when the user terminal sends a new verification request, the server checks whether the time in the request is later than the recorded time and finally determines a positioning result; the problems of potential safety hazards and real-time performance caused by long-term sending of the same ciphertext can be solved, and the safety and the real-time performance of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Bluetooth communication, and in particular to a short-distance positioning method based on a Bluetooth beacon device. Background Art

[0002] A Bluetooth beacon is a small wireless transmission device that uses Bluetooth low energy (BLE) technology to send and receive data wirelessly. Its core components include a Bluetooth chip, a radio frequency antenna, and a power supply. A Bluetooth beacon can periodically send a broadcast signal containing its unique ID. After receiving these signals, other devices can implement a variety of applications by parsing the data in the signal.

[0003] The invention patent with the existing announcement number CN111601293B discloses a positioning method and device based on a Bluetooth beacon device, including: a user terminal can determine the target location to be reached, send a request to the server to obtain information corresponding to the target location according to the target location, and receive the device identifier of the Bluetooth beacon device corresponding to the target location as the first device identifier and the decryption key determined in advance by the server according to the first device identifier. When the user terminal receives the ciphertext information determined and broadcasted by the Bluetooth beacon device according to its own device identifier, the ciphertext information is decrypted according to the decryption key, and the device identifier contained in the ciphertext information is obtained as the second device identifier. The user terminal can determine the positioning result according to the first device identifier and the second device identifier. Through the above positioning method based on Bluetooth beacon devices, the broadcast content of Bluetooth beacon devices is encrypted, which prevents Bluetooth beacon devices from being forged or used maliciously, and reduces the effect of positioning errors of user terminals. However, the above scheme still has the following problems: the same ciphertext is sent for a long time, and the secret key and device identification are the same. In this way, overly complex secret keys, ciphertexts and encryption methods cannot be set. Because the processing capabilities of terminal devices are different, they can only be set to the minimum. The device can maintain security in a short period of time. In the long run, it is easy to be cracked and imitated by the outside, and the security is not high. Summary of the invention

[0004] The embodiment of the present application solves the problem in the prior art that the same ciphertext is sent for a long time, and the secret key and the device identification are the same, by providing a short-distance positioning method based on a Bluetooth beacon device. In this method, overly complex secret keys, ciphertexts and encryption methods cannot be set, because the processing capabilities of terminal devices are different and can only be set to the minimum. The device can maintain security in a short period of time, but in the long run, it is easy to be cracked and imitated by the outside and has low security. It increases the complexity of information and greatly increases the difficulty of forgery and cracking.

[0005] The present application embodiment provides a short-distance positioning method based on a Bluetooth beacon device, including: It consists of three components: Bluetooth beacon device, user terminal and server. The Bluetooth beacon device broadcasts data packets containing plaintext and ciphertext information. The user terminal receives the information and verifies it through the algorithm and key provided by the server to finally determine the positioning result.

[0006] The Bluetooth beacon device is a Bluetooth signal generator based on the Bluetooth 4.0 communication protocol or low-power Bluetooth technology. The Bluetooth beacon device can be composed of a low-power Bluetooth communication module with a power supply, and broadcasts data packets through the low-power Bluetooth communication module at preset intervals; The broadcast data packet contains plaintext and ciphertext information; The plaintext information of the broadcast data packet is a series of continuously increasing digital sequences (such as timestamp, serial number, device running time, etc.), and the plaintext information is different each time it is broadcast; The ciphertext information of the broadcast data packet is n numbers extracted from the plaintext information, which are encrypted in the server using the SHA-256 algorithm and combined with the key of the Bluetooth beacon device; The encryption process is to integrate a counter inside the Bluetooth beacon device, and the counter is incremented each time it is broadcast. As part of the plaintext, the selected plaintext numbers are encrypted using the SHA-256 algorithm to generate ciphertext; The server is a third-party application platform that stores the unique key of each Bluetooth beacon device, defines and manages complex algorithms (such as the SHA-256 algorithm) for generating ciphertext, and transmits the algorithm to the user terminal for user terminal verification; The server records the time when each Bluetooth beacon device was last successfully authenticated. When the user terminal sends a new authentication request, the server checks whether the time in the request is later than the recorded time. The user terminal is an electronic device that supports the Bluetooth 4.0 communication protocol (such as a mobile phone, tablet computer and other smart devices). The user terminal sends a request to the server to obtain the algorithm and key of the target Bluetooth beacon device, and stores the algorithm and key for subsequent information verification; The user terminal receives the plaintext and ciphertext information broadcast by the Bluetooth beacon device in real time and performs verification; Plain text information verification is to check whether the timestamp or serial number in the plain text is incremented to ensure the freshness of the information. The time in the plain text is compared with the time recorded by the server to ensure that it is not later than the server time. Ciphertext information verification is to use the stored algorithm description and key to encrypt the plaintext part selected by the user terminal, and compare the generated ciphertext with the received ciphertext; If both the plaintext and ciphertext are verified, and the plaintext time is not earlier than the server time, it is confirmed that the user terminal has arrived at the target location; If any verification fails, positioning is rejected and an error message is displayed to the user or an alert is sent to the server; The user terminal sends the plain text time of the verification to the server, and the server updates the last successful verification time of the Bluetooth beacon device.

[0007] The calculation methods obtained by different devices change dynamically, corresponding to the different positions of the solutions in the ciphertext. For example, in 1234567, the second and third digits 2 and 3 are taken in the plaintext, and the calculation method is the second digit multiplied by the third digit. The corresponding solution position is the sixth digit. The position of the plaintext value and the position of the solution are dynamic and have encryption properties. The content in the ciphertext remains unchanged, but the calculation method and the value position change dynamically each time. In this way, the information sent is combined with the dynamic value to reduce the amount of calculation required for decryption, while also improving security performance.

[0008] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0009] In some embodiments, when a Bluetooth beacon device broadcasts a data packet to broadcast ciphertext information, a dynamic ciphertext generation algorithm is used, so that each ciphertext broadcast not only has a different encryption method, but also the location and decryption method of information to be extracted from the ciphertext during decryption also change dynamically, specifically including the following steps: S201: When the Bluetooth beacon device generates a ciphertext, a basic ciphertext string is predetermined, such as 1234567, and then a dynamic factor is generated according to a current timestamp or counter value and a preset key generation algorithm (such as MD5). The dynamic factor determines which digits are extracted from the basic ciphertext for a specific calculation (such as multiplication) and determines which digit of the calculation result should be placed in the ciphertext; The current timestamp or counter is incremented with the number of times the Bluetooth beacon device broadcasts; The specific method of dynamic factor generation is: DF=MD5(T||K); Among them, DF represents a dynamic factor; T represents the current timestamp or counter; K represents a preset key, and || represents an operation algorithm, which can be a simple calculation of addition, subtraction, multiplication, and division; The value selection rule is to extract specific indexes from the dynamic factor, such as the first three digits as the starting index and the last three digits as the placement index of the calculation result, and extract the corresponding numbers from the basic ciphertext according to the index for calculation; The basic ciphertext is processed by using dynamic rules to generate the final ciphertext broadcast information; S202: After receiving the dynamic ciphertext broadcast by the Bluetooth beacon device, the user terminal executes the same dynamic factor generation algorithm as the Bluetooth beacon device according to the decryption key obtained from the server and the current timestamp or counter synchronization value to determine how to extract information from the ciphertext and decrypt it, specifically: The user terminal uses the same key and current timestamp or counter value as the Bluetooth beacon device to generate a dynamic factor through the MD5 hash algorithm; Based on the generated dynamic factors, determine which numbers to extract from the ciphertext and perform which calculations, and place the calculation results at the specified position of the ciphertext, thereby restoring the original information or verifying the validity of the information.

[0010] S301: In the Bluetooth beacon device, a set of fixed ciphertexts is predefined, which is recorded as a fixed ciphertext library, and the number is n; Each ciphertext in the fixed ciphertext library has a certain length and complexity. The content of the fixed ciphertext library remains unchanged, but all ciphertexts are not sent at the same time during broadcasting. Instead, they are selected and sent according to dynamic strategies. The length and complexity of the ciphertexts in the fixed ciphertext library can be the same or different; S302: After receiving the request from the terminal device, the server selects x ciphertexts from the fixed ciphertext library for broadcast (x≤n) according to a preset strategy (such as time, location or other factors), and sends the selected ciphertexts and specific location information of each ciphertext for subsequent calculation to the terminal device; Use a pseudo-random number generator or a selection mechanism based on a specific algorithm to ensure that the ciphertext combination selected each time is unpredictable; The specific algorithm may be a timestamp-based hash function; For each selected ciphertext, the server specifies one or more positions (such as the 2nd and 3rd positions) for subsequent calculations; S303: After receiving the broadcasted ciphertext combination, the terminal device first verifies whether the number and serial number of the ciphertext are consistent with those indicated by the server; if they are consistent, the terminal device extracts the corresponding characters or numbers from each ciphertext according to the position specified by the server, and decrypts or verifies the characters or numbers according to the calculation method provided by the server; Compare the number of ciphertexts received with the number indicated by the server, as well as the identification (e.g., serial number) of the ciphertexts; According to the calculation method and specific location information provided by the server, the extracted characters or numbers are processed to obtain the final verification result or decrypted information.

[0011] S401: Split the ciphertext into two parts, one part is sent alone and is defined as independent ciphertext; the other part is sent together with the plaintext and is defined as combined ciphertext; Formulate a sending strategy, set the sending time for independent ciphertext, send the combined ciphertext and independent ciphertext separately, set the time interval, and send the combined ciphertext after the time interval after the independent ciphertext is sent; S402: The content of the independent ciphertext includes the sending time information and the sending time of the previous combined ciphertext, which increases the difficulty of forgery; S403: Ensure that the preset time interval is maintained between the independent ciphertext and the combined ciphertext, and accurately control the time through time synchronization and interval control algorithm.

[0012] In some embodiments, when sending a ciphertext, not only is the ciphertext split into a combined ciphertext and an independent ciphertext, but a sending time interval between the two is also dynamically generated; A dynamic time interval generation algorithm is used, which generates the time interval according to the system time and the operating status of the Bluetooth beacon device; The content of the independent ciphertext should include not only the sending time information but also the actual sending timestamp of the previous combined ciphertext. Implement dynamic time interval control on the Bluetooth beacon device side and perform synchronization verification on the user terminal; The user terminal receives the ciphertext according to the dynamic time interval verification strategy obtained from the server, dynamically compares the independent ciphertext sending time and the combined ciphertext sending time, and verifies the dynamic time interval.

[0013] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: This technical solution effectively solves the security risks and real-time problems caused by long-term sending of the same ciphertext by introducing an information broadcasting method that combines plaintext and ciphertext, as well as a real-time verification mechanism on the user terminal side. At the same time, the security and real-time performance of the system are further enhanced through the keys and algorithms uniformly managed by the server and the time synchronization mechanism.

[0014] The dynamic ciphertext generation and decryption mechanism makes each communication unique and difficult to intercept and crack. Even if the ciphertext content remains unchanged, its security and complexity are significantly improved. At the same time, although dynamic factors are introduced into the encryption and decryption process, the amount of calculation has not increased significantly, because the main operations are concentrated on hash algorithms and simple mathematical operations, which are suitable for terminal device processing.

[0015] The ciphertext is split into two parts: independent ciphertext and combined ciphertext, so that even if an attacker intercepts one part, it is difficult to restore the complete encrypted information; the time interval between independent ciphertext and combined ciphertext is used as another hidden encryption method. This interval is not directly reflected in the form of ciphertext, which increases the difficulty of cracking. The dynamic time interval generation algorithm is adopted to make the time interval of the ciphertext sent each time different, thereby improving the complexity and security of encryption. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of a short-distance positioning method based on a Bluetooth beacon device of the present invention; Figure 2It is a flow chart of the short-distance positioning method S301-S303 based on the Bluetooth beacon device of the present invention. DETAILED DESCRIPTION

[0017] To facilitate the understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.

[0018] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are only for illustrative purposes and do not represent the only implementation method.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more related listed items.

[0020] Embodiment 1: Figure 1 As shown, the present application is a short-distance positioning method based on a Bluetooth beacon device, including three components: a Bluetooth beacon device, a user terminal and a server. The Bluetooth beacon device broadcasts a data packet containing plaintext and ciphertext information. The user terminal receives the information and verifies it through the algorithm and key provided by the server to finally determine the positioning result.

[0021] The Bluetooth beacon device is a Bluetooth signal generator based on the Bluetooth 4.0 communication protocol or low-power Bluetooth technology. The Bluetooth beacon device can be composed of a low-power Bluetooth communication module with a power supply, and broadcasts data packets through the low-power Bluetooth communication module at preset intervals; The broadcast data packet contains plaintext and ciphertext information; The plaintext information of the broadcast data packet is a series of continuously increasing digital sequences (such as timestamp, serial number, device running time, etc.), and the plaintext information is different each time it is broadcast; The ciphertext information of the broadcast data packet is n numbers extracted from the plaintext information, which are encrypted in the server using the SHA-256 algorithm and combined with the key of the Bluetooth beacon device; The encryption process is to integrate a counter inside the Bluetooth beacon device, and the counter is incremented each time it is broadcast. As part of the plaintext, the selected plaintext numbers are encrypted using the SHA-256 algorithm to generate ciphertext; The server is a third-party application platform that stores the unique key of each Bluetooth beacon device, defines and manages complex algorithms (such as the SHA-256 algorithm) for generating ciphertext, and transmits the algorithm to the user terminal for user terminal verification; The server records the time when each Bluetooth beacon device was last successfully authenticated. When the user terminal sends a new authentication request, the server checks whether the time in the request is later than the recorded time. The user terminal is an electronic device that supports the Bluetooth 4.0 communication protocol (such as a mobile phone, tablet computer and other smart devices). The user terminal sends a request to the server to obtain the algorithm description and key of the target Bluetooth beacon device, and stores the algorithm description and key for subsequent information verification; The user terminal receives the plaintext and ciphertext information broadcast by the Bluetooth beacon device in real time and performs verification; Plain text information verification is to check whether the timestamp or serial number in the plain text is incremented to ensure the freshness of the information. The time in the plain text is compared with the time recorded by the server to ensure that it is not later than the server time. Ciphertext information verification is to use the stored algorithm description and key to encrypt the plaintext part selected by the user terminal, and compare the generated ciphertext with the received ciphertext; If both the plaintext and ciphertext are verified, and the plaintext time is not earlier than the server time, it is confirmed that the user terminal has arrived at the target location; If any verification fails, positioning is rejected and an error message is displayed to the user or an alert is sent to the server; The user terminal sends the plain text time of the verification to the server, and the server updates the last successful verification time of the Bluetooth beacon device.

[0022] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages: This technical solution effectively solves the security risks and real-time problems caused by the long-term sending of the same ciphertext in the original solution by introducing a combination of plaintext and ciphertext information broadcasting and a real-time verification mechanism on the user terminal side. At the same time, the security and real-time performance of the system are further enhanced through the unified management of keys and algorithms by the server and the time synchronization mechanism.

[0023] The combination of plain text and cipher text increases the complexity of information, making it much more difficult to forge and crack. The real-time verification on the user terminal side reduces the complexity of encryption and decryption and improves the response speed of the system.

[0024] Embodiment 2: In embodiment 1, the calculation methods obtained by different devices change dynamically, corresponding to the different positions of the solutions in the ciphertext. For example, in 1234567, the two digits 2 and 3 in the second and third digits in the plaintext are taken, and the calculation method is the second digit multiplied by the third digit, and the corresponding solution position is the sixth digit. The position of the plaintext value and the position of the solution are dynamic and have encryption properties. The content in the ciphertext remains unchanged, but the calculation method and the value position change dynamically each time. In this way, the information sent is combined with the dynamic value, which reduces the amount of calculation required for decryption and also improves security performance.

[0025] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0026] In some embodiments, when a Bluetooth beacon device broadcasts a data packet to broadcast ciphertext information, a dynamic ciphertext generation algorithm is used, so that each ciphertext broadcast not only has a different encryption method, but also the location and decryption method of information to be extracted from the ciphertext during decryption also change dynamically, specifically including the following steps: S201: When the Bluetooth beacon device generates a ciphertext, a basic ciphertext string is predetermined, such as 1234567, and then a dynamic factor is generated according to a current timestamp or counter value and a preset key generation algorithm (such as MD5). The dynamic factor determines which digits are extracted from the basic ciphertext for a specific calculation (such as multiplication) and determines which digit of the calculation result should be placed in the ciphertext; The current timestamp or counter is incremented with the number of times the Bluetooth beacon device broadcasts; The specific method of dynamic factor generation is: ; Among them, DF represents a dynamic factor; T represents the current timestamp or counter; K represents a preset key, and || represents an operation algorithm, which can be a simple calculation of addition, subtraction, multiplication, and division; The value selection rule is to extract specific indexes from the dynamic factor, such as the first three digits as the starting index and the last three digits as the placement index of the calculation result, and extract the corresponding numbers from the basic ciphertext according to the index for calculation; The basic ciphertext is processed by using dynamic rules to generate the final ciphertext broadcast information; S202: After receiving the dynamic ciphertext broadcast by the Bluetooth beacon device, the user terminal executes the same dynamic factor generation algorithm as the Bluetooth beacon device according to the decryption key obtained from the server and the current timestamp or counter synchronization value to determine how to extract information from the ciphertext and decrypt it, specifically: The user terminal uses the same key and current timestamp or counter value as the Bluetooth beacon device to generate a dynamic factor through the MD5 hash algorithm; Based on the generated dynamic factors, determine which numbers to extract from the ciphertext and perform which calculations, and place the calculation results at the specified position of the ciphertext, thereby restoring the original information or verifying the validity of the information.

[0027] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages: Through dynamic decryption processing, the user terminal can accurately extract and decrypt information from dynamically changing ciphertext, ensuring synchronization and communication security with the Bluetooth beacon device.

[0028] The dynamic ciphertext generation and decryption mechanism makes each communication unique and difficult to intercept and crack. Even if the ciphertext content remains unchanged, its security and complexity are significantly improved. At the same time, although dynamic factors are introduced into the encryption and decryption process, the amount of calculation has not increased significantly, because the main operations are concentrated on hash algorithms and simple mathematical operations, which are suitable for terminal device processing.

[0029] Embodiment 3: In Embodiment 1 and Embodiment 2, the number of results of dynamic random combination of ciphertexts is huge, resulting in high requirements for Bluetooth beacon devices and terminal devices. In view of the above situation, Figure 2 As shown, a ciphertext library is set, and n ciphertexts are set to be fixed. In combination with the above scheme, the positions of multiple ciphertexts selected from the basic ciphertext are determined by value-taking rules. When the terminal device verifies the ciphertext, the position and quantity of the ciphertext are verified first, which can reduce the decryption difficulty of the terminal device.

[0030] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0031] S301: On the Bluetooth beacon device side, a set of fixed ciphertexts is predefined, recorded as a fixed ciphertext library, and the number is n; Each ciphertext in the fixed ciphertext library has a certain length and complexity. The content of the fixed ciphertext library remains unchanged, but all ciphertexts are not sent at the same time during broadcasting. Instead, they are selected and sent according to dynamic strategies. The length and complexity of the ciphertexts in the fixed ciphertext library can be the same or different; S302: After receiving the request from the terminal device, the server selects x ciphertexts from the fixed ciphertext library for broadcast (x≤n) according to a preset strategy (such as time, location or other factors), and sends the selected ciphertexts and specific location information of each ciphertext for subsequent calculation to the terminal device; Use a pseudo-random number generator or a selection mechanism based on a specific algorithm to ensure that the ciphertext combination selected each time is unpredictable; The specific algorithm can be a timestamp-based hash function For each selected ciphertext, the server specifies one or more positions (such as the 2nd and 3rd positions) for subsequent calculations; S303: After receiving the broadcasted ciphertext combination, the terminal device first verifies whether the number and serial number of the ciphertext are consistent with those indicated by the server; if they are consistent, the terminal device extracts the corresponding characters or numbers from each ciphertext according to the position specified by the server, and decrypts or verifies the characters or numbers according to the calculation method provided by the server; Compare the number of ciphertexts received with the number indicated by the server, as well as the identification (e.g., serial number) of the ciphertexts; According to the calculation method and specific location information provided by the server, the extracted characters or numbers are processed to obtain the final verification result or decrypted information.

[0032] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages: By introducing a fixed ciphertext library and a dynamic ciphertext combination mechanism, the goal of both improving security and reducing device complexity is achieved. The fixed ciphertext library simplifies the tasks of Bluetooth beacon devices, while the dynamic ciphertext combination and verification mechanism enhances the system's anti-cracking ability and real-time performance.

[0033] Through dynamic selection and verification mechanism, the difficulty of cracking is increased and the impact of forged and old information is reduced. The design of fixed ciphertext library reduces the computing burden of Bluetooth beacon devices and improves the scalability and compatibility of the system. Through double verification, it ensures that the received information is authentic and valid, and filters out possible forged or old information. At the same time, it reduces the complexity of decryption of terminal devices and improves the real-time and stability of the system.

[0034] Embodiment 4: In the above embodiment, the sending of the dynamic ciphertext combination is divided into two parts, one part is sent together with the plaintext, and the other part is sent alone to form an independent ciphertext; the independent ciphertext sets the sending time, and the information of the combination of the plaintext and the ciphertext is named the combined ciphertext, and the time interval between the independent ciphertext and the combined ciphertext is limited, such as 0.2-2 seconds; the independent ciphertext contains the sending time information and the sending time information of the adjacent previous combined ciphertext, and the information obtained by the terminal device from the server contains the preset time interval information. When the terminal device receives the information, it first compares the independent ciphertext sending time and the combined ciphertext sending time, and subtracts them to obtain the sending time interval; this time interval itself is not reflected in the form of ciphertext, forming another hidden encryption method.

[0035] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0036] S401: Split the ciphertext into two parts, one part is sent alone and is defined as independent ciphertext; the other part is sent together with the plaintext and is defined as combined ciphertext; Formulate a sending strategy, set the sending time for independent ciphertext, send the combined ciphertext and independent ciphertext separately, set the time interval, and send the combined ciphertext after the time interval after the independent ciphertext is sent; S402: The content of the independent ciphertext includes the sending time information and the sending time of the previous combined ciphertext, which increases the difficulty of forgery; S403: Ensure that the preset time interval is maintained between the independent ciphertext and the combined ciphertext, and accurately control the time through time synchronization and interval control algorithm.

[0037] In some embodiments, when sending a ciphertext, not only is the ciphertext split into a combined ciphertext and an independent ciphertext, but a sending time interval between the two is also dynamically generated; A dynamic time interval generation algorithm is used, which generates the time interval according to the system time and the operating status of the Bluetooth beacon device; The content of the independent ciphertext should include not only the sending time information but also the actual sending timestamp of the previous combined ciphertext. Implement dynamic time interval control on the Bluetooth beacon device side and perform synchronization verification on the user terminal; The user terminal receives the ciphertext according to the dynamic time interval verification strategy obtained from the server, dynamically compares the independent ciphertext sending time and the combined ciphertext sending time, and verifies the dynamic time interval.

[0038] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages: The ciphertext is split into two parts: independent ciphertext and combined ciphertext, so that even if an attacker intercepts one part, it is difficult to restore the complete encrypted information; the time interval between independent ciphertext and combined ciphertext is used as another hidden encryption method. This interval is not directly reflected in the form of ciphertext, which increases the difficulty of cracking. The dynamic time interval generation algorithm is adopted, so that the time interval of the ciphertext sent each time is different, further improving the complexity and security of encryption.

[0039] Through multiple encryptions and dynamic time intervals, information can be effectively prevented from being intercepted, cracked or forged, thus improving the security of the entire system. Since the encryption and decryption process is automatically completed in the background, users do not need to perform additional operations, so it will not affect the user experience. At the same time, the enhanced security also increases users' trust in the system.

[0040] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A short-distance positioning method based on Bluetooth beacon equipment, characterized in that: It includes three components: Bluetooth beacon device, user terminal and server. The Bluetooth beacon device broadcasts data packets containing plaintext and ciphertext information. The user terminal receives the information and verifies it through the algorithm and key provided by the server to finally determine the positioning result. The Bluetooth beacon device has an internal integrated counter, which is incremented each time it broadcasts. As part of the plaintext, the selected plaintext digits are encrypted using an algorithm to generate ciphertext; The server stores a unique key for each Bluetooth beacon device, defines and manages an algorithm for generating ciphertext, and transmits the algorithm to the user terminal for user terminal verification; The server records the time when each Bluetooth beacon device was last successfully authenticated. When the user terminal sends a new authentication request, the server checks whether the time in the request is later than the recorded time. The user terminal sends a request to the server to obtain the algorithm and key of the target Bluetooth beacon device and store the algorithm and key for subsequent information verification; The user terminal receives the plaintext and ciphertext information broadcast by the Bluetooth beacon device in real time and performs verification; If both the plaintext and ciphertext are verified, and the plaintext time is not earlier than the server time, it is confirmed that the user terminal has arrived at the target location; If any verification fails, positioning is rejected and an error message is displayed to the user or an alert is sent to the server.

2. The short-distance positioning method based on a Bluetooth beacon device as claimed in claim 1, characterized in that: The Bluetooth beacon device is a Bluetooth signal generator based on the Bluetooth 4.0 communication protocol or low-power Bluetooth technology, which broadcasts data packets through a low-power Bluetooth communication module at preset intervals; The broadcast data packet contains plaintext and ciphertext information; The plaintext information of the broadcast data packet is a series of continuously increasing digital sequences, and the plaintext information is different each time it is broadcast; The ciphertext information of the broadcast data packet is n numbers extracted from the plaintext information, and is encrypted in the server through an algorithm combined with the key of the Bluetooth beacon device.

3. The short-distance positioning method based on a Bluetooth beacon device as claimed in claim 2, characterized in that: The user terminal receives the plaintext and ciphertext information broadcast by the Bluetooth beacon device in real time and performs verification, specifically: Plain text information verification is to check whether the sequence number in the plain text is incremented, and compare the time in the plain text with the time recorded by the server to ensure that it is not later than the server time; Ciphertext information verification uses the stored algorithm description and key to encrypt the plaintext portion selected by the user terminal, and compares the generated ciphertext with the received ciphertext.

4. The short-distance positioning method based on a Bluetooth beacon device as claimed in claim 1, characterized in that: When a Bluetooth beacon device broadcasts data packets and ciphertext information, a dynamic ciphertext generation algorithm is used, so that not only the encryption method of each broadcast ciphertext is different, but also the location where information needs to be extracted from the ciphertext and the decryption method are dynamically changed during decryption.

5. The short-distance positioning method based on Bluetooth beacon device as claimed in claim 4, characterized in that: The dynamic ciphertext generation algorithm is specifically: A basic ciphertext string is determined in advance, and a dynamic factor is generated according to the current timestamp or counter value and a preset key generation algorithm, the MD5 algorithm. The dynamic factor determines which digits are extracted from the basic ciphertext for a specific calculation and determines where the calculation result should be placed in the ciphertext; The current timestamp or counter is incremented with the number of times the Bluetooth beacon device broadcasts; The specific method of dynamic factor generation is: DF=MD5(T||K); Among them, DF represents a dynamic factor; T represents the current timestamp or counter; K represents a preset key, and || represents an operation algorithm, which is a simple calculation of addition, subtraction, multiplication and division; The value selection rule is to extract a specific number of indices from the dynamic factor, and extract the corresponding number from the basic ciphertext according to the index for calculation; The basic ciphertext is processed by using dynamic rules to generate the final ciphertext broadcast information.

6. The short-distance positioning method based on Bluetooth beacon device as claimed in claim 5, characterized in that: After receiving the dynamic ciphertext broadcast by the Bluetooth beacon device, the user terminal executes the same dynamic factor generation algorithm as the Bluetooth beacon device according to the decryption key and the current timestamp or counter synchronization value obtained from the server to determine how to extract information from the ciphertext and decrypt it, specifically: The user terminal uses the same key and current timestamp or counter value as the Bluetooth beacon device to generate a dynamic factor through the MD5 hash algorithm; Based on the generated dynamic factors, determine which numbers to extract from the ciphertext and perform which calculations, and place the calculation results in the specified position of the ciphertext to restore the original information or verify the validity of the information.

7. The short-distance positioning method based on a Bluetooth beacon device as claimed in claim 6, characterized in that: In the Bluetooth beacon device, a set of fixed ciphertexts is predefined, which is recorded as a fixed ciphertext library, and the number is n; After receiving the request from the terminal device, the server selects x ciphertexts from the fixed ciphertext library for broadcast according to the preset strategy. At the same time, the server sends the selected ciphertexts and the specific location information of each ciphertext for subsequent calculation to the terminal device; After receiving the broadcast ciphertext combination, the terminal device first verifies whether the quantity and number of the ciphertexts are consistent with those indicated by the server; if they are consistent, the corresponding characters or numbers are extracted from each ciphertext according to the position specified by the server, and decrypted or verified according to the calculation method provided by the server.

8. The short-distance positioning method based on Bluetooth beacon device as claimed in claim 7, characterized in that: Each ciphertext in the fixed ciphertext library has a certain length and complexity. The content of the fixed ciphertext library remains unchanged, but all ciphertexts are not sent at the same time during broadcasting. Instead, they are selected and sent according to dynamic strategies. The length and complexity of the ciphertexts in the fixed ciphertext library can be the same or different.

9. The short-distance positioning method based on Bluetooth beacon device as claimed in claim 7, characterized in that: The preset strategy is a pseudo-random number generator or a selection mechanism based on a specific algorithm, ensuring that the ciphertext combination selected each time is unpredictable; The specific algorithm is a timestamp-based hash function; For each selected ciphertext, the server specifies one or more locations for subsequent computation.

10. The short-distance positioning method based on Bluetooth beacon device as claimed in claim 7, characterized in that: The ciphertext combination is divided into two parts, one part is sent together with the plaintext, and the other part is sent alone to form an independent ciphertext; the independent ciphertext sets the sending time, and the information of the combination of the plaintext and the ciphertext is named the combined ciphertext, and the time interval between the independent ciphertext and the combined ciphertext is limited. The independent ciphertext contains the sending time information and the sending time information of the adjacent previous combined ciphertext. The information obtained by the terminal device from the server contains the preset time interval information. The terminal device receives the information, first compares the sending time of the independent ciphertext with the sending time of the combined ciphertext, and subtracts them to obtain the sending time interval, which specifically includes the following steps: S401: Split the ciphertext into two parts, one part is sent alone and is defined as independent ciphertext; the other part is sent together with the plaintext and is defined as combined ciphertext; Formulate a sending strategy, set the sending time for independent ciphertext, send the combined ciphertext and independent ciphertext separately, set the time interval, and send the combined ciphertext after the time interval after the independent ciphertext is sent; S402: The content of the independent ciphertext includes the sending time information and the sending time of the previous combined ciphertext, which increases the difficulty of forgery; S403: ensuring that the preset time interval is maintained between the independent ciphertext and the combined ciphertext, using a time synchronization and interval control algorithm; When sending ciphertext, not only is the ciphertext split into combined ciphertext and independent ciphertext, but the sending time interval between the two is also dynamically generated; A dynamic time interval generation algorithm is used, which generates the time interval according to the system time and the operating status of the Bluetooth beacon device; The content of the independent ciphertext, in addition to the sending time information, also records the actual sending timestamp of the previous combined ciphertext; Implement dynamic time interval control on the Bluetooth beacon device side and perform synchronization verification on the user terminal; The user terminal receives the ciphertext according to the dynamic time interval verification strategy obtained from the server, dynamically compares the independent ciphertext sending time and the combined ciphertext sending time, and verifies the dynamic time interval.

Citation Information

Patent Citations

  • Positioning method and device based on Bluetooth beacon devices

    CN111601293B