WO2021155482A1 - Data transmission method and ble device - Google Patents

Data transmission method and ble device Download PDF

Info

Publication number
WO2021155482A1
WO2021155482A1 PCT/CN2020/074170 CN2020074170W WO2021155482A1 WO 2021155482 A1 WO2021155482 A1 WO 2021155482A1 CN 2020074170 W CN2020074170 W CN 2020074170W WO 2021155482 A1 WO2021155482 A1 WO 2021155482A1
Authority
WO
WIPO (PCT)
Prior art keywords
ble
time synchronization
time
ble device
terminal
Prior art date
Application number
PCT/CN2020/074170
Other languages
French (fr)
Chinese (zh)
Inventor
袁明武
Original Assignee
深圳市汇顶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN202080001510.4A priority Critical patent/CN111788836B/en
Priority to PCT/CN2020/074170 priority patent/WO2021155482A1/en
Publication of WO2021155482A1 publication Critical patent/WO2021155482A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • This application relates to the field of communication technology, and in particular to a method of data transmission and a BLE device.
  • BLE Bluetooth Low Energy
  • the current mainstream practice of using BLE for communication is mainly to use the encryption binding function of BLE technology, or to encrypt the data layer when transmitting data.
  • these encrypted communication methods need to establish a connection between BLE devices in order to perform ID identification and wireless control. Then in some scenarios that require fast identification or require encrypted communication and identification of multiple devices, these encryptions
  • the communication method is inefficient and not very practical.
  • This application provides a data transmission method and a BLE device, which can ensure the security of data transmission while improving transmission efficiency.
  • a method for BLE data transmission includes: a first BLE end uses a one-time encryption algorithm to encrypt original data to obtain encrypted data; In this way, the encrypted data is sent to at least one BLE end.
  • the BLE end can use a one-time encryption algorithm to encrypt data, and send encrypted data to other BLE ends by broadcasting, which can improve transmission At the same time of efficiency, the security of data transmission is ensured.
  • the first BLE end uses a one-time encryption algorithm to encrypt the original data, including: the first BLE end performs the encryption processing on the original data based on a time factor The data is encrypted.
  • the first BLE end encrypts the original data based on a time factor, including: the first BLE end performs encryption processing on the original data according to The time and the preset time interval of the first BLE end determine a key; the first BLE end uses the key to encrypt the original data.
  • the first BLE terminal determines the key according to the time of the first BLE terminal and a preset time interval, including; The first BLE terminal determines the key according to the time of the first BLE terminal and the preset time interval according to the seed file.
  • the one-time encryption algorithm is a dynamic password algorithm.
  • the method further includes: performing time synchronization between the first BLE end and a second BLE end, and the second BLE end is One of the at least one BLE terminal.
  • the time synchronization between the first BLE end and the second BLE end includes: the first BLE end The second BLE end sends a time synchronization request message, the time synchronization request message is used by the first BLE end to request time synchronization with the second BLE end; the first BLE end receives the second BLE end according to The time synchronization response message sent by the time synchronization request message; the first BLE end performs time synchronization with the second BLE end according to the time synchronization response message.
  • the time synchronization request message includes the time of the first BLE end; and/or, the time synchronization response message includes the The time of the second BLE end.
  • a Bluetooth connection is not established between the first BLE terminal and the at least one BLE terminal.
  • the method before the first BLE end and the second BLE end perform time synchronization, the method further includes: A BLE terminal establishes a Bluetooth connection with the second BLE terminal, and the Bluetooth connection is used for the time synchronization.
  • the establishment of a Bluetooth connection between the first BLE terminal and the second BLE terminal includes: the first BLE terminal receives the A connection request message sent by the second BLE terminal, where the connection request message is used by the second BLE terminal to request the establishment of a connection with the first BLE terminal; the first BLE terminal sends the connection request message to the The second BLE end sends a connection response message.
  • a method for data transmission between BLE terminals includes: a second BLE terminal receives encrypted data sent by a first BLE terminal by means of broadcasting; Algorithm to decrypt the encrypted data to obtain the original data.
  • the BLE terminal adopts a one-time encryption algorithm to encrypt broadcast data, which can improve the transmission efficiency while ensuring the security of data transmission.
  • the second BLE terminal decrypts the encrypted data according to a one-time encryption algorithm, including: the second BLE terminal performs a decryption process on the encrypted data based on a time factor The encrypted data is decrypted.
  • the second BLE terminal decrypts the encrypted data based on a time factor, including: the second BLE terminal decrypts the encrypted data according to The time of the second BLE end and the preset time interval determine the key; the second BLE end uses the key to decrypt the encrypted data.
  • the second BLE terminal determines the key according to the time of the second BLE terminal and a preset time interval, including: The second BLE terminal determines the key according to the time of the second BLE terminal and the preset time interval according to the seed file.
  • the method further includes: the second BLE end receiving the seed file sent by the application server.
  • the one-time encryption algorithm is a dynamic password algorithm.
  • the method further includes: performing time synchronization between the second BLE terminal and the first BLE terminal.
  • the time synchronization between the second BLE terminal and the first BLE terminal includes: the second BLE terminal receives the A time synchronization request message sent by the first BLE end, where the time synchronization request message is used by the first BLE end to request time synchronization with the second BLE end; the second BLE end according to the time synchronization request message , Sending a time synchronization response message to the first BLE end.
  • the time synchronization request message includes the time of the first BLE end; and/or, the time synchronization response message includes the The time of the second BLE end.
  • a Bluetooth connection is not established between the first BLE terminal and the at least one BLE terminal.
  • the method before the second BLE end and the first BLE end perform time synchronization, the method further includes: the first BLE end
  • the second BLE terminal establishes a Bluetooth connection with the first BLE terminal, and the Bluetooth connection is used for the time synchronization.
  • the establishment of a Bluetooth connection between the second BLE end and the first BLE end includes: the second BLE end The first BLE end sends a connection request message, the connection request message is used by the second BLE end to request to establish a connection with the first BLE end; the second BLE end receives the first BLE end according to the connection The connection response message sent by the request message; the second BLE terminal establishes a Bluetooth connection with the first BLE terminal according to the connection response message.
  • the method further includes: the second BLE terminal performs identity recognition on the first BLE terminal according to the original data .
  • a BLE device which is used to execute the foregoing first aspect or any possible implementation of the first aspect.
  • the BLE device includes a unit for executing the foregoing first aspect or any possible implementation of the first aspect.
  • a BLE device which is used to execute the foregoing second aspect or any possible implementation method of the second aspect.
  • the BLE device includes a unit for executing the foregoing second aspect or any possible implementation of the second aspect.
  • a BLE device including: a storage unit and a processor, the storage unit is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory The execution causes the processor to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • a BLE device including: a storage unit and a processor, the storage unit is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory The execution causes the processor to execute the second aspect or the method in any possible implementation manner of the second aspect.
  • a BLE chip which is used to implement the above-mentioned first aspect or the methods in each of its implementation manners.
  • the BLE chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the BLE chip executes the method in the above-mentioned first aspect or each of its implementation manners.
  • a BLE chip which is used to implement the method in the second aspect or each of its implementation manners.
  • the BLE chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the BLE chip executes the method in the above-mentioned second aspect or each of its implementation manners.
  • a computer-readable medium for storing a computer program, and the computer program includes instructions for executing the first aspect or any possible implementation of the first aspect.
  • a computer-readable medium for storing a computer program, and the computer program includes instructions for executing the second aspect or any possible implementation of the second aspect.
  • a computer program product including instructions is provided.
  • the computer runs the instructions of the computer program product
  • the computer executes the first aspect or any possible implementation of the first aspect.
  • the computer program product may run on the BLE device of the third aspect.
  • a computer program product including instructions is provided.
  • the computer runs the instructions of the computer program product
  • the computer executes the second aspect or any possible implementation of the second aspect.
  • the computer program product can run on the BLE device of the fourth aspect.
  • Fig. 1 is a schematic flowchart of a method for BLE data transmission according to an embodiment of the present application.
  • Fig. 2 is a schematic diagram of an application scenario of data transmission between BLE devices according to an embodiment of the present application.
  • Fig. 3 is a schematic diagram of the working principle of encryption and decryption using a dynamic password according to an embodiment of the present application.
  • Fig. 4 is a schematic flowchart of a method for time synchronization between two BLE devices according to an embodiment of the present application.
  • Fig. 5 is a schematic block diagram of a BLE device according to an embodiment of the present application.
  • Fig. 6 is another schematic block diagram of a BLE device according to an embodiment of the present application.
  • Fig. 7 is a schematic block diagram of a BLE chip according to an embodiment of the present application.
  • Fig. 1 shows a schematic flowchart of a method 100 for BLE data transmission according to an embodiment of the present application.
  • the method 100 includes: S110, encrypting the original data, that is, the first BLE end uses a one-time encryption algorithm to encrypt the original data to obtain encrypted data; S120, sending the encrypted data, that is, the first BLE end A BLE end sends the encrypted data by broadcasting.
  • at least one BLE end may receive the encrypted data; S130, decrypt the encrypted data.
  • the second The BLE end may be any one of the at least one BLE end that receives the encrypted data, and the second BLE end decrypts the encrypted data according to a one-time encryption algorithm to obtain the original data.
  • the first BLE terminal in the embodiments of the present application may refer to any BLE device or any chip, and the chip may be applied to a BLE device.
  • the first BLE terminal is an encryption terminal, that is, it is used to encrypt data. And there may be one or more first BLE terminals.
  • the following description takes the first BLE terminal as a BLE device as an example; the second BLE terminal in the embodiment of the present application may also refer to any BLE device or any one Chip, the chip can be applied to BLE devices, the second BLE end is the decryption end, that is, the second BLE end is the receiving end of encrypted data, the second BLE end receives the encrypted data broadcasted by the first BLE end, and can also There are one or more second BLE terminals.
  • the following description takes the second BLE terminal as a BLE device as an example, but the embodiment of the present application is not limited to this.
  • the original data in the embodiments of the present application may refer to any data.
  • the original data may refer to any data used for data communication between the first BLE device and the second BLE device; for another example, the original data may also be It may refer to related data used for identification ID identification, and the embodiment of the present application is not limited to this.
  • FIG. 2 shows a schematic diagram of an application scenario of data transmission between BLE devices.
  • the slave device generally refers to the slave peripheral device
  • the master device generally refers to the master central device.
  • the slave device can be used to send data, for example, it can be used to send advertising packets, that is, send data in a broadcast manner.
  • the first BLE device in this embodiment of the application can be Slave devices, such as smart bracelets and other wearable devices; and the master device can be used to scan data broadcast by the slave device, that is, scan advertising packets, or receive advertising packets.
  • the master device can also be used to initiate connection requests (connection request).
  • connection request for example, the second BLE device in the embodiment of the present application may be a master device.
  • Common master devices include long power supply devices such as mobile phones, but the embodiments of the present application are not limited to this.
  • the method 100 of the embodiment of the present application may be applied to a scenario where the first BLE device sends data to one or more BLE devices in a broadcast manner.
  • the current data transmission or data encryption process between BLE devices is done after the connection is established.
  • any two BLE devices can only transmit data after establishing a Bluetooth connection; however, the data can be transmitted by broadcasting.
  • a BLE device sends data to one or more other BLE devices.
  • the first BLE device in the embodiment of the present application may also communicate with the at least one BLE device on the receiving end. Establish a Bluetooth connection and transmit data directly through broadcast. This broadcast transmission method can greatly improve the efficiency of data transmission.
  • the current transmission method is one-to-one, that is, the sending end BLE device needs to be sent sequentially. Send data to each receiving end BLE device; but if broadcast is used, regardless of whether a connection has been established between these devices, the sending end BLE device can directly send data to multiple BLE devices through broadcast, for example
  • the first BLE device may also send data to multiple BLE devices in a broadcast manner, thereby improving the efficiency of data transmission.
  • the method 100 of the embodiment of the present application uses a one-time encryption algorithm to encrypt the broadcast data while transmitting data in a broadcast manner.
  • the one-time password (One Time Password, OTP) used in the one-time algorithm in the embodiments of this application has the most important advantage of being less susceptible to replay attacks, even if the attacker uses the static password for encryption.
  • the packet meter captures data through the air interface, and will not brute force the key (KEY).
  • the method for data transmission between BLE terminals in this embodiment of the application adopts a one-time encryption algorithm that can be efficiently run on the Microcontroller Unit (MCU) platform, encrypts the data, and then broadcasts it.
  • MCU Microcontroller Unit
  • this method can be applied to general-purpose BLE chips, and can ensure the security of data transmission while improving transmission efficiency.
  • the first BLE device uses a one-time encryption algorithm to encrypt the original data to obtain encrypted data.
  • the first BLE device uses a one-time encryption algorithm to encrypt the original data, that is, uses OTP to encrypt the original data.
  • the OTP is also called a secret notebook, which is a kind of espionage technology applied in the military field. It uses a pre-appointed one-time secret notebook to encrypt and decrypt communication information. The used secret notebook is discarded and no longer used. It can be done once.
  • One secret is also called a secret notebook, which is a kind of espionage technology applied in the military field. It uses a pre-appointed one-time secret notebook to encrypt and decrypt communication information. The used secret notebook is discarded and no longer used. It can be done once.
  • One secret is also called a secret notebook, which is a kind of espionage technology applied in the military field. It uses a pre-appointed one-time secret notebook to encrypt and decrypt communication information
  • the S110 may specifically include: the first BLE device encrypts the original data based on a time factor.
  • the first BLE device may use a dynamic password algorithm to encrypt the original data that needs to be broadcast, where the dynamic password algorithm is a type of OTP.
  • a dynamic password algorithm based on a time factor may be used for encryption processing.
  • the first BLE device encrypts the original data based on the time factor, which may specifically include: the first BLE device determines the key according to the time of the first BLE device and a preset time interval; the first BLE The device uses the key to encrypt the original data.
  • the preset time interval may indicate the update duration of the dynamic password, or may also be called the time step; and, the preset time interval can be set according to actual applications, and can be set to any value, for example, it can be set to 30s, 60s or other values, but the embodiment of the present application is not limited thereto.
  • FIG. 3 shows a schematic diagram of the working principle of encryption and decryption using dynamic passwords. As shown in Figure 3, the processes of encryption and decryption are the same. Both are based on time as a factor and use a non-functional pseudo-random number algorithm, which is simple , Fast, efficient, and can run in general BLE chips.
  • the first BLE device may determine the key according to the seed file according to the time of the first BLE device and the preset time interval, and use the key to encrypt data.
  • the encryption terminal for example, the first BLE device in the embodiment of this application
  • the decryption terminal for example, at least one second BLE device in the embodiment of this application
  • both store a seed file that is, the key store in FIG. 3 The seed of the representative.
  • the seed file in the first BLE device and/or the second BLE device can be stored in the BLE chip; or, the seed file in the first BLE device and/or the second BLE device can also be obtained through the application server; or, The first BLE device and the second BLE device may also transmit the seed file to each other.
  • the seed file may be transmitted through a Bluetooth connection or other connection methods.
  • the method 100 may further include: the second BLE device receiving the seed file sent by the application server.
  • the second BLE device in the embodiment of the present application may be connected to the application server, or connected to the network side, to obtain related information, for example, the seed file may be obtained through the application server.
  • the first BLE device to encrypt the original data based on the time factor as an example.
  • the first BLE device can be based on the time of the first BLE device (that is, the "clock" on the left in FIG. 3 represents the time of the first BLE device) and a preset time interval, according to the seed File, determine the key; the first BLE device uses the key to encrypt the original data (that is, the "broadcast data” in Figure 3, which means the original data to be broadcast), that is, the "cryptographic operation” in Figure 3 "Process to generate encrypted data.
  • the first BLE device sends the encrypted data generated in S110 by broadcasting, for example, the encrypted data generated as shown in FIG. 3; correspondingly, at least one BLE device may receive the encrypted data .
  • the second BLE device may be any one of the at least one BLE device that has received encrypted data.
  • the second BLE device receives the encrypted data in S120 according to the one-time encryption algorithm.
  • the encrypted data is decrypted to obtain the original data. That is to say, after receiving the encrypted data, the second BLE device on the decryption side will perform a "decryption operation" corresponding to the encryption operation to obtain the original data, that is, to obtain the "broadcast data" in FIG. 3.
  • the first BLE device in the method 100 in the embodiment of the present application may use a dynamic password algorithm based on a time factor for encryption processing.
  • the time synchronization between the first BLE device and the second BLE device is effective.
  • the first BLE device and/or the second BLE device need to have an accurate real-time clock timer; for another example, the first BLE device and/or the second BLE device can also connect to the network to obtain the time; for another example, the first BLE device The device and the second BLE device can be connected to perform time synchronization, and the embodiment of the present application is not limited to this.
  • the method 100 of the embodiment of the present application may further include: the first BLE device performs time synchronization with a second BLE device, where the second BLE device is a device that receives a broadcast from the first BLE device. Any one of at least one BLE device that encrypts data.
  • FIG. 4 shows a schematic diagram of a process 200 for performing time synchronization between the first BLE device and the second BLE device according to an embodiment of the present application. As shown in FIG.
  • the process 200 may include: the first BLE device performs time synchronization with the second BLE device, and may specifically include: S210, sending a time synchronization request message, that is, the first BLE device sends a time synchronization request message to the second BLE device.
  • the BLE device sends a time synchronization request message, which is used by the first BLE device to request time synchronization with the second BLE device; S220, send a time synchronization response message, that is, the second BLE device synchronizes according to the received time Request message, sending a time synchronization response message to the first BLE device, so that the first BLE device can receive the time synchronization response message sent by the second BLE device, and perform time synchronization with the second BLE device according to the time response message .
  • the time synchronization request message includes the time of the first BLE device, so that the second BLE device can learn the time of the second BLE device; and/or, the time response message includes the time of the second BLE device, In this way, the first BLE device can learn the time of the second BLE device.
  • the first BLE device can perform time synchronization based on its own time and the time of the second BLE device.
  • the second BLE device can also perform time synchronization based on its own time and the time of the first BLE device, either way , Both can achieve the purpose of time synchronization between the first BLE device and the second BLE device, but the embodiment of the present application is not limited to this.
  • the process 200 further includes: the first BLE device establishes with the second BLE device Bluetooth connection, which is used for time synchronization.
  • establishing a Bluetooth connection between the first BLE device and the second BLE device may include: S230, sending a connection request message, that is, the second BLE device sends a connection request message to the first BLE device, and the connection request message is used for The second BLE device requests to establish a connection with the first BLE device, and correspondingly, the first BLE device receives the connection request message sent by the second BLE device; S240, sends a connection response message, that is, the first BLE device receives The connection request message is sent to the second BLE device, so that the first BLE device can establish a connection with the second BLE device.
  • the second BLE device sends a connection request message and the first BLE device sends a connection response message as an example; on the contrary, the first BLE device can also send a connection request message, and the second BLE device sends a connection request message.
  • the BLE device sends a connection response message, and can also establish a Bluetooth connection between the first BLE device and the second BLE device. For the sake of brevity, details are not repeated here.
  • the time synchronization can also be performed when the connection between the first BLE device and the second BLE device is not established, for example
  • the time synchronization may be performed in a broadcast manner, or time synchronization may also be performed in other manners, and the embodiment of the present application is not limited to this.
  • the dynamic password algorithm based on the time factor is used to encrypt the broadcast data, which can ensure that the encryption process is more accurate.
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the BLE device 300 may include: a processing unit 310 and a transceiving unit 320.
  • the BLE device 300 may be the first BLE device in the embodiment of the application.
  • the processing unit 310 is configured to: use a one-time encryption algorithm to encrypt the original data to obtain encrypted data; 320 is used to: send the encrypted data to at least one BLE device in a broadcast manner.
  • the processing unit 310 is configured to perform encryption processing on the original data based on a time factor.
  • the processing unit 310 is configured to: determine a key according to the seed file according to the time of the first BLE device and a preset time interval; use the key to compare the original The data is encrypted.
  • the one-time encryption algorithm is a dynamic password algorithm.
  • the processing unit 310 is further configured to: perform time synchronization with a second BLE device, and the second BLE device is one of the at least one BLE device.
  • the transceiving unit 320 is further configured to: send a time synchronization request message to the second BLE device, where the time synchronization request message is used to request time synchronization with the second BLE device Receiving the time synchronization response message sent by the second BLE device according to the time synchronization request message; the processing unit 310 is configured to: perform time synchronization with the second BLE device according to the time synchronization response message.
  • the time synchronization request message includes the time of the first BLE device; and/or, the time synchronization response message includes the time of the second BLE device.
  • a Bluetooth connection is not established between the first BLE device and the at least one BLE device.
  • the processing unit 310 is further configured to: before performing time synchronization with the second BLE device, establish a Bluetooth connection with the second BLE device, and the Bluetooth connection is used for the Time synchronization.
  • the transceiving unit 320 is further configured to: receive a connection request message sent by the second BLE device, where the connection request message is used by the second BLE device to request communication with the first BLE device.
  • the BLE device establishes a connection; according to the connection request message, a connection response message is sent to the second BLE device.
  • the BLE device 300 may also be the second BLE device in the embodiment of the application.
  • the transceiving unit 320 is configured to: receive encrypted data sent by the first BLE device in a broadcast manner; the processing The unit 310 is configured to: perform decryption processing on the encrypted data according to a one-time encryption algorithm to obtain original data.
  • the processing unit 310 is configured to perform decryption processing on the encrypted data based on a time factor.
  • the processing unit 310 is configured to: determine a key according to the seed file according to the time of the second BLE device and a preset time interval; use the key to encrypt the The data is decrypted.
  • the transceiving unit 320 is further configured to: receive the seed file sent by the application server.
  • the one-time encryption algorithm is a dynamic password algorithm.
  • the processing unit 310 is further configured to: perform time synchronization with the first BLE device.
  • the transceiving unit 320 is further configured to: receive a time synchronization request message sent by the first BLE device, where the time synchronization request message is used by the first BLE device to request communication with the The second BLE device performs time synchronization; according to the time synchronization request message, a time synchronization response message is sent to the first BLE device.
  • the time synchronization request message includes the time of the first BLE device; and/or, the time synchronization response message includes the time of the second BLE device.
  • a Bluetooth connection is not established between the first BLE device and the at least one BLE device.
  • the processing unit 310 is further configured to: before performing time synchronization with the first BLE device, establish a Bluetooth connection with the first BLE device, and the Bluetooth connection is used for the Time synchronization.
  • the transceiving unit 320 is further configured to: send a connection request message to the first BLE device, where the connection request message is used to request to establish a connection with the first BLE device;
  • the first BLE device sends a connection response message according to the connection request message;
  • the processing unit 310 is configured to establish a Bluetooth connection with the first BLE device according to the connection response message.
  • the processing unit 310 is further configured to: perform identity recognition on the first BLE device according to the original data.
  • the BLE device of the embodiment of the present application adopts a one-time encryption algorithm that can run efficiently on the MCU platform, encrypts the data, and sends it by broadcast.
  • This method can be applied to general BLE chips and can improve transmission At the same time of efficiency, the security of data transmission is ensured.
  • FIG. 6 is a schematic structural diagram of a BLE device 400 provided by an embodiment of the present application.
  • the BLE device 400 shown in FIG. 6 includes a processor 410, and the processor 410 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
  • the BLE device 400 may further include a memory 420.
  • the processor 410 may call and run a computer program from the memory 420 to implement the method in the embodiment of the present application.
  • the memory 420 may be a separate device independent of the processor 410, or may be integrated in the processor 410.
  • the BLE device 400 may further include a transceiver 430, and the processor 410 may control the transceiver 430 to communicate with other devices. Specifically, it may send information or data to other devices, or receive other devices. Information or data sent by the device.
  • the transceiver 430 may include a transmitter and a receiver.
  • the transceiver 430 may further include an antenna, and the number of antennas may be one or more.
  • the BLE device 400 may specifically be the first BLE device of the embodiment of the present application, and the BLE device 400 may implement the corresponding process implemented by the first device in each method of the embodiment of the present application. For the sake of brevity, here No longer.
  • the BLE device 400 may specifically be the second BLE device of the embodiment of the present application, and the BLE device 400 may implement the corresponding procedures implemented by the second BLE device in the various methods of the embodiments of the present application. For the sake of brevity, This will not be repeated here.
  • Fig. 7 is a schematic structural diagram of a BLE chip according to an embodiment of the present application.
  • the BLE chip 500 shown in FIG. 7 includes a processor 510, and the processor 510 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
  • the BLE chip 500 may further include a memory 520.
  • the processor 510 may call and run a computer program from the memory 520 to implement the method in the embodiment of the present application.
  • the memory 520 may be a separate device independent of the processor 510, or may be integrated in the processor 510.
  • the BLE chip 500 may further include an input interface 530.
  • the processor 510 can control the input interface 530 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
  • the BLE chip 500 may further include an output interface 540.
  • the processor 510 can control the output interface 540 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
  • the BLE chip can be applied to the first BLE device in the embodiment of the present application, and the BLE chip can implement the corresponding process implemented by the first BLE device in each method of the embodiment of the present application.
  • the BLE chip can implement the corresponding process implemented by the first BLE device in each method of the embodiment of the present application.
  • the BLE chip can be applied to the second BLE device in the embodiment of the present application, and the BLE chip can implement the corresponding process implemented by the second BLE device in each method of the embodiment of the present application.
  • the BLE chip can implement the corresponding process implemented by the second BLE device in each method of the embodiment of the present application.
  • the BLE chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
  • the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Rambus RAM
  • the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
  • the embodiments of the present application also provide a computer-readable storage medium for storing computer programs.
  • the computer-readable storage medium may be applied to the first BLE device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the first BLE device in each method of the embodiment of the present application, in order to It's concise, so I won't repeat it here.
  • the computer-readable storage medium may be applied to the second BLE device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the second BLE device in each method of the embodiment of the present application, in order to It's concise, so I won't repeat it here.
  • the embodiments of the present application also provide a computer program product, including computer program instructions.
  • the computer program product can be applied to the first BLE device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the first BLE device in each method of the embodiment of the present application, for the sake of brevity , I won’t repeat it here.
  • the computer program product can be applied to the second BLE device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the second BLE device in each method of the embodiment of the present application, for the sake of brevity , I won’t repeat it here.
  • the embodiment of the present application also provides a computer program.
  • the computer program can be applied to the first BLE device in the embodiment of the present application, and when the computer program runs on the computer, the computer is caused to execute the corresponding implementation of the first BLE device in the various methods of the embodiments of the present application. For the sake of brevity, the process will not be repeated here.
  • the computer program can be applied to the second BLE device in the embodiment of the present application, and when the computer program runs on the computer, the computer is caused to execute the corresponding implementation of the second BLE device in the various methods of the embodiments of the present application.
  • the process will not be repeated here.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory,) ROM, random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Embodiments of the present application relate to a data transmission method and a Bluetooth low energy (BLE) device. The method comprises: a first BLE end encrypts original data by using a one-time encryption algorithm to obtain encrypted data; and the first BLE end sends the encrypted data to at least one BLE end by means of broadcasting. The data transmission method and the BLE device of the embodiments of the present application can ensure the security of data transmission while improving the transmission efficiency.

