Authentication interaction method for encrypted broadcast and bluetooth broadcast authentication system

By generating and matching authentication keys between Bluetooth devices, the problems of spoofing risk and operational complexity in Bluetooth broadcasting are solved, achieving efficient and secure device connection and improving user experience.

CN120640285BActive Publication Date: 2026-05-19SHENZHEN FENGHEYUAN TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN FENGHEYUAN TECH
Filing Date
2025-08-15
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Bluetooth broadcasting presents risks of counterfeiting and operational complexity, especially in unencrypted broadcasting which lacks an effective encryption mechanism, resulting in low connection security and a poor user experience; encrypted broadcasting requires pairing via a mobile terminal, which is inefficient.

Method used

The transmitting device generates broadcast name information and digital code, calculates the authentication key using a preset algorithm, encrypts the data to be encrypted, and the receiving device scans and calculates the expected authentication key to match the connection, thus achieving autonomous authentication and decryption and simplifying the pairing process between devices.

Benefits of technology

It improves the pairing and connection efficiency between Bluetooth devices, reduces the risk of counterfeiting, simplifies the operation process, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120640285B_ABST
    Figure CN120640285B_ABST
Patent Text Reader

Abstract

The application discloses an authentication interaction method of encrypted broadcast and a Bluetooth broadcast authentication system, relates to the field of wireless communication, and is applied to the Bluetooth broadcast authentication system, which comprises a transmitting device and a receiving device, and comprises the following steps: the transmitting device generates broadcast name information and digital coding, calculates an authentication key through a preset algorithm, and encrypts to-be-encrypted data according to the authentication key to obtain encrypted broadcast information; the transmitting device transmits a broadcast data packet containing the broadcast name information, the digital coding and the encrypted broadcast information; the receiving device scans the broadcast data packet, calculates an expected authentication key through the preset algorithm; if the expected authentication key matches the authentication key, the receiving device establishes a Bluetooth connection with the transmitting device, and the receiving device decrypts the encrypted broadcast information. Therefore, the transmitting device and the receiving device generate the authentication key and the expected authentication key in the same way, the receiving device can autonomously generate the expected authentication key, and the efficiency of matching connection of the two is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication technology, and more specifically, to an authentication interaction method for encrypted broadcasting and a Bluetooth broadcast authentication system. Background Technology

[0002] Bluetooth broadcasting is divided into encrypted broadcasting and unencrypted broadcasting. Unencrypted broadcasting technologies lack effective encryption mechanisms, posing a risk of counterfeiting and reducing the security of the connection between the transmitting and receiving devices. Encrypted broadcasting technologies require a mobile terminal (e.g., a smartphone) as a transfer medium to pair the transmitting and receiving devices, which is inefficient and complex, thus impacting the user experience. Summary of the Invention

[0003] In view of the above problems, this application proposes an authentication interaction method for encrypted broadcasting and a Bluetooth broadcast authentication system to solve the above problems.

[0004] In a first aspect, embodiments of this application provide an authentication interaction method for encrypted broadcasting, applied to a Bluetooth broadcast authentication system. The Bluetooth broadcast authentication system includes a transmitting device and a receiving device. The method includes: the transmitting device generating broadcast name information and a digital code, calculating an authentication key using a preset algorithm, and encrypting the data to be encrypted according to the authentication key to obtain encrypted broadcast information; the transmitting device transmitting a broadcast data packet containing the broadcast name information, the digital code, and the encrypted broadcast information; the receiving device scanning the broadcast data packet, calculating an expected authentication key using a preset algorithm; if the expected authentication key matches the authentication key, the receiving device and the transmitting device establish a Bluetooth connection, and the receiving device decrypts the encrypted broadcast information.

[0005] Secondly, embodiments of this application provide a Bluetooth broadcast authentication system, which includes a transmitting device and a receiving device. The transmitting device generates broadcast name information and a digital code, calculates an authentication key using a preset algorithm, and encrypts the data to be encrypted according to the authentication key to obtain encrypted broadcast information. The transmitting device transmits a broadcast data packet containing the broadcast name information, the digital code, and the encrypted broadcast information. The receiving device scans the broadcast data packet, calculates an expected authentication key using a preset algorithm, and establishes a Bluetooth connection with the transmitting device if the expected authentication key matches the authentication key. The receiving device then decrypts the encrypted broadcast information.

[0006] The technical solution provided in this application is applied to a Bluetooth broadcast authentication system, which includes a transmitting device and a receiving device. The method includes: the transmitting device generating broadcast name information and a digital code, calculating an authentication key using a preset algorithm, and encrypting the data to be encrypted according to the authentication key to obtain encrypted broadcast information; the transmitting device transmitting a broadcast data packet containing the broadcast name information, the digital code, and the encrypted broadcast information; the receiving device scanning the broadcast data packet, calculating an expected authentication key using a preset algorithm; if the expected authentication key matches the authentication key, the receiving device and the transmitting device establish a Bluetooth connection, and the receiving device decrypts the encrypted broadcast information. Therefore, the transmitting device generates the authentication key in the same way as the receiving device generates the expected authentication key, enabling the receiving device to autonomously generate the expected authentication key, thereby improving the efficiency of the matching connection between the transmitting and receiving devices. Attached Figure Description

[0007] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments and drawings obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0008] Figure 1 A schematic diagram of the structure of a Bluetooth broadcast authentication system provided in an embodiment of this application is shown.

