CN113438633A - Communication data processing method, terminal and computer readable storage medium - Google Patents

Communication data processing method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN113438633A
CN113438633A CN202110683568.8A CN202110683568A CN113438633A CN 113438633 A CN113438633 A CN 113438633A CN 202110683568 A CN202110683568 A CN 202110683568A CN 113438633 A CN113438633 A CN 113438633A
Authority
CN
China
Prior art keywords
bluetooth
protocol
data
private
communication
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.)
Granted
Application number
CN202110683568.8A
Other languages
Chinese (zh)
Other versions
CN113438633B (en
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.)
Shenzhen Songnuo Technology Co ltd
Original Assignee
Shenzhen Songnuo Technology 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 Shenzhen Songnuo Technology Co ltd filed Critical Shenzhen Songnuo Technology Co ltd
Priority to CN202110683568.8A priority Critical patent/CN113438633B/en
Publication of CN113438633A publication Critical patent/CN113438633A/en
Application granted granted Critical
Publication of CN113438633B publication Critical patent/CN113438633B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/02Data link layer protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W92/00Interfaces specially adapted for wireless communication networks
    • H04W92/16Interfaces between hierarchically similar devices
    • H04W92/18Interfaces between hierarchically similar devices between terminal devices
    • 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 application discloses a communication data processing method, a terminal and a computer readable storage medium, wherein the communication data processing method comprises the following steps: acquiring a private communication protocol of a to-be-communicated private protocol device; packaging data to be sent into a data packet based on a private communication protocol; and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and a data packet, and sending the Bluetooth broadcast message, wherein the data domain of the Bluetooth broadcast message comprises the data packet. The data packet of the private communication protocol is packaged into the data domain of the Bluetooth broadcast message, so that the to-be-communicated private protocol device can directly identify and analyze the Bluetooth broadcast message, and communication with the Bluetooth device is realized.

Description