Description

数据传输的方法和BLE设备Data transmission method and BLE device 技术领域Technical field
本申请涉及通信技术领域,尤其涉及数据传输的方法和BLE设备。This application relates to the field of communication technology, and in particular to a method of data transmission and a BLE device.
背景技术Background technique
当前蓝牙低能耗(Bluetooth Low Energy,BLE)技术高速发展,以其极地功耗特性、灵活性和便捷性在无线传输应用中发挥日益重要的作用,广泛用于身份标识符(identifier,ID)识别、无线控制等应用,但因为BLE传输的数据在空中传输,在数据传输安全性上受到强烈的关注。At present, Bluetooth Low Energy (BLE) technology is developing rapidly. With its polar power consumption characteristics, flexibility and convenience, it plays an increasingly important role in wireless transmission applications, and is widely used for identification (identifier, ID) recognition , Wireless control and other applications, but because the data transmitted by BLE is transmitted in the air, the security of data transmission has received strong attention.
当前使用BLE进行通信的主流做法主要是使用BLE技术的加密绑定功能,或者在传输数据时,对数据层进行加密。但这些加密通信的方法都需要在BLE设备之间建立连接的基础上,才能进行身份ID识别和无线控制,那么在一些需要快速识别,或者需要多设备进行加密通信和识别的场景下,这些加密通信方法效率较低,并不是很实用。The current mainstream practice of using BLE for communication is mainly to use the encryption binding function of BLE technology, or to encrypt the data layer when transmitting data. However, these encrypted communication methods need to establish a connection between BLE devices in order to perform ID identification and wireless control. Then in some scenarios that require fast identification or require encrypted communication and identification of multiple devices, these encryptions The communication method is inefficient and not very practical.
发明内容Summary of the invention
本申请提供了一种数据传输的方法和BLE设备,能够在提高传输效率的同时,保证数据传输的安全性。This application provides a data transmission method and a BLE device, which can ensure the security of data transmission while improving transmission efficiency.
第一方面,提供了一种用于BLE的数据传输的方法,该方法包括:第一BLE端采用一次性加密算法对原始数据进行加密处理,获得加密数据;所述第一BLE端通过广播的方式,向至少一个BLE端发送所述加密数据。In a first aspect, a method for BLE data transmission is provided. The method includes: a first BLE end uses a one-time encryption algorithm to encrypt original data to obtain encrypted data; In this way, the encrypted data is sent to at least one BLE end.
因此,本申请实施例的用于BLE的数据传输的方法,BLE端可以采用一次性加密算法,对数据进行加密处理,并通过广播的方式,向其他的BLE端发送加密数据,可以在提高传输效率的同时,保证数据传输的安全性。Therefore, in the method for BLE data transmission in the embodiment of the application, the BLE end can use a one-time encryption algorithm to encrypt data, and send encrypted data to other BLE ends by broadcasting, which can improve transmission At the same time of efficiency, the security of data transmission is ensured.
结合第一方面,在第一方面的一种实现方式中,所述第一BLE端采用一次性加密算法对原始数据进行加密处理,包括:所述第一BLE端基于时间因子,对所述原始数据进行加密处理。With reference to the first aspect, in an implementation manner of the first aspect, the first BLE end uses a one-time encryption algorithm to encrypt the original data, including: the first BLE end performs the encryption processing on the original data based on a time factor The data is encrypted.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述第一BLE端基于时间因子,对所述原始数据进行加密处理,包括:所述第一BLE端根据所述第一BLE端的时间和预设时间间隔,确定密钥;所述第 一BLE端采用所述密钥,对所述原始数据进行加密处理。In combination with the first aspect and the foregoing implementation manners of the first aspect, in another implementation manner of the first aspect, the first BLE end encrypts the original data based on a time factor, including: the first BLE end performs encryption processing on the original data according to The time and the preset time interval of the first BLE end determine a key; the first BLE end uses the key to encrypt the original data.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述第一BLE端根据所述第一BLE端的时间和预设时间间隔,确定密钥,包括;所述第一BLE端根据所述第一BLE端的时间和预设时间间隔,按照种子文件,确定密钥。With reference to the first aspect and the foregoing implementation manners thereof, in another implementation manner of the first aspect, the first BLE terminal determines the key according to the time of the first BLE terminal and a preset time interval, including; The first BLE terminal determines the key according to the time of the first BLE terminal and the preset time interval according to the seed file.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述一次性加密算法为动态口令算法。With reference to the first aspect and the foregoing implementation manners, in another implementation manner of the first aspect, the one-time encryption algorithm is a dynamic password algorithm.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述方法还包括:所述第一BLE端与第二BLE端进行时间同步,所述第二BLE端为所述至少一个BLE端中的一个。With reference to the first aspect and the foregoing implementation manners of the first aspect, in another implementation manner of the first aspect, the method further includes: performing time synchronization between the first BLE end and a second BLE end, and the second BLE end is One of the at least one BLE terminal.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述第一BLE端与所述第二BLE端进行时间同步,包括:所述第一BLE端向所述第二BLE端发送时间同步请求消息,所述时间同步请求消息用于所述第一BLE端请求与所述第二BLE端进行时间同步;所述第一BLE端接收所述第二BLE端根据所述时间同步请求消息发送的时间同步响应消息;所述第一BLE端根据所述时间同步响应消息,与所述第二BLE端进行时间同步。With reference to the first aspect and the foregoing implementation manners, in another implementation manner of the first aspect, the time synchronization between the first BLE end and the second BLE end includes: the first BLE end The second BLE end sends a time synchronization request message, the time synchronization request message is used by the first BLE end to request time synchronization with the second BLE end; the first BLE end receives the second BLE end according to The time synchronization response message sent by the time synchronization request message; the first BLE end performs time synchronization with the second BLE end according to the time synchronization response message.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述时间同步请求消息包括所述第一BLE端的时间;和/或,所述时间同步响应消息包括所述第二BLE端的时间。With reference to the first aspect and the foregoing implementation manners, in another implementation manner of the first aspect, the time synchronization request message includes the time of the first BLE end; and/or, the time synchronization response message includes the The time of the second BLE end.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述第一BLE端与所述至少一个BLE端之间未建立蓝牙连接。With reference to the first aspect and the foregoing implementation manners thereof, in another implementation manner of the first aspect, a Bluetooth connection is not established between the first BLE terminal and the at least one BLE terminal.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,在所述第一BLE端与所述第二BLE端进行时间同步之前,所述方法还包括:所述第一BLE端与所述第二BLE端建立蓝牙连接,所述蓝牙连接用于所述时间同步。With reference to the first aspect and the foregoing implementation manners, in another implementation manner of the first aspect, before the first BLE end and the second BLE end perform time synchronization, the method further includes: A BLE terminal establishes a Bluetooth connection with the second BLE terminal, and the Bluetooth connection is used for the time synchronization.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述第一BLE端与所述第二BLE端建立蓝牙连接,包括:所述第一BLE端接收所述第二BLE端发送的连接请求消息,所述连接请求消息用于所述第二BLE端请求与所述第一BLE端建立连接;所述第一BLE端根据所述连接请求消息,向所述第二BLE端发送连接响应消息。With reference to the first aspect and the foregoing implementation manners, in another implementation manner of the first aspect, the establishment of a Bluetooth connection between the first BLE terminal and the second BLE terminal includes: the first BLE terminal receives the A connection request message sent by the second BLE terminal, where the connection request message is used by the second BLE terminal to request the establishment of a connection with the first BLE terminal; the first BLE terminal sends the connection request message to the The second BLE end sends a connection response message.
第二方面,提供了一种用于BLE端间数据传输的方法,该方法包括:第 二BLE端接收第一BLE端通过广播的方式发送的加密数据;所述第二BLE端根据一次性加密算法,对所述加密数据进行解密处理,获得原始数据。In a second aspect, a method for data transmission between BLE terminals is provided. The method includes: a second BLE terminal receives encrypted data sent by a first BLE terminal by means of broadcasting; Algorithm to decrypt the encrypted data to obtain the original data.
因此,本申请实施例的用于BLE端间数据传输的方法,BLE端采用一次性加密算法,对广播数据进行加密处理,可以在提高传输效率的同时,保证数据传输的安全性。Therefore, in the method for data transmission between BLE terminals in the embodiment of the present application, the BLE terminal adopts a one-time encryption algorithm to encrypt broadcast data, which can improve the transmission efficiency while ensuring the security of data transmission.
结合第二方面,在第二方面的一种实现方式中,所述第二BLE端根据一次性加密算法,对所述加密数据进行解密处理,包括:所述第二BLE端基于时间因子,对所述加密数据进行解密处理。With reference to the second aspect, in an implementation manner of the second aspect, the second BLE terminal decrypts the encrypted data according to a one-time encryption algorithm, including: the second BLE terminal performs a decryption process on the encrypted data based on a time factor The encrypted data is decrypted.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二BLE端基于时间因子,对所述加密数据进行解密处理,包括:所述第二BLE端根据所述第二BLE端的时间和预设时间间隔,确定密钥;所述第二BLE端采用所述密钥,对所述加密数据进行解密处理。In combination with the second aspect and the foregoing implementation manners of the second aspect, in another implementation manner of the second aspect, the second BLE terminal decrypts the encrypted data based on a time factor, including: the second BLE terminal decrypts the encrypted data according to The time of the second BLE end and the preset time interval determine the key; the second BLE end uses the key to decrypt the encrypted data.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二BLE端根据所述第二BLE端的时间和预设时间间隔,确定密钥,包括:所述第二BLE端根据所述第二BLE端的时间和预设时间间隔,按照种子文件,确定密钥。With reference to the second aspect and the foregoing implementation manners of the second aspect, in another implementation manner of the second aspect, the second BLE terminal determines the key according to the time of the second BLE terminal and a preset time interval, including: The second BLE terminal determines the key according to the time of the second BLE terminal and the preset time interval according to the seed file.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述方法还包括:所述第二BLE端接收应用服务器发送的所述种子文件。With reference to the second aspect and the foregoing implementation manners of the second aspect, in another implementation manner of the second aspect, the method further includes: the second BLE end receiving the seed file sent by the application server.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述一次性加密算法为动态口令算法。In combination with the second aspect and the foregoing implementation manners, in another implementation manner of the second aspect, the one-time encryption algorithm is a dynamic password algorithm.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述方法还包括:所述第二BLE端与所述第一BLE端进行时间同步。With reference to the second aspect and the foregoing implementation manners thereof, in another implementation manner of the second aspect, the method further includes: performing time synchronization between the second BLE terminal and the first BLE terminal.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二BLE端与所述第一BLE端进行时间同步,包括:所述第二BLE端接收所述第一BLE端发送的时间同步请求消息,所述时间同步请求消息用于所述第一BLE端请求与所述第二BLE端进行时间同步;所述第二BLE端根据所述时间同步请求消息,向所述第一BLE端发送时间同步响应消息。With reference to the second aspect and the foregoing implementation manners, in another implementation manner of the second aspect, the time synchronization between the second BLE terminal and the first BLE terminal includes: the second BLE terminal receives the A time synchronization request message sent by the first BLE end, where the time synchronization request message is used by the first BLE end to request time synchronization with the second BLE end; the second BLE end according to the time synchronization request message , Sending a time synchronization response message to the first BLE end.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述时间同步请求消息包括所述第一BLE端的时间;和/或,所述时间同步响应消息包括所述第二BLE端的时间。With reference to the second aspect and the foregoing implementation manners thereof, in another implementation manner of the second aspect, the time synchronization request message includes the time of the first BLE end; and/or, the time synchronization response message includes the The time of the second BLE end.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所 述第一BLE端与所述至少一个BLE端之间未建立蓝牙连接。With reference to the second aspect and the foregoing implementation manners thereof, in another implementation manner of the second aspect, a Bluetooth connection is not established between the first BLE terminal and the at least one BLE terminal.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,在所述第二BLE端与所述第一BLE端进行时间同步之前,所述方法还包括:所述第二BLE端与所述第一BLE端建立蓝牙连接,所述蓝牙连接用于所述时间同步。With reference to the second aspect and the foregoing implementation manners thereof, in another implementation manner of the second aspect, before the second BLE end and the first BLE end perform time synchronization, the method further includes: the first BLE end The second BLE terminal establishes a Bluetooth connection with the first BLE terminal, and the Bluetooth connection is used for the time synchronization.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二BLE端与所述第一BLE端建立蓝牙连接,包括:所述第二BLE端向所述第一BLE端发送连接请求消息,所述连接请求消息用于所述第二BLE端请求与所述第一BLE端建立连接;所述第二BLE端接收所述第一BLE端根据所述连接请求消息发送的连接响应消息;所述第二BLE端根据所述连接响应消息,与所述第一BLE端建立蓝牙连接。With reference to the second aspect and the foregoing implementation manners of the second aspect, in another implementation manner of the second aspect, the establishment of a Bluetooth connection between the second BLE end and the first BLE end includes: the second BLE end The first BLE end sends a connection request message, the connection request message is used by the second BLE end to request to establish a connection with the first BLE end; the second BLE end receives the first BLE end according to the connection The connection response message sent by the request message; the second BLE terminal establishes a Bluetooth connection with the first BLE terminal according to the connection response message.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述方法还包括:所述第二BLE端根据所述原始数据,对所述第一BLE端进行身份识别。With reference to the second aspect and the foregoing implementation manners thereof, in another implementation manner of the second aspect, the method further includes: the second BLE terminal performs identity recognition on the first BLE terminal according to the original data .
第三方面,提供了一种BLE设备,用于执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该BLE设备包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的单元。In a third aspect, a BLE device is provided, which is used to execute the foregoing first aspect or any possible implementation of the first aspect. Specifically, the BLE device includes a unit for executing the foregoing first aspect or any possible implementation of the first aspect.
第四方面,提供了一种BLE设备,用于执行上述第二方面或第二方面的任意可能的实现方式中的方法。具体地,该BLE设备包括用于执行上述第二方面或第二方面的任意可能的实现方式中的方法的单元。In a fourth aspect, a BLE device is provided, which is used to execute the foregoing second aspect or any possible implementation method of the second aspect. Specifically, the BLE device includes a unit for executing the foregoing second aspect or any possible implementation of the second aspect.
第五方面,提供了一种BLE设备,包括:存储单元和处理器,该存储单元用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第一方面或第一方面的任意可能的实现方式中的方法。In a fifth aspect, a BLE device is provided, including: a storage unit and a processor, the storage unit is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory The execution causes the processor to execute the method in the first aspect or any possible implementation manner of the first aspect.
第六方面,提供了一种BLE设备,包括:存储单元和处理器,该存储单元用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第二方面或第二方面的任意可能的实现方式中的方法。In a sixth aspect, a BLE device is provided, including: a storage unit and a processor, the storage unit is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory The execution causes the processor to execute the second aspect or the method in any possible implementation manner of the second aspect.
第七方面,提供了一种BLE芯片,用于实现上述第一方面或其各实现方式中的方法。具体地,该BLE芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该BLE芯片的设备执行如上述第一方面或其各实 现方式中的方法。In a seventh aspect, a BLE chip is provided, which is used to implement the above-mentioned first aspect or the methods in each of its implementation manners. Specifically, the BLE chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the BLE chip executes the method in the above-mentioned first aspect or each of its implementation manners.
第八方面,提供了一种BLE芯片,用于实现上述第二方面或其各实现方式中的方法。具体地,该BLE芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该BLE芯片的设备执行如上述第二方面或其各实现方式中的方法。In an eighth aspect, a BLE chip is provided, which is used to implement the method in the second aspect or each of its implementation manners. Specifically, the BLE chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the BLE chip executes the method in the above-mentioned second aspect or each of its implementation manners.
第九方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a ninth aspect, a computer-readable medium is provided for storing a computer program, and the computer program includes instructions for executing the first aspect or any possible implementation of the first aspect.
第十方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。In a tenth aspect, a computer-readable medium is provided for storing a computer program, and the computer program includes instructions for executing the second aspect or any possible implementation of the second aspect.
第十一方面,提供了一种包括指令的计算机程序产品,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该计算机程序产品可以运行于上述第三方面的BLE设备上。In an eleventh aspect, a computer program product including instructions is provided. When the computer runs the instructions of the computer program product, the computer executes the first aspect or any possible implementation of the first aspect. method. Specifically, the computer program product may run on the BLE device of the third aspect.
第十二方面,提供了一种包括指令的计算机程序产品,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述第二方面或第二方面的任意可能的实现方式中的方法。具体地,该计算机程序产品可以运行于上述第四方面的BLE设备上。In a twelfth aspect, a computer program product including instructions is provided. When the computer runs the instructions of the computer program product, the computer executes the second aspect or any possible implementation of the second aspect. method. Specifically, the computer program product can run on the BLE device of the fourth aspect.
附图说明Description of the drawings
图1是根据本申请实施例的用于BLE的数据传输的方法的示意性流程图。Fig. 1 is a schematic flowchart of a method for BLE data transmission according to an embodiment of the present application.
图2是根据本申请实施例的BLE设备间传输数据的应用场景的示意图。Fig. 2 is a schematic diagram of an application scenario of data transmission between BLE devices according to an embodiment of the present application.
图3是根据本申请实施例的采用动态口令进行加密和解密的工作原理的示意图。Fig. 3 is a schematic diagram of the working principle of encryption and decryption using a dynamic password according to an embodiment of the present application.
图4是根据本申请实施例的两个BLE设备间时间同步的方法的示意性流程图。Fig. 4 is a schematic flowchart of a method for time synchronization between two BLE devices according to an embodiment of the present application.
图5是根据本申请实施例的一种BLE设备的示意性框图。Fig. 5 is a schematic block diagram of a BLE device according to an embodiment of the present application.
图6是根据本申请实施例的一种BLE设备的另一示意性框图。Fig. 6 is another schematic block diagram of a BLE device according to an embodiment of the present application.
图7是根据本申请实施例的一种BLE芯片的示意性框图。Fig. 7 is a schematic block diagram of a BLE chip according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
图1示出了根据本申请实施例的用于BLE的数据传输的方法100的示意性流程图。如图1所示,该方法100包括:S110,对原始数据进行加密处理,即第一BLE端采用一次性加密算法对原始数据进行加密处理,获得加密数据;S120,发送加密数据,即该第一BLE端通过广播的方式,发送该加密数据,对应的,可以有至少一个BLE端接收到该加密数据;S130,对加密数据进行解密处理,例如,以第二BLE端为例,该第二BLE端可以为接收到加密数据的至少一个BLE端中的任意一个BLE端,该第二BLE端根据一次性加密算法,对该加密数据进行解密处理,获得原始数据。Fig. 1 shows a schematic flowchart of a method 100 for BLE data transmission according to an embodiment of the present application. As shown in FIG. 1, the method 100 includes: S110, encrypting the original data, that is, the first BLE end uses a one-time encryption algorithm to encrypt the original data to obtain encrypted data; S120, sending the encrypted data, that is, the first BLE end A BLE end sends the encrypted data by broadcasting. Correspondingly, at least one BLE end may receive the encrypted data; S130, decrypt the encrypted data. For example, taking the second BLE end as an example, the second The BLE end may be any one of the at least one BLE end that receives the encrypted data, and the second BLE end decrypts the encrypted data according to a one-time encryption algorithm to obtain the original data.
应理解,本申请实施例中的第一BLE端可以指任意一个BLE设备或者任意一个芯片,该芯片可以应用于BLE设备,该第一BLE端为加密端,即用于对数据进行加密处理,并且可以存在一个或者多个第一BLE端,为了便于说明,下面以第一BLE端为BLE设备为例进行描述;本申请实施例中的第二BLE端也可以指任意一个BLE设备或者任意一个芯片,该芯片可以应用于BLE设备,该第二BLE端为解密端,即第二BLE端为加密数据的接收端,该第二BLE端接收第一BLE端广播发送的加密数据,并且也可以存在一个或者多个第二BLE端,为了便于说明,下面以第二BLE端为BLE设备为例进行描述,但本申请实施例并不限于此。It should be understood that the first BLE terminal in the embodiments of the present application may refer to any BLE device or any chip, and the chip may be applied to a BLE device. The first BLE terminal is an encryption terminal, that is, it is used to encrypt data. And there may be one or more first BLE terminals. For ease of description, the following description takes the first BLE terminal as a BLE device as an example; the second BLE terminal in the embodiment of the present application may also refer to any BLE device or any one Chip, the chip can be applied to BLE devices, the second BLE end is the decryption end, that is, the second BLE end is the receiving end of encrypted data, the second BLE end receives the encrypted data broadcasted by the first BLE end, and can also There are one or more second BLE terminals. For ease of description, the following description takes the second BLE terminal as a BLE device as an example, but the embodiment of the present application is not limited to this.
应理解,本申请实施例中的原始数据可以指任意数据,例如,该原始数据可以指用于第一BLE设备与第二BLE设备之间进行数据通信的任意数据;再例如,该原始数据也可以指用于进行身份ID识别的相关数据,本申请实施例并不限于此。It should be understood that the original data in the embodiments of the present application may refer to any data. For example, the original data may refer to any data used for data communication between the first BLE device and the second BLE device; for another example, the original data may also be It may refer to related data used for identification ID identification, and the embodiment of the present application is not limited to this.
图2示出了BLE设备间传输数据的一种应用场景的示意图,如图2所示,通常在BLE无线数据分发传输中存在两种角色,这里分别称为从(slave)设备和主(master)设备。其中,从设备一般指slave外围设备,而主设备一般指master中心设备。例如,如图2所示,slave设备可以用于发送数据,例如可以用于发送广播包(advertising packets),即采用广播的方式发送数据,例如,本申请实施例中的第一BLE设备可以为slave设备,如智能手环等穿戴设备;而master设备可以用于扫描slave设备广播发送的数据,即扫描 advertising packets,或者说接收advertising packets,另外,master设备还可以用于发起连接请求(connection request),例如,本申请实施例中的第二BLE设备可以为master设备,常见的master设备包括手机等长供电设备,但本申请实施例并不限于此。Figure 2 shows a schematic diagram of an application scenario of data transmission between BLE devices. As shown in Figure 2, there are usually two roles in BLE wireless data distribution and transmission, which are called slave devices and master devices. )equipment. Among them, the slave device generally refers to the slave peripheral device, and the master device generally refers to the master central device. For example, as shown in Figure 2, the slave device can be used to send data, for example, it can be used to send advertising packets, that is, send data in a broadcast manner. For example, the first BLE device in this embodiment of the application can be Slave devices, such as smart bracelets and other wearable devices; and the master device can be used to scan data broadcast by the slave device, that is, scan advertising packets, or receive advertising packets. In addition, the master device can also be used to initiate connection requests (connection request). ), for example, the second BLE device in the embodiment of the present application may be a master device. Common master devices include long power supply devices such as mobile phones, but the embodiments of the present application are not limited to this.
应理解,本申请实施例的方法100可以应用于第一BLE设备通过广播的方式向一个或者多个BLE设备发送数据的场景中。具体地,目前BLE设备间的数据传输或者数据加密过程,都是在建立连接之后,例如任意两个BLE设备在建立蓝牙连接之后,才可以进行数据传输;但是,采取广播的方式传输数据,可以在没有建立蓝牙连接的情况下,由一个BLE设备向一个或者多个其他的BLE设备发送数据,例如,本申请实施例中的第一BLE设备也可以与接收端的该至少一个BLE设备之间未建立蓝牙连接,直接通过广播的方式传输数据,这种广播传输的方式能够大大的提高数据传输的效率。It should be understood that the method 100 of the embodiment of the present application may be applied to a scenario where the first BLE device sends data to one or more BLE devices in a broadcast manner. Specifically, the current data transmission or data encryption process between BLE devices is done after the connection is established. For example, any two BLE devices can only transmit data after establishing a Bluetooth connection; however, the data can be transmitted by broadcasting. In the case that a Bluetooth connection is not established, a BLE device sends data to one or more other BLE devices. For example, the first BLE device in the embodiment of the present application may also communicate with the at least one BLE device on the receiving end. Establish a Bluetooth connection and transmit data directly through broadcast. This broadcast transmission method can greatly improve the efficiency of data transmission.
另外,对于需要多设备进行通信和识别的场景下,例如,可能存在某个BLE设备需要向多个BLE设备发送数据的场景,目前的传输方式均为一对一,即需要发送端BLE设备依次向每个接收端BLE设备发送数据;但是如果采用广播的方式,那么无论这些设备之间是否已建立连接,都可以由发送端BLE设备通过广播的方式,直接向多个BLE设备发送数据,例如,本申请实施例中的第一BLE设备也可以通过广播的方式,向多个BLE设备发送数据,从而提高数据传输的效率。In addition, for scenarios that require multiple devices to communicate and identify, for example, there may be a scenario where a certain BLE device needs to send data to multiple BLE devices. The current transmission method is one-to-one, that is, the sending end BLE device needs to be sent sequentially. Send data to each receiving end BLE device; but if broadcast is used, regardless of whether a connection has been established between these devices, the sending end BLE device can directly send data to multiple BLE devices through broadcast, for example In the embodiment of the present application, the first BLE device may also send data to multiple BLE devices in a broadcast manner, thereby improving the efficiency of data transmission.
考虑到广播传输的方式的安全性,本申请实施例的方法100在采用广播的方式传输数据的同时,还采用一次性加密算法对广播数据进行加密。这样,相对于采用静态密码进行加密的方式,本申请实施例中一次性算法中使用的一次性密码(One Time Password,OTP)最重要的优点是不容易受到重放攻击,即使攻击者通过抓包仪进行空口数据抓包,也不会暴力破解出密钥(KEY)。Considering the security of the broadcast transmission method, the method 100 of the embodiment of the present application uses a one-time encryption algorithm to encrypt the broadcast data while transmitting data in a broadcast manner. In this way, the one-time password (One Time Password, OTP) used in the one-time algorithm in the embodiments of this application has the most important advantage of being less susceptible to replay attacks, even if the attacker uses the static password for encryption. The packet meter captures data through the air interface, and will not brute force the key (KEY).
因此,本申请实施例的用于BLE端之间数据传输的方法,采用可以在微控制单元(Microcontroller Unit,MCU)平台高效运行的一次性加密算法,对数据进行加密处理,再通过广播的方式发送加密数据,该方法可以适用于通用BLE芯片,并可以在提高传输效率的同时,保证数据传输的安全性。Therefore, the method for data transmission between BLE terminals in this embodiment of the application adopts a one-time encryption algorithm that can be efficiently run on the Microcontroller Unit (MCU) platform, encrypts the data, and then broadcasts it. To send encrypted data, this method can be applied to general-purpose BLE chips, and can ensure the security of data transmission while improving transmission efficiency.
下面将结合具体实施例,对本申请实施例的方法100进行详细描述。The method 100 of the embodiment of the present application will be described in detail below in conjunction with specific embodiments.
在S110中,第一BLE设备采用一次性加密算法对原始数据进行加密处 理,以获得加密数据。具体地,第一BLE设备采用一次性加密算法对原始数据进行加密处理,也就是采用OTP对原始数据进行加密。该OTP也叫密电本,是一种应用于军事领域的谍报技术,即对通信信息使用预先约定的一次性密电本进行加密和解密,使用后的密电本部分丢弃不再使用,能够做到一次一密。In S110, the first BLE device uses a one-time encryption algorithm to encrypt the original data to obtain encrypted data. Specifically, the first BLE device uses a one-time encryption algorithm to encrypt the original data, that is, uses OTP to encrypt the original data. The OTP is also called a secret notebook, which is a kind of espionage technology applied in the military field. It uses a pre-appointed one-time secret notebook to encrypt and decrypt communication information. The used secret notebook is discarded and no longer used. It can be done once. One secret.
在本申请实施例中,该S110可以具体包括:该第一BLE设备基于时间因子,对该原始数据进行加密处理。例如,第一BLE设备可以使用动态口令算法对需要广播的原始数据进行加密处理,其中,动态口令算法是OTP中的一类。另外,本申请实施例的方法100中可以采用基于时间因子的动态口令算法进行加密处理。In the embodiment of the present application, the S110 may specifically include: the first BLE device encrypts the original data based on a time factor. For example, the first BLE device may use a dynamic password algorithm to encrypt the original data that needs to be broadcast, where the dynamic password algorithm is a type of OTP. In addition, in the method 100 of the embodiment of the present application, a dynamic password algorithm based on a time factor may be used for encryption processing.
具体地,第一BLE设备基于时间因子,对该原始数据进行加密处理,可以具体包括:该第一BLE设备根据该第一BLE设备的时间和预设时间间隔,确定密钥;该第一BLE设备采用该密钥,对该原始数据进行加密处理。其中,该预设时间间隔可以表示动态口令的更新时长,或者也可以称为时间步长;并且,该预设时间间隔可以根据实际应用进行设置,并且可以设置为任意值,例如,可以设置为30s,60s或者其他数值,但本申请实施例并不限于此。Specifically, the first BLE device encrypts the original data based on the time factor, which may specifically include: the first BLE device determines the key according to the time of the first BLE device and a preset time interval; the first BLE The device uses the key to encrypt the original data. Among them, the preset time interval may indicate the update duration of the dynamic password, or may also be called the time step; and, the preset time interval can be set according to actual applications, and can be set to any value, for example, it can be set to 30s, 60s or other values, but the embodiment of the present application is not limited thereto.
应理解,本申请实施例中的加密过程和解密过程相对应,流程相同。图3示出了采用动态口令进行加密和解密的工作原理的示意图,如图3所示,加密和解密的流程是一样的,都基于时间作为因子,使用非函数式的伪随机数算法,简单、快速、高效,并且能够在通用BLE芯片中运行。It should be understood that the encryption process and the decryption process in the embodiment of the present application correspond to each other, and the process is the same. Figure 3 shows a schematic diagram of the working principle of encryption and decryption using dynamic passwords. As shown in Figure 3, the processes of encryption and decryption are the same. Both are based on time as a factor and use a non-functional pseudo-random number algorithm, which is simple , Fast, efficient, and can run in general BLE chips.
在本申请实施例中,第一BLE设备可以根据该第一BLE设备的时间和预设时间间隔,按照种子文件,确定密钥,并采用该密钥加密数据。具体地,加密端(例如本申请实施例中的第一BLE设备)和解密端(例如本申请实施例中的至少一个第二BLE设备)都存储了一份种子文件,即图3中钥匙所代表的种子(seed)。例如,第一BLE设备和/或者第二BLE设备中的种子文件可以存储在BLE芯片中;或者,第一BLE设备和/或者第二BLE设备中的种子文件也可以通过应用服务器获取;或者,第一BLE设备与第二BLE设备之间还可以相互传输该种子文件,例如,可以通过蓝牙连接或者其他连接方式传输该种子文件。例如,若第一BLE设备与第二BLE设备之间建立过蓝牙连接,则可以相互传输该种子文件并保存该种子文件,以便于在之后二者之间存在或者不存在蓝牙连接的情况下,都可以保证能够使用该种子文件。 再例如,该方法100还可以包括:该第二BLE设备接收应用服务器发送的该种子文件。具体地,如图2所示,本申请实施例中的第二BLE设备可以与应用服务器连接,或者说与网络侧连接,以获取相关信息,例如,可以通过应用服务器获取种子文件。In the embodiment of the present application, the first BLE device may determine the key according to the seed file according to the time of the first BLE device and the preset time interval, and use the key to encrypt data. Specifically, the encryption terminal (for example, the first BLE device in the embodiment of this application) and the decryption terminal (for example, at least one second BLE device in the embodiment of this application) both store a seed file, that is, the key store in FIG. 3 The seed of the representative. For example, the seed file in the first BLE device and/or the second BLE device can be stored in the BLE chip; or, the seed file in the first BLE device and/or the second BLE device can also be obtained through the application server; or, The first BLE device and the second BLE device may also transmit the seed file to each other. For example, the seed file may be transmitted through a Bluetooth connection or other connection methods. For example, if a Bluetooth connection has been established between the first BLE device and the second BLE device, the seed file can be transferred to each other and the seed file can be saved, so that when there is or no Bluetooth connection between the two, Can guarantee to be able to use the seed file. For another example, the method 100 may further include: the second BLE device receiving the seed file sent by the application server. Specifically, as shown in FIG. 2, the second BLE device in the embodiment of the present application may be connected to the application server, or connected to the network side, to obtain related information, for example, the seed file may be obtained through the application server.
考虑到本申请实施例中的加密过程和解密过程一致,下面先以第一BLE设备基于时间因子,对该原始数据进行加密处理为例进行描述。具体地,如图3所示,该第一BLE设备可以根据该第一BLE设备的时间(即图3中左边的“时钟”表示该第一BLE设备的时间)和预设时间间隔,按照种子文件,确定密钥;该第一BLE设备采用该密钥,对该原始数据(即图3中的“广播数据”,表示待广播的原始数据)进行加密处理,即图3中的“密码运算”过程,以生成加密数据。Considering that the encryption process and the decryption process in the embodiment of the present application are consistent, the following describes the first BLE device to encrypt the original data based on the time factor as an example. Specifically, as shown in FIG. 3, the first BLE device can be based on the time of the first BLE device (that is, the "clock" on the left in FIG. 3 represents the time of the first BLE device) and a preset time interval, according to the seed File, determine the key; the first BLE device uses the key to encrypt the original data (that is, the "broadcast data" in Figure 3, which means the original data to be broadcast), that is, the "cryptographic operation" in Figure 3 "Process to generate encrypted data.
之后,在S120中,该第一BLE设备通过广播的方式,发送S110中生成的加密数据,例如,如图3所示生成的加密数据;对应的,可以有至少一个BLE设备接收到该加密数据。以第二BLE设备为例,该第二BLE设备可以为接收到加密数据的至少一个BLE设备中的任意一个BLE设备,在S130中,该第二BLE设备根据一次性加密算法,对S120中接收到的加密数据进行解密处理,以获得原始数据。也就是说,对于解密端的第二BLE设备在收到加密数据后,会进行与加密运算相应的“解密运算”,以获得原始数据,即获得图3中的“广播的数据”。After that, in S120, the first BLE device sends the encrypted data generated in S110 by broadcasting, for example, the encrypted data generated as shown in FIG. 3; correspondingly, at least one BLE device may receive the encrypted data . Taking the second BLE device as an example, the second BLE device may be any one of the at least one BLE device that has received encrypted data. In S130, the second BLE device receives the encrypted data in S120 according to the one-time encryption algorithm. The encrypted data is decrypted to obtain the original data. That is to say, after receiving the encrypted data, the second BLE device on the decryption side will perform a "decryption operation" corresponding to the encryption operation to obtain the original data, that is, to obtain the "broadcast data" in FIG. 3.
可选地,考虑本申请实施例中的方法100中的第一BLE设备可以采用基于时间因子的动态口令算法进行加密处理,此时对第一BLE设备与第二BLE设备之间的时间同步有一定要求。例如,第一BLE设备和/或第二BLE设备需要有精准的实时时钟计时器;再例如,第一BLE设备和/或第二BLE设备也可以连接网络获取到时间;再例如,第一BLE设备和第二BLE设备可以进行连接,从而进行时间同步,本申请实施例并不限于此。可选地,作为一个实施例,本申请实施例的方法100还可以包括:该第一BLE设备与第二BLE设备进行时间同步,其中,该第二BLE设备为接收到第一BLE设备广播的加密数据的至少一个BLE设备中的任意一个。具体地,图4示出了本申请实施例的用于该第一BLE设备与第二BLE设备进行时间同步的过程200的示意图。如图4所示,该过程200可以包括:该第一BLE设备与该第二BLE设备进行时间同步,并具体可以包括:S210,发送时间同步请求消息, 即该第一BLE设备向该第二BLE设备发送时间同步请求消息,该时间同步请求消息用于该第一BLE设备请求与该第二BLE设备进行时间同步;S220,发送时间同步响应消息,即第二BLE设备根据接收到的时间同步请求消息,向第一BLE设备发送时间同步响应消息,以便于该第一BLE设备接收该第二BLE设备发送的时间同步响应消息,并根据该时间响应消息,与该第二BLE设备进行时间同步。Optionally, consider that the first BLE device in the method 100 in the embodiment of the present application may use a dynamic password algorithm based on a time factor for encryption processing. At this time, the time synchronization between the first BLE device and the second BLE device is effective. Must be required. For example, the first BLE device and/or the second BLE device need to have an accurate real-time clock timer; for another example, the first BLE device and/or the second BLE device can also connect to the network to obtain the time; for another example, the first BLE device The device and the second BLE device can be connected to perform time synchronization, and the embodiment of the present application is not limited to this. Optionally, as an embodiment, the method 100 of the embodiment of the present application may further include: the first BLE device performs time synchronization with a second BLE device, where the second BLE device is a device that receives a broadcast from the first BLE device. Any one of at least one BLE device that encrypts data. Specifically, FIG. 4 shows a schematic diagram of a process 200 for performing time synchronization between the first BLE device and the second BLE device according to an embodiment of the present application. As shown in FIG. 4, the process 200 may include: the first BLE device performs time synchronization with the second BLE device, and may specifically include: S210, sending a time synchronization request message, that is, the first BLE device sends a time synchronization request message to the second BLE device. The BLE device sends a time synchronization request message, which is used by the first BLE device to request time synchronization with the second BLE device; S220, send a time synchronization response message, that is, the second BLE device synchronizes according to the received time Request message, sending a time synchronization response message to the first BLE device, so that the first BLE device can receive the time synchronization response message sent by the second BLE device, and perform time synchronization with the second BLE device according to the time response message .
可选地,该时间同步请求消息包括该第一BLE设备的时间,这样可以使得第二BLE设备获知第二BLE设备的时间;和/或,该时间响应消息包括该第二BLE设备的时间,这样可以使得第一BLE设备获知第二BLE设备的时间。第一BLE设备可以根据自身的时间以及第二BLE设备的时间,进行时间同步,同样的,第二BLE设备也可以根据自身的时间以及第一BLE设备的时间,进行时间同步,无论哪种方式,都可以达到第一BLE设备与第二BLE设备之间时间同步的目的,但本申请实施例并不限于此。Optionally, the time synchronization request message includes the time of the first BLE device, so that the second BLE device can learn the time of the second BLE device; and/or, the time response message includes the time of the second BLE device, In this way, the first BLE device can learn the time of the second BLE device. The first BLE device can perform time synchronization based on its own time and the time of the second BLE device. Similarly, the second BLE device can also perform time synchronization based on its own time and the time of the first BLE device, either way , Both can achieve the purpose of time synchronization between the first BLE device and the second BLE device, but the embodiment of the present application is not limited to this.
可选地,如图4所示,在该过程200中的该第一BLE设备与该第二BLE设备进行时间同步之前,该过程200还包括:该第一BLE设备与该第二BLE设备建立蓝牙连接,该蓝牙连接用于该时间同步。具体地,该第一BLE设备与该第二BLE设备建立蓝牙连接,可以包括:S230,发送连接请求消息,即该第二BLE设备向第一BLE设备发送连接请求消息,该连接请求消息用于该第二BLE设备请求与该第一BLE设备建立连接,对应的,第一BLE设备接收该第二BLE设备发送的连接请求消息;S240,发送连接响应消息,即该第一BLE设备根据接收到的该连接请求消息,向该第二BLE设备发送连接响应消息,以便于第一BLE设备与第二BLE设备建立连接。其中,在S230和S240中,是以第二BLE设备发送连接请求消息,第一BLE设备发送连接响应消息为例进行说明的;相反的,还可以由第一BLE设备发送连接请求消息,第二BLE设备发送连接响应消息,同样可以建立第一BLE设备和第二BLE设备之间的蓝牙连接,为了简洁,在此不再赘述。Optionally, as shown in FIG. 4, before the first BLE device and the second BLE device perform time synchronization in the process 200, the process 200 further includes: the first BLE device establishes with the second BLE device Bluetooth connection, which is used for time synchronization. Specifically, establishing a Bluetooth connection between the first BLE device and the second BLE device may include: S230, sending a connection request message, that is, the second BLE device sends a connection request message to the first BLE device, and the connection request message is used for The second BLE device requests to establish a connection with the first BLE device, and correspondingly, the first BLE device receives the connection request message sent by the second BLE device; S240, sends a connection response message, that is, the first BLE device receives The connection request message is sent to the second BLE device, so that the first BLE device can establish a connection with the second BLE device. Among them, in S230 and S240, the second BLE device sends a connection request message and the first BLE device sends a connection response message as an example; on the contrary, the first BLE device can also send a connection request message, and the second BLE device sends a connection request message. The BLE device sends a connection response message, and can also establish a Bluetooth connection between the first BLE device and the second BLE device. For the sake of brevity, details are not repeated here.
可选地,不同于上述第一BLE设备与第二BLE设备建立连接之后再进行时间同步,在第一BLE设备与第二BLE设备之间未建立连接的情况下,也可以进行时间同步,例如,可以通过广播的方式进行时间同步,或者也可以通过其他方式进行时间同步,本申请实施例并不限于此。Optionally, different from the time synchronization after the first BLE device and the second BLE device are connected, the time synchronization can also be performed when the connection between the first BLE device and the second BLE device is not established, for example The time synchronization may be performed in a broadcast manner, or time synchronization may also be performed in other manners, and the embodiment of the present application is not limited to this.
这样,在第一BLE设备与第二BLE设备之间时间保持同步的情况下, 采用基于时间因子的动态口令算法对广播的数据进行加密处理,能够保证加密过程更加准确。In this way, under the condition that the time between the first BLE device and the second BLE device is synchronized, the dynamic password algorithm based on the time factor is used to encrypt the broadcast data, which can ensure that the encryption process is more accurate.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application. The implementation process constitutes any limitation.
上文中结合图1至图4,详细描述了根据本申请实施例的用于BLE的数据传输的方法,下面将结合图5至图7,描述根据本申请实施例的BLE设备。The method for BLE data transmission according to the embodiments of the present application is described in detail above in conjunction with FIGS. 1 to 4, and the BLE device according to the embodiments of the present application will be described below in conjunction with FIGS.
如图5所示,根据本申请实施例的BLE设备300可以包括:处理单元310和收发单元320。可选地,该BLE设备300可以为本申请实施例中的第一BLE设备,具体地,所述处理单元310用于:采用一次性加密算法对原始数据进行加密处理,获得加密数据;收发单元320用于:通过广播的方式,向至少一个BLE设备发送所述加密数据。As shown in FIG. 5, the BLE device 300 according to the embodiment of the present application may include: a processing unit 310 and a transceiving unit 320. Optionally, the BLE device 300 may be the first BLE device in the embodiment of the application. Specifically, the processing unit 310 is configured to: use a one-time encryption algorithm to encrypt the original data to obtain encrypted data; 320 is used to: send the encrypted data to at least one BLE device in a broadcast manner.
可选地,作为一个实施例,所述处理单元310用于:基于时间因子,对所述原始数据进行加密处理。Optionally, as an embodiment, the processing unit 310 is configured to perform encryption processing on the original data based on a time factor.
可选地,作为一个实施例,所述处理单元310用于:根据所述第一BLE设备的时间和预设时间间隔,按照种子文件,确定密钥;采用所述密钥,对所述原始数据进行加密处理。Optionally, as an embodiment, the processing unit 310 is configured to: determine a key according to the seed file according to the time of the first BLE device and a preset time interval; use the key to compare the original The data is encrypted.
可选地,作为一个实施例,所述一次性加密算法为动态口令算法。Optionally, as an embodiment, the one-time encryption algorithm is a dynamic password algorithm.
可选地,作为一个实施例,所述处理单元310还用于:与第二BLE设备进行时间同步,所述第二BLE设备为所述至少一个BLE设备中的一个。Optionally, as an embodiment, the processing unit 310 is further configured to: perform time synchronization with a second BLE device, and the second BLE device is one of the at least one BLE device.
可选地,作为一个实施例,所述收发单元320还用于:向所述第二BLE设备发送时间同步请求消息,所述时间同步请求消息用于请求与所述第二BLE设备进行时间同步;接收所述第二BLE设备根据所述时间同步请求消息发送的时间同步响应消息;所述处理单元310用于:根据所述时间同步响应消息,与所述第二BLE设备进行时间同步。Optionally, as an embodiment, the transceiving unit 320 is further configured to: send a time synchronization request message to the second BLE device, where the time synchronization request message is used to request time synchronization with the second BLE device Receiving the time synchronization response message sent by the second BLE device according to the time synchronization request message; the processing unit 310 is configured to: perform time synchronization with the second BLE device according to the time synchronization response message.
可选地,作为一个实施例,所述时间同步请求消息包括所述第一BLE设备的时间;和/或,所述时间同步响应消息包括所述第二BLE设备的时间。Optionally, as an embodiment, the time synchronization request message includes the time of the first BLE device; and/or, the time synchronization response message includes the time of the second BLE device.
可选地,作为一个实施例,所述第一BLE设备与所述至少一个BLE设备之间未建立蓝牙连接。Optionally, as an embodiment, a Bluetooth connection is not established between the first BLE device and the at least one BLE device.
可选地,作为一个实施例,所述处理单元310还用于:在与所述第二BLE设备进行时间同步之前,与所述第二BLE设备建立蓝牙连接,所述蓝牙连接 用于所述时间同步。Optionally, as an embodiment, the processing unit 310 is further configured to: before performing time synchronization with the second BLE device, establish a Bluetooth connection with the second BLE device, and the Bluetooth connection is used for the Time synchronization.
可选地,作为一个实施例,所述收发单元320还用于:接收所述第二BLE设备发送的连接请求消息,所述连接请求消息用于所述第二BLE设备请求与所述第一BLE设备建立连接;根据所述连接请求消息,向所述第二BLE设备发送连接响应消息。Optionally, as an embodiment, the transceiving unit 320 is further configured to: receive a connection request message sent by the second BLE device, where the connection request message is used by the second BLE device to request communication with the first BLE device. The BLE device establishes a connection; according to the connection request message, a connection response message is sent to the second BLE device.
应理解,上述的本申请实施例的BLE设备300中的各个单元的上述和其它操作和/或功能分别为了实现图1至图4中的各个方法中第一BLE设备的相应流程,为了简洁,在此不再赘述。It should be understood that the above-mentioned and other operations and/or functions of the units in the BLE device 300 of the embodiment of the present application described above are to implement the corresponding processes of the first BLE device in the respective methods in FIGS. 1 to 4, and for simplicity, I won't repeat them here.
可选地,该BLE设备300还可以为本申请实施例中的第二BLE设备,具体地,所述收发单元320用于:接收第一BLE设备通过广播的方式发送的加密数据;所述处理单元310用于:根据一次性加密算法,对所述加密数据进行解密处理,获得原始数据。Optionally, the BLE device 300 may also be the second BLE device in the embodiment of the application. Specifically, the transceiving unit 320 is configured to: receive encrypted data sent by the first BLE device in a broadcast manner; the processing The unit 310 is configured to: perform decryption processing on the encrypted data according to a one-time encryption algorithm to obtain original data.
可选地,作为一个实施例,所述处理单元310用于:基于时间因子,对所述加密数据进行解密处理。Optionally, as an embodiment, the processing unit 310 is configured to perform decryption processing on the encrypted data based on a time factor.
可选地,作为一个实施例,所述处理单元310用于:根据所述第二BLE设备的时间和预设时间间隔,按照种子文件,确定密钥;采用所述密钥,对所述加密数据进行解密处理。Optionally, as an embodiment, the processing unit 310 is configured to: determine a key according to the seed file according to the time of the second BLE device and a preset time interval; use the key to encrypt the The data is decrypted.
可选地,作为一个实施例,所述收发单元320还用于:接收应用服务器发送的所述种子文件。Optionally, as an embodiment, the transceiving unit 320 is further configured to: receive the seed file sent by the application server.
可选地,作为一个实施例,所述一次性加密算法为动态口令算法。Optionally, as an embodiment, the one-time encryption algorithm is a dynamic password algorithm.
可选地,作为一个实施例,所述处理单元310还用于:与所述第一BLE设备进行时间同步。Optionally, as an embodiment, the processing unit 310 is further configured to: perform time synchronization with the first BLE device.
可选地,作为一个实施例,所述收发单元320还用于:接收所述第一BLE设备发送的时间同步请求消息,所述时间同步请求消息用于所述第一BLE设备请求与所述第二BLE设备进行时间同步;根据所述时间同步请求消息,向所述第一BLE设备发送时间同步响应消息。Optionally, as an embodiment, the transceiving unit 320 is further configured to: receive a time synchronization request message sent by the first BLE device, where the time synchronization request message is used by the first BLE device to request communication with the The second BLE device performs time synchronization; according to the time synchronization request message, a time synchronization response message is sent to the first BLE device.
可选地,作为一个实施例,所述时间同步请求消息包括所述第一BLE设备的时间;和/或,所述时间同步响应消息包括所述第二BLE设备的时间。Optionally, as an embodiment, the time synchronization request message includes the time of the first BLE device; and/or, the time synchronization response message includes the time of the second BLE device.
可选地,作为一个实施例,所述第一BLE设备与所述至少一个BLE设备之间未建立蓝牙连接。Optionally, as an embodiment, a Bluetooth connection is not established between the first BLE device and the at least one BLE device.
可选地,作为一个实施例,所述处理单元310还用于:在与所述第一BLE 设备进行时间同步之前,与所述第一BLE设备建立蓝牙连接,所述蓝牙连接用于所述时间同步。Optionally, as an embodiment, the processing unit 310 is further configured to: before performing time synchronization with the first BLE device, establish a Bluetooth connection with the first BLE device, and the Bluetooth connection is used for the Time synchronization.
可选地,作为一个实施例,所述收发单元320还用于:向所述第一BLE设备发送连接请求消息,所述连接请求消息用于请求与所述第一BLE设备建立连接;接收所述第一BLE设备根据所述连接请求消息发送的连接响应消息;所述处理单元310用于:根据所述连接响应消息,与所述第一BLE设备建立蓝牙连接。Optionally, as an embodiment, the transceiving unit 320 is further configured to: send a connection request message to the first BLE device, where the connection request message is used to request to establish a connection with the first BLE device; The first BLE device sends a connection response message according to the connection request message; the processing unit 310 is configured to establish a Bluetooth connection with the first BLE device according to the connection response message.
可选地,作为一个实施例,所述处理单元310还用于:根据所述原始数据,对所述第一BLE设备进行身份识别。Optionally, as an embodiment, the processing unit 310 is further configured to: perform identity recognition on the first BLE device according to the original data.
应理解,上述的本申请实施例的BLE设备300中的各个单元的上述和其它操作和/或功能分别为了实现图1至图4中的各个方法中第二BLE设备的相应流程,为了简洁,在此不再赘述。It should be understood that the foregoing and other operations and/or functions of the units in the BLE device 300 of the embodiment of the present application described above are to implement the corresponding procedures of the second BLE device in the respective methods in FIGS. 1 to 4, and for simplicity, I won't repeat them here.
因此,本申请实施例的BLE设备,采用可以在MCU平台高效运行的一次性加密算法,对数据进行加密处理,并通过广播的方式发送,该方法可以适用于通用BLE芯片,并可以在提高传输效率的同时,保证数据传输的安全性。Therefore, the BLE device of the embodiment of the present application adopts a one-time encryption algorithm that can run efficiently on the MCU platform, encrypts the data, and sends it by broadcast. This method can be applied to general BLE chips and can improve transmission At the same time of efficiency, the security of data transmission is ensured.
图6是本申请实施例提供的一种BLE设备400示意性结构图。图6所示的BLE设备400包括处理器410,处理器410可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 6 is a schematic structural diagram of a BLE device 400 provided by an embodiment of the present application. The BLE device 400 shown in FIG. 6 includes a processor 410, and the processor 410 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
可选地,如图6所示,BLE设备400还可以包括存储器420。其中,处理器410可以从存储器420中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 6, the BLE device 400 may further include a memory 420. The processor 410 may call and run a computer program from the memory 420 to implement the method in the embodiment of the present application.
其中,存储器420可以是独立于处理器410的一个单独的器件,也可以集成在处理器410中。The memory 420 may be a separate device independent of the processor 410, or may be integrated in the processor 410.
可选地,如图6所示,BLE设备400还可以包括收发器430,处理器410可以控制该收发器430与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。Optionally, as shown in FIG. 6, the BLE device 400 may further include a transceiver 430, and the processor 410 may control the transceiver 430 to communicate with other devices. Specifically, it may send information or data to other devices, or receive other devices. Information or data sent by the device.
其中,收发器430可以包括发射机和接收机。收发器430还可以进一步包括天线,天线的数量可以为一个或多个。Wherein, the transceiver 430 may include a transmitter and a receiver. The transceiver 430 may further include an antenna, and the number of antennas may be one or more.
可选地,该BLE设备400具体可为本申请实施例的第一BLE设备,并且该BLE设备400可以实现本申请实施例的各个方法中由第一设备实现的相 应流程,为了简洁,在此不再赘述。Optionally, the BLE device 400 may specifically be the first BLE device of the embodiment of the present application, and the BLE device 400 may implement the corresponding process implemented by the first device in each method of the embodiment of the present application. For the sake of brevity, here No longer.
可选地,该BLE设备400具体可为本申请实施例的第二BLE设备,并且该BLE设备400可以实现本申请实施例的各个方法中由第二BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the BLE device 400 may specifically be the second BLE device of the embodiment of the present application, and the BLE device 400 may implement the corresponding procedures implemented by the second BLE device in the various methods of the embodiments of the present application. For the sake of brevity, This will not be repeated here.
图7是本申请实施例的BLE芯片的示意性结构图。图7所示的BLE芯片500包括处理器510,处理器510可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。Fig. 7 is a schematic structural diagram of a BLE chip according to an embodiment of the present application. The BLE chip 500 shown in FIG. 7 includes a processor 510, and the processor 510 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
可选地,如图7所示,BLE芯片500还可以包括存储器520。其中,处理器510可以从存储器520中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 7, the BLE chip 500 may further include a memory 520. The processor 510 may call and run a computer program from the memory 520 to implement the method in the embodiment of the present application.
其中,存储器520可以是独立于处理器510的一个单独的器件,也可以集成在处理器510中。The memory 520 may be a separate device independent of the processor 510, or may be integrated in the processor 510.
可选地,该BLE芯片500还可以包括输入接口530。其中,处理器510可以控制该输入接口530与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。Optionally, the BLE chip 500 may further include an input interface 530. The processor 510 can control the input interface 530 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
可选地,该BLE芯片500还可以包括输出接口540。其中,处理器510可以控制该输出接口540与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。Optionally, the BLE chip 500 may further include an output interface 540. The processor 510 can control the output interface 540 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
可选地,该BLE芯片可应用于本申请实施例中的第一BLE设备,并且该BLE芯片可以实现本申请实施例的各个方法中由第一BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the BLE chip can be applied to the first BLE device in the embodiment of the present application, and the BLE chip can implement the corresponding process implemented by the first BLE device in each method of the embodiment of the present application. For the sake of brevity, here No longer.
可选地,该BLE芯片可应用于本申请实施例中的第二BLE设备,并且该BLE芯片可以实现本申请实施例的各个方法中由第二BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the BLE chip can be applied to the second BLE device in the embodiment of the present application, and the BLE chip can implement the corresponding process implemented by the second BLE device in each method of the embodiment of the present application. For the sake of brevity, here No longer.
应理解,本申请实施例提到的BLE芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the BLE chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field  Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synchlink DRAM, SLDRAM) ) And Direct Rambus RAM (DR RAM). It should be noted that the memories of the systems and methods described herein are intended to include, but are not limited to, these and any other suitable types of memories.
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和 任意其它适合类型的存储器。It should be understood that the foregoing memory is exemplary but not restrictive. For example, the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。The embodiments of the present application also provide a computer-readable storage medium for storing computer programs.
可选的,该计算机可读存储介质可应用于本申请实施例中的第一BLE设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由第一BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium may be applied to the first BLE device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the first BLE device in each method of the embodiment of the present application, in order to It's concise, so I won't repeat it here.
可选地,该计算机可读存储介质可应用于本申请实施例中的第二BLE设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由第二BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium may be applied to the second BLE device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the second BLE device in each method of the embodiment of the present application, in order to It's concise, so I won't repeat it here.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。The embodiments of the present application also provide a computer program product, including computer program instructions.
可选的,该计算机程序产品可应用于本申请实施例中的第一BLE设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由第一BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the first BLE device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the first BLE device in each method of the embodiment of the present application, for the sake of brevity , I won’t repeat it here.
可选地,该计算机程序产品可应用于本申请实施例中的第二BLE设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由第二BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the second BLE device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the second BLE device in each method of the embodiment of the present application, for the sake of brevity , I won’t repeat it here.
本申请实施例还提供了一种计算机程序。The embodiment of the present application also provides a computer program.
可选的,该计算机程序可应用于本申请实施例中的第一BLE设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由第一BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program can be applied to the first BLE device in the embodiment of the present application, and when the computer program runs on the computer, the computer is caused to execute the corresponding implementation of the first BLE device in the various methods of the embodiments of the present application. For the sake of brevity, the process will not be repeated here.
可选地,该计算机程序可应用于本申请实施例中的第二BLE设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由第二BLE设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program can be applied to the second BLE device in the embodiment of the present application, and when the computer program runs on the computer, the computer is caused to execute the corresponding implementation of the second BLE device in the various methods of the embodiments of the present application. For the sake of brevity, the process will not be repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in the embodiments disclosed in this document can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which is not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和 方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,)ROM、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory,) ROM, random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (46)

  1. 一种用于蓝牙低能耗BLE的数据传输的方法,其特征在于,包括:A method for data transmission of Bluetooth low energy BLE, which is characterized in that it includes:
    第一BLE端采用一次性加密算法对原始数据进行加密处理,获得加密数据;The first BLE end uses a one-time encryption algorithm to encrypt the original data to obtain encrypted data;
    所述第一BLE端通过广播的方式,向至少一个BLE端发送所述加密数据。The first BLE end sends the encrypted data to at least one BLE end in a broadcast manner.
  2. 根据权利要求1所述的方法,其特征在于,所述第一BLE端采用一次性加密算法对原始数据进行加密处理,包括:The method according to claim 1, wherein the first BLE end uses a one-time encryption algorithm to encrypt the original data, comprising:
    所述第一BLE端基于时间因子,对所述原始数据进行加密处理。The first BLE terminal performs encryption processing on the original data based on the time factor.
  3. 根据权利要求2所述的方法,其特征在于,所述第一BLE端基于时间因子,对所述原始数据进行加密处理,包括:The method according to claim 2, wherein the first BLE terminal encrypts the original data based on a time factor, comprising:
    所述第一BLE端根据所述第一BLE端的时间和预设时间间隔,按照种子文件,确定密钥;The first BLE terminal determines the key according to the seed file according to the time of the first BLE terminal and the preset time interval;
    所述第一BLE端采用所述密钥,对所述原始数据进行加密处理。The first BLE end uses the key to encrypt the original data.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述一次性加密算法为动态口令算法。The method according to any one of claims 1 to 3, wherein the one-time encryption algorithm is a dynamic password algorithm.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    所述第一BLE端与第二BLE端进行时间同步,所述第二BLE端为所述至少一个BLE端中的一个。The first BLE terminal and the second BLE terminal perform time synchronization, and the second BLE terminal is one of the at least one BLE terminal.
  6. 根据权利要求5所述的方法,其特征在于,所述第一BLE端与所述第二BLE端进行时间同步,包括:The method according to claim 5, wherein the time synchronization between the first BLE terminal and the second BLE terminal comprises:
    所述第一BLE端向所述第二BLE端发送时间同步请求消息,所述时间同步请求消息用于所述第一BLE端请求与所述第二BLE端进行时间同步;Sending, by the first BLE terminal, a time synchronization request message to the second BLE terminal, where the time synchronization request message is used by the first BLE terminal to request time synchronization with the second BLE terminal;
    所述第一BLE端接收所述第二BLE端根据所述时间同步请求消息发送的时间同步响应消息;Receiving, by the first BLE terminal, a time synchronization response message sent by the second BLE terminal according to the time synchronization request message;
    所述第一BLE端根据所述时间同步响应消息,与所述第二BLE端进行时间同步。The first BLE terminal performs time synchronization with the second BLE terminal according to the time synchronization response message.
  7. 根据权利要求6所述的方法,其特征在于,所述时间同步请求消息包括所述第一BLE端的时间;和/或,The method according to claim 6, wherein the time synchronization request message includes the time of the first BLE terminal; and/or,
    所述时间同步响应消息包括所述第二BLE端的时间。The time synchronization response message includes the time of the second BLE terminal.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一BLE端与所述至少一个BLE端之间未建立蓝牙连接。The method according to any one of claims 1 to 7, wherein a Bluetooth connection is not established between the first BLE terminal and the at least one BLE terminal.
  9. 根据权利要求5至7中任一项所述的方法,其特征在于,在所述第一BLE端与所述第二BLE端进行时间同步之前,所述方法还包括:The method according to any one of claims 5 to 7, characterized in that, before the first BLE terminal and the second BLE terminal perform time synchronization, the method further comprises:
    所述第一BLE端与所述第二BLE端建立蓝牙连接,所述蓝牙连接用于所述时间同步。The first BLE terminal establishes a Bluetooth connection with the second BLE terminal, and the Bluetooth connection is used for the time synchronization.
  10. 一种用于蓝牙低能耗BLE的数据传输的方法,其特征在于,包括:A method for data transmission of Bluetooth low energy BLE, which is characterized in that it includes:
    第二BLE端接收第一BLE端通过广播的方式发送的加密数据;The second BLE end receives the encrypted data sent by the first BLE end in a broadcast manner;
    所述第二BLE端根据一次性加密算法,对所述加密数据进行解密处理,获得原始数据。The second BLE end decrypts the encrypted data according to the one-time encryption algorithm to obtain the original data.
  11. 根据权利要求10所述的方法,其特征在于,所述第二BLE端根据一次性加密算法,对所述加密数据进行解密处理,包括:The method according to claim 10, wherein the second BLE terminal decrypts the encrypted data according to a one-time encryption algorithm, comprising:
    所述第二BLE端基于时间因子,对所述加密数据进行解密处理。The second BLE terminal performs decryption processing on the encrypted data based on the time factor.
  12. 根据权利要求11所述的方法,其特征在于,所述第二BLE端基于时间因子,对所述加密数据进行解密处理,包括:The method according to claim 11, wherein the second BLE terminal decrypts the encrypted data based on a time factor, comprising:
    所述第二BLE端根据所述第二BLE端的时间和预设时间间隔,按照种子文件,确定密钥;The second BLE terminal determines the key according to the seed file according to the time of the second BLE terminal and the preset time interval;
    所述第二BLE端采用所述密钥,对所述加密数据进行解密处理。The second BLE end uses the key to decrypt the encrypted data.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, wherein the method further comprises:
    所述第二BLE端接收应用服务器发送的所述种子文件。The second BLE end receives the seed file sent by the application server.
  14. 根据权利要求10至13中任一项所述的方法,其特征在于,所述一次性加密算法为动态口令算法。The method according to any one of claims 10 to 13, wherein the one-time encryption algorithm is a dynamic password algorithm.
  15. 根据权利要求10至14中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 10 to 14, wherein the method further comprises:
    所述第二BLE端与所述第一BLE端进行时间同步。The second BLE terminal performs time synchronization with the first BLE terminal.
  16. 根据权利要求15所述的方法,其特征在于,所述第二BLE端与所述第一BLE端进行时间同步,包括:The method according to claim 15, wherein the time synchronization between the second BLE terminal and the first BLE terminal comprises:
    所述第二BLE端接收所述第一BLE端发送的时间同步请求消息,所述时间同步请求消息用于所述第一BLE端请求与所述第二BLE端进行时间同步;Receiving, by the second BLE terminal, a time synchronization request message sent by the first BLE terminal, where the time synchronization request message is used by the first BLE terminal to request time synchronization with the second BLE terminal;
    所述第二BLE端根据所述时间同步请求消息,向所述第一BLE端发送 时间同步响应消息。The second BLE end sends a time synchronization response message to the first BLE end according to the time synchronization request message.
  17. 根据权利要求16所述的方法,其特征在于,所述时间同步请求消息包括所述第一BLE端的时间;和/或,The method according to claim 16, wherein the time synchronization request message includes the time of the first BLE terminal; and/or,
    所述时间同步响应消息包括所述第二BLE端的时间。The time synchronization response message includes the time of the second BLE terminal.
  18. 根据权利要求10至17中任一项所述的方法,其特征在于,所述第一BLE端与所述至少一个BLE端之间未建立蓝牙连接。The method according to any one of claims 10 to 17, wherein a Bluetooth connection is not established between the first BLE terminal and the at least one BLE terminal.
  19. 根据权利要求15至17中任一项所述的方法,其特征在于,在所述第二BLE端与所述第一BLE端进行时间同步之前,所述方法还包括:The method according to any one of claims 15 to 17, wherein before the second BLE terminal and the first BLE terminal perform time synchronization, the method further comprises:
    所述第二BLE端与所述第一BLE端建立蓝牙连接,所述蓝牙连接用于所述时间同步。The second BLE terminal establishes a Bluetooth connection with the first BLE terminal, and the Bluetooth connection is used for the time synchronization.
  20. 根据权利要求10至19中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 10 to 19, wherein the method further comprises:
    所述第二BLE端根据所述原始数据,对所述第一BLE端进行身份识别。The second BLE terminal performs identity recognition on the first BLE terminal according to the original data.
  21. 一种BLE设备,其特征在于,包括:A BLE device, characterized in that it includes:
    处理单元,用于采用一次性加密算法对原始数据进行加密处理,获得加密数据;The processing unit is used to encrypt the original data with a one-time encryption algorithm to obtain encrypted data;
    收发单元,用于通过广播的方式,向至少一个BLE设备发送所述加密数据。The transceiver unit is configured to send the encrypted data to at least one BLE device in a broadcast manner.
  22. 根据权利要求21所述的BLE设备,其特征在于,所述处理单元用于:The BLE device according to claim 21, wherein the processing unit is configured to:
    基于时间因子,对所述原始数据进行加密处理。Based on the time factor, the original data is encrypted.
  23. 根据权利要求22所述的BLE设备,其特征在于,所述处理单元用于:The BLE device according to claim 22, wherein the processing unit is configured to:
    根据所述第一BLE设备的时间和预设时间间隔,按照种子文件,确定密钥;Determine the key according to the time of the first BLE device and the preset time interval according to the seed file;
    采用所述密钥,对所述原始数据进行加密处理。Using the key, the original data is encrypted.
  24. 根据权利要求21至23中任一项所述的BLE设备,其特征在于,所述一次性加密算法为动态口令算法。The BLE device according to any one of claims 21 to 23, wherein the one-time encryption algorithm is a dynamic password algorithm.
  25. 根据权利要求21至24中任一项所述的BLE设备,其特征在于,所述处理单元还用于:The BLE device according to any one of claims 21 to 24, wherein the processing unit is further configured to:
    与第二BLE设备进行时间同步,所述第二BLE设备为所述至少一个BLE 设备中的一个。Perform time synchronization with a second BLE device, where the second BLE device is one of the at least one BLE device.
  26. 根据权利要求25所述的BLE设备,其特征在于,所述收发单元还用于:The BLE device according to claim 25, wherein the transceiver unit is further configured to:
    向所述第二BLE设备发送时间同步请求消息,所述时间同步请求消息用于请求与所述第二BLE设备进行时间同步;Sending a time synchronization request message to the second BLE device, where the time synchronization request message is used to request time synchronization with the second BLE device;
    接收所述第二BLE设备根据所述时间同步请求消息发送的时间同步响应消息;Receiving a time synchronization response message sent by the second BLE device according to the time synchronization request message;
    所述处理单元用于:The processing unit is used for:
    根据所述时间同步响应消息,与所述第二BLE设备进行时间同步。Perform time synchronization with the second BLE device according to the time synchronization response message.
  27. 根据权利要求26所述的BLE设备,其特征在于,所述时间同步请求消息包括所述第一BLE设备的时间;和/或,The BLE device according to claim 26, wherein the time synchronization request message includes the time of the first BLE device; and/or,
    所述时间同步响应消息包括所述第二BLE设备的时间。The time synchronization response message includes the time of the second BLE device.
  28. 根据权利要求21至27中任一项所述的BLE设备,其特征在于,所述第一BLE设备与所述至少一个BLE设备之间未建立蓝牙连接。The BLE device according to any one of claims 21 to 27, wherein a Bluetooth connection is not established between the first BLE device and the at least one BLE device.
  29. 根据权利要求25至27中任一项所述的BLE设备,其特征在于,所述处理单元还用于:The BLE device according to any one of claims 25 to 27, wherein the processing unit is further configured to:
    在与所述第二BLE设备进行时间同步之前,与所述第二BLE设备建立蓝牙连接,所述蓝牙连接用于所述时间同步。Before performing time synchronization with the second BLE device, establish a Bluetooth connection with the second BLE device, and the Bluetooth connection is used for the time synchronization.
  30. 一种BLE设备,其特征在于,包括:A BLE device, characterized in that it includes:
    收发单元,用于接收第一BLE设备通过广播的方式发送的加密数据;The transceiver unit is configured to receive encrypted data sent by the first BLE device in a broadcast manner;
    处理单元,用于根据一次性加密算法,对所述加密数据进行解密处理,获得原始数据。The processing unit is configured to perform decryption processing on the encrypted data according to a one-time encryption algorithm to obtain original data.
  31. 根据权利要求30所述的BLE设备,其特征在于,所述处理单元用于:The BLE device of claim 30, wherein the processing unit is configured to:
    基于时间因子,对所述加密数据进行解密处理。Based on the time factor, the encrypted data is decrypted.
  32. 根据权利要求31所述的BLE设备,其特征在于,所述处理单元用于:The BLE device according to claim 31, wherein the processing unit is configured to:
    根据所述第二BLE设备的时间和预设时间间隔,按照种子文件,确定密钥;Determining the key according to the time of the second BLE device and the preset time interval according to the seed file;
    采用所述密钥,对所述加密数据进行解密处理。Using the key to decrypt the encrypted data.
  33. 根据权利要求32所述的BLE设备,其特征在于,所述收发单元还 用于:The BLE device according to claim 32, wherein the transceiver unit is further configured to:
    接收应用服务器发送的所述种子文件。Receiving the seed file sent by the application server.
  34. 根据权利要求30至33中任一项所述的BLE设备,其特征在于,所述一次性加密算法为动态口令算法。The BLE device according to any one of claims 30 to 33, wherein the one-time encryption algorithm is a dynamic password algorithm.
  35. 根据权利要求30至34中任一项所述的BLE设备,其特征在于,所述处理单元还用于:The BLE device according to any one of claims 30 to 34, wherein the processing unit is further configured to:
    与所述第一BLE设备进行时间同步。Perform time synchronization with the first BLE device.
  36. 根据权利要求35所述的BLE设备,其特征在于,所述收发单元还用于:The BLE device according to claim 35, wherein the transceiver unit is further configured to:
    接收所述第一BLE设备发送的时间同步请求消息,所述时间同步请求消息用于所述第一BLE设备请求与所述第二BLE设备进行时间同步;Receiving a time synchronization request message sent by the first BLE device, where the time synchronization request message is used by the first BLE device to request time synchronization with the second BLE device;
    根据所述时间同步请求消息,向所述第一BLE设备发送时间同步响应消息。According to the time synchronization request message, a time synchronization response message is sent to the first BLE device.
  37. 根据权利要求36所述的BLE设备,其特征在于,所述时间同步请求消息包括所述第一BLE设备的时间;和/或,The BLE device according to claim 36, wherein the time synchronization request message includes the time of the first BLE device; and/or,
    所述时间同步响应消息包括所述第二BLE设备的时间。The time synchronization response message includes the time of the second BLE device.
  38. 根据权利要求30至37中任一项所述的BLE设备,其特征在于,所述第一BLE设备与所述至少一个BLE设备之间未建立蓝牙连接。The BLE device according to any one of claims 30 to 37, wherein a Bluetooth connection is not established between the first BLE device and the at least one BLE device.
  39. 根据权利要求35至37中任一项所述的BLE设备,其特征在于,所述处理单元还用于:The BLE device according to any one of claims 35 to 37, wherein the processing unit is further configured to:
    在与所述第一BLE设备进行时间同步之前,与所述第一BLE设备建立蓝牙连接,所述蓝牙连接用于所述时间同步。Before performing time synchronization with the first BLE device, a Bluetooth connection is established with the first BLE device, and the Bluetooth connection is used for the time synchronization.
  40. 根据权利要求30至39中任一项所述的BLE设备,其特征在于,所述处理单元还用于:The BLE device according to any one of claims 30 to 39, wherein the processing unit is further configured to:
    根据所述原始数据,对所述第一BLE设备进行身份识别。According to the original data, the first BLE device is identified.
  41. 一种BLE设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至9中任一项所述的方法。A BLE device, characterized by comprising: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute any of claims 1 to 9 The method described in one item.
  42. 一种BLE设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求10至20中任一项所述的方法。A BLE device, characterized by comprising: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute any of claims 10 to 20 The method described in one item.
  43. 一种BLE芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至9中任一项所述的方法。A BLE chip, characterized by comprising: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method according to any one of claims 1 to 9.
  44. 一种BLE芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求10至20中任一项所述的方法。A BLE chip, characterized by comprising: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the method according to any one of claims 10 to 20.
  45. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至9中任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program that enables a computer to execute the method according to any one of claims 1 to 9.
  46. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求10至20中任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program that enables a computer to execute the method according to any one of claims 10 to 20.