[0009] Figure 2 The diagram shows a flowchart of an authentication interaction method for encrypted broadcasting provided in an embodiment of this application.

[0010] Figure 3 A flowchart illustrating another encrypted broadcast authentication interaction method provided in an embodiment of this application is shown.

[0011] Figure 4 This illustration shows a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation

[0012] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0013] Bluetooth broadcasting is divided into encrypted and unencrypted broadcasting. In unencrypted broadcasting technologies, the receiving device typically identifies the user directly based on the broadcast's unique identifier, lacking an effective encryption mechanism and posing a risk of impersonation. Encryption can be applied separately to the broadcast source device, such as a speaker or a dongle connected to a computer. The dongle itself has an authentication password, either factory-preset or user-defined. Factory presets are usually indicated on the product or in the instruction manual, while some products allow users to customize or modify these settings.

[0014] In encrypted broadcasting technologies, wireless transmitters typically not only encrypt their broadcast information individually but also transmit audio information from connected speakers or computers via Bluetooth. Even when mobile devices like speakers or computers lack Bluetooth broadcasting capabilities, a wireless transmitter is still required. In this case, the transmitter acts as the transmitting device, only emitting broadcast signals. External receiving devices can scan for these Bluetooth broadcast signals, enter a password, and pair with the transmitter to establish a broadcast network for signal transmission. Since the wireless transmitter itself lacks an input interface, and the receiving device requires password verification, traditional wireless transmitters rely on a medium for password pairing, such as a mobile app. After the mobile app connects to the receiving device via Bluetooth, the app displays a message; selecting the receiving device and entering the password allows the connected device to receive the transmitter's broadcast. This method requires multiple devices to work together, is complex, and carries the risk of password leakage due to password visibility and reliance on app-based password transmission. Furthermore, when there are multiple transmitting devices, the mobile terminal will display multiple transmitting devices. Users need to find the target transmitting device among the multiple displayed transmitting devices and then enter the corresponding decryption authentication code, which further reduces efficiency and increases the complexity of operation, thus affecting the user experience.

[0015] To address the aforementioned issues, this application provides an authentication interaction method for encrypted broadcasting and a Bluetooth broadcast authentication system. This authentication interaction method is applied to a Bluetooth broadcast authentication system, which includes a transmitting device and a receiving device. The method includes: the transmitting device generating broadcast name information and a digital code, calculating an authentication key using a preset algorithm, and encrypting the data to be encrypted according to the authentication key to obtain encrypted broadcast information; the transmitting device transmitting a broadcast data packet containing the broadcast name information, the digital code, and the encrypted broadcast information; the receiving device scanning the broadcast data packet, calculating an expected authentication key using a preset algorithm; and if the expected authentication key matches the authentication key, the receiving device establishing a Bluetooth connection with the transmitting device and decrypting the encrypted broadcast information.

[0016] Therefore, the transmitting device generates the authentication key in the same way as the receiving device generates the expected authentication key, so that the receiving device can generate the expected authentication key independently, thereby improving the efficiency of the matching connection between the transmitting device and the receiving device.

[0017] Please see Figure 1 , Figure 1 A schematic diagram of the structure of a Bluetooth broadcast authentication system provided in an embodiment of this application is shown. Figure 1 As shown, the Bluetooth broadcast authentication system 100 includes a transmitting device 110 and a receiving device 120. Wherein:

[0018] Transmitting device 110 and receiving device 120 can be connected wirelessly. For example, transmitting device 110 and receiving device 120 can be connected via Bluetooth.

[0019] In some implementations, the broadcast source device is connected to an external wireless transmitter (dongle) to transmit the broadcast, with the wireless transmitter acting as the transmitting device 110. The broadcast source device can be a laptop, desktop computer, mobile phone, headphones, or video game console, etc. For example, the video game console can be a PS4 or PS5, etc.

[0020] In some implementations, the receiving device 120 may include headphones, Bluetooth headphones, TWS headphones, Bluetooth speakers, or other Bluetooth wireless receivers.

[0021] Before the transmitting device 110 and the receiving device 120 establish a wireless connection, they need to be paired. After the pairing connection is completed, the transmitting device 110 can send audio information to the receiving device 120, and the receiving device 120 can play the audio information.

[0022] Transmitting device 110 encrypts the data to be encrypted by generating a unique and unpredictable authentication key, thereby obtaining encrypted broadcast information. It then broadcasts the broadcast data packet containing the broadcast name, numerical encoding, and encrypted broadcast information. Receiving device 120, after scanning the broadcast data packet, generates a desired authentication key in the same way as transmitting device 110. If the authentication key matches the desired authentication key, pairing and connection are established between transmitting device 110 and receiving device 120. Specifically:

[0023] Please see Figure 2 , Figure 2 This illustration shows a flowchart of an authentication interaction method for encrypted broadcasting provided in an embodiment of this application. Figure 2 As shown, the method may include steps 210 to 240 and can be applied to the aforementioned Bluetooth broadcast authentication system. Specifically:

[0024] In step 210, the transmitting device generates broadcast name information and digital code, calculates the authentication key through a preset algorithm, and encrypts the data to be encrypted according to the authentication key to obtain encrypted broadcast information.

[0025] In some implementations, the broadcast name information is the broadcast name information of the transmitting device, i.e., the wireless transmitter. The broadcast name information can be a string concatenated by the wireless transmitter based on the device name, device model, and the last four digits of the Bluetooth address.