Communication data processing method, terminal and computer readable storage medium
Technical Field
The present application relates to the field of communications, and in particular, to a communication data processing method, a terminal, and a computer-readable storage medium.
Background
With the rapid development of the internet of things smart home industry, the variety of consumer electronic products is increased, the communication technologies used by electronic products are also diverse and all work on 2.4G public open channels, and thus, the whole public channel is greatly polluted. However, the bluetooth device can only communicate with the bluetooth enabled device, and the 2.4G private protocol device can only communicate with the 2.4G private protocol enabled device, so that the existing problem that the bluetooth device cannot communicate with the 2.4G private protocol device exists.
Disclosure of Invention
The embodiment of the application aims to solve the problem that a Bluetooth device and a 2.4G private protocol device cannot communicate by providing a communication data processing method, a terminal and a computer readable storage medium.
In order to achieve the above object, an aspect of the present application provides a communication data processing method applied to a bluetooth device, the method including:
acquiring a private communication protocol of a to-be-communicated private protocol device;
packaging data to be sent into a data packet based on the private communication protocol;
and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet, and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
Optionally, the step of generating a bluetooth broadcast packet based on the bluetooth communication protocol and the data packet includes:
acquiring a protocol format of the Bluetooth communication protocol, and determining the packaging position of the data packet based on the protocol format;
and packaging the data packet based on the packaging position to obtain the Bluetooth broadcast message.
Optionally, the step of generating a bluetooth broadcast packet based on the bluetooth communication protocol and the data packet further includes:
and when at least two pieces of to-be-communicated private protocol equipment exist, packaging the data packet of each piece of to-be-communicated private protocol equipment to a packaging position corresponding to the Bluetooth communication protocol to obtain each Bluetooth broadcast message.
Optionally, the step of obtaining the private communication protocol of the to-be-communicated private protocol device includes:
and acquiring a private communication protocol of the same-frequency private protocol device to be communicated, wherein the working frequency band of the private protocol device to be communicated is the same as that of the Bluetooth device.
In order to achieve the above object, an aspect of the present application provides a communication data processing method applied to a private protocol device, where the method includes:
receiving a Bluetooth broadcast message sent by Bluetooth equipment, wherein a data domain of the Bluetooth broadcast message comprises a data packet of a local private communication protocol;
and communicating with the Bluetooth equipment based on the Bluetooth broadcast message.
Optionally, the step of communicating with the bluetooth device based on the bluetooth broadcast packet includes:
acquiring a lead code and an access address of the Bluetooth broadcast message;
when the lead code is a preset lead code and the access address is a preset access address, analyzing the Bluetooth broadcast message to obtain analysis data;
communicating with the Bluetooth device based on the parsed data.
Optionally, the step of communicating with the bluetooth device based on the parsed data includes:
and establishing a communication link with the Bluetooth device based on the analysis data, and communicating with the Bluetooth device based on the communication link.
In addition, in order to achieve the above object, another aspect of the present application further provides a terminal, where the terminal includes a memory, a processor, and a communication data processing program stored in the memory and running on the processor, and the processor implements the steps of the communication data processing method when executing the communication data processing program.
Optionally, the terminal includes:
the acquisition module is used for acquiring the private communication protocol of the to-be-communicated private protocol device;
a first encapsulation module, configured to encapsulate data to be sent into a data packet based on the private communication protocol;
and the second packaging module is used for generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
In addition, to achieve the above object, another aspect of the present application further provides a computer-readable storage medium having a communication data processing program stored thereon, the communication data processing program, when executed by a processor, implementing the steps of the communication data processing method as described above.
The application provides a communication data processing method, which comprises the steps of obtaining a private communication protocol of a to-be-communicated private protocol device; packaging data to be sent into a data packet based on a private communication protocol; and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and a data packet, and sending the Bluetooth broadcast message, wherein the data domain of the Bluetooth broadcast message comprises the data packet. The data packet of the private communication protocol is packaged into the data domain of the Bluetooth broadcast message, so that the to-be-communicated private protocol device can directly identify and analyze the Bluetooth broadcast message, and communication with the Bluetooth device is realized.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a first embodiment of a communication data processing method according to the present application;
fig. 3 is a schematic flowchart of a communication data processing method according to a second embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a communication process between the bluetooth device and the bluetooth device based on the bluetooth broadcast packet in the communication data processing method according to the present application;
FIG. 5 is a schematic diagram of the structure of a data packet of the 2.4G proprietary protocol of the present application;
fig. 6 is a schematic structural diagram of a bluetooth broadcast message according to the present application;
fig. 7 is a block diagram of a terminal according to the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: acquiring a private communication protocol of a to-be-communicated private protocol device; packaging data to be sent into a data packet based on the private communication protocol; and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet, and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
Because the existing bluetooth device can only communicate with the bluetooth-enabled device and the 2.4G private protocol device can only communicate with the 2.4G private protocol-enabled device, a home needs multiple gateways to coordinate the devices. Therefore, there is a problem that the bluetooth device cannot communicate with the 2.4G private protocol device. The private communication protocol of the to-be-communicated private protocol device is acquired; packaging data to be sent into a data packet based on a private communication protocol; and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and a data packet, and sending the Bluetooth broadcast message, wherein the data domain of the Bluetooth broadcast message comprises the data packet. The data packet of the private communication protocol is packaged into the data domain of the Bluetooth broadcast message, so that the to-be-communicated private protocol device can directly identify and analyze the Bluetooth broadcast message, and communication with the Bluetooth device is realized.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a communication data processing program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for data communication with the background server; the user interface 1003 is mainly used for data communication with a client (user side); when the terminal is a bluetooth device, the processor 1001 may be configured to call the communication data processing program in the memory 1005 and perform the following operations:
acquiring a private communication protocol of a to-be-communicated private protocol device;
packaging data to be sent into a data packet based on the private communication protocol;
and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet, and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
When the terminal is a proprietary protocol device, the processor 1001 may be configured to invoke the communication data processing program in the memory 1005 and perform the following operations:
receiving a Bluetooth broadcast message sent by Bluetooth equipment, wherein a data domain of the Bluetooth broadcast message comprises a data packet of a local private communication protocol;
and communicating with the Bluetooth equipment based on the Bluetooth broadcast message.
Referring to fig. 2, fig. 2 is a schematic flowchart of a communication data processing method according to a first embodiment of the present application.
While the embodiments of the present application provide an embodiment of a communication data processing method, it should be noted that, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown or described here.
The communication data processing method runs on the Bluetooth device side, and comprises the following steps:
step S10, obtaining the private communication protocol of the device with the private protocol to be communicated;
it should be noted that, the private protocol device to be communicated in this application refers to a 2.4G private protocol device, and the private communication protocol refers to a 2.4G private protocol. Wherein, 2.4G is ism frequency band common to all countries, wireless local area network (ieee802.11b/ieee802.11g), Bluetooth, ZigBee and other wireless networks can work in 2.4G frequency band. And the proprietary protocol refers to a protocol without specific standards, and generally refers to a 2.4G wireless communication protocol customized by enterprises or individuals without being reviewed, adopted and approved by national standardization organizations.
The common points of the Bluetooth protocol and the 2.4G private protocol are as follows: the two devices work in a 2.4G frequency band, have the same modulation mode and the same bandwidth, so the waves of the two devices in an air transmission layer are extremely similar, and only the physical layer analysis is different. Secondly, for the bluetooth protocol and the 2.4G private protocol, the physical layer analysis needs to have a preamble and an access address meeting requirements, the bluetooth device and the 2.4G private protocol device can analyze the data packet transmitted over the air, and if the data packet does not meet the requirements, the data packet is discarded. The access address of the bluetooth protocol has specific requirements, but the access address of the 2.4G private protocol can be arbitrarily set according to actual requirements, and the two types of equipment cannot communicate because the access addresses do not accord with each other. Meanwhile, on the MAC layer, bluetooth transmission needs to conform to 802.11 or 802.15 specifications, the preamble, access address, header, and length of the bluetooth transmission need to have specified specifications, and the data sent by the bluetooth transmission needs to ensure that the preamble, access address, header, and length of the bluetooth transmission conform to IEEE standards, so the bluetooth device cannot send any empty packet through configuration, but the 2.4G private protocol device can send any empty packet through configuration modification. Thus, if it is desired to implement communication between the bluetooth device and the 2.4G private protocol device, it is necessary to ensure that the over-the-air data packet sent by the bluetooth device contains a data packet format that can be resolved by the 2.4G private protocol physical layer.
In this embodiment, before the bluetooth device communicates with the 2.4G private protocol device, a 2.4G private protocol corresponding to the 2.4G private protocol device to be communicated needs to be acquired, where each 2.4G private protocol device to be communicated is preset with a corresponding 2.4G private protocol, so that the corresponding 2.4G private protocol may be acquired according to the device information of the 2.4G private protocol device to be communicated, for example, the 2.4G private protocol is acquired based on the device model; or to obtain a 2.4G proprietary protocol based on the device name. The specific obtaining mode of the 2.4G private protocol may be determined according to the user requirement, and is not limited herein.
Step S20, packaging the data to be sent into a data packet based on the private communication protocol;
in this embodiment, the protocol content of the 2.4G private protocol, that is, the data to be sent, is obtained, and the data to be sent is encapsulated into a data packet according to the protocol format of the private communication protocol. Referring to fig. 5, the format of the 2.4G proprietary Protocol Data packet includes a preamble, an access address, a Protocol Data Unit (PDU), and a check CRC, where the PDU refers to a Data Unit transmitted between peer layers.
Step S30, generating a Bluetooth broadcast message based on the Bluetooth communication protocol and the data packet, and sending the Bluetooth broadcast message, wherein the data packet is included in the data domain of the Bluetooth broadcast message.
It should be noted that the bluetooth device needs to acquire a communication address of the 2.4G private protocol to communicate with the 2.4G private protocol, in other words, the user a needs to know the phone number of the user B to realize the communication with the user B when the user a wants to communicate with the user B. Therefore, a communication address of the 2.4G private protocol needs to be added to the bluetooth protocol, so that the 2.4G private protocol device can directly receive and analyze the bluetooth data packet sent by the bluetooth device. In addition, since the bluetooth protocol needs to conform to the 802.11 or 802.15 standard, the data to be transmitted needs to be encapsulated into a communication protocol conforming to the 802.11 or 802.15 standard through the MAC layer, that is, the data of the MAC layer is fixed and cannot be changed. Thus, the 2.4G private protocol can be encapsulated into a PDU of the bluetooth protocol, which is a protocol data unit, including data to be transmitted.
In this embodiment, referring to fig. 6, fig. 6 is a schematic structural diagram of a bluetooth broadcast message. The bluetooth broadcast message is composed of various data fields, including:
leader: 10101010b (0xaa) or 01010101b (0x55), determined by the bit to which the access address is connected, in order to guarantee the alternation of 0 and 1;
access address: an access address of the broadcast;
PDU: a data packet;
checking: performing 24-bit CRC check on the PDU;
wherein, the PDU includes:
header: the broadcast type and the broadcast address type are saved;
length: length of the broadcast PDU
Data: the data of the broadcast.
Because the header and the length of the PDU both occupy one byte, and the data occupy 0-37 bytes, the field of the data in the PDU is used as the encapsulation position of the 2.4G private protocol, and the data packet of the 2.4G private protocol is encapsulated to the position to generate a corresponding Bluetooth broadcast message, and meanwhile, the Bluetooth broadcast message is sent to the air in the form of the data packet. For example, if the operating frequency of the 2.4G private protocol device is 2426MHZ and the access address is 0x 660 x 660 x5A, if the bluetooth device needs to communicate with the 2.4G private protocol device, PDU data padding in the bluetooth protocol is started with 0xC 80 x 780 xF 60 x4A, and after data to be sent is processed by the MAC layer and the physical layer, the encoded over-the-air packet becomes xx xx xx xx xx 555 a 6666 xx xx xx xx xx, and at this time, the over-the-air packet can be directly identified and resolved by the 2.4G private protocol device. Different data are filled in the PDU of the Bluetooth protocol, and compatibility of different devices and different protocols can be realized.
It should be noted that, when the bluetooth device transmits a data packet to the air, it needs to acquire an operating frequency of the 2.4G private protocol device, and determine a current broadcast channel for transmitting the data packet based on the operating frequency, for example, the broadcast channel: 37. 38, 39 are 2402MHz, 2426MHz, 2480MHz, respectively. Furthermore, the bluetooth device needs to perform whitening processing on the data before sending the data packet over the air, in order to reduce the occurrence of multiple consecutive 0's or 1's. Processing data in a whitening manner may reduce data anomalies during over-the-air transmission, as successive low or high levels may cause signal identification anomalies.
In an embodiment, when the bluetooth device serves as a bluetooth gateway, the bluetooth gateway may communicate with multiple 2.4G private protocol devices at the same time, and specifically, the bluetooth gateway obtains a communication protocol of each to-be-communicated 2.4G private protocol device, encapsulates each communication protocol into a PDU of the bluetooth protocol, and generates a corresponding bluetooth broadcast packet. Meanwhile, the working frequency of each 2.4G private protocol device to be communicated is obtained, a broadcast channel for sending the Bluetooth broadcast message is determined based on the working frequency, and the Bluetooth broadcast message is further sent to each 2.4G private protocol device to be communicated in a data packet mode based on the determined broadcast channel, so that the communication with the plurality of 2.4G private protocol devices is realized simultaneously.
In this embodiment, by obtaining the private communication protocol of the to-be-communicated private protocol device, encapsulating data to be sent into a data packet based on the private communication protocol, encapsulating the data packet into a PDU of the bluetooth protocol, generating a bluetooth broadcast packet, and sending the bluetooth broadcast packet to the air in the form of the data packet, so that the 2.4G private protocol device can directly receive and analyze the data packet, thereby implementing communication between the bluetooth device and the 2.4G private protocol device, and achieving the following technical effects: the number of gateways is reduced, co-channel interference of public open 2.4G channels is effectively reduced, Bluetooth equipment/gateways can directly communicate with 2.4G private protocol equipment, a host is allowed to directly communicate with a plurality of equipment or a plurality of types of equipment, communication can be carried out without connection, and interference of peripheral Bluetooth broadcast signals is avoided.
Further, referring to fig. 3, a second embodiment of the communication data processing method of the present application is proposed.
The communication data processing method runs on a private protocol device side, and comprises the following steps:
step S40, receiving a Bluetooth broadcast message sent by a Bluetooth device, wherein a data domain of the Bluetooth broadcast message comprises a data packet of a local private communication protocol;
and step S50, communicating with the Bluetooth equipment based on the Bluetooth broadcast message.
In this embodiment, when the bluetooth device sends a bluetooth broadcast packet in the form of a data packet on the operating frequency of the 2.4G private protocol device, the 2.4G private protocol device receives the data packet, at this time, determines whether the bluetooth data packet includes a data packet format analyzed by the 2.4G private protocol physical layer, if so, analyzes the bluetooth data packet to obtain analysis data, and establishes a communication link with the bluetooth device based on the analysis data.
In an embodiment, referring to fig. 4, the step of communicating with the bluetooth device based on the bluetooth broadcast packet includes:
step S51, obtaining the lead code and the access address of the Bluetooth broadcast message;
step S52, when the lead code is a preset lead code and the access address is a preset access address, analyzing the Bluetooth broadcast message to obtain analysis data;
and step S53, communicating with the Bluetooth device based on the analysis data.
In this embodiment, the preamble of the 2.4G private protocol needs to meet the standard, that is, it needs to start with 55 or AA, and when receiving a data packet sent by a bluetooth device, the 2.4G private protocol device identifies data in the data packet, for example, each byte, and determines whether the preamble in the data packet meets the standard, and if not, discards the data and continues to receive the data packet in the air; if the access address meets the standard, whether the access address in the data packet is the set address is further judged, if so, the data packet is analyzed, the analyzed data is transmitted to the chip end, and the chip end judges whether the protocol content meets the requirement of the 2.4G private protocol or not, so that the communication between the Bluetooth device and the 2.4G private protocol device is realized. For example, if the access address of the 2.4G private protocol device is 0x 660 x 660 x5A, PDU data padding in the bluetooth protocol starts with 0xC 80 x 780 xF 60 x4A, and after the data to be transmitted is processed by the MAC layer and the physical layer, the encoded over-the-air packet becomes xx xx xx 555 a 6666 xx xx xx. Thus, when receiving the data packet, the 2.4G private protocol device determines whether the data packet includes the preamble 55 or AA, and when identifying 55 or AA, further identifies whether the access address set by the data of three or four bits after the preamble is set, and if yes, parses the data in the PDU. That is, in "xx xx xx 555 a 6666 xx xx" bluetooth data ahead of "55" will not be parsed because they do not conform to the data format of the 2.4G proprietary protocol, while bluetooth data behind "66" will be parsed because "55" conforms to the preamble requirements, while "5 a 6666" conforms to the access address requirements.
In this embodiment, when receiving a data packet sent by a bluetooth device, a 2.4G private protocol device may determine whether the data packet includes a corresponding preamble and an access address, and if so, parse PDU data, establish a communication link between the bluetooth device and the 2.4G private protocol device, and implement mutual communication.
In order to more clearly describe the communication data processing method of the present application, in an embodiment, when a bluetooth device/bluetooth gateway needs to communicate with a 2.4G private protocol device, an operating frequency of the 2.4G private protocol device is first obtained and a corresponding 2.4G private protocol is used, a protocol content of the 2.4G private protocol is encapsulated into a data packet, and the data packet is encapsulated into a PDU field in a bluetooth protocol, so as to obtain a corresponding bluetooth broadcast message. At this time, whitening processing is carried out on the Bluetooth data packet, and the whitened Bluetooth data packet is sent on a corresponding broadcast channel, wherein the Bluetooth data packet comprises a Bluetooth broadcast message, and the data packet is a data unit in protocol communication transmission. When receiving a Bluetooth data packet sent by Bluetooth equipment, the 2.4G private protocol equipment acquires a lead code and an access address of the Bluetooth data packet, judges whether the lead code is 55 or AA, discards the data if not and continues to receive the data; if so, further judging whether the access address of the last three or four bits of the lead code is the set access address, if so, analyzing the data in the PDU, sending the analyzed data to the chip end, and judging whether the analyzed data meets the corresponding protocol format by the chip end. Because the PDU field in the Bluetooth data packet is encapsulated with the 2.4G private protocol, the 2.4G private protocol equipment can directly identify and analyze the Bluetooth data packet, thereby opening a communication link between the Bluetooth equipment and the 2.4G private protocol equipment and realizing the communication between the Bluetooth equipment and the 2.4G private protocol equipment.
The present application also provides a terminal, including a memory, a processor, and a communication data processing program stored on the memory and running on the processor, wherein the communication data processing program, when executed by the processor, implements the following steps:
acquiring a private communication protocol of a to-be-communicated private protocol device;
packaging data to be sent into a data packet based on the private communication protocol;
and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet, and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
In one embodiment, referring to fig. 7, the terminal 100 includes an acquisition module 10, a first encapsulation module 20, and a second encapsulation module 30;
the acquiring module 10 is configured to acquire a private communication protocol of a to-be-communicated private protocol device;
the first encapsulating module 20 is configured to encapsulate data to be sent into a data packet based on the private communication protocol;
the second encapsulation module 30 is configured to generate a bluetooth broadcast packet based on a bluetooth communication protocol and the data packet, and send the bluetooth broadcast packet, where a data domain of the bluetooth broadcast packet includes the data packet.
Further, the second encapsulation module 30 includes a first obtaining unit and a second encapsulation unit;
the first obtaining unit is configured to obtain a protocol format of the bluetooth communication protocol, and determine a packaging position of the data packet based on the protocol format;
and the second packaging unit is used for packaging the data packet based on the packaging position to obtain the Bluetooth broadcast message.
Further, the second encapsulating unit is further configured to encapsulate, when there are at least two to-be-communicated private protocol devices, a data packet of each to-be-communicated private protocol device to an encapsulating position corresponding to the bluetooth communication protocol to obtain each bluetooth broadcast packet.
Further, the acquiring module 10 includes a second acquiring unit;
the second obtaining unit is used for obtaining the private communication protocol of the same-frequency private protocol device to be communicated, and the working frequency band of the private protocol device to be communicated is the same as that of the Bluetooth device
In one embodiment, the terminal comprises a receiving module and a communication module;
the receiving module is used for receiving a Bluetooth broadcast message sent by Bluetooth equipment, and a data domain of the Bluetooth broadcast message comprises a data packet of a local private communication protocol;
and the communication module is used for communicating with the Bluetooth equipment based on the Bluetooth broadcast message.
Further, the communication module comprises a third acquisition unit, an analysis unit and a communication unit;
the third obtaining unit is configured to obtain a preamble and an access address of the bluetooth broadcast packet;
the analysis unit is used for analyzing the Bluetooth broadcast message to obtain analysis data when the lead code is a preset lead code and the access address is a preset access address;
the communication unit is used for communicating with the Bluetooth equipment based on the analysis data.
Further, the communication unit comprises a communication subunit;
and the communication subunit is used for establishing a communication link with the Bluetooth equipment based on the analysis data and communicating with the Bluetooth equipment based on the communication link.
The implementation of the functions of each module of the terminal is similar to the process in the embodiment of the method, and is not repeated here.
Furthermore, the present application also provides a computer-readable storage medium having stored thereon a communication data processing method program which, when executed by a processor, implements the steps of the communication data processing method as described above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications of these 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 application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A communication data processing method is applied to a Bluetooth device, and comprises the following steps:
acquiring a private communication protocol of a to-be-communicated private protocol device;
packaging data to be sent into a data packet based on the private communication protocol;
and generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet, and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
2. The communication data processing method of claim 1, wherein the step of generating a bluetooth broadcast message based on the bluetooth communication protocol and the data packet comprises:
acquiring a protocol format of the Bluetooth communication protocol, and determining the packaging position of the data packet based on the protocol format;
and packaging the data packet based on the packaging position to obtain the Bluetooth broadcast message.
3. The communication data processing method of claim 2, wherein the step of generating the bluetooth broadcast message based on the bluetooth communication protocol and the data packet further comprises:
and when at least two pieces of to-be-communicated private protocol equipment exist, packaging the data packet of each piece of to-be-communicated private protocol equipment to a packaging position corresponding to the Bluetooth communication protocol to obtain each Bluetooth broadcast message.
4. The communication data processing method according to claim 1, wherein the step of acquiring the private communication protocol of the to-be-communicated private protocol device includes:
and acquiring a private communication protocol of the same-frequency private protocol device to be communicated, wherein the working frequency band of the private protocol device to be communicated is the same as that of the Bluetooth device.
5. A method for processing communication data, applied to a private protocol device, the method comprising:
receiving a Bluetooth broadcast message sent by Bluetooth equipment, wherein a data domain of the Bluetooth broadcast message comprises a data packet of a local private communication protocol;
and communicating with the Bluetooth equipment based on the Bluetooth broadcast message.
6. The communication data processing method of claim 5, wherein the step of communicating with the Bluetooth device based on the Bluetooth broadcast message comprises:
acquiring a lead code and an access address of the Bluetooth broadcast message;
when the lead code is a preset lead code and the access address is a preset access address, analyzing the Bluetooth broadcast message to obtain analysis data;
communicating with the Bluetooth device based on the parsed data.
7. The communication data processing method of claim 6, wherein the step of communicating with the Bluetooth device based on the parsed data comprises:
and establishing a communication link with the Bluetooth device based on the analysis data, and communicating with the Bluetooth device based on the communication link.
8. A terminal, characterized in that the terminal comprises a memory, a processor and a communication data processing program stored on the memory and running on the processor, the processor implementing the steps of the method according to any one of claims 1 to 7 when executing the communication data processing program.
9. A terminal, characterized in that the terminal comprises:
the acquisition module is used for acquiring the private communication protocol of the to-be-communicated private protocol device;
a first encapsulation module, configured to encapsulate data to be sent into a data packet based on the private communication protocol;
and the second packaging module is used for generating a Bluetooth broadcast message based on a Bluetooth communication protocol and the data packet and sending the Bluetooth broadcast message, wherein the data packet is included in a data domain of the Bluetooth broadcast message.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a communication data processing program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
CN202110683568.8A 2021-06-18 2021-06-18 Communication data processing method, terminal and computer readable storage medium Active CN113438633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110683568.8A CN113438633B (en) 2021-06-18 2021-06-18 Communication data processing method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110683568.8A CN113438633B (en) 2021-06-18 2021-06-18 Communication data processing method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113438633A true CN113438633A (en) 2021-09-24
CN113438633B CN113438633B (en) 2023-03-31