PCT/CN2020/074170 2020-02-03 2020-02-03 Data transmission method and ble device WO2021155482A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080001510.4A CN111788836B (en) 2020-02-03 2020-02-03 Data transmission method and BLE equipment
PCT/CN2020/074170 WO2021155482A1 (en) 2020-02-03 2020-02-03 Data transmission method and ble device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/074170 WO2021155482A1 (en) 2020-02-03 2020-02-03 Data transmission method and ble device

Publications (1)

Publication Number Publication Date
WO2021155482A1 true WO2021155482A1 (en) 2021-08-12

Family

ID=72763042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/074170 WO2021155482A1 (en) 2020-02-03 2020-02-03 Data transmission method and ble device

Country Status (2)

Country Link
CN (1) CN111788836B (en)
WO (1) WO2021155482A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114007209A (en) * 2021-10-28 2022-02-01 歌尔光学科技有限公司 BLE-based data transmission method and device and BLE master equipment
CN114205758A (en) * 2021-11-16 2022-03-18 锐捷网络股份有限公司 Information processing method and device based on Bluetooth
CN114979830A (en) * 2022-05-19 2022-08-30 宁夏隆基宁光仪表股份有限公司 BLE-based intelligent water meter cluster data transmission method and system and control equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160100311A1 (en) * 2014-10-06 2016-04-07 Derek D. Kumar Secure broadcast beacon communications
CN106792482A (en) * 2017-01-20 2017-05-31 深圳市慧闪科技有限责任公司 A kind of method and system for being used between two devices set up near-field communication
WO2019129528A1 (en) * 2017-12-29 2019-07-04 Gemalto Sa Method, first device, second device and system for authenticating a first device to a second device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9591684B2 (en) * 2014-06-06 2017-03-07 BBPOS Limited System and method of bluetooth pairing with a group of bluetooth devices
CN105635943B (en) * 2015-12-21 2020-02-28 中颖电子股份有限公司 Low-power-consumption Bluetooth beacon data interaction device, beacon device and method
WO2018094677A1 (en) * 2016-11-25 2018-05-31 深圳市汇顶科技股份有限公司 Bluetooth low energy (ble) device, and data update system and method
CN108541324A (en) * 2016-12-27 2018-09-14 深圳易马达科技有限公司 A kind of unlocking method of electronic lock device, client and its electronic lock device
CN106878926B (en) * 2017-02-08 2020-11-06 泰凌微电子(上海)有限公司 Data transmission method based on low-power-consumption Bluetooth, slave master device and system
US10111069B1 (en) * 2017-10-09 2018-10-23 Building Robotics, Inc. System, method, and computer program for transmitting occupancy data from sensors to a remote server
CN108684021B (en) * 2018-03-20 2021-06-04 海信视像科技股份有限公司 Bluetooth low-power-consumption communication method and device
CN108900981A (en) * 2018-05-30 2018-11-27 歌尔股份有限公司 Transmission method, the apparatus and system of Bluetooth audio frequency data
CN109151788A (en) * 2018-09-28 2019-01-04 咪付(广西)网络技术有限公司 A kind of data in mobile phone transmission method and system based on bluetooth low energy device
CN109561413B (en) * 2018-11-23 2021-08-06 深圳市太美亚电子科技有限公司 Bluetooth authentication and authorization method and system of BLE equipment
CN110602703B (en) * 2019-09-17 2021-04-27 深圳市太美亚电子科技有限公司 Bluetooth communication data encryption method, terminal and system for BLE

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160100311A1 (en) * 2014-10-06 2016-04-07 Derek D. Kumar Secure broadcast beacon communications
CN106792482A (en) * 2017-01-20 2017-05-31 深圳市慧闪科技有限责任公司 A kind of method and system for being used between two devices set up near-field communication
WO2019129528A1 (en) * 2017-12-29 2019-07-04 Gemalto Sa Method, first device, second device and system for authenticating a first device to a second device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JUNG, HYUNHEE ; SHIN, DONGRYEOL , CHO, KWANGSU ; NAM, CHOONSUNG: "BLE-OTP Authorization Mechanism for iBeacon Network Security", JOURNAL OF KIISE, vol. 42, no. 8, 15 August 2015 (2015-08-15), KR, pages 979 - 989, XP009529465, ISSN: 2383-630X, DOI: 10.5626/JOK.2015.42.8.979 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114007209A (en) * 2021-10-28 2022-02-01 歌尔光学科技有限公司 BLE-based data transmission method and device and BLE master equipment
CN114205758A (en) * 2021-11-16 2022-03-18 锐捷网络股份有限公司 Information processing method and device based on Bluetooth
CN114979830A (en) * 2022-05-19 2022-08-30 宁夏隆基宁光仪表股份有限公司 BLE-based intelligent water meter cluster data transmission method and system and control equipment