[0026] The device name can be a prefix of the transmitting device, which can be customized and is generally the brand name of the transmitting device. For example, it can be the prefix of the brand of the wireless transmitter. For instance, the device name can be "BRD", "AUD", or "DEV", etc.

[0027] The device model can be the model of the wireless transmitter. For example, the device model can be "Speaker1", "Mic" or "Device", etc.

[0028] A Bluetooth address is typically a 6-byte MAC address. The format of a Bluetooth address can be represented as "XX:XX:XX:XX:XX:XX". For example, if the Bluetooth address is "11:22:33:44:55:66", then the last four characters of the Bluetooth address are "5566". That is, only the last four characters of the Bluetooth address are taken, excluding the colon.

[0029] In some implementations, the Bluetooth address is separated from the device name or device model by an underscore character. For example: Broadcast name information = "Device name" + "Device model" + "_" + "Last four digits of Bluetooth address".

[0030] The transmitting device concatenates its corresponding device name, device model, and the last four digits of its Bluetooth address to obtain a specific broadcast name. The Bluetooth address and device name or device model are separated by an underscore character. The underscore separator has a fixed concatenation order, increasing the difficulty of constructing a disguised device and improving security.

[0031] In some implementations, all characters are ASCII encoded. That is, all characters included in the broadcast name information are ASCII encoded. By using ASCII encoding for all characters, it is ensured that the broadcast name information remains consistent across devices, aligning with the 32-byte limit of Bluetooth broadcast packets, unifying broadcast data, and reducing broadcast latency.

[0032] After constructing the broadcast name information, the transmitting device processes the length of the broadcast name information accordingly to ensure that the length of the broadcast name information is even, so as to facilitate subsequent calculation or processing. Specifically, in some embodiments, if the length of the generated broadcast name information string is odd, a space character is padded to the last position of the broadcast name information string to make the length of the generated broadcast name information string even.

[0033] The space character is only used to fill the last character of the broadcast name information string, which minimizes the impact on the readability of the broadcast name information.

[0034] Ensuring that the string length of the broadcast name information is even facilitates subsequent calculations or processing. For example, in embedded systems or Bluetooth protocols, data is processed in bytes, and an even length can simplify memory access, check calculations (e.g., CRC), or data transmission alignment with the 32-byte limit of Bluetooth broadcast packets (avoiding alignment issues).

[0035] Understandably, if the string length corresponding to the broadcast name information from the transmitting device is even, then no further processing of the broadcast name information's length is required. In other words, the transmitting device ultimately receives broadcast name information with an even string length, entirely in ASCII encoding.

[0036] For example, if the device name is "BRD", the device model is "Mic", and the Bluetooth address is "00:1A:7D:DA:71:13", then the last four digits of the Bluetooth address are "7113". Concatenating these digits, the resulting string is: "BRD" + "Mic" + "_" + "7113" = "BRDMic_7113". Since the string "BRDMic_7113" has an odd length (11 characters), adding a space to it results in the final broadcast name information "BRDMic_7113" (with a space at the end, totaling 12 characters).

[0037] For example, if the device name is "DEV", the device model is "Device", and the Bluetooth address is "12:34:56:78:90:AB", then the last four digits of the Bluetooth address are "90AB". By concatenating the above data, the resulting string is "DEVDevice_90AB". Since the length of the concatenated string "DEVDevice_90AB" is an even number (14 characters), the final broadcast name information is "DEVDevice_90AB".

[0038] The sending end obtains the broadcast name information by connecting the device name, device model and the last four bits of the Bluetooth address; calculates the length of the broadcast name information; determines whether to pad with spaces to make the length of the broadcast name information even; and finally constructs a broadcast name information with an even length and full ASCII encoding.

[0039] Furthermore, the digital code is generated by the transmitting device, i.e., the wireless transmitter itself. In some implementations, the digital code can be a unique broadcast ID, a unique identifier defined by the transmitting device manufacturer, and an initial code is generated based on the hardware unique ID (such as the chip serial number) when the transmitting device is first started.

[0040] In some implementations, the numeric encoding is a 4-byte integer represented as a 6-digit string, where the string value ranges from 000001 to 999999. For example, the string corresponding to the numeric encoding is "999999". Figure 2 As shown, when the device is first started, the digital encoding generates a 4-byte initial value through a hash operation based on the unique hardware identifier (such as the chip serial number), and then converts it into a 6-digit numeric string. This allows different devices to have different hardware IDs, and the 4-byte integer storage only occupies 32 bits of memory. The 6-bit string transmission can adapt to the 6~8 byte payload limit of BLE Bluetooth broadcast packets, saving storage space resources.

[0041] It is worth noting that if the string corresponding to the numeric code is less than 6 digits, you can add 0s in front of the string to make it a 6-digit string.

[0042] In some implementations, the data to be encrypted can be data that the transmitting device wants to send to the receiving device. The transmitting device generates a unique and unpredictable authentication key based on the broadcast name information, digital encoding, and a preset algorithm. The transmitting device then encrypts the data to be encrypted using the authentication key to obtain encrypted broadcast information. This encrypted broadcast information is then formed into a broadcast data packet that includes the broadcast name information, digital encoding, and encrypted broadcast information. The broadcast data packet is then broadcast for the receiving device to scan. The broadcast data includes a plaintext portion and a ciphertext portion. The ciphertext is the data encrypted with the authentication key, i.e., the data after the data to be encrypted is encrypted using the authentication key.

