A Ukey status management method and related device based on Bluetooth connection
The Ukey status management method enhances Bluetooth connection reliability by using advanced encryption and distance calculation techniques, ensuring secure and precise state conversion of Ukeys.
Patent Information
- Application Number
- CN202410704613.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-06-03
AI Technical Summary
Existing Ukey status management methods using Bluetooth connections are unreliable due to inaccurate distance measurements between devices, which are affected by environmental factors, leading to connection errors and inability to guarantee secure and accurate status management.
A Ukey status management method that involves two-way authentication between Bluetooth terminals using a decryption key generated through a series of bit operations and encryption processes, combined with real-time distance calculations based on signal strength and channel responses, to ensure accurate and secure connection state conversion.
The method provides reliable and precise Ukey status management by reducing environmental impact on distance measurement and minimizing connection errors, ensuring automatic and quick connection, and enabling accurate state conversion based on real-time target distance.
Smart Images

Figure CN118632223B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a Ukey status management method based on Bluetooth connection and a related device. Background Art
[0002] In enterprises, the management requirement for Ukey is that employees need to unplug Ukey when they leave the computer, but most employees are not used to this requirement. Since Bluetooth is commonly used in daily work, enterprises have begun to design a method to manage the status of Ukey through Bluetooth connection. In the existing management method for Ukey status, Bluetooth fast connection is usually achieved through plain text exchange, but this method cannot guarantee the security and accuracy of Bluetooth connection. When the same Bluetooth device appears, connection errors are prone to occur, making the status management of Ukey unable to be reliably guaranteed. In the status management of Ukey, it is necessary to detect the distance between Bluetooth devices to indicate the distance that the employee walks away. When the distance reaches a certain threshold, the Bluetooth connection is disconnected and the Ukey becomes disconnected. In this regard, the measurement of the distance between Bluetooth devices is particularly important, but currently the distance between Bluetooth devices is usually measured only by the Bluetooth signal strength value, and the Bluetooth signal strength value is easily affected by the environment, which makes it fluctuate greatly, resulting in inaccurate distance between Bluetooth devices in the final calculation, making the conversion error of Ukey status too large, and unable to guarantee high reliability of Ukey status management. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides a Ukey status management method and related devices based on Bluetooth connection, which meet the enterprise's management requirements for Ukey and enable the Ukey status management to achieve a more ideal effect.
[0004] In order to solve the above technical problems, the present invention provides a Ukey status management method based on Bluetooth connection, the method comprising:
[0005] The first Bluetooth terminal receives the Bluetooth broadcast information sent by the second Bluetooth terminal, authenticates the Bluetooth broadcast information using the preset key information based on the Ukey management software, and obtains a first key signal;
[0006] The first Bluetooth terminal sends the first key signal to the second Bluetooth terminal, the second Bluetooth terminal generates a decryption key based on the first key signal, and sends the decryption key to the first Bluetooth terminal;
[0007] The first Bluetooth terminal decrypts based on the decryption key to obtain valid data, establishes two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, and establishes a valid connection between the first Bluetooth terminal and the second Bluetooth terminal based on the two-way authentication;
[0008] The Ukey management software converts the state of the Ukey into a normal use state based on the effective connection between the first Bluetooth terminal and the second Bluetooth terminal;
[0009] After converting the state of Ukey to a normal use state, obtaining a real-time signal strength value of a Bluetooth broadcast signal and a real-time signal strength indication value of a connectivity broadcast packet sent by a second Bluetooth terminal, and calculating a first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet;
[0010] Acquire a number of Bluetooth channels of the first Bluetooth terminal and the second Bluetooth terminal, calculate a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the number of Bluetooth channels, and calculate a real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first real-time distance and the second real-time distance;
[0011] The real-time target distance is compared with a preset distance threshold. If the real-time target distance is greater than or equal to the preset distance threshold, the Ukey management software converts the Ukey from a normal use state to a disconnected use state.
[0012] Optionally, the authenticating the Bluetooth broadcast information by using preset key information based on Ukey management software to obtain a first key signal includes:
[0013] The Ukey management software obtains a random number in the Bluetooth broadcast information, authenticates the Bluetooth broadcast information based on the random number in the Bluetooth broadcast information using preset key information, and obtains a first key signal.
[0014] Optionally, generating a decryption key based on the first key signal includes:
[0015] Generate a symmetric encryption key based on the first key signal, and perform encapsulation processing based on the symmetric encryption key to obtain an encapsulated message;
[0016] Performing bit operations based on the first key signal and the encapsulated message to obtain a first ciphertext digital signal, and performing bit operations based on the first key signal to obtain a random digital signal;
[0017] Inserting the random digital signal into the first ciphertext digital signal to obtain a second ciphertext digital signal, and performing bit inversion processing on the second ciphertext digital signal to obtain an encrypted segmented digital signal;
[0018] A bit inversion process is performed based on the encrypted segmented digital signal to obtain a third ciphertext digital signal, and a decryption key is generated based on the third ciphertext digital signal combined with a random digital signal.
[0019] Optionally, the decrypting based on the decryption key to obtain valid data, and establishing two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data includes:
[0020] Performing an XOR operation based on the decryption key to obtain a decryption round key, and performing multiple rounds of decryption using the decryption round key based on a round function to obtain valid data;
[0021] The valid data is compared with the stored local valid data. If the comparison result between the valid data and the stored local valid data is consistent, two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal is established.
[0022] Optionally, the calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indicator value of the connectivity broadcast packet includes:
[0023] Acquire a preset number of target real-time signal strength values from the real-time signal strength values of the Bluetooth broadcast signal based on a sliding window, and calculate the target real-time signal strength average value based on the preset number of target real-time signal strength values;
[0024] Calculate a first distance value based on the target real-time signal strength average value using a preset calibration value;
[0025] Calculating an average power value based on the real-time signal strength indicator value of the connectivity broadcast packet, obtaining a path loss power of the connectivity broadcast packet, and calculating a second distance value based on the average power value and the path loss power;
[0026] A first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on the first distance value and the second distance value.
[0027] Optionally, the calculating the second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on a plurality of Bluetooth channels includes:
[0028] Obtaining a request channel response and a reply channel response in each Bluetooth channel, and generating a plurality of intermediate values based on the request channel response and the reply channel response in each Bluetooth channel;
[0029] The transmission time of the Bluetooth channel is obtained by using the orthogonal matching pursuit method based on several intermediate values;
[0030] Initial distance data is acquired based on a plurality of Bluetooth channels, and a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on the Bluetooth channel transmission time in combination with the initial distance data.
[0031] Optionally, converting the Ukey from a normal use state to a disconnected use state includes:
[0032] Construct a broadcast receiver based on the BroadcastReceiver component, and receive the Ukey connection status change instruction based on the broadcast receiver;
[0033] Based on the onRecevie method, the Ukey connection state change instruction is used to convert the Ukey from the normal use state to the disconnected use state.
[0034] In addition, the present invention provides a Ukey status management device based on Bluetooth connection, the device comprising:
[0035] Bluetooth broadcast information authentication module: used for the first Bluetooth terminal to receive the Bluetooth broadcast information sent by the second Bluetooth terminal, authenticate the Bluetooth broadcast information based on the Ukey management software using the preset key information, and obtain the first key signal;
[0036] Decryption key generation module: used for the first Bluetooth terminal to send the first key signal to the second Bluetooth terminal, and the second Bluetooth terminal to generate a decryption key based on the first key signal and send the decryption key to the first Bluetooth terminal;
[0037] A Bluetooth terminal connection module: used for the first Bluetooth terminal to perform decryption based on the decryption key to obtain valid data, establish two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, and establish a valid connection between the first Bluetooth terminal and the second Bluetooth terminal based on the two-way authentication;
[0038] Ukey state conversion module: used for the Ukey management software to convert the state of Ukey to a normal use state based on the effective connection between the first Bluetooth terminal and the second Bluetooth terminal;
[0039] A first real-time distance calculation module: used for obtaining the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet sent by the second Bluetooth terminal after converting the state of the Ukey to the normal use state, and calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet;
[0040] A real-time target distance calculation module: used for acquiring a number of Bluetooth channels of the first Bluetooth terminal and the second Bluetooth terminal, calculating a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the number of Bluetooth channels, and calculating a real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first real-time distance and the second real-time distance;
[0041] Ukey disconnection module: used to compare the real-time target distance with the preset distance threshold. If the real-time target distance is greater than or equal to the preset distance threshold, the Ukey management software converts the Ukey from the normal use state to the disconnected use state.
[0042] In addition, the present invention provides an electronic device, which includes a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the above-mentioned Ukey status management method based on Bluetooth connection.
[0043] In addition, the present invention provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned Ukey status management method based on Bluetooth connection.
[0044] In an embodiment of the present invention, an encrypted segmented digital signal is generated based on a first ciphertext digital signal generated by bitwise operation of a first key signal and an encapsulated message and a random digital signal generated by bitwise operation of the first key signal, and a decryption key is generated based on the encrypted segmented digital signal, so that the obtained decryption key has higher accuracy and avoids Bluetooth terminal connection errors. Based on the decryption round key generated by XOR operation of the decryption key combined with the round function, multiple rounds of decryption are performed to obtain valid data, and two-way authentication of the Bluetooth terminal is established through the valid data, and then an effective connection between the Bluetooth terminals is established, which not only ensures that the Bluetooth terminals can be automatically and quickly connected, reduces the manual operation of the user, but also improves the reliability of the Bluetooth terminal connection, so that the state management of Ukey can be reliably guaranteed, and the high-precision connection state conversion of Ukey is achieved. The real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated by using the first real-time distance calculated by the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectibility broadcast packet and the second real-time distance calculated by several Bluetooth channels, so that the real-time target distance is more accurate, which greatly reduces the impact of environmental factors on distance measurement, and at the same time greatly reduces the state conversion error of Ukey, so that when the user leaves the preset distance, Ukey automatically switches to the disconnected state. It meets the management requirements of enterprises for Ukey, so that the state management of Ukey can achieve a more ideal effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 It is a flowchart of a Ukey status management method based on Bluetooth connection in an embodiment of the present invention;
[0047] Figure 2 It is a schematic diagram of the structure of a Ukey status management device based on Bluetooth connection in an embodiment of the present invention;
[0048] Figure 3 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Embodiment 1
[0051] See also Figure 1 , Figure 1 It is a flow chart of a Ukey status management method based on Bluetooth connection in an embodiment of the present invention.
[0052] like Figure 1 As shown, a Ukey status management method based on Bluetooth connection, the method includes:
[0053] S11: The first Bluetooth terminal receives the Bluetooth broadcast information sent by the second Bluetooth terminal, and authenticates the Bluetooth broadcast information using preset key information based on the Ukey management software to obtain a first key signal;
[0054] In the specific implementation process of the present invention, the Ukey management software uses preset key information to authenticate the Bluetooth broadcast information to obtain a first key signal, including: the Ukey management software obtains a random number in the Bluetooth broadcast information, and authenticates the Bluetooth broadcast information based on the random number in the Bluetooth broadcast information using preset key information to obtain a first key signal.
[0055] Specifically, after the first Bluetooth terminal and the second Bluetooth terminal are paired and connected for the first time, a preset key information will be generated, and the preset key information will be stored in the storage unit of the Bluetooth terminal. The first Bluetooth terminal can be a computer Bluetooth, and the second Bluetooth terminal can be a mobile phone Bluetooth of the corresponding employee; the Ukey management software in the computer monitors the connection status of the mobile phone Bluetooth and the computer Bluetooth. When the user turns on the second Bluetooth terminal, the second Bluetooth terminal will continue to send Bluetooth broadcast information. When the second Bluetooth terminal enters the signal receiving range of the first Bluetooth terminal, the first Bluetooth terminal receives the Bluetooth broadcast information sent by the second Bluetooth terminal. The Bluetooth broadcast information is the terminal identification information of the second Bluetooth terminal. The Ukey management software obtains the random number in the Bluetooth broadcast information. The Ukey management software can obtain the random number in the Bluetooth broadcast information through the terminal identification information. The random number is used to form an authentication string. The Bluetooth broadcast information is authenticated based on the random number in the Bluetooth broadcast information using the preset key information. The preset key information is a private key, which is a one-to-one pairing. The Bluetooth broadcast information is authenticated using the authentication string generated by the random number according to the preset key information to obtain the first key signal.
[0056] S12: the first Bluetooth terminal sends the first key signal to the second Bluetooth terminal, the second Bluetooth terminal generates a decryption key based on the first key signal, and sends the decryption key to the first Bluetooth terminal;
[0057] In the specific implementation process of the present invention, the generation of a decryption key based on the first key signal includes: generating a symmetric encryption key based on the first key signal, and performing encapsulation processing based on the symmetric encryption key to obtain an encapsulated message; performing bit operations based on the first key signal and the encapsulated message to obtain a first ciphertext digital signal, and performing bit operations based on the first key signal to obtain a random digital signal; inserting the random digital signal into the first ciphertext digital signal to obtain a second ciphertext digital signal, and performing bit inversion processing on the second ciphertext digital signal to obtain an encrypted segmented digital signal; performing bit inversion processing based on the encrypted segmented digital signal to obtain a third ciphertext digital signal, and generating a decryption key based on the third ciphertext digital signal combined with the random digital signal.
[0058] Specifically, the first Bluetooth terminal sends the first key signal to the second Bluetooth terminal, generates a symmetric encryption key based on the first key signal, and performs signature verification processing through the first key signal to obtain the symmetric encryption key. Based on the symmetric encryption key, encapsulation processing is performed, a digital envelope is generated according to the symmetric encryption key, and encapsulation processing is performed according to the digital envelope to obtain an encapsulated message. Based on the first key signal and the encapsulated message, a bit operation is performed to obtain the length of the first key signal and the encapsulated message, and the byte ordinal number in the first key signal and the encapsulated message is obtained. Combined with the length of the first key signal and the encapsulated message and the byte ordinal number in the first key signal and the encapsulated message, the first key signal and the encapsulated message are introduced into the binary random hash with the help of an encrypted hash function, and a bit operation rule is introduced. Based on the bit operation rule, the value of all or part of the binary bits of the binary random hash is changed, and then mapped to the ciphertext space. The bit operation rule includes negating some binary bits in the binary random hash according to a Boolean function and negating some binary bits of the key stream according to the true value bit or false value bit of the key stream, etc., to obtain the first ciphertext digital signal. Based on the first key signal, a bit operation is performed, and the first key signal is introduced into the binary random hash. Based on the bit operation rule, the value of all or part of the binary bits of the binary random hash is changed to obtain a random digital signal. It should be noted that the length value of the random digital signal should not be too large, otherwise it will easily lead to data expansion. The random digital signal is inserted into the first ciphertext digital signal, and the binary bits of the random digital signal are inserted into the first ciphertext digital signal to generate a new ciphertext digital signal, that is, to obtain the second ciphertext digital signal. The second ciphertext digital signal is subjected to bit inversion processing, and the bits at two positions in the second ciphertext digital signal are exchanged by the exchange function swapBits, and the bits at two positions are detected by XOR operation. If they are not the same, the bit values of the two positions are exchanged by the switching function combined with the XOR operation. After the bit values of the two positions are exchanged, the bit values after the exchanged positions are optimized by the divide-and-conquer method, and then the bit inversion processing is completed to obtain the encrypted segmented digital signal. Based on the encrypted segmented digital signal, a bit inversion process is performed, and according to the insertion position and the preset length value, the starting position of the bit inversion operation in the encrypted segmented digital signal is determined, and one bit in each byte after the starting position in the encrypted segmented digital signal is inverted, wherein the bit sequence number of each byte to be inverted is determined by at least three bits in the bit stream composed of the bytes preceding the byte, and a third ciphertext digital signal is obtained. A decryption key is generated based on the third ciphertext digital signal combined with a random digital signal, that is, a bit operation is performed on the third ciphertext digital signal and the random digital signal to generate a decryption key. The second Bluetooth terminal sends the decryption key to the first Bluetooth terminal.An encrypted segmented digital signal is generated based on a first ciphertext digital signal generated by bitwise operation of the first key signal and the encapsulated message and a random digital signal generated by bitwise operation of the first key signal, and a decryption key is generated based on the encrypted segmented digital signal, so that the obtained decryption key has higher accuracy and avoids Bluetooth terminal connection errors.
[0059] S13: The first Bluetooth terminal decrypts based on the decryption key to obtain valid data, establishes two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, and establishes a valid connection between the first Bluetooth terminal and the second Bluetooth terminal based on the two-way authentication;
[0060] In the specific implementation process of the present invention, decryption is performed based on the decryption key to obtain valid data, and two-way authentication of the first Bluetooth terminal and the second Bluetooth terminal is established based on the valid data, including: performing an XOR operation based on the decryption key to obtain a decryption round key, and performing multiple rounds of decryption using the decryption round key based on a round function to obtain valid data; comparing the valid data with the stored local valid data, and if the comparison result between the valid data and the stored local valid data is consistent, then two-way authentication of the first Bluetooth terminal and the second Bluetooth terminal is established.
[0061] Specifically, the first Bluetooth terminal receives the decryption key, performs an XOR operation based on the decryption key, selects a round key length, generates several round keys according to the selected round key length, performs an XOR operation on each round key and the decryption key, and obtains a decryption round key, and there are several decryption round keys. Based on the round function, the decryption round key is used to perform multiple rounds of decryption, and the round function is used to perform multiple rounds of decryption using the substitution permutation network. Each round of decryption includes four steps: byte replacement, row shift, column confusion, and round key addition. The byte replacement is to replace the input byte through the replacement box, the row shift is to perform a row shift operation on the input state matrix, the column confusion is to perform a column confusion operation on the input state matrix, and the round key addition is to perform an XOR operation on the decryption round key and the state matrix. The input state matrix is generated by the round key combined with the preset round constant. The decryption process is repeated by the round function using the decryption round key until the preset number of times is reached. In the last round, the column confusion operation is omitted, so as to obtain valid data. The valid data is the data formed by the valid information in the Bluetooth terminal encryption connection authentication process, that is, the valid identification data of the Bluetooth terminal connection. The valid data is compared with the stored local valid data. If the comparison result of the valid data is consistent with the stored local valid data, a two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal is established, that is, the authentication between the first Bluetooth terminal and the second Bluetooth terminal is passed. If the comparison result of the valid data is inconsistent with the stored local data, an authentication failure message is generated, and the Bluetooth broadcast information authentication, decryption key generation and valid data comparison are re-performed according to the authentication failure message. If the number of authentication failures is greater than the preset number threshold, a prompt message is sent to the relevant personnel. An effective connection between the first Bluetooth terminal and the second Bluetooth terminal is established based on the two-way authentication, a two-way security channel is established through the two-way authentication of the first Bluetooth terminal and the second Bluetooth terminal, and an effective connection between the first Bluetooth terminal and the second Bluetooth terminal is established according to the two-way security channel, which can ensure the security of the Bluetooth connection. Based on the decryption round key generated by the XOR operation of the decryption key combined with the round function, multiple rounds of decryption are performed to obtain valid data, and a two-way authentication of the Bluetooth terminal is established through the valid data, and then an effective connection between the Bluetooth terminals is established, which not only ensures that the Bluetooth terminals can be automatically and quickly connected, reduces the manual operation of the user, but also improves the reliability of the Bluetooth terminal connection, so that the status management of Ukey can be reliably guaranteed.
[0062] S14: The Ukey management software converts the state of the Ukey into a normal use state based on the effective connection between the first Bluetooth terminal and the second Bluetooth terminal;
[0063] During the specific implementation of the present invention, since the Ukey management software monitors the connection status of the first Bluetooth terminal and the second Bluetooth terminal, when the first Bluetooth terminal and the second Bluetooth terminal establish an effective connection, the Ukey management software converts the status of the Ukey into a normal use status, that is, wakes up the Ukey plugged in the computer and makes the Ukey effective.
[0064] S15: after converting the state of Ukey to the normal use state, obtaining the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet sent by the second Bluetooth terminal, and calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet;
[0065] In the specific implementation process of the present invention, the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indicator value of the connectivity broadcast packet, including: obtaining a preset number of target real-time signal strength values from a plurality of real-time signal strength values of the Bluetooth broadcast signal based on a sliding window, and calculating the target real-time signal strength average value based on the preset number of target real-time signal strength values; calculating the first distance value based on the target real-time signal strength average value using a preset calibration value; calculating the average power value based on the real-time signal strength indicator value of the connectivity broadcast packet, obtaining the path loss power of the connectivity broadcast packet, and calculating the second distance value based on the average power value and the path loss power; calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first distance value and the second distance value.
[0066] Specifically, after converting the state of Ukey to normal use state, the second Bluetooth terminal will continue to send Bluetooth broadcast signals and connectivity broadcast packets. The connectivity broadcast packet includes the Bluetooth transmission output power information and address information of the terminal, etc. The real-time signal strength value of the Bluetooth broadcast signal sent by the second Bluetooth terminal and the real-time signal strength indication value of the connectivity broadcast packet are obtained through the management software. Based on the sliding window, a preset number of target real-time signal strength values are obtained from the real-time signal strength values of the Bluetooth broadcast signal. The length of the sliding window is determined by the preset number. The preset number of target real-time signal strength values are intercepted from the real-time signal strength values through the sliding window to calculate the average value. The target real-time signal strength average value is calculated based on the preset number of target real-time signal strength values, and the target real-time signal strength values are added. Then, the result of the addition is calculated with the preset number to obtain the target real-time signal strength average value. The first distance value is calculated based on the target real-time signal strength average value using the preset calibration value. The calculation expression of the first distance value is:
[0067]
[0068] Wherein, d is the first distance value, A is the fitting coefficient, ver is the target real-time signal strength average value, b is the preset calibration value, and σ is the correction coefficient. The average power value is calculated based on the real-time signal strength indication value of the connectivity broadcast packet. The real-time signal strength indication value of the connectivity broadcast packet includes the Bluetooth transmit output power value. The average power value can be calculated according to the preset unit time combined with the Bluetooth transmit output power value. The path loss power of the connectivity broadcast packet is obtained, and the second distance value is calculated based on the average power value and the path loss power. The communication distance between the first Bluetooth terminal and the second Bluetooth terminal can be reflected by the average power value. The communication distance reflected by the average power value can be corrected by combining the path loss power with a preset constant factor to obtain the second distance value. The first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on the first distance value and the second distance value. The instability of calculating the distance between Bluetooth terminals based only on signal strength can be reduced.
[0069] S16: Acquire a plurality of Bluetooth channels of the first Bluetooth terminal and the second Bluetooth terminal, calculate a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the plurality of Bluetooth channels, and calculate a real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first real-time distance and the second real-time distance;
[0070] In the specific implementation process of the present invention, the second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on several Bluetooth channels, including: obtaining a request channel response and a response channel response in each Bluetooth channel, and generating several intermediate values based on the request channel response and the response channel response in each Bluetooth channel; obtaining the Bluetooth channel transmission time based on the several intermediate values using the orthogonal matching tracking method; obtaining initial distance data based on several Bluetooth channels, and calculating the second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the Bluetooth channel transmission time combined with the initial distance data.
[0071] Specifically, several Bluetooth channels between the first Bluetooth terminal and the second Bluetooth terminal are obtained; the request channel response and the response channel response in each Bluetooth channel are obtained, and the request channel response and the response channel response in each Bluetooth channel are obtained by channel estimation. The second Bluetooth terminal sends a request data packet to the first Bluetooth terminal through a selected Bluetooth channel, and the first Bluetooth terminal receives the request data packet and performs channel estimation in the selected Bluetooth channel according to the request data packet to obtain the request channel response of the Bluetooth channel. The first Bluetooth terminal sends a response data packet to the second Bluetooth terminal through the selected Bluetooth channel, and the second Bluetooth terminal receives the response data packet and performs channel estimation in the selected Bluetooth channel according to the response data packet to obtain the response channel response of the Bluetooth channel. The above steps are repeated until all Bluetooth channels have completed channel estimation, and the request channel response and the response channel response in all Bluetooth channels can be obtained. Several intermediate values are generated based on the request channel response and the response channel response in each Bluetooth channel, and the request channel response and the response channel response in the Bluetooth channel are multiplied to obtain several intermediate values. Based on several intermediate values, the orthogonal matching tracking method is used to obtain the Bluetooth channel transmission time, that is, the transmission time of the request data packet and the response data packet in the Bluetooth channel is calculated by the orthogonal matching tracking method through the intermediate values, the linear terms and high-order terms are determined by the intermediate values, the linear terms and high-order terms are synchronously compensated by the least square method, and the transmission time is determined based on the linear terms and high-order terms after synchronization compensation, and the linear terms and high-order terms after synchronization compensation can be used for time calculation. Based on several Bluetooth channels, the initial distance data is obtained, and the initial distance data can be obtained by using the cosine wave formula through the carrier in the Bluetooth channel. The initial distance data is data reflecting the distance between the first Bluetooth terminal and the second Bluetooth terminal, that is, data related to the distance between the two. At the same time, the initial distance data is positively correlated with the distance between the two Bluetooth terminals. Based on the Bluetooth channel transmission time combined with the initial distance data, the second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated, the signal transmission speed in the Bluetooth channel is obtained in the database, the initial distance is calculated by combining the Bluetooth channel transmission time with the signal transmission speed, the correction coefficient is generated by the initial distance data, and the second real-time distance is calculated by combining the correction coefficient with the initial distance. The real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on the first real-time distance and the second real-time distance. The weight ratio of the first real-time distance and the weight ratio of the second real-time distance can be obtained by performing reference value evaluation on the first real-time distance and the second real-time distance, and the real-time target distance is calculated according to the weight ratio of the first real-time distance and the weight ratio of the second real-time distance.
[0072] S17: Compare the real-time target distance with a preset distance threshold. If the real-time target distance is greater than or equal to the preset distance threshold, the Ukey management software converts the Ukey from a normal use state to a disconnected use state.
[0073] In the specific implementation process of the present invention, converting the Ukey from a normal usage state to a disconnected usage state includes: building a broadcast receiver based on a BroadcastReceiver component, and receiving a Ukey connection status change instruction based on the broadcast receiver; and converting the Ukey from a normal usage state to a disconnected usage state using the Ukey connection status change instruction based on an onRecevie method.
[0074] Specifically, the Ukey management software always monitors the distance between the first Bluetooth terminal and the second Bluetooth terminal, and compares the real-time target distance with the preset distance threshold. If the real-time target distance is less than the preset distance threshold, the first Bluetooth terminal and the second Bluetooth terminal remain connected, and the Ukey management software keeps Ukey in normal use. If the real-time target distance is greater than or equal to the preset distance threshold, the connection between the first Bluetooth terminal and the second Bluetooth terminal is disconnected, and a broadcast receiver is constructed based on the BroadcastReceiver component. The BroadcastReceiver component is essentially a system-level listener component that can communicate between multiple threads and different components. The broadcast receiver constructed by the BroadcastReceiver component can receive changes in the Ukey connection state. Through the multi-threaded communication function of the broadcast receiver, the Ukey connection state change instruction can be received based on the broadcast receiver. Based on the onRecevie method, the Ukey is converted from a normal use state to a disconnected use state using the Ukey connection state change instruction. The onRecevie method is used to receive event instructions to perform data processing. When receiving a Ukey connection state change instruction, that is, a Ukey disconnection instruction, the Ukey management software converts the Ukey from a normal use state to a disconnected use state, making the Ukey invalid. When the Bluetooth terminal is in a connected state, Ukey can be used normally. If the connection between the Bluetooth terminals is disconnected, Ukey becomes unusable, that is, when the user walks away, Ukey will become invalid, and when the user approaches the computer, Ukey will become effective again.
[0075] In an embodiment of the present invention, an encrypted segmented digital signal is generated based on a first ciphertext digital signal generated by bitwise operation of a first key signal and an encapsulated message and a random digital signal generated by bitwise operation of the first key signal, and a decryption key is generated based on the encrypted segmented digital signal, so that the obtained decryption key has higher accuracy and avoids Bluetooth terminal connection errors. Based on the decryption round key generated by XOR operation of the decryption key combined with the round function, multiple rounds of decryption are performed to obtain valid data, and two-way authentication of the Bluetooth terminal is established through the valid data, and then an effective connection between the Bluetooth terminals is established, which not only ensures that the Bluetooth terminals can be automatically and quickly connected, reduces the manual operation of the user, but also improves the reliability of the Bluetooth terminal connection, so that the state management of Ukey can be reliably guaranteed, and the high-precision connection state conversion of Ukey is achieved. The real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated by using the first real-time distance calculated by the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectibility broadcast packet and the second real-time distance calculated by several Bluetooth channels, so that the real-time target distance is more accurate, which greatly reduces the impact of environmental factors on distance measurement, and at the same time greatly reduces the state conversion error of Ukey, so that when the user leaves the preset distance, Ukey automatically switches to the disconnected state. It meets the management requirements of enterprises for Ukey, so that the state management of Ukey can achieve a more ideal effect.
[0076] Embodiment 2
[0077] See also Figure 2 , Figure 2 It is a schematic diagram of the structural composition of a Ukey status management device based on Bluetooth connection in an embodiment of the present invention.
[0078] like Figure 2 As shown, a Ukey status management device based on Bluetooth connection, the device includes:
[0079] Bluetooth broadcast information authentication module 21: used for the first Bluetooth terminal to receive the Bluetooth broadcast information sent by the second Bluetooth terminal, and authenticate the Bluetooth broadcast information using the preset key information based on the Ukey management software to obtain the first key signal;
[0080] Decryption key generation module 22: used for the first Bluetooth terminal to send the first key signal to the second Bluetooth terminal, and the second Bluetooth terminal to generate a decryption key based on the first key signal and send the decryption key to the first Bluetooth terminal;
[0081] Bluetooth terminal connection module 23: used for the first Bluetooth terminal to perform decryption based on the decryption key to obtain valid data, establish two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, and establish a valid connection between the first Bluetooth terminal and the second Bluetooth terminal based on the two-way authentication;
[0082] Ukey state conversion module 24: used for the Ukey management software to convert the state of the Ukey into a normal use state based on the effective connection between the first Bluetooth terminal and the second Bluetooth terminal;
[0083] A first real-time distance calculation module 25 is used to obtain the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet sent by the second Bluetooth terminal after the state of the Ukey is converted to the normal use state, and calculate the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet;
[0084] A real-time target distance calculation module 26 is used to obtain a number of Bluetooth channels of the first Bluetooth terminal and the second Bluetooth terminal, calculate a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the number of Bluetooth channels, and calculate a real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first real-time distance and the second real-time distance;
[0085] Ukey disconnection module 27: used to compare the real-time target distance with a preset distance threshold. If the real-time target distance is greater than or equal to the preset distance threshold, the Ukey management software converts the Ukey from a normal use state to a disconnected use state.
[0086] In the specific implementation process of the present invention, the specific implementation method of the device item can refer to the implementation method of the above-mentioned method item, which will not be repeated here.
[0087] In an embodiment of the present invention, an encrypted segmented digital signal is generated based on a first ciphertext digital signal generated by bitwise operation of a first key signal and an encapsulated message and a random digital signal generated by bitwise operation of the first key signal, and a decryption key is generated based on the encrypted segmented digital signal, so that the obtained decryption key has higher accuracy and avoids Bluetooth terminal connection errors. Based on the decryption round key generated by XOR operation of the decryption key combined with the round function, multiple rounds of decryption are performed to obtain valid data, and two-way authentication of the Bluetooth terminal is established through the valid data, and then an effective connection between the Bluetooth terminals is established, which not only ensures that the Bluetooth terminals can be automatically and quickly connected, reduces the manual operation of the user, but also improves the reliability of the Bluetooth terminal connection, so that the state management of Ukey can be reliably guaranteed, and the high-precision connection state conversion of Ukey is achieved. The real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated by using the first real-time distance calculated by the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectibility broadcast packet and the second real-time distance calculated by several Bluetooth channels, so that the real-time target distance is more accurate, which greatly reduces the impact of environmental factors on distance measurement, and at the same time greatly reduces the state conversion error of Ukey, so that when the user leaves the preset distance, Ukey automatically switches to the disconnected state. It meets the management requirements of enterprises for Ukey, so that the state management of Ukey can achieve a more ideal effect.
[0088] A computer-readable storage medium provided by an embodiment of the present invention stores a computer program on the computer-readable storage medium, and when the program is executed by a processor, the Ukey state management method based on Bluetooth connection of any one of the above embodiments is implemented. Wherein, the computer-readable storage medium includes but is not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the storage device includes any medium that stores or transmits information in a readable form by a device (for example, a computer, a mobile phone), which can be a read-only memory, a disk or an optical disk, etc.
[0089] Embodiment 3
[0090] See also Figure 3 , Figure 3It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention.
[0091] The embodiment of the present invention further provides an electronic device, such as Figure 3 As shown, the electronic device includes a memory 31, a processor 33, and a computer program 32 stored in the memory 31 and executable on the processor 33. Those skilled in the art will appreciate that Figure 3 The electronic device shown does not constitute a limitation on all devices, and may include more or fewer components than shown, or combine certain components. The memory 31 can be used to store the computer program 32 and various functional modules, and the processor 33 runs the computer program 32 stored in the memory 31, thereby executing various functional applications and data processing of the device. The memory can be an internal memory or an external memory, or include both internal and external memories. The internal memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. The external memory can include a hard disk, a floppy disk, a ZIP disk, a U disk, a magnetic tape, etc. The processor 33 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general processor may be a microprocessor, a single chip microcomputer or the processor 33 may also be any conventional processor, etc. The processor and memory disclosed in the present invention include but are not limited to these types of processors and memories. The processor and memory disclosed in the present invention are only examples and not limitations.
[0092] As an embodiment, the electronic device includes: one or more processors 33, a memory 31, and one or more computer programs 32, wherein the one or more computer programs 32 are stored in the memory 31 and are configured to be executed by the one or more processors 33, and the one or more computer programs 32 are configured to execute the Ukey status management method based on Bluetooth connection in any of the above-mentioned embodiments. For the specific implementation process, please refer to the above-mentioned embodiments, which will not be repeated here.
[0093] In an embodiment of the present invention, an encrypted segmented digital signal is generated based on a first ciphertext digital signal generated by bitwise operation of a first key signal and an encapsulated message and a random digital signal generated by bitwise operation of the first key signal, and a decryption key is generated based on the encrypted segmented digital signal, so that the obtained decryption key has higher accuracy and avoids Bluetooth terminal connection errors. Based on the decryption round key generated by XOR operation of the decryption key combined with the round function, multiple rounds of decryption are performed to obtain valid data, and two-way authentication of the Bluetooth terminal is established through the valid data, and then an effective connection between the Bluetooth terminals is established, which not only ensures that the Bluetooth terminals can be automatically and quickly connected, reduces the manual operation of the user, but also improves the reliability of the Bluetooth terminal connection, so that the state management of Ukey can be reliably guaranteed, and the high-precision connection state conversion of Ukey is achieved. The real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated by using the first real-time distance calculated by the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectibility broadcast packet and the second real-time distance calculated by several Bluetooth channels, so that the real-time target distance is more accurate, which greatly reduces the impact of environmental factors on distance measurement, and at the same time greatly reduces the state conversion error of Ukey, so that when the user leaves the preset distance, Ukey automatically switches to the disconnected state. It meets the management requirements of enterprises for Ukey, so that the state management of Ukey can achieve a more ideal effect.
[0094] In addition, the above is a detailed introduction to a Ukey status management method based on Bluetooth connection and related devices provided in an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A Ukey status management method based on Bluetooth connection, characterized in that: The method comprises: The first Bluetooth terminal receives the Bluetooth broadcast information sent by the second Bluetooth terminal, authenticates the Bluetooth broadcast information using the preset key information based on the Ukey management software, and obtains a first key signal; The first Bluetooth terminal sends the first key signal to the second Bluetooth terminal, the second Bluetooth terminal generates a decryption key based on the first key signal, and sends the decryption key to the first Bluetooth terminal; The first Bluetooth terminal decrypts based on the decryption key to obtain valid data, establishes two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, and establishes a valid connection between the first Bluetooth terminal and the second Bluetooth terminal based on the two-way authentication; The Ukey management software converts the state of the Ukey into a normal use state based on the effective connection between the first Bluetooth terminal and the second Bluetooth terminal; After converting the state of Ukey to a normal use state, obtaining a real-time signal strength value of a Bluetooth broadcast signal and a real-time signal strength indication value of a connectivity broadcast packet sent by a second Bluetooth terminal, and calculating a first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet; Acquire a number of Bluetooth channels of the first Bluetooth terminal and the second Bluetooth terminal, calculate a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the number of Bluetooth channels, and calculate a real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first real-time distance and the second real-time distance; Compare the real-time target distance with a preset distance threshold, and if the real-time target distance is greater than or equal to the preset distance threshold, the Ukey management software converts the Ukey from a normal use state to a disconnected use state; Among them, the calculation of the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet includes: obtaining a preset number of target real-time signal strength values from a plurality of real-time signal strength values of the Bluetooth broadcast signal based on a sliding window, and calculating the target real-time signal strength average value based on the preset number of target real-time signal strength values; calculating the first distance value based on the target real-time signal strength average value using a preset calibration value; calculating the average power value based on the real-time signal strength indication value of the connectivity broadcast packet, obtaining the path loss power of the connectivity broadcast packet, and calculating the second distance value based on the average power value and the path loss power; calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first distance value and the second distance value.
2. The Ukey status management method based on Bluetooth connection according to claim 1 is characterized in that: The method of authenticating the Bluetooth broadcast information by using preset key information based on the Ukey management software to obtain a first key signal includes: The Ukey management software obtains a random number in the Bluetooth broadcast information, authenticates the Bluetooth broadcast information based on the random number in the Bluetooth broadcast information using preset key information, and obtains a first key signal.
3. The Ukey status management method based on Bluetooth connection according to claim 1 is characterized in that: The generating a decryption key based on the first key signal comprises: Generate a symmetric encryption key based on the first key signal, and perform encapsulation processing based on the symmetric encryption key to obtain an encapsulated message; Performing bit operations based on the first key signal and the encapsulated message to obtain a first ciphertext digital signal, and performing bit operations based on the first key signal to obtain a random digital signal; Inserting the random digital signal into the first ciphertext digital signal to obtain a second ciphertext digital signal, and performing bit inversion processing on the second ciphertext digital signal to obtain an encrypted segmented digital signal; A bit inversion process is performed based on the encrypted segmented digital signal to obtain a third ciphertext digital signal, and a decryption key is generated based on the third ciphertext digital signal combined with a random digital signal.
4. The Ukey status management method based on Bluetooth connection according to claim 1 is characterized in that: The decrypting based on the decryption key to obtain valid data, and establishing two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, includes: Performing an XOR operation based on the decryption key to obtain a decryption round key, and performing multiple rounds of decryption using the decryption round key based on a round function to obtain valid data; The valid data is compared with the stored local valid data. If the comparison result between the valid data and the stored local valid data is consistent, two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal is established.
5. The Ukey status management method based on Bluetooth connection according to claim 1 is characterized in that: The calculating the second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on a plurality of Bluetooth channels includes: Obtaining a request channel response and a reply channel response in each Bluetooth channel, and generating a plurality of intermediate values based on the request channel response and the reply channel response in each Bluetooth channel; The transmission time of the Bluetooth channel is obtained by using the orthogonal matching pursuit method based on several intermediate values; Initial distance data is acquired based on a plurality of Bluetooth channels, and a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal is calculated based on the Bluetooth channel transmission time in combination with the initial distance data.
6. The Ukey status management method based on Bluetooth connection according to claim 1 is characterized in that: Converting the Ukey from a normal use state to a disconnected use state comprises: Construct a broadcast receiver based on the BroadcastReceiver component, and receive the Ukey connection status change instruction based on the broadcast receiver; Based on the onRecevie method, the Ukey connection state change instruction is used to convert the Ukey from the normal use state to the disconnected use state.
7. A Ukey status management device based on Bluetooth connection, characterized in that: The device comprises: Bluetooth broadcast information authentication module: used for the first Bluetooth terminal to receive the Bluetooth broadcast information sent by the second Bluetooth terminal, authenticate the Bluetooth broadcast information based on the Ukey management software using the preset key information, and obtain the first key signal; Decryption key generation module: used for the first Bluetooth terminal to send the first key signal to the second Bluetooth terminal, and the second Bluetooth terminal to generate a decryption key based on the first key signal and send the decryption key to the first Bluetooth terminal; A Bluetooth terminal connection module: used for the first Bluetooth terminal to perform decryption based on the decryption key to obtain valid data, establish two-way authentication between the first Bluetooth terminal and the second Bluetooth terminal based on the valid data, and establish a valid connection between the first Bluetooth terminal and the second Bluetooth terminal based on the two-way authentication; Ukey state conversion module: used for the Ukey management software to convert the state of Ukey to a normal use state based on the effective connection between the first Bluetooth terminal and the second Bluetooth terminal; A first real-time distance calculation module: used for obtaining the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet sent by the second Bluetooth terminal after converting the state of the Ukey to the normal use state, and calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet; A real-time target distance calculation module: used for acquiring a number of Bluetooth channels of the first Bluetooth terminal and the second Bluetooth terminal, calculating a second real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the number of Bluetooth channels, and calculating a real-time target distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first real-time distance and the second real-time distance; Ukey disconnection module: used to compare the real-time target distance with the preset distance threshold. If the real-time target distance is greater than or equal to the preset distance threshold, the Ukey management software converts the Ukey from the normal use state to the disconnected use state; Among them, the calculation of the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the real-time signal strength value of the Bluetooth broadcast signal and the real-time signal strength indication value of the connectivity broadcast packet includes: obtaining a preset number of target real-time signal strength values from a plurality of real-time signal strength values of the Bluetooth broadcast signal based on a sliding window, and calculating the target real-time signal strength average value based on the preset number of target real-time signal strength values; calculating the first distance value based on the target real-time signal strength average value using a preset calibration value; calculating the average power value based on the real-time signal strength indication value of the connectivity broadcast packet, obtaining the path loss power of the connectivity broadcast packet, and calculating the second distance value based on the average power value and the path loss power; calculating the first real-time distance between the first Bluetooth terminal and the second Bluetooth terminal based on the first distance value and the second distance value.
8. An electronic device, comprising a processor and a memory, characterized in that: The memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the Ukey status management method based on Bluetooth connection as described in any one of claims 1 to claim 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the Ukey status management method based on Bluetooth connection as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent Bluetooth operation switching method and system based on beacon broadcasting
CN111970646A
Embedded industrial Internet of Things controller
CN117896417A
Identity Verification via Short-Range Wireless Communications
US20150332258A1