Also Published As

Publication number Publication date
CN111788836A (en) 2020-10-16
CN111788836B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
US10812969B2 (en) System and method for configuring a wireless device for wireless network access
US11943343B2 (en) ECDHE key exchange for server authentication and a key server
WO2021155482A1 (en) Data transmission method and ble device
US20170180330A1 (en) Method and electronic device for vehicle remote control and a non-transitory computer readable storage medium
US10009760B2 (en) Providing network credentials
CN105308995A (en) Wireless configuration using passive near field communication
US20160323100A1 (en) Key generation device, terminal device, and data signature and encryption method
CN107454590A (en) A kind of data ciphering method, decryption method and wireless router
WO2017133021A1 (en) Security processing method and relevant device
WO2018219181A1 (en) Method and device for determining identifier of terminal device
TWI553504B (en) A cloud encryption system and method
CN110234102B (en) Communication method and apparatus
WO2018024048A1 (en) Authentication method, server, terminal, and gateway
CN106295373B (en) A kind of data transmission encryption device realized based on M-PHY interface
WO2022188033A1 (en) Data uploading method, data downloading method and related device
WO2019019853A1 (en) Data processing method, terminal device, and network device
WO2022155803A1 (en) Data encryption method, data transmission method, related apparatuses and device
CN113094734A (en) Equipment key updating method and device, storage medium and electronic equipment
US20220210851A1 (en) Method and apparatus for quickly pairing dual-mode wireless device
CN106326754B (en) A kind of data transmission encryption device realized based on PCIE interface
CN106372516B (en) A kind of encryption Hub device realized based on M-PHY interface
CN114095277A (en) Power distribution network secure communication method, secure access device and readable storage medium
CN106295372B (en) A kind of encryption Hub device realized based on EMMC interface
CN111836260B (en) Authentication information processing method, terminal and network equipment
US11258600B2 (en) Secure communication in accessing a network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20918044

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20918044

Country of ref document: EP

Kind code of ref document: A1