[0043] In some implementations, the preset algorithm can be a preset MD5 algorithm. It is understood that the preset algorithm can also be other encryption algorithms, and this application does not impose specific limitations on them.

[0044] The transmitting device concatenates the generated broadcast name information and digital code, and then uses the concatenated output as input to a preset algorithm to obtain a unique and unpredictable authentication key for the Bluetooth broadcast authentication system. This allows the transmitting device to encrypt the data to be encrypted using the authentication key, enabling the receiving device to establish a Bluetooth connection with the transmitting device based on the match between its generated expected authentication key and the actual authentication key. Specifically, in some embodiments, this encrypted broadcast authentication interaction method may further include the following steps:

[0045] (1) The transmitting device concatenates the string of the broadcast name information and the 6-digit string of the numerical code to generate the input string.

[0046] (2) Calculate the MD5 digest based on the input string using the preset MD5 algorithm, convert the MD5 digest into a 32-bit hexadecimal string, and extract the first 6 hexadecimal characters from the MD5 digest and convert them into uppercase form as the authentication key.

[0047] If the numeric code is not a 6-character string, it needs to be converted to a 6-character string first, and then the string of the broadcast name information and the 6-character string of the numeric code are concatenated. For example, assuming the numeric code is "123", the 6-character string of the numeric code is "000123". In some implementations, the numeric code is updated periodically, such as every 24 hours. This improves the unpredictability of the authentication key generated in subsequent steps, thereby improving the security of the broadcast data to be encrypted. During the update, it can be updated based on the random number of the hardware device to improve dynamic protection. The current random value of the hardware device (such as the current temperature of the device, obtained by the temperature sensor) is introduced. A random number is generated based on the temperature. Even if the algorithm is known, the next code cannot be predicted. The updated numeric code is then generated by combining the algorithm of the updated code (current code + random number) and ensuring that the range is 000001~999999.

[0048] The input string is obtained by concatenating the broadcast name string and a 6-digit numeric encoding string. The transmitting device then calculates the MD5 digest of the entire concatenated string (i.e., the input string), and converts the MD5 digest result into a 32-character hexadecimal string (usually lowercase, but uppercase is required, so it must be converted to uppercase at the end). The first 6 uppercase hexadecimal characters of the MD5 digest result are then used as the authentication key. A preset MD5 algorithm is used to generate the authentication key, which provides irreversible protection for device information. Even if the authentication key is obtained, it is impossible to deduce the device name or numeric encoding. Furthermore, MD5 calculation only requires 512 bytes of RAM, making it fast and time-efficient, thus better meeting the real-time requirements of Bluetooth broadcasting.

[0049] For example, the broadcast name information is in the string form "BRDSpeaker_7113" (with a space at the end, totaling 16 characters); the numeric encoding is in the string form "000123"; then the input string is: "BRDSpeaker_7113 " + "000123" = "BRDSpeaker_7113 000123". Directly concatenating the beginning and end reduces the length of the broadcast packet. Then, converting the concatenated input string into a byte sequence can be represented as: "B:66, R:82, D:68,S:83, p:112, e:101, a:97, k:107, e:101, r:114, _:95, 7:55, 1:49, 1:49, 3:51,space:32,0:48, 0:48, 0:48, 1:49, 2:50, 3:51”, then calculate the MD5 of these bytes. Assuming the calculated MD5 hexadecimal string (32 characters) is: “1a2b3c4d5e6f78901234567890abcdef”, take the first 6 characters (uppercase): “1A2B3C”, then the authentication key is “1A2B3C”.

[0050] For example, the broadcast name information is in string form: "AUDPlayer_EEFF"; the six-digit encoded string is in numeric form: "000001". Concatenating these two strings yields the input string: "AUDPlayer_EEFF" + "000001" = "AUDPlayer_EEFF000001". The MD5 hash of "AUDPlayer_EEFF000001" is calculated to be "7D1D45E0D5A9A8A7C4E8E9A0D0E8E5B5". Taking the first six digits, we get "7D1D45", thus obtaining the authentication key: "7D1D45". Using hexadecimal uppercase eliminates platform compatibility issues, and the fixed truncation position (first 6 digits) ensures that the receiving device does not require additional signaling to synchronize the key position, reducing protocol complexity and the computational burden on embedded devices (RAM usage <1KB).

[0051] After obtaining the authentication key "1A2B3C", the broadcast data packet sent by the transmitting device is encrypted using this key, making the broadcast private. Subsequent receiving devices need to obtain this authentication key to decrypt the broadcast data packet. In some implementations, after the digital code is updated periodically, when the digital code "000123" is updated to "000124", the authentication key generated for the same broadcast name changes from "1A2B3C" to "8E9F0A"; it is also updated in a timely manner before transmitting the broadcast, using the new authentication key for encryption.

[0052] Therefore, it can be seen that the transmitting device constructs broadcast name information using the device name, device model, and Bluetooth address. Then, based on the broadcast name information, the transmitting device's unique digital code, and a preset algorithm, a unique and unpredictable authentication key is generated for the Bluetooth broadcast authentication system. This authentication key is used to encrypt the data to be encrypted, thus obtaining the encrypted broadcast information. Further:

[0053] In step 220, the transmitting device transmits a broadcast data packet containing broadcast name information, digital encoding, and encrypted broadcast information.

