CN114205758A - Information processing method and device based on Bluetooth - Google Patents

Information processing method and device based on Bluetooth Download PDF

Info

Publication number
CN114205758A
CN114205758A CN202111357174.XA CN202111357174A CN114205758A CN 114205758 A CN114205758 A CN 114205758A CN 202111357174 A CN202111357174 A CN 202111357174A CN 114205758 A CN114205758 A CN 114205758A
Authority
CN
China
Prior art keywords
message
ble
sending
secret key
key
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111357174.XA
Other languages
Chinese (zh)
Inventor
黄剑清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202111357174.XA priority Critical patent/CN114205758A/en
Publication of CN114205758A publication Critical patent/CN114205758A/en
Pending legal-status Critical Current

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
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses an information processing method and device based on Bluetooth, wherein the method comprises the following steps: the sender is electrified and initialized to establish Bluetooth connection with the receiver, and the slave mode is entered; broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key; receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender; switching a slave mode of the transmitter to a broadcast mode and entering a sleep state; and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode. The embodiment of the invention can solve the problem that the reliability of Bluetooth information processing is not high in the response system in the prior art.

Description

Information processing method and device based on Bluetooth
Technical Field
The present invention relates to the field of data communication technologies, and in particular, to a bluetooth-based information processing method and apparatus.
Background
Currently, the answering system based on bluetooth technology is more and more widely applied, for example, a restaurant ordering and ordering system, a classroom answering machine receiver system, and the like, taking the answering system of the answering machine receiver as an example, the answering machine supports high-frequency data receiving and sending in classroom use, and usually completes one round of data receiving and sending within 500ms to 1000ms, and the use of such high frequency results in large power consumption of the answering machine, poor endurance, the answering machine needs to frequently change a battery or charge to maintain normal functions, and when the voltage of the answering machine is lower than a normal threshold value, data receiving and sending errors will occur. On the other hand, an illegal user can illegally intercept and analyze data of other users according to a sending protocol of the answering machine, so that the safety problem of data leakage is caused. The above situations all result in insufficient reliability of the answering machine, which affects normal operation of the service, and the problem of reliability of the current answering machine needs to be solved urgently.
At present, the main solutions for improving the reliability of the answering machine are as follows:
1. window period wakeup for data transmission and reception
The data message carrying a window period is sent to the answering machine through the receiver, the answering machine detects the window time carried by the message after receiving the message, the receiving window is opened after the specified window time is expired, data receiving is completed, then the low-power-consumption silent state is entered, and the receiving window is opened after the next window time is expired, so that data receiving is completed. If the relay has data transmission, the window period time of the next receiving is re-detected in the received response message after the data transmission is finished.
2. Periodically awakening transceiving data
After the answering machine collects the user data, the answering machine caches the user data, compresses the data message according to a certain format, sends the data message after the timer expires, waits for the response message of the receiver after the data is sent, and enters a silent mode to reduce power consumption after the answering machine receives the response.
3. White list pre-registration
The receiver firstly inputs the serial number identification of the answering machine, then starts to receive the data message of the answering machine after the answering machine is electrified and initialized, judges whether the serial number identification of the answering machine is in a registered white list after receiving the message, randomly generates an MAC address of equipment and binds the MAC address and the serial number identification if the serial number identification of the answering machine is in the registered white list, then distributes the MAC address to the corresponding answering machine, and judges whether the serial number identification corresponding to the MAC address is in the white list and whether the corresponding message is processed or not when data is subsequently processed, thereby improving the efficiency of the receiver.
However, in the method 1, the time of the answering machine receiving window is shortened to achieve the purpose of energy saving, the received message still needs to be started after the receiving window is expired, and the power consumption loss is also caused when the receiving window is started, and in the method 2, the sending frequency is reduced to save energy, but the message is sent in a delayed manner, and certain limitation is still caused in a scene with a high real-time requirement. In the method 3, the white list is imported in advance, so that the answering machine can be used in a plurality of different classrooms, and different receivers need to import the white list, thereby increasing the deployment difficulty.
At present, how to more efficiently and conveniently improve the reliability of bluetooth information processing becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides an information processing method and device based on Bluetooth, which are used for solving the problem that the reliability of Bluetooth information processing is not high in a response system in the prior art.
According to an embodiment of the present invention, there is provided a bluetooth-based information processing method applicable to an answering system including a receiver and at least one transmitter, the method applied to the transmitter, including:
the sender is electrified and initialized to establish Bluetooth connection with the receiver, and the slave mode is entered;
broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key;
receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender;
switching a slave mode of the transmitter to a broadcast mode and entering a sleep state;
and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode.
Optionally, after encrypting the message to be sent by using the key, the message is sent by broadcasting, and the method further includes:
and entering a dormant state, and keeping the dormant state when a sending instruction input by a user is not received.
Optionally, the broadcasting and sending the first BLE packet to request the secret key includes:
broadcasting a first BLE message with a null key pkey field to request a key, wherein the pkey field is obtained by extending a UUID field of a universal unique identifier in a data field of a protocol data unit PDU of the first BLE message.
Optionally, after receiving a response packet returned by the receiver according to the BLE packet, the method further includes:
and sending a preset number of confirmation messages to the receiver according to a preset time interval to inform that the secret key is received.
Optionally, after the broadcasting sends the first bluetooth low energy BLE packet to request the secret key, the method further includes:
and when the sender does not receive the response message within the preset time length, the sender broadcasts and sends the first BLE message again to request the secret key.
Optionally, the broadcast sending after encrypting the message to be sent by using the key specifically includes:
performing XOR operation on the service data text and the key to obtain a ciphertext;
filling the ciphertext and the secret key into a UUID field of a data section of a PDU (protocol data unit) of a second BLE message;
and broadcasting and sending the second BLE message.
Optionally, before the broadcasting and transmitting the second BLE packet, the method further includes:
and filling the power percentage of the transmitter into the second BLE message to prompt the current power of the transmitter.
According to an embodiment of the present invention, there may also be provided a bluetooth-based information processing apparatus adapted for use in a reply system including a receiver and at least one transmitter, the apparatus being applied to the transmitter, including: the device comprises an initialization unit, a first sending unit, a receiving unit, a mode switching unit and a second sending unit; wherein the content of the first and second substances,
the initialization unit is used for establishing Bluetooth connection with the receiver through power-on initialization and entering a slave mode;
the first sending unit is used for broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key;
the receiving unit is configured to receive a response packet returned by the receiver according to the BLE packet, where the response packet includes a secret key pre-allocated to the sender;
the mode switching unit is used for switching the slave mode of the transmitter to a broadcasting mode and entering a dormant state;
and the second sending unit is used for encrypting the message to be sent by using the secret key and then sending the encrypted message in a broadcast mode when receiving a sending instruction input by a user.
Optionally, after the second sending unit encrypts and then sends the message to be sent in a broadcast mode by using the key, the mode switching unit is further configured to: and entering a dormant state, and keeping the dormant state when a sending instruction input by a user is not received.
Optionally, the first sending unit is specifically configured to broadcast a first BLE packet with a null key field for sending a key, where the key field is obtained by extending a UUID field of a universally unique identifier in a data field of a protocol data unit PDU of the first BLE packet.
Optionally, after the receiving unit receives a response packet returned by the receiver according to the BLE packet, the first sending unit is further configured to send a preset number of acknowledgement packets to the receiver according to a preset time interval to notify that the secret key has been received.
Optionally, the second sending unit is specifically configured to perform xor operation on the service data plaintext and the key to obtain a ciphertext; filling the ciphertext and the secret key into a UUID field of a data section of a PDU (protocol data unit) of a second BLE message; and broadcasting and sending the second BLE message.
Optionally, the second sending unit is further configured to, before the second BLE packet is broadcast and sent, fill the power percentage of the sender into the second BLE packet to prompt the current power of the sender.
According to the embodiment of the invention, the electronic equipment comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the above method steps when executing the program stored in the memory.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program, which when executed by a processor, performs the above-mentioned method steps.
The invention has the following beneficial effects:
according to the information processing method and device based on the Bluetooth, the Bluetooth connection is established with the receiver through the power-on initialization of the transmitter, and the slave mode is entered; broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key; receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender; switching a slave mode of the transmitter to a broadcast mode and entering a sleep state; and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode. In the embodiment of the invention, after the transmitter is initialized and enters the slave mode, the BLE message is transmitted by broadcasting to obtain the key of the subsequent transmitted message, then the data to be transmitted is encrypted by using the key acquired after initialization and then is transmitted in a broadcast way, so that the security of data transmission can be improved, and switches from the slave mode to the broadcast mode after obtaining the key, the transmitter in the broadcast mode does not receive the message, only broadcasts and transmits the message, the message immediately enters the dormant state after being transmitted, thus, the opening and closing of the receiving window of the transmitter do not need to be controlled by receiving the message sent by the receiver in the slave mode, further saving power consumption, in addition, the embodiment of the invention realizes the technical scheme of information interaction between the transmitter and the receiver by expanding the BLE message, is convenient and fast to realize, and can effectively improve the reliability of Bluetooth information processing.
Drawings
FIG. 1 is a flow chart of a method for processing information based on Bluetooth in an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an embodiment of a Bluetooth-based information processing apparatus according to the present invention;
fig. 3 is a schematic structural diagram of an electronic device shown in the present application.
Detailed Description
Aiming at the problem of low reliability of Bluetooth information processing in a response system in the prior art, the Bluetooth-based information processing method provided by the embodiment of the invention encrypts a message to be sent by requesting a secret key in a slave mode, switches to a broadcast mode after obtaining the secret key and enters a dormant state to reduce the energy consumption of receiving window control, and provides the reliability of Bluetooth information processing by two aspects of message encryption and power consumption saving. The method of the invention is applicable to a transponder system comprising a receiver and at least one transmitter, said method being applied to the transmitter and having the flow shown in fig. 1, the following steps being carried out:
step 101, a sender is powered on to initialize and establish Bluetooth connection with a receiver, and enters a slave mode;
step 102, broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key;
in the embodiment of the present invention, the sender and the receiver perform information interaction through a BLE packet, specifically, the sender and the receiver may perform custom extension through a Universal Unique Identifier (UUID) in a standard BLE packet format, so as to fill service data, and specifically, the information interaction may include, but is not limited to, the following fields:
Figure BDA0003357707350000061
103, receiving a response message returned by the receiver according to the BLE message, wherein the response message includes a secret key pre-allocated to the sender;
here, a secret key may be configured in advance at the receiver, and after the receiver receives the first BLE packet, the receiver returns a response packet carrying the secret key and records a correspondence between the secret key and the sender.
Step 104, switching the slave mode of the transmitter to a broadcast mode, and entering a sleep state;
specifically, after the sender confirms that the key is received, the sender switches to the broadcast mode, and the sender switching to the broadcast mode broadcasts a transmission message when receiving a transmission instruction, or otherwise enters a sleep state.
And 105, when a sending instruction input by a user is received, encrypting the message to be sent by using the secret key and then broadcasting the message.
After the sender receives the key, the sender encrypts the message by using the key before sending the message, wherein the encryption process can be to perform XOR operation on the original message and the key to obtain a ciphertext, generate the ciphertext and send the ciphertext to the receiver. Similarly, the receiver needs to decrypt the ciphertext after receiving the ciphertext, that is, the ciphertext and the same key are subjected to exclusive or operation to obtain the original text, and the encryption process can ensure the safety of the data transmission process. It should be understood that the above encryption process is only an exemplary illustration, and other encryption algorithms may also be used, which is not limited by the embodiment of the present invention.
Here, since the sender does not perform the opening and closing control of the receiving window any more, the receiver does not reply the response message to confirm the receipt after receiving the message, and therefore, in order to improve the reliability of the system, the sender randomly selects 4 times to repeatedly send the message within a set period after sending the message, so as to ensure that the receiver can receive the message, and if the receiver has received the message, the receiver does not perform the repeat processing any more.
Optionally, after encrypting the message to be sent by using the key, the message is sent by broadcasting, and the method further includes:
and entering a dormant state, and keeping the dormant state when a sending instruction input by a user is not received.
Specifically, the user may input the transmission instruction through an input key or an input unit of the transmitter.
Optionally, the broadcasting and sending the first BLE packet to request the secret key includes:
broadcasting a first BLE message with a null key pkey field to request a key, wherein the pkey field is obtained by extending a UUID field of a universal unique identifier in a data field of a protocol data unit PDU of the first BLE message.
Optionally, after receiving a response packet returned by the receiver according to the BLE packet, the method further includes:
and sending a preset number of confirmation messages to the receiver according to a preset time interval to inform that the secret key is received. For example, after receiving the key, the sender may send 5 consecutive ACK acknowledgement messages to the receiver, where the time interval of each ACK acknowledgement message is 500ms, and the receiver does not need to reply to the ACK message any more, and at this time, it may be determined that the sender has received the reply message.
Optionally, after the broadcasting sends the first bluetooth low energy BLE packet to request the secret key, the method further includes:
and when the sender does not receive the response message within the preset time length, the sender broadcasts and sends the first BLE message again to request the secret key.
Optionally, the broadcast sending after encrypting the message to be sent by using the key specifically includes:
performing XOR operation on the service data text and the key to obtain a ciphertext;
filling the ciphertext and the secret key into a UUID field of a data section of a PDU (protocol data unit) of a second BLE message;
and broadcasting and sending the second BLE message.
Optionally, before the broadcasting and transmitting the second BLE packet, the method further includes:
and filling the power percentage of the transmitter into the second BLE message to prompt the current power of the transmitter.
After the receiver analyzes the second BLE message, if the electric quantity indicated by the power field in the second BLE message is lower than the set percentage, the receiver prompts the user that the battery of the transmitter needs to be replaced, so that the reliability of the response service is ensured.
Based on the same inventive concept, an embodiment of the present invention provides a bluetooth-based information processing apparatus, which may be applied to an answering system including a receiver and at least one transmitter, the apparatus applied to the transmitter, including: an initialization unit 21, a first transmission unit 22, a reception unit 23, a mode switching unit 24, and a second transmission unit 25; the structure is shown in fig. 2, and comprises:
the initialization unit 21 is configured to power on initialization, establish bluetooth connection with a receiver, and enter a slave mode;
the first sending unit 22 is configured to broadcast and send a first bluetooth low energy BLE message to request a secret key;
the receiving unit 23 is configured to receive a response packet returned by the receiver according to the BLE packet, where the response packet includes a secret key pre-assigned to the sender;
the mode switching unit 24 is configured to switch a slave mode of the transmitter to a broadcast mode, and enter a sleep state;
and the second sending unit 25 is configured to encrypt and broadcast the message to be sent by using the key when receiving a sending instruction input by the user.
Optionally, after the second sending unit 25 encrypts and then sends the message to be sent in a broadcast mode by using the key, the mode switching unit 24 is further configured to: and entering a dormant state, and keeping the dormant state when a sending instruction input by a user is not received.
Optionally, the first sending unit 22 is specifically configured to broadcast a first BLE packet with a null key field for sending a key, where the key field is obtained by extending a UUID field of a universally unique identifier in a data field of a protocol data unit PDU of the first BLE packet.
Optionally, after the receiving unit 23 receives the response packet returned by the receiver according to the BLE packet, the first sending unit 22 is further configured to send a preset number of acknowledgement packets to the receiver according to a preset time interval to notify that the secret key has been received.
Optionally, the second sending unit 25 is specifically configured to perform an exclusive or operation on the service data plaintext and the key to obtain a ciphertext; filling the ciphertext and the secret key into a UUID field of a data section of a PDU (protocol data unit) of a second BLE message; and broadcasting and sending the second BLE message.
Optionally, the second sending unit 25 is further configured to, before the second BLE packet is broadcast and sent, fill the power percentage of the sender into the second BLE packet to prompt the current power of the sender.
It should be understood that the implementation principle and process of the information processing apparatus based on bluetooth according to the embodiment of the present invention are similar to those of the above-mentioned fig. 1 and the illustrated embodiment, and are not described herein again.
According to the information processing method and device based on the Bluetooth, the Bluetooth connection is established with the receiver through the power-on initialization of the transmitter, and the slave mode is entered; broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key; receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender; switching a slave mode of the transmitter to a broadcast mode and entering a sleep state; and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode. In the embodiment of the invention, after the transmitter is initialized and enters the slave mode, the BLE message is transmitted by broadcasting to obtain the key of the subsequent transmitted message, then the data to be transmitted is encrypted by using the key acquired after initialization and then is transmitted in a broadcast way, so that the security of data transmission can be improved, and switches from the slave mode to the broadcast mode after obtaining the key, the transmitter in the broadcast mode does not receive the message, only broadcasts and transmits the message, the message immediately enters the dormant state after being transmitted, thus, the opening and closing of the receiving window of the transmitter do not need to be controlled by receiving the message sent by the receiver in the slave mode, further saving power consumption, in addition, the embodiment of the invention realizes the technical scheme of information interaction between the transmitter and the receiver by expanding the BLE message, is convenient and fast to realize, and can effectively improve the reliability of Bluetooth information processing.
An electronic device is further provided in the embodiment of the present application, please refer to fig. 3, which includes a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 complete communication with each other through the communication bus 540.
A memory 530 for storing a computer program;
the processor 510 is configured to implement the bluetooth-based information processing method according to any of the above embodiments when executing the program stored in the memory 530.
The communication interface 520 is used for communication between the electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the scheme, a Bluetooth connection is established with a receiver through power-on initialization of a transmitter, and a slave mode is entered; broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key; receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender; switching a slave mode of the transmitter to a broadcast mode and entering a sleep state; and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode. In the embodiment of the invention, after the transmitter is initialized and enters the slave mode, the BLE message is transmitted by broadcasting to obtain the key of the subsequent transmitted message, then the data to be transmitted is encrypted by using the key acquired after initialization and then is transmitted in a broadcast way, so that the security of data transmission can be improved, and switches from the slave mode to the broadcast mode after obtaining the key, the transmitter in the broadcast mode does not receive the message, only broadcasts and transmits the message, the message immediately enters the dormant state after being transmitted, thus, the opening and closing of the receiving window of the transmitter do not need to be controlled by receiving the message sent by the receiver in the slave mode, further saving power consumption, in addition, the embodiment of the invention realizes the technical scheme of information interaction between the transmitter and the receiver by expanding the BLE message, is convenient and fast to realize, and can effectively improve the reliability of Bluetooth information processing.
Accordingly, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium runs on a computer, the computer is caused to execute any of the bluetooth-based information processing methods described in the foregoing embodiments.
In the scheme, a Bluetooth connection is established with a receiver through power-on initialization of a transmitter, and a slave mode is entered; broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key; receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender; switching a slave mode of the transmitter to a broadcast mode and entering a sleep state; and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode. In the embodiment of the invention, after the transmitter is initialized and enters the slave mode, the BLE message is transmitted by broadcasting to obtain the key of the subsequent transmitted message, then the data to be transmitted is encrypted by using the key acquired after initialization and then is transmitted in a broadcast way, so that the security of data transmission can be improved, and switches from the slave mode to the broadcast mode after obtaining the key, the transmitter in the broadcast mode does not receive the message, only broadcasts and transmits the message, the message immediately enters the dormant state after being transmitted, thus, the opening and closing of the receiving window of the transmitter do not need to be controlled by receiving the message sent by the receiver in the slave mode, further saving power consumption, in addition, the embodiment of the invention realizes the technical scheme of information interaction between the transmitter and the receiver by expanding the BLE message, is convenient and fast to realize, and can effectively improve the reliability of Bluetooth information processing.
Those of ordinary skill in the art will understand that: the figures are merely schematic representations of one embodiment, and the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are merely used for distinguishing different operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (15)

