CN113472786A - Data transmission method, device, equipment and medium based on multiple radio frequency communication modules - Google Patents

Data transmission method, device, equipment and medium based on multiple radio frequency communication modules Download PDF

Info

Publication number
CN113472786A
CN113472786A CN202110741526.5A CN202110741526A CN113472786A CN 113472786 A CN113472786 A CN 113472786A CN 202110741526 A CN202110741526 A CN 202110741526A CN 113472786 A CN113472786 A CN 113472786A
Authority
CN
China
Prior art keywords
data
sub
radio frequency
target
frequency 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
CN202110741526.5A
Other languages
Chinese (zh)
Other versions
CN113472786B (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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110741526.5A priority Critical patent/CN113472786B/en
Publication of CN113472786A publication Critical patent/CN113472786A/en
Application granted granted Critical
Publication of CN113472786B publication Critical patent/CN113472786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • 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

Landscapes

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

Abstract

The application discloses data transmission method, device, equipment and medium based on many radio frequency communication module, wherein, many radio frequency communication module include two at least radio frequency communication module, the method includes: detecting that a data packet to be sent exists, wherein target data to be sent is recorded in the data packet, and the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules; analyzing a first sub-parameter according to a first data sub-packet in the data packet, wherein the first sub-parameter is used for describing address information of the target radio frequency communication module; and sequentially sending data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter, thereby effectively improving the reliability of data communication between the gateway and the multiple radio frequency modules.

Description

Data transmission method, device, equipment and medium based on multiple radio frequency communication modules
Technical Field
The present disclosure relates generally to the field of communication coding technologies, and in particular, to a method, an apparatus, a device, and a medium for data transmission based on multiple radio frequency communication modules.
Background
The Internet of Things (The Internet of Things, IOT for short) is to collect any object or process needing monitoring, connection and interaction in real time and collect various required information such as sound, light, heat, electricity, mechanics, chemistry, biology and location through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors and laser scanners, and to realize ubiquitous connection of objects and people through various possible network accesses, so as to realize intelligent sensing, identification and management of objects and processes.
The physical network is an information carrier based on the internet, traditional telecommunication networks and the like, and enables all common physical objects which can be independently addressed to form an interconnected network. All terminal devices are connected through gateway products, but the interfaces of the gateway are limited, so a scheme for controlling the multi-mode radio frequency module to interact with different terminals by using the same interface needs to be considered.
Disclosure of Invention
In view of the foregoing defects or shortcomings in the prior art, it is desirable to provide a data transmission method, device, apparatus and medium based on multiple radio frequency communication modules, which effectively improves the reliability of data communication between a gateway and multiple radio frequency modules.
In a first aspect, an embodiment of the present application provides a data transmission method based on multiple radio frequency communication modules, where the multiple radio frequency communication modules include at least two radio frequency communication modules, and the method includes:
detecting that a data packet to be sent exists, wherein the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules;
analyzing a first sub-parameter according to a first data sub-packet in the data packet, wherein the first sub-parameter is used for describing address information of the target radio frequency communication module;
and sequentially sending the data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter.
In some embodiments, before detecting that there is a data packet to be sent, the method further comprises:
detecting the existence of target data to be sent;
acquiring the target radio frequency communication module corresponding to the target data;
acquiring a protocol database corresponding to the target radio frequency communication module;
and constructing the data packet corresponding to the target data according to the target data and the protocol database.
In some embodiments, the constructing the data packet corresponding to the target data according to the target data and the protocol database includes:
respectively acquiring each sub-parameter in the target data;
and constructing a data sub-package corresponding to the sub-parameters according to the self-parameters corresponding to the sub-parameters and the protocol database department aiming at each sub-parameter.
In some embodiments, the constructing a data sub-packet corresponding to the sub-parameter according to the self-parameter corresponding to the sub-parameter and the protocol database department includes:
constructing a data word field in the data packet according to the self-parameter and the protocol database;
adding a main command word field corresponding to the target radio frequency communication module at the front end of the data word field according to the communication type parameters in the target data and the protocol database;
and according to the protocol database, adding a data header field, a length field and a check field at the front end and the rear end of the intermediate data packet respectively to obtain a data sub-packet corresponding to the sub-parameters.
In a second aspect, an embodiment of the present application provides a gateway, where the gateway performs serial port communication with multiple radio frequency modules, and the gateway includes: a device management module and a serial port protocol analysis module,
the device management module is used for detecting that a data packet to be sent exists, and the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules;
the serial port protocol analysis module is used for analyzing a first sub-parameter according to a first data sub-packet in the data packet, wherein the first sub-parameter is used for describing address information of the target radio frequency communication module; and sequentially sending the data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter.
In some embodiments, the device management module is further to:
detecting the existence of target data to be sent;
acquiring the target radio frequency communication module corresponding to the target data;
acquiring a protocol database corresponding to the target radio frequency communication module;
and constructing the data packet corresponding to the target data according to the target data and the protocol database.
In some embodiments, the device management module is further to:
respectively acquiring each sub-parameter in the target data;
and constructing a data sub-package corresponding to the sub-parameters according to the self-parameters corresponding to the sub-parameters and the protocol database department aiming at each sub-parameter.
In some embodiments, the device management module is further to:
constructing a data word field in the data packet according to the self-parameter and the protocol database;
adding a main command word field corresponding to the target radio frequency communication module at the front end of the data word field according to the communication type parameters in the target data and the protocol database;
according to the protocol database, adding a data head word field, a length word field and a check word field at the front end and the rear end of the intermediate data packet respectively to obtain a data sub-packet corresponding to the sub-parameters
In a third aspect, embodiments of the present application provide an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the method described in the embodiments of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method as described in the embodiments of the present application.
According to the method and the device, the target radio frequency communication module used for sending the target data to the target terminal can be effectively determined according to the first sub-parameter corresponding to the first data sub-package recorded in the data package, and therefore the stability of serial port communication between the gateway and the multiple radio frequency communication modules is effectively improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic block diagram of a multi-rf module system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a data transmission method based on multiple radio frequency communication modules according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another data transmission method based on multiple radio frequency communication modules according to an embodiment of the present disclosure;
fig. 4 is a flowchart of another data transmission method based on multiple radio frequency communication modules according to an embodiment of the present application;
fig. 5 is a signaling interaction diagram of a data transmission process based on multiple radio frequency communication modules according to an embodiment of the present application;
fig. 6 is a block diagram of a gateway according to an embodiment of the present application;
fig. 7 shows a schematic structural diagram of a computer system suitable for implementing the electronic device or the server according to the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
For a clearer description of the present application, the following are explanations of terms of related art:
data frame: and a complete piece of data is transmitted through the serial port.
A word domain: the length of the word field is not fixed 1 byte, for example, the data word field is composed of several bytes.
Field: the serial port data word field is composed of a plurality of corresponding chip fields.
The command field, the program identifies the field, which is not sent over the air, but the program acts as a distinguishing mark identifying the meaning of the data frame.
0 xXX: any 16-ary data, and XX represents any combination of 0-9 digits and a-F characters.
And (3) data flow direction: which wireless modulation chip is responsible for processing the data word field in the data frame.
Basic format of data frame: including a header field (55 or AA), a length field (Len), a master command field (XX), a data field (XX x N) and a check field (CRC).
A data head: the single data frame start flag begins with a two byte sequence of 0x55 or 0 xAA.
Length field: the total byte number of the body command word field + data word field + check word field is expressed in 16 system.
Main command word field: the data flow direction flag is shown, where 0x01 indicates data flow to the bluetooth chip, 0x02 indicates data flow to the infrared chip, 0x03 indicates data flow to the NFC chip, and 0x04 indicates data flow to the Zigbee chip. It should be understood that the mapping relationship between the master command word field and the communication means is illustrative, and the name of the master control chip includes, but is not limited to, the communication means, and may support up to 255 communication means.
Data word field: the data in the word field is the data sent to a specific chip data analysis module.
CRC checking: and checking all data in the main command field and the data field by using a CRC-16/IBM checking method, and generating a 2-byte 16-system result filled in the field.
Fig. 1 is a block diagram of a multi-rf module system according to an embodiment of the present disclosure. As shown in fig. 1, the multi-rf module system includes a gateway 1 and a multi-rf communication module 2, the gateway 1 includes an equipment management module 11, a data management module 12 and a serial protocol analysis module 13, the multi-rf communication module 2 includes a single chip microcomputer 21 and at least two rf modules 22, and serial communication is performed between the serial protocol analysis module 13 and the single chip microcomputer 21.
The data management module 12 is configured to store and receive target data to be uploaded and/or transmitted to form a data queue, the device management module 11 is configured to construct the target data to be transmitted into a data packet according to a preset communication protocol, and the serial port protocol analysis module 13 is configured to send the target data to a corresponding radio frequency module in the serial port module 12 according to the serial port data packet.
Fig. 2 is a flowchart of a data transmission method based on multiple radio frequency communication modules according to an embodiment of the present disclosure. The execution main body of the data transmission method based on the multi-radio-frequency communication module is a gateway, and specifically, a serial port protocol analysis module and an equipment management module are obtained from the gateway.
As shown in fig. 2, the data transmission method based on multiple radio frequency communication modules includes:
step 101: detecting that a data packet to be sent exists, wherein target data to be sent is recorded in the data packet, and the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules.
It should be noted that the data packet is constructed by the device management module according to a preset communication protocol according to target data to be sent in the data management module.
Specifically, as shown in fig. 3, before detecting that there is a data packet to be sent, the method further includes:
step 201, detecting that target data to be sent exists.
The target data to be sent are stored in the data management module, and the data in the data management module classifies and sorts the target data according to a designated target terminal when being issued by a cloud and/or a mode of communicating with the target terminal, so as to form a data queue.
Step 202, a target radio frequency communication module corresponding to the target data is obtained.
And determining a target radio frequency communication module corresponding to the target data according to the data queue to which the target data belongs. Specifically, the target radio frequency communication module can be determined according to a specified communication mode with the target terminal when the target radio frequency communication module is issued by the cloud.
Step 203, a protocol database corresponding to the target rf module is obtained.
The protocol database comprises three tables, wherein the first table is a definition table and is defined as follows:
Figure BDA0003141550430000061
the second is a protocol sub-parameter table defined as follows
Figure BDA0003141550430000062
The third table is an ACK parameter table, which is defined as follows:
name (R) Main key Sub-parameters ACK Result Resend
Data type int int int bool bool
And step 204, constructing a data packet corresponding to the target data according to the target data and the protocol database.
In some embodiments, constructing a data packet corresponding to the target data according to the target data and the protocol database includes: respectively acquiring each sub-parameter in the target data; and constructing a data sub-package corresponding to the sub-parameters according to the self-parameters corresponding to the sub-parameters and the protocol database department aiming at each sub-parameter.
As shown in fig. 4, constructing a data sub-packet corresponding to the sub-parameter according to the self-parameter and the protocol database corresponding to the sub-parameter includes:
step 301, constructing a data word field in the data packet according to the self-parameter and protocol database.
The target data is a data file written in a json format, and the self-parameter is specific parameter information corresponding to each sub-parameter command, for example:
Figure BDA0003141550430000071
the json data file is a first sub-parameter of certain data, the beginning of the json data file is 'deviceID' and is used for specifying the equipment identification number of a target radio frequency communication module, a plurality of sub-parameter instructions can be provided, each instruction is 'desc' and is used for describing an instruction function, the 'file' is used for describing the storage position of the target data in the data management module, and the 'data' is used for describing the specific content (represented in a 16-system character string form) of the current sub-parameter, wherein the 'file' and the 'data' cannot exist at the same time. When "data" is included in the sub-parameter instruction, "len" represents the data length in "data". "goto" is used to describe the processing procedure of jumping to the command of other sub-parameters after the current sub-parameter processing is completed, and the other sub-parameters include sub-parameter 02 and sub-parameter 0x in this embodiment. Wherein, "wait" in the other sub-parameter commands indicates that it needs to wait for the previous sub-parameter to receive ACK (Acknowledge character), and "send" indicates to enter the process of processing the sub-command.
And step 302, adding a main command word domain corresponding to the target radio frequency communication module at the front end of the data word domain according to the communication type parameters and the protocol database in the target data.
The main command word field is a data flow direction identifier, that is, the main command word field is used for indicating the target radio frequency communication module.
And 303, adding a data header field, a length field and a check field at the front end and the rear end of the intermediate data packet respectively according to the protocol database to obtain a data sub-packet corresponding to the sub-parameter.
The header field is a flag for the beginning of the data frame, and may be set according to specific situations, for example, 0x55, 0xAA, etc. may be used. The length field is the total byte number of the main command field, the data field and the check field and is expressed by 16-system. The check word field checks all data in the main command word field and the data word field using a CRC check, i.e., using a CRC-16/IBM check method, and generates a 2-byte 16-ary result to be filled in the word field.
It should be understood that the data sub-packets for each sub-parameter include the same data header field and main command field, i.e., each data sub-packet contains address information of the target rf communication module.
It should be further noted that a data sub-packet may include a plurality of sub-parameters, such as:
Figure BDA0003141550430000081
according to the protocol definition, each field in the table forms a data word field sent by the serial port, and the meaning is as follows: scanning and connecting a Bluetooth radio frequency module with a MAC address of 0xAA:0xBB:0xCC:0xDD:0xEE:0xFF, wherein the total number of bytes of data to be sent is 290 packets (0x010x22 is converted into decimal 290)
Step 102, analyzing a first sub-parameter from a first data sub-packet in the data packet, wherein the first sub-parameter is used for describing address information of the target radio frequency communication module.
It should be understood that when a data packet is sent, it always needs to be parsed from the first data sub-packet in the data packet, i.e., address information of a target rf communication module needs to be determined first.
Here, the content of the "desc" of the first sub-parameter of the json format is "deviceID".
And 103, sequentially sending the data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter.
Specifically, since the "goto" instruction in the parameter instruction of the first sub-parameter directs the sub-parameters executed after the first sub-parameter, and the "goto" instruction in the parameter instruction of each executed sub-parameter can find the sub-parameter to be executed continuously until the "stop" instruction occurs, that is, the sending of the data packet corresponding to the target data is completed.
Therefore, the target radio frequency communication module used for sending the target data to the target terminal can be effectively determined according to the first sub-parameter corresponding to the first data sub-package recorded in the data package, and therefore the stability of serial port communication between the gateway and the multi-radio frequency communication module is effectively improved.
As an embodiment, the target rf communication module is bluetooth, for example.
The protocol database that bluetooth radio frequency module corresponds includes:
Figure BDA0003141550430000091
Figure BDA0003141550430000101
sub-parameter ACK list:
sub-parameters of Bluetooth chip Meaning of parameter values Remarks for note
0x01 Is free of
0x04 Is free of
0x05 Is free of
0x06 00+ packet number: success of the method
01+ packet number: failure of
None: task cancel ACK
0x07 00: success of the method
01: failure of
The system maintains a device protocol relationship table as follows:
Figure BDA0003141550430000102
the look-up table for the name of the subparameter table according to the fourth field protocol bluetoothWordCard is as follows
Figure BDA0003141550430000103
The json in the bluetoothWordCard table represents data issued by the cloud, and the Serial represents data returned by the radio frequency communication module. Whether the True in the ACK column represents that the data carrying the field needs to return ACK, and False represents that ACK does not need to be returned. And when the ACK is needed to be True, continuously checking the Resend field, wherein True represents that the previous packet of data is retransmitted if no ACK or ACK exists and result is false, and otherwise, the previous packet of data is not needed.
The protocol composition table for ACK is named bluetoothWordCardack table:
main key Sub-parameters ACK subparameter Result
1 0x01 00 True
2 0x04 00 True
3 0x05 00 True
4 0x06 00 True
5 0x06 01 False
6 0x07 00 True
7 0x07 01 False
The json format target data received from the cloud and stored in the data management module in the gateway is as follows:
Figure BDA0003141550430000111
Figure BDA0003141550430000121
and only some information data which need to be sent to the serial port multi-radio frequency module by the gateway are reserved in the json format target data. The rules are composed according to the json format described previously. The data to be sent is for the bluetooth module "0xaabbcc data, and the sub-parameter processing flow of 0x01 is entered first. 0x01 sends mac address to connect bluetooth terminal, and needs to wait to play ACK according to database inquiry. When the ACK is received, the method goes to wait for the sub-parameter reception of 0x02 or 0x 03. If 0x02 is received, the process jumps to the sub-parameter 0x04, and if 0x03 is received, the task flow ends. And 0x04 is the data volume to be sent, the ACK is waited according to the database query requirement, and the processing process of the sub-parameters of 0x05 is switched after the ACK is received. 0x05 is sending data dataid, waiting for ACK according to database query requirement, and switching to 0x06 processing process after ACK is received. 0x06 has a file field from the parameter indicating that the send data is stored in a file. The process of sending the data of 0x06 is circulated, each packet data needs to wait for ACK, and then the process of jumping to 0x06 to send the next packet data in the file until the end of the file. Jump to 0x07 subparameter receipt, then 0x07 ends the task flow. The data transmission process is shown in fig. 5.
To sum up, this application can effectively determine the target radio frequency communication module that is used for sending the target data to the target terminal according to the first sub-parameter that the first data sub-package that records in the data packet corresponds to effectively improve the stability of serial communication between gateway and the many radio frequency communication module.
It should be noted that while the operations of the method of the present invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results.
With further reference to fig. 6, fig. 6 is a block diagram illustrating a gateway according to an embodiment of the present application.
As shown in fig. 5, the gateway 1 includes: a device management module 11 and a serial port protocol analysis module 13.
The device management module 11 is configured to detect that a data packet to be sent exists, where the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules;
the serial port protocol analysis module 13 is configured to analyze a first sub-parameter according to a first data sub-packet in the data packet, where the first sub-parameter is used to describe address information of the target radio frequency communication module; and sequentially sending the data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter.
In some embodiments, the device management module 11 is further configured to:
detecting the existence of target data to be sent;
acquiring a target radio frequency communication module corresponding to target data;
acquiring a protocol database corresponding to a target radio frequency communication module;
and constructing a data packet corresponding to the target data according to the target data and the protocol database.
In some embodiments, the device management module 11 is further configured to:
respectively acquiring each sub-parameter in the target data;
and constructing a data sub-package corresponding to the sub-parameters according to the self-parameters corresponding to the sub-parameters and the protocol database department aiming at each sub-parameter.
In some embodiments, the device management module 11 is further configured to:
constructing a data word field in the data packet according to the self-parameter and protocol database;
adding a main command word domain corresponding to the target radio frequency communication module at the front end of the data word domain according to the communication type parameters and the protocol database in the target data;
and according to the protocol database, respectively adding a data head field, a length field and a check field at the front end and the rear end of the middle data packet to obtain a data sub-packet corresponding to the sub-parameters.
The division into several modules or units mentioned in the above detailed description is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
To sum up, this application can effectively determine the target radio frequency communication module that is used for sending the target data to the target terminal according to the first sub-parameter that the first data sub-package that records in the data packet corresponds to effectively improve the stability of serial communication between gateway and the many radio frequency communication module.
It should be noted that details that are not disclosed in the gateway in the embodiments of the present application refer to details disclosed in the above embodiments of the present application, and are not described herein again.
Referring now to fig. 7, fig. 7 illustrates a schematic diagram of a computer system suitable for use in implementing an electronic device or server of an embodiment of the present application,
as shown in fig. 7, the computer system includes a Central Processing Unit (CPU)601, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for operation instructions of the system are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605; an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to embodiments of the present application, the process described above with reference to the flowchart fig. 2 may be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program comprises program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a device management module and a serial protocol parsing module. The names of the units or modules do not limit the units or modules themselves under certain conditions, for example, the device management module may also be described as "detecting that there is a data packet to be sent, where the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules".
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist separately without being assembled into the electronic device. The computer readable storage medium stores one or more programs, and when the programs are used by one or more processors to execute the data transmission method based on multiple radio frequency communication modules described in the present application.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the disclosure. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A data transmission method based on multiple radio frequency communication modules is characterized in that the multiple radio frequency communication modules comprise at least two radio frequency communication modules, and the method comprises the following steps:
detecting that a data packet to be sent exists, wherein target data to be sent is recorded in the data packet, and the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules;
analyzing a first sub-parameter according to a first data sub-packet in the data packet, wherein the first sub-parameter is used for describing address information of the target radio frequency communication module;
and sequentially sending the data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter.
2. The method of claim 1, prior to detecting the presence of a data packet to be transmitted, further comprising:
detecting the existence of target data to be sent;
acquiring the target radio frequency communication module corresponding to the target data;
acquiring a protocol database corresponding to the target radio frequency communication module;
and constructing the data packet corresponding to the target data according to the target data and the protocol database.
3. The method of claim 2, wherein constructing the data packet corresponding to the target data according to the target data and the protocol database comprises:
respectively acquiring each sub-parameter in the target data;
and constructing a data sub-package corresponding to the sub-parameters according to the self-parameters corresponding to the sub-parameters and the protocol database department aiming at each sub-parameter.
4. The method of claim 3, wherein constructing the data sub-packet corresponding to the sub-parameter according to the self-parameter corresponding to the sub-parameter and the protocol database comprises:
constructing a data word field in the data packet according to the self-parameter and the protocol database;
adding a main command word field corresponding to the target radio frequency communication module at the front end of the data word field according to the communication type parameters in the target data and the protocol database;
and according to the protocol database, adding a data header field, a length field and a check field at the front end and the rear end of the intermediate data packet respectively to obtain a data sub-packet corresponding to the sub-parameters.
5. A gateway, characterized in that the gateway communicates with multiple radio frequency modules in a serial port, the gateway comprising: a device management module and a serial port protocol analysis module,
the device management module is used for detecting that a data packet to be sent exists, and the data packet needs to be sent to a target terminal through a target radio frequency communication module in the multiple radio frequency communication modules;
the serial port protocol analysis module is used for analyzing a first sub-parameter according to a first data sub-packet in the data packet, wherein the first sub-parameter is used for describing address information of the target radio frequency communication module; and sequentially sending the data sub-packets corresponding to other sub-parameters in the data packet to the target radio frequency communication module according to the first sub-parameter.
6. The gateway of claim 5, wherein the device management module is further configured to:
detecting the existence of target data to be sent;
acquiring the target radio frequency communication module corresponding to the target data;
acquiring a protocol database corresponding to the target radio frequency communication module;
and constructing the data packet corresponding to the target data according to the target data and the protocol database.
7. The gateway of claim 6, wherein the device management module is further configured to:
respectively acquiring each sub-parameter in the target data;
and constructing a data sub-package corresponding to the sub-parameters according to the self-parameters corresponding to the sub-parameters and the protocol database department aiming at each sub-parameter.
8. The gateway of claim 7, wherein the device management module is further configured to:
constructing a data word field in the data packet according to the self-parameter and the protocol database;
adding a main command word field corresponding to the target radio frequency communication module at the front end of the data word field according to the communication type parameters in the target data and the protocol database;
and according to the protocol database, adding a data header field, a length field and a check field at the front end and the rear end of the intermediate data packet respectively to obtain a data sub-packet corresponding to the sub-parameters.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for transmitting data based on multiple radio frequency communication modules according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the multi-radio frequency communication module-based data transmission method according to any one of claims 1 to 4.
CN202110741526.5A 2021-06-30 2021-06-30 Data transmission method, device, equipment and medium based on multi-radio frequency communication module Active CN113472786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110741526.5A CN113472786B (en) 2021-06-30 2021-06-30 Data transmission method, device, equipment and medium based on multi-radio frequency communication module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110741526.5A CN113472786B (en) 2021-06-30 2021-06-30 Data transmission method, device, equipment and medium based on multi-radio frequency communication module

Publications (2)

Publication Number Publication Date
CN113472786A true CN113472786A (en) 2021-10-01
CN113472786B CN113472786B (en) 2023-07-07

Family

ID=77876901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110741526.5A Active CN113472786B (en) 2021-06-30 2021-06-30 Data transmission method, device, equipment and medium based on multi-radio frequency communication module

Country Status (1)

Country Link
CN (1) CN113472786B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483606A (en) * 2009-02-26 2009-07-15 中国网络通信集团公司 Internal data switch control method for home gateway and home gateway therefor
CN110113323A (en) * 2019-04-20 2019-08-09 深圳瀚星翔科技有限公司 A kind of communication means, electronic equipment and computer readable storage medium
CN111541607A (en) * 2020-04-17 2020-08-14 深圳市信锐网科技术有限公司 Communication method, device, equipment, system and storage medium based on gateway equipment
CN112087441A (en) * 2020-09-03 2020-12-15 郑州信大先进技术研究院 Multi-protocol communication method, intelligent home gateway and multi-protocol communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483606A (en) * 2009-02-26 2009-07-15 中国网络通信集团公司 Internal data switch control method for home gateway and home gateway therefor
CN110113323A (en) * 2019-04-20 2019-08-09 深圳瀚星翔科技有限公司 A kind of communication means, electronic equipment and computer readable storage medium
CN111541607A (en) * 2020-04-17 2020-08-14 深圳市信锐网科技术有限公司 Communication method, device, equipment, system and storage medium based on gateway equipment
CN112087441A (en) * 2020-09-03 2020-12-15 郑州信大先进技术研究院 Multi-protocol communication method, intelligent home gateway and multi-protocol communication system

Also Published As

Publication number Publication date
CN113472786B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
US20180375817A1 (en) Method and apparatus for unified message adaptation
US8381201B2 (en) Processing of expressions
CN113596017B (en) Protocol analysis method and device, soft gateway and storage medium
CN109388417A (en) A kind of update method of communication protocol, system and terminal device
CN109669787B (en) Data transmission method and device, storage medium and electronic equipment
CN107426770A (en) Data communication method, data terminal and system based on data link layer
CN115827928A (en) Vehicle data processing method, device, equipment, medium and product
US20220311644A1 (en) Data transmission method and device, electronic apparatus and storage medium
CN112948306B (en) Method and device for expanding system interface
CN113472786A (en) Data transmission method, device, equipment and medium based on multiple radio frequency communication modules
CN111741138A (en) Robot system registration management method, apparatus and computer-readable storage medium
CN116346961B (en) Financial message processing method and device, electronic equipment and storage medium
CN102520988A (en) Processing method and system of intelligent card individualization data
CN116738745A (en) Communication method, device, equipment and medium of electromagnetic transient simulation system
CN116055576A (en) Data transmission method, system, electronic equipment and storage medium
CN115348320A (en) Communication data conversion method and device and electronic equipment
CN114979307A (en) Communication protocol analysis method, intelligent terminal and storage medium
CN112769741B (en) Message communication method and electronic equipment
CN114928655A (en) Data communication method and device for vehicle, vehicle and storage medium
CN107635009A (en) Method of servicing, system, request of data device and the data supplying device of middleware
CN113992391B (en) Method and device for analyzing message
CN113393288A (en) Order processing information generation method, device, equipment and computer readable medium
CN113518087A (en) IOT protocol reverse docking method and device
CN117061588B (en) Device access method, electronic device, and computer-readable storage medium
CN117880396A (en) Instruction analysis method, device, electronic equipment 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