[0054] After generating a unique and unpredictable authentication key for the Bluetooth broadcast authentication system, the transmitting device encrypts the data to be encrypted using the authentication key to obtain encrypted broadcast information. Then, it generates a broadcast data packet based on the broadcast name information, digital encoding, and encrypted broadcast information, and broadcasts the generated broadcast data packet.

[0055] The broadcast data packet includes the broadcast name information and digital code of the wireless transmitter. The receiving device generates an authentication key using the same logic. When the receiving device scans the broadcast from the transmitter, the broadcast data includes plaintext and ciphertext. The ciphertext is the data encrypted with the authentication key, while the plaintext can be directly scanned and parsed, such as the transmitter's name, device model, Bluetooth address, and digital code. The plaintext portion is extracted from the broadcast data packet and used as a decryption condition parameter. This receiving device is paired with the transmitter, has the same logic algorithm, and generates the expected authentication key in the same way as the transmitter to decrypt the encrypted broadcast information. Specifically:

[0056] In step 230, the receiving device scans the broadcast data packet and calculates the expected authentication key using a preset algorithm.

[0057] When the receiving device scans a broadcast data packet, it extracts the broadcast name information and digital code included in the broadcast data packet, and then calculates the expected authentication key based on the broadcast name information, digital code and preset algorithm.

[0058] In one specific implementation, when the receiving device scans a broadcast data packet, it extracts the broadcast name information and numeric code included in the broadcast data packet, then concatenates the string of the broadcast name information and the 6-digit string of the numeric code to generate an input string, and then calculates the MD5 digest according to the input string using a preset MD5 algorithm, converts the MD5 digest into a 32-bit hexadecimal string, and extracts the first 6 hexadecimal characters from the MD5 digest and converts them into uppercase form as the expected authentication key.

[0059] For example, when the receiving device detects a broadcast data packet, it extracts the broadcast name information included in the broadcast data packet. The corresponding string format is "BRDSpeaker_7113" (with a space at the end, totaling 16 characters). The six-digit numerical encoding is "000123". These are concatenated to obtain the input string: "BRDSpeaker_7113" + "000123" = "BRDSpeaker_7113 000123". The corresponding byte format is "B:66, R:82, D:68,S:83, p:112, e:101, a:97, k:107, e:101, r:114, _:95, 7:55, 1:49, 1:49, 3:51,space:32,0:48, 0:48, 0:48, 1:49, 2:50, Calculate the MD5 hash of these bytes, assuming the MD5 hash is "1a2b3c4d5e6f78901234567890abcdef". Take the first 6 characters (uppercase) "1A2B3C" to obtain the expected authentication key "1A2B3C". Use this key to decrypt the ciphertext of the broadcast data packet. If the verification is successful, the device is authenticated and the connection is successfully matched.

[0060] Understandably, in application scenarios with multiple transmitting devices, a receiving device may scan for multiple broadcast data packets from different transmitting devices. To prioritize connecting to a specific transmitting device and improve connection efficiency between the receiving device and its corresponding transmitting device, the receiving device needs to... (See also...) Figure 3 , Figure 3 This document illustrates a flowchart of another encrypted broadcast authentication interaction method provided in an embodiment of this application, as shown below. Figure 3 As shown, in some embodiments, the authentication interaction method for encrypted broadcasts may further include the following steps:

[0061] (1) When the receiving device scans broadcast data packets sent by multiple transmitting devices, it identifies the broadcast name information format in the broadcast data packets respectively.

[0062] (2) If it matches the expected format, mark it as an encrypted transmission device and save the record.

[0063] (3) If the transmission device does not match the expected format, then filter the transmission device.

[0064] In other words, when a receiving device scans broadcast data packets from multiple transmitting devices, if it extracts the broadcast name information included in the broadcast data packets, it identifies the format of this broadcast name information and compares it with the expected format. That is, it first filters out transmitting devices for which no broadcast name information has been extracted, and then filters out transmitting devices whose broadcast name information format does not match the expected format. For example, if the receiving device scans broadcast name information from multiple broadcast data packets, after filtering, it only retains broadcast data plaintext in the format of broadcast name information = "device name" + "device model" + "_" + "last four digits of Bluetooth address", such as "BRDMic_7113", "BRDMic_7113", "BRDSpeaker_7113", "AUDPlayer_EEFF", etc., which conform to the format, and records and retains them as encrypted transmitting devices.

[0065] The receiving device filters out unencrypted broadcast data packets and broadcast data packets that do not meet the automatic decryption conditions through multiple screening processes in an environment with multiple transmitting devices. It automatically, quickly and accurately finds the corresponding transmitting device for pairing and connection. This improves the matching efficiency between the transmitting and receiving devices in an environment with multiple transmitting devices. Compared with the traditional solution that requires a mobile app to relay the connection, there is no need to manually search and select among relay devices. The automatic screening of transmitting devices is simpler, faster and more efficient.

[0066] For further information, please refer to [link / reference]. Figure 3 In some implementations, the step "if it matches the expected format, mark it as an encrypted transmitting device and save the record" may also include the following steps:

[0067] (1) Select the transmitting device that has the same device name and device model as the receiving device as the connection object.

[0068] (2) If the device models are different, select the transmitting device with the same device name as the receiving device as the connection object.

[0069] The receiving device compares the format of the broadcast name information with the expected format. If the receiving device detects that the device name and device model included in the format of the broadcast name information are the same as the specified device name and device model, then it takes the corresponding transmitting device as the connection object.