1. A bluetooth-based information processing method, characterized in that the method is adapted to an answering system comprising a receiver and at least one transmitter, the method being applied to the transmitter and comprising:
the sender is electrified and initialized to establish Bluetooth connection with the receiver, and the slave mode is entered;
broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key;
receiving a response message returned by the receiver according to the BLE message, wherein the response message comprises a secret key pre-allocated to the sender;
switching a slave mode of the transmitter to a broadcast mode and entering a sleep state;
and when a sending instruction input by a user is received, the message to be sent is encrypted by using the secret key and then is sent in a broadcast mode.
2. The method according to claim 1, wherein the broadcast transmission is performed after the message to be transmitted is encrypted by using the key, and the method further comprises:
and entering a dormant state, and keeping the dormant state when a sending instruction input by a user is not received.
3. The method according to claim 1, wherein the broadcasting the transmission of the first BLE packet to request the secret key comprises:
broadcasting a first BLE message with a null key pkey field to request a key, wherein the pkey field is obtained by extending a UUID field of a universal unique identifier in a data field of a protocol data unit PDU of the first BLE message.
4. The method according to claim 1, wherein after receiving the response message returned by the receiver according to the BLE message, the method further comprises:
and sending a preset number of confirmation messages to the receiver according to a preset time interval to inform that the secret key is received.
5. The method according to claim 1, wherein after the broadcasting transmits the first Bluetooth Low Energy (BLE) message to request the secret key, the method further comprises:
and when the sender does not receive the response message within the preset time length, the sender broadcasts and sends the first BLE message again to request the secret key.
6. The method according to claim 1, wherein the encrypting and broadcasting the message to be transmitted by using the key specifically comprises:
performing XOR operation on the service data text and the key to obtain a ciphertext;
filling the ciphertext and the secret key into a UUID field of a data section of a PDU (protocol data unit) of a second BLE message;
and broadcasting and sending the second BLE message.
7. The method according to claim 6, wherein prior to the broadcasting transmitting the second BLE packet, the method further comprises:
and filling the power percentage of the transmitter into the second BLE message to prompt the current power of the transmitter.
8. A bluetooth-based information processing device, characterized in that the device is adapted to a transponder system comprising a receiver and at least one transmitter, the device being applied to the transmitter and comprising: the device comprises an initialization unit, a first sending unit, a receiving unit, a mode switching unit and a second sending unit; wherein the content of the first and second substances,
the initialization unit is used for establishing Bluetooth connection with the receiver through power-on initialization and entering a slave mode;
the first sending unit is used for broadcasting and sending a first Bluetooth Low Energy (BLE) message to request a secret key;
the receiving unit is configured to receive a response packet returned by the receiver according to the BLE packet, where the response packet includes a secret key pre-allocated to the sender;
the mode switching unit is used for switching the slave mode of the transmitter to a broadcasting mode and entering a dormant state;
and the second sending unit is used for encrypting the message to be sent by using the secret key and then sending the encrypted message in a broadcast mode when receiving a sending instruction input by a user.
9. The apparatus according to claim 8, wherein after the second sending unit encrypts and then broadcasts the message to be sent by using the key, the mode switching unit is further configured to: and entering a dormant state, and keeping the dormant state when a sending instruction input by a user is not received.
10. The apparatus according to claim 8, wherein the first sending unit is specifically configured to broadcast a first BLE packet with a null pkey field of a sending key to request a key, wherein the pkey field is obtained by extending a Universally Unique Identifier (UUID) field in a data field of a Protocol Data Unit (PDU) of the first BLE packet.
11. The apparatus according to claim 8, wherein after the receiving unit receives the response packet returned by the receiver according to the BLE packet, the first sending unit is further configured to send a preset number of acknowledgement packets to the receiver at preset time intervals to inform that the secret key has been received.
12. The apparatus according to claim 8, wherein the second sending unit is specifically configured to perform an exclusive or operation on a service data plaintext and the key to obtain a ciphertext; filling the ciphertext and the secret key into a UUID field of a data section of a PDU (protocol data unit) of a second BLE message; and broadcasting and sending the second BLE message.
13. The apparatus according to claim 12, wherein the second transmitting unit is further configured to pad the percentage of power of the transmitter to the second BLE packet to indicate the current power of the transmitter before broadcasting the second BLE packet.
14. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-7 when executing a program stored on a memory.
15. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202111357174.XA 2021-11-16 2021-11-16 Information processing method and device based on Bluetooth Pending CN114205758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111357174.XA CN114205758A (en) 2021-11-16 2021-11-16 Information processing method and device based on Bluetooth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111357174.XA CN114205758A (en) 2021-11-16 2021-11-16 Information processing method and device based on Bluetooth