Family

ID=77756667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110683568.8A Active CN113438633B (en) 2021-06-18 2021-06-18 Communication data processing method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113438633B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124868A (en) * 2021-11-23 2022-03-01 北京百度网讯科技有限公司 Instant communication method, device, system, equipment and storage medium
CN115955521A (en) * 2022-09-13 2023-04-11 武汉麦丰创新网络科技有限公司 Method and system for identifying private message

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447627A (en) * 2011-12-05 2012-05-09 上海顶竹通讯技术有限公司 Message encapsulation/decapsulation device and method
US20160073220A1 (en) * 2014-09-09 2016-03-10 Mediatek Inc. Rate Indication and Link Adaptation for Long Range Wireless Networks
WO2016057431A1 (en) * 2014-10-06 2016-04-14 Mediatek Inc. Rate indication and link adaptation for variable data rates in long range wireless networks
CN108810011A (en) * 2018-06-29 2018-11-13 南京南瑞继保电气有限公司 A kind of universal network secure accessing sound zone system and message processing method suitable for power private network
WO2019101153A1 (en) * 2017-11-23 2019-05-31 捷开通讯(深圳)有限公司 Bluetooth-grid-protocol-based outdoor communication method, and mobile terminal and storage medium
CN111263339A (en) * 2020-01-14 2020-06-09 华为技术有限公司 Wireless communication method and device with wireless communication function
CN111818493A (en) * 2020-05-21 2020-10-23 上海橙群微电子有限公司 Data transmission method, wireless network system, node and readable storage medium
US20200359209A1 (en) * 2018-01-29 2020-11-12 Fengping ZHAO Method and system for Bluetooth-based multi-end to multi-end communication
CN112383907A (en) * 2020-11-10 2021-02-19 炬芯科技股份有限公司 Bluetooth private protocol access method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447627A (en) * 2011-12-05 2012-05-09 上海顶竹通讯技术有限公司 Message encapsulation/decapsulation device and method
US20160073220A1 (en) * 2014-09-09 2016-03-10 Mediatek Inc. Rate Indication and Link Adaptation for Long Range Wireless Networks
WO2016057431A1 (en) * 2014-10-06 2016-04-14 Mediatek Inc. Rate indication and link adaptation for variable data rates in long range wireless networks
WO2019101153A1 (en) * 2017-11-23 2019-05-31 捷开通讯(深圳)有限公司 Bluetooth-grid-protocol-based outdoor communication method, and mobile terminal and storage medium
US20200359209A1 (en) * 2018-01-29 2020-11-12 Fengping ZHAO Method and system for Bluetooth-based multi-end to multi-end communication
CN108810011A (en) * 2018-06-29 2018-11-13 南京南瑞继保电气有限公司 A kind of universal network secure accessing sound zone system and message processing method suitable for power private network
CN111263339A (en) * 2020-01-14 2020-06-09 华为技术有限公司 Wireless communication method and device with wireless communication function
CN111818493A (en) * 2020-05-21 2020-10-23 上海橙群微电子有限公司 Data transmission method, wireless network system, node and readable storage medium
CN112383907A (en) * 2020-11-10 2021-02-19 炬芯科技股份有限公司 Bluetooth private protocol access method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124868A (en) * 2021-11-23 2022-03-01 北京百度网讯科技有限公司 Instant communication method, device, system, equipment and storage medium
CN115955521A (en) * 2022-09-13 2023-04-11 武汉麦丰创新网络科技有限公司 Method and system for identifying private message
CN115955521B (en) * 2022-09-13 2023-08-11 武汉麦丰创新网络科技有限公司 Private message identification method and system