[0070] Alternatively, if the receiving device detects that the device model included in the format of the broadcast name information is different from the specified device model, but the device name included in the format of the broadcast name information is the same as the specified device name, then the corresponding transmitting device is taken as the connection object.

[0071] In other words, when filtering connection objects, priority is given to transmitting devices with the same device name and model. If they are different, the transmitting devices with the same device name are selected as the next priority for connection.

[0072] For example, if the broadcast name information in multiple broadcast data packets is scanned and filtered out, if the expected format specified by the receiving device is "BRDMic_7113", its device name is "BRD", and its device model is "Mic", and the scanned broadcast name information includes "BRDMic_7113", "BRDSpeaker_7113", and "AUDPlayer_EEFF", then "BRDMic_7113" is selected as the connection object; if the scanned broadcast name information includes "BRDSpeaker_7113" and "AUDPlayer_EEFF", and there is no device name and device model that are the same, then "BRD" with the same device name is selected, that is, "BRDSpeaker_7113" is selected as the connection object.

[0073] The receiving device performs a first round of filtering among the multiple transmitting devices corresponding to the multiple broadcast data packets based on whether it extracts the broadcast name information from the scanned broadcast data packets. Then, it compares the device name and device model contained in the broadcast name information of the broadcast data packets with the device name and device model specified by the receiving device to perform a second round of filtering among the multiple transmitting devices corresponding to the multiple broadcast data packets. Thus, among the multiple transmitting devices, the transmitting device that meets the corresponding conditions is selected as the connection target.

[0074] It is understandable that there may be at least two transmitting devices that meet the corresponding conditions. Based on this situation, in order to improve the connection efficiency between the receiving device and the corresponding transmitting device, please continue reading. Figure 3 In some implementations, the authentication interaction method for encrypted broadcasts may further include the following steps:

[0075] (1) When there are multiple transmitting devices with the same device name and device model as the receiving device, if there is a previously connected encrypted transmitting device that is scanned in this scan, then the transmitting device is selected as the connection object.

[0076] (2) If there is no previously connected encrypted transmitting device, the transmitting device with the strongest broadcast signal strength shall be selected as the connection target.

[0077] In other words, in an environment with multiple transmitting devices, the receiving device prioritizes the transmitting device that has the same device name and model as the one specified by the receiving device as the connection target, and its connection priority is the highest. Secondly, if there are multiple transmitting devices that have the same device name and model as the one specified by the receiving device, the transmitting device that was previously connected to the specified encrypted transmitting device and is scanned in the current scan will be selected as the connection target. Thirdly, if there is no previously connected specified encrypted transmitting device, the transmitting device with the strongest broadcast signal strength will be selected as the connection target. Finally, if there is no transmitting device that has the same device name and model as the one specified by the receiving device, and there is a transmitting device whose model is different from the one specified by the receiving device, the receiving device will select the transmitting device with the same device name as the one specified by the receiving device as the connection target.

[0078] For example, if the broadcast name information in multiple broadcast data packets is scanned and filtered out, if the expected format specified by the receiving device is "BRDMic_7113", its device name is "BRD", and its device model is "Mic", and the scanned broadcast name information is "BRDMic_7113", "BRDMic_5566", and "BRDMic_EEFF", if the last connection was with "BRDMic_7113", then "BRDMic_7113" is selected as the connection target; if there is no previous connection, the signal strengths of these transmitting devices are obtained, which are -70dBm, -65dBm, and -60dBm respectively, and then the "BRDMic_EEFF" corresponding to the strongest signal strength of -60dBm is selected as the connection target.

[0079] In addition, please continue to refer to Figure 3 In some implementations, the authentication interaction method for encrypted broadcasts may further include the following steps:

[0080] (1) When selecting a previously connected encrypted transmitting device, if its signal strength is lower than the threshold, it will automatically switch to the second-best device and select the transmitting device with the strongest broadcast signal strength as the connection target.

[0081] (2) After a successful connection, update the priority weight W of the transmitting device: W = α * signal strength + β * number of historical connections, where α = 0.7 and β = 0.3.

[0082] In other words, if there are multiple transmitting devices with the same device name and model as the receiving device, the transmitting device that was previously connected to the specified encrypted transmitting device and is scanned in this scan will be used as the connection target. If there are multiple transmitting devices that meet the conditions, the transmitting device with the strongest signal strength will be used as the connection target. If there is a transmitting device that meets the conditions and its signal strength is below the threshold, the transmitting device with the strongest broadcast signal strength will be used as the connection target.

[0083] For example, if the scanned broadcast names are "BRDMic_7113", "BRDMic_5566", and "BRDMic_EEFF", and the last connection was "BRDMic_7113", then "BRDMic_7113" is selected as the connection target. The signal strengths of these transmitting devices are obtained as -70dBm, -70dBm, and -60dBm, respectively. It is determined whether they are below the threshold of -65dBm. Since the signal strength of "BRDMic_7113" does not meet the standard, it is automatically filtered out, and the transmitting device with the strongest signal strength is selected as the connection target (i.e., "BRDMic_EEFF" with a signal strength of -60dBm is selected).

[0084] In some implementations, when multiple transmitting devices exist that have the same device name and model as the device specified by the receiving device, the transmitting device with the highest priority weight is selected as the connection target. Alternatively, when multiple transmitting devices exist that have a different device model than the device specified by the receiving device but the same device name, the transmitting device with the highest priority weight is selected as the connection target. Alternatively, when multiple transmitting devices exist that have the same device name and model as the device specified by the receiving device, and these transmitting devices are all previously connected to the specified encrypted transmitting device and are scanned in the current scan, the transmitting device with the highest priority weight is selected as the connection target. Alternatively, if no previously connected specified encrypted transmitting device exists, and multiple transmitting devices with the strongest broadcast signal strength exist, the transmitting device with the highest priority weight is selected as the connection target.

[0085] For example, transmitting device A: device name = "BRD", device model = "Speaker", signal strength = -70dBm, number of historical connections = 5; transmitting device B: device name = "BRD", device model = "Speaker", signal strength = -60dBm, number of historical connections = 3; transmitting device C: device name = "AUD", device model = "Mic", signal strength = -50dBm (strongest signal but name mismatch);

[0086] Step 1: Filter devices with mismatched formats (assuming all are compatible);

[0087] Step 2: Select A and B (excluding C) where both device name and model number match.

[0088] Step 3: Select the previously connected devices (assuming A was connected last time);

[0089] Step 4: Because the strength of signal A (-70dBm) is lower than the threshold (-65dBm), it automatically switches to the stronger signal B (-60dBm);

[0090] Step 5: After successful connection, update the weight of B: W = 0.7*(-60) + 0.3*3 = -42 + 0.9 = -41.1.

[0091] A higher weight means that the conditions of the transmitting device are optimal and the number of user connections is higher. It can be used as the connection object according to user preferences and habits. That is, the weight of the transmitting device is calculated for each connection. In the next connection, if the same conditions are met, the device with the highest weight will be selected first to connect, which conforms to user habits. Based on the priority strategy of broadcast name format filtering, signal strength, and historical connection weight, the optimal connection in the second is achieved in the multi-transmitting device scenario.

[0092] Therefore, the receiving device identifies a transmitting device whose broadcast name information format matches the expected format among the broadcast data packets sent by multiple transmitting devices, marks it as an encrypted transmitting device, and selects the transmitting device as the connection target among the encrypted transmitting devices. However, there are cases where the broadcast name information format in the broadcast data packets sent by multiple transmitting devices does not match the expected format. Based on the above situation, in some embodiments, the authentication interaction method for encrypted broadcasts may further include the following steps:

[0093] (1) When the receiving device scans broadcast data packets sent by multiple transmitting devices, it identifies the format of the broadcast name information in the broadcast data packets;

[0094] (2) If there is no transmitting device with the same name as the receiving device, the unencrypted transmitting device with the strongest broadcast signal strength shall be selected as the connection target.

[0095] Therefore, when the receiving device scans multiple transmitting devices and identifies the broadcast name information format, if there is no broadcast data packet to be decrypted, it will automatically connect to the unencrypted transmitting device as the connection object. In this way, it can connect to broadcasts even in an environment where no encrypted broadcast data packet is specified, and can be used as a basic broadcast receiving device, such as connecting to open public broadcast sources.

[0096] After the receiving device selects and determines the transmitting device as the connection target, it obtains the broadcast name information and numeric code from the broadcast data packet of the transmitting device; it concatenates the string of the broadcast name information and the 6-digit string of the numeric code to generate the input string; it calculates the MD5 digest based on the input string using a preset MD5 algorithm, converts the MD5 digest into a 32-bit hexadecimal string, and extracts the first 6 hexadecimal characters from the MD5 digest, converting them to uppercase as the expected authentication key. Further:

[0097] In step 240, if the expected authentication key matches the authentication key, the receiving device establishes a Bluetooth connection with the transmitting device, and the receiving device decrypts the encrypted broadcast information.

[0098] If the expected authentication key matches the authentication key, the receiving device establishes a Bluetooth connection with the transmitting device, which is the connection target. The receiving device can decrypt the encrypted broadcast information in the broadcast data packet sent by the transmitting device, which is the connection target, based on the expected authentication key.

[0099] The receiving device in this solution autonomously generates the expected authentication key through a preset algorithm, eliminating the need for external devices such as mobile apps to relay the data. This significantly reduces pairing latency and improves efficiency compared to traditional solutions. A priority strategy based on broadcast name format filtering, signal strength, and historical connection weights enables optimal connection within seconds in multi-transmitting device scenarios. The input is generated by concatenating the device name, model, the last four digits of the Bluetooth address, and a numerical code. The first six hexadecimal digits are extracted using MD5 calculation to create the key, resulting in an extremely low repetition rate and effectively resisting spoofing attacks. Only the broadcast name and numerical code (plaintext) are publicly displayed in the broadcast data packet; sensitive data is encrypted using the authentication key to prevent man-in-the-middle attacks. The solution is based on the existing Bluetooth broadcast authentication system's broadcast protocol, eliminating the need for additional dedicated chips or interfaces.

[0100] Please see Figure 4 , Figure 4 The diagram illustrates the structure of a computer-readable storage medium 300 provided in an embodiment of this application. The computer-readable storage medium 300 stores program code, which can be called by a processor to execute the encrypted broadcast authentication interaction method described in the above method embodiments.