Publications (1)

Publication Number Publication Date
CN114205758A true CN114205758A (en) 2022-03-18

Family

ID=80647854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111357174.XA Pending CN114205758A (en) 2021-11-16 2021-11-16 Information processing method and device based on Bluetooth

Country Status (1)

Country Link
CN (1) CN114205758A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878926A (en) * 2017-02-08 2017-06-20 泰凌微电子(上海)有限公司 A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system
CN111615220A (en) * 2020-04-30 2020-09-01 华为技术有限公司 Equipment connection method and equipment based on neighbor awareness network
US20200359318A1 (en) * 2017-02-28 2020-11-12 Feitian Technologies Co., Ltd. Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device
CN112040459A (en) * 2020-09-07 2020-12-04 深圳市蓝蜂时代实业有限公司 Bluetooth headset voice interactive communication method based on BLE
WO2021155482A1 (en) * 2020-02-03 2021-08-12 深圳市汇顶科技股份有限公司 Data transmission method and ble device
CN113366439A (en) * 2018-12-26 2021-09-07 荣耀终端有限公司 Method and device for connecting Bluetooth device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878926A (en) * 2017-02-08 2017-06-20 泰凌微电子(上海)有限公司 A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system
US20200359318A1 (en) * 2017-02-28 2020-11-12 Feitian Technologies Co., Ltd. Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device
CN113366439A (en) * 2018-12-26 2021-09-07 荣耀终端有限公司 Method and device for connecting Bluetooth device
WO2021155482A1 (en) * 2020-02-03 2021-08-12 深圳市汇顶科技股份有限公司 Data transmission method and ble device
CN111615220A (en) * 2020-04-30 2020-09-01 华为技术有限公司 Equipment connection method and equipment based on neighbor awareness network
CN112040459A (en) * 2020-09-07 2020-12-04 深圳市蓝蜂时代实业有限公司 Bluetooth headset voice interactive communication method based on BLE