Also Published As

Publication number Publication date
CN113438633B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN113411313B (en) Data transmission method, device and system
WO2018059496A1 (en) Method and apparatus for encapsulating /decapsulating data packets at a radio access node
CN113438633B (en) Communication data processing method, terminal and computer readable storage medium
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN109561395A (en) A kind of blue-tooth transmission method and device
CN110535812B (en) Message transmission method, communication device and system
CN110290130B (en) VOLTE data transmission method and device, access network equipment and storage medium
CN112787902A (en) Message encapsulation method and device and message de-encapsulation method and device
KR20060034932A (en) Method and apparatus for transmitting and receiving data via wusb
KR101566555B1 (en) Method and system for configuring a media access control header
CN110611892B (en) Modem short message reporting method, device, system, equipment and medium
WO2015066436A1 (en) Maximum away duration
CN111133792A (en) Base station apparatus and data packet transmission method
CN115733898A (en) Data transmission method and related equipment
CN109661854A (en) The method and apparatus of transmission in wireless network signaling
CN113973134A (en) Data transmission method and device, electronic equipment and computer storage medium
CN111327575B (en) Communication method and device based on Ethernet in train
CN111278145B (en) Method for generating data, method for configuring logical channel, terminal equipment and chip
WO2020097855A1 (en) Wireless communication method and communication device
CN114500167B (en) Information processing method and device, electronic equipment and storage medium
CN110891073B (en) Multi-protocol stack communication method for mobile communication core network
CN113765761B (en) Data transmission method, device, equipment, system and storage medium
CN113114328B (en) Signal relay method, signal identification method, device and equipment
CN112399480B (en) Method, apparatus and storage medium for reducing transmission overhead
WO2022134840A1 (en) Message transmission method and system, and network device and storage medium

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
GR01 Patent grant
GR01 Patent grant