[0101] The computer-readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 that performs any of the method steps described above. This program code can be read from or written to one or more computer program devices. The program code 310 may be compressed, for example, in a suitable form.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An authentication interaction method for encrypted broadcasting, applied to a Bluetooth broadcast authentication system, the Bluetooth broadcast authentication system comprising a transmitting device and a receiving device, characterized in that, The method includes: The transmitting device generates broadcast name information and a digital code, calculates an authentication key based on the broadcast name information, the digital code and a preset algorithm, and encrypts the data to be encrypted based on the authentication key to obtain encrypted broadcast information; the broadcast name information is a string concatenated by the transmitting device based on the device name, device model and the last four digits of the Bluetooth address; The transmitting device transmits a broadcast data packet containing the broadcast name information, the digital code, and the encrypted broadcast information; The receiving device scans the broadcast data packets and identifies the format of the broadcast name information in the broadcast data packets. If it matches the expected format, it is marked as an encrypted transmitting device and the record is saved. If it does not match the expected format, the transmitting device is filtered out. Select an encrypted transmission device that matches the expected format, and calculate the expected authentication key based on the broadcast name information, the digital encoding, and the preset algorithm; The digital encoding is a 4-byte integer, represented as a 6-digit string, wherein the value range of the digital encoding string is 000001 to 999999; the string of the broadcast name information and the 6-digit string of the digital encoding are concatenated to generate an input string; the MD5 digest is calculated based on the input string using a preset MD5 algorithm, the MD5 digest is converted into a 32-bit hexadecimal string, and the first 6 hexadecimal characters in the MD5 digest are extracted and converted into uppercase form as the authentication key; If the expected authentication key matches the authentication key, the receiving device establishes a Bluetooth connection with the transmitting device, and the receiving device decrypts the encrypted broadcast information.

2. The authentication interaction method for encrypted broadcasting as described in claim 1, characterized in that, The Bluetooth address is separated from the device name or the device model by an underscore character; all characters are ASCII encoded; if the length of the generated broadcast name information string is odd, then the last character of the broadcast name information string is padded with a space character until the last character is even.

3. The authentication interaction method for encrypted broadcasting as described in claim 2, characterized in that, If it matches the expected format, it is marked as an encrypted transmitting device and the record is saved, including: Select the transmitting device that has the same device name and device model as the receiving device as the connection object; If the device models are different, the transmitting device with the same device name as the receiving device is selected as the connection target.

4. The authentication interaction method for encrypted broadcasting as described in claim 3, characterized in that, The method further includes: When there are multiple transmitting devices with the same device name and device model as the receiving device, if there is a previously connected encrypted transmitting device that is scanned in this scan, then the transmitting device is selected as the connection target. If the specified encrypted transmitting device that was previously connected does not exist, the transmitting device with the strongest broadcast signal strength will be selected as the connection target.

5. The authentication interaction method for encrypted broadcasting as described in claim 4, characterized in that, The method further includes: When selecting a previously connected encrypted transmitting device, if its signal strength is below the threshold, it will automatically switch to the second-best device and select the transmitting device with the strongest broadcast signal strength as the connection target. After a successful connection, update the priority weight W of the transmitting device: W = α * signal strength + β * number of historical connections, where α = 0.7 and β = 0.

3.

6. The authentication interaction method for encrypted broadcasting as described in any one of claims 3-5, characterized in that, The method includes: Retrieve the broadcast name information and numeric code from the broadcast data packet of the transmitting device of the connected object; The input string is generated by concatenating the broadcast name information string with the 6-digit numeric encoding string. The MD5 digest is calculated based on the input string using a preset MD5 algorithm. The MD5 digest is then converted into a 32-bit hexadecimal string. The first 6 hexadecimal characters in the MD5 digest are extracted, converted to uppercase, and used as the expected authentication key.

7. The authentication interaction method for encrypted broadcasting as described in claim 2, characterized in that, The method further includes: When the receiving device scans multiple broadcast data packets sent by the transmitting device, it identifies the format of the broadcast name information in the broadcast data packets; If no transmitting device with the same name as the receiving device is specified, the unencrypted transmitting device with the strongest broadcast signal strength is selected as the connection target.

8. A Bluetooth broadcast authentication system, characterized in that, Includes transmitting and receiving equipment, of which: The transmitting device is used to generate broadcast name information and digital code, calculate an authentication key based on the broadcast name information, the digital code and a preset algorithm, and encrypt the data to be encrypted based on the authentication key to obtain encrypted broadcast information; the broadcast name information is a string concatenated by the transmitting device based on the device name, device model and the last four digits of the Bluetooth address; The transmitting device is used to transmit a broadcast data packet containing the broadcast name information, the digital code, and the encrypted broadcast information; The receiving device is used to scan the broadcast data packets and identify the format of the broadcast name information in the broadcast data packets; if it matches the expected format, it is marked as an encrypted transmitting device and the record is saved; if it does not match the expected format, the transmitting device is filtered out. Select an encrypted transmission device that matches the expected format, and calculate the expected authentication key based on the broadcast name information, the digital encoding, and the preset algorithm; The digital encoding is a 4-byte integer, represented as a 6-digit string, wherein the value range of the digital encoding string is 000001 to 999999; the string of the broadcast name information and the 6-digit string of the digital encoding are concatenated to generate an input string; the MD5 digest is calculated based on the input string using a preset MD5 algorithm, the MD5 digest is converted into a 32-bit hexadecimal string, and the first 6 hexadecimal characters in the MD5 digest are extracted and converted into uppercase form as the authentication key; The receiving device is used to establish a Bluetooth connection with the transmitting device if the expected authentication key matches the authentication key, and the receiving device decrypts the encrypted broadcast information.