Similar Documents

Publication Publication Date Title
US11757623B2 (en) Encryption method, decryption method, and related apparatus
US9338130B2 (en) Apparatus and method to register Wi-Fi clients on a Wi-Fi network
CN113271579B (en) Bluetooth device control method, client, computer device and readable storage medium
EP1849323B1 (en) Key delivery method and apparatus in a communications system
CN110831240B (en) Base station and user equipment for early data transmission in random access procedure
US10237739B2 (en) Systems and methods for transmitting conditional access information
RU2019124694A (en) USER EQUIPMENT AND BASE STATION PARTICIPATING IN THE RADIO NETWORK UPDATE PROCEDURE
US10454706B2 (en) Transponder module and access module for activating and configuring such transponder module over a CAN bus
CN107920333B (en) Multicast scheduling method, HARQ (hybrid automatic repeat request) information receiving method, user equipment and base station
CN104137618A (en) Shared network access via a peer-to-peer link
US11373008B2 (en) Transponder module and access module for activating and configuring such transponder module
CN110249585B (en) Apparatus and method for information request and/or information provision
CN110958308B (en) Method for network distribution, Internet of things equipment and access equipment
CN111788836A (en) Data transmission method and BLE equipment
CN112260780A (en) Network access method, device and system
CN111787514B (en) Method and device for acquiring equipment control data, storage medium and electronic device
EP4117225A1 (en) Secure communication method and apparatus
CN116347656A (en) Bluetooth encryption connection method and device and electronic equipment
CN114205758A (en) Information processing method and device based on Bluetooth
CN113271586B (en) Power equipment body area network safety communication method and system and storage medium
CN113573252B (en) Data transmission method, system, chip, electronic device and storage medium
CN110034927B (en) Communication method and device
CN112422275A (en) Key negotiation method, system, equipment and computer storage medium in UART communication
CN112087745A (en) Network distribution method and device of household appliance, electronic device and storage medium
CN100387000C (en) Method for ensuring user apparatus in cluster to obtain multi-replaying/broadcasting signaling information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination