CN113422765B - Data transmission method and device of Internet of things equipment and Internet of things equipment - Google Patents

Data transmission method and device of Internet of things equipment and Internet of things equipment Download PDF

Info

Publication number
CN113422765B
CN113422765B CN202110678013.4A CN202110678013A CN113422765B CN 113422765 B CN113422765 B CN 113422765B CN 202110678013 A CN202110678013 A CN 202110678013A CN 113422765 B CN113422765 B CN 113422765B
Authority
CN
China
Prior art keywords
data
target
transmission protocol
field
internet
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.)
Active
Application number
CN202110678013.4A
Other languages
Chinese (zh)
Other versions
CN113422765A (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.)
Hangzhou Shendu Technology Co ltd
Original Assignee
Hangzhou Shendu 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 Hangzhou Shendu Technology Co ltd filed Critical Hangzhou Shendu Technology Co ltd
Priority to CN202110678013.4A priority Critical patent/CN113422765B/en
Publication of CN113422765A publication Critical patent/CN113422765A/en
Application granted granted Critical
Publication of CN113422765B publication Critical patent/CN113422765B/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/22Parsing or analysis of headers
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/75Information technology; Communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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/04Protocols for data compression, e.g. ROHC
    • 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/08Protocols for interworking; Protocol conversion
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Communication Control (AREA)

Abstract

The application discloses a data transmission method and device of Internet of things equipment, the Internet of things equipment and an Internet of things system, which can realize data communication of the Internet of things equipment through a preset transmission protocol, wherein the preset transmission protocol distinguishes different data structures through different command codes, and each data structure comprises any number of fields, so that on one hand, the application can reduce the storage space occupied by a data packet and realize compression transmission of data; on the other hand, the method is favorable for improving the packing and unpacking rate and improving the data communication efficiency. In addition, the expandability of the preset transmission protocol supports the compatibility of low versions.

Description

Data transmission method and device of Internet of things equipment and Internet of things equipment
Technical Field
The application relates to the technical field of computers, in particular to a data transmission method and device of Internet of things equipment, the Internet of things equipment and an Internet of things system.
Background
The large-scale application of the Internet of things, a large amount of data transmission exists between equipment and a controller, and the transmitted data format has great influence on the bandwidth and the performance of the Internet of things and also influences the range of usable equipment.
At present, there are about 2 types of communication schemes between internet of things devices: the first method uses json transmission, has good readability and expansibility, but has large volume, complex packing and unpacking and inconvenient equipment use of a singlechip; the second kind is struct structural communication, and this kind of is small, and the packing is unpacked conveniently, and single chip microcomputer equipment also can conveniently use, but the expansibility is poor, and the change all needs to modify the code at every turn, and development is maintained complicacy.
Disclosure of Invention
The application aims to provide a data transmission method and device of Internet of things equipment, the Internet of things equipment and an Internet of things system, and the data transmission method and device, the Internet of things equipment and the Internet of things system are used for solving the problems that a data packet of a transmission protocol of conventional Internet of things equipment occupies a large volume and is low in packaging and unpacking speed. The specific scheme is as follows:
in a first aspect, the present application provides a data transmission method for an internet of things device, including: receiving a data packet of a preset transmission protocol;
reading a command code field of the data packet to obtain a target command code, and further acquiring a target data structure corresponding to the target command code in the preset transmission protocol; the command codes correspond to data structures in the preset transmission protocol one by one, and each data structure comprises any number of fields;
reading a data length field of the data packet to obtain a target data length;
and analyzing the load field of the data packet according to the target data structure and the target data length to obtain received data.
Optionally, the method further includes:
acquiring data to be transmitted;
generating a target command code, and further acquiring a target data structure corresponding to the target command code in a preset transmission protocol;
converting the data to be sent into data of the target data structure to obtain load data;
determining a target data length of the load data;
and packaging the target command code, the target data length and the load data to obtain a data packet of the preset transmission protocol.
Optionally, after reading the command code field of the data packet to obtain the target command code, the method further includes:
loading a corresponding configuration file according to the target command code;
and converting the data packet of the preset transmission protocol into a data packet of a target transmission protocol according to the configuration file, wherein the configuration file records the corresponding relation between the field identification of the preset transmission protocol and the field name of the target transmission protocol, and in the preset transmission protocol, the field identifications of different fields in a data structure corresponding to a single command code are different.
Optionally, the target transmission protocol is json.
Optionally, the field identifier is a numerical code.
Optionally, after receiving the data packet of the preset transmission protocol, the method further includes:
and storing the data packet by using the continuous buffer.
Optionally, the data structure in the preset transmission protocol supports nesting.
In a second aspect, the present application further provides a data transmission device for an internet of things device, including:
the receiving module is used for receiving a data packet of a preset transmission protocol;
the data structure determining module is used for reading a command code field of the data packet to obtain a target command code, and further acquiring a target data structure corresponding to the target command code in the preset transmission protocol;
the data length determining module is used for reading a data length field of the data packet to obtain a target data length;
and the load data determining module is used for analyzing the load field of the data packet according to the target data structure and the target data length to obtain the received data.
In a third aspect, the present application further provides an internet of things device, including:
a memory: for storing a computer program;
a processor: the computer program is used for executing the computer program to realize the data transmission method of the internet of things equipment.
In a fourth aspect, the application provides an internet of things system, which includes the internet of things device as described above, and further includes an integrated device controller and a cloud server, where data communication is performed between the internet of things devices and the integrated device controller through a preset transmission protocol.
The application provides a data transmission method of Internet of things equipment, which comprises the following steps: receiving a data packet of a preset transmission protocol; reading a command code field of the data packet to obtain a target command code, and further acquiring a target data structure corresponding to the target command code in a preset transmission protocol; reading a data length field of the data packet to obtain a target data length; and analyzing the load field of the data packet according to the target data structure and the target data length to obtain the received data.
Therefore, the method realizes data communication among the Internet of things devices through a preset transmission protocol, the preset transmission protocol distinguishes different data structures through different command codes, and each data structure comprises any number of fields, so that on one hand, the storage space occupied by data packets can be reduced, and compressed transmission of data is realized; on the other hand, the method is favorable for improving the packing and unpacking rate and improving the data communication efficiency. In addition, the expandability of the preset transmission protocol supports the compatibility of low versions.
The application also provides a data transmission device of the Internet of things equipment, the Internet of things equipment and an Internet of things system, and the technical effect of the method corresponds to that of the method, and the details are not repeated here.
Drawings
In order to clearly illustrate the embodiments or technical solutions of the present application, the drawings used in the embodiments or technical solutions of the present application will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart illustrating a first implementation of a data transmission method for an internet of things device according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a data packet of a predetermined transmission protocol provided in the present application;
fig. 3 is a schematic diagram illustrating a packing and unpacking process of a predetermined transport protocol provided in the present application;
fig. 4 is a flowchart illustrating an implementation of a second data transmission method for internet of things devices according to the present application;
fig. 5 is a functional block diagram of an embodiment of a data transmission apparatus of an internet of things device provided in the present application;
fig. 6 is a schematic structural diagram of an embodiment of an internet of things device provided by the present application;
fig. 7 is a system architecture diagram of an embodiment of an internet of things system provided herein.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The utility model provides a aim at realizes a new data transmission agreement in thing networking device, guarantees that the data package is small, and it is convenient to pack and unpack, and expansibility is strong, and the data after along with version iteration upgrading do not influence the use of old version data simultaneously. In order to achieve the above object, the present application provides a data transmission method and apparatus for an internet of things device, and an internet of things system, which are introduced below.
First, a first embodiment of a data transmission method for an internet of things device provided by the present application is introduced, and with reference to fig. 1, the first embodiment includes:
s11, receiving a data packet of a preset transmission protocol;
s12, reading a command code field of the data packet to obtain a target command code, and further acquiring a target data structure corresponding to the target command code in a preset transmission protocol;
s13, reading a data length field of the data packet to obtain a target data length;
and S14, analyzing the load field of the data packet according to the target data structure and the target data length to obtain the received data.
The embodiment is applied to the field of internet of things, and defines a preset transmission protocol of an internet of things device in advance, as shown in fig. 2, a data packet of the preset transmission protocol includes but is not limited to three fields: a command code field, a data length field, and a payload field. Furthermore, a plurality of command codes are defined in the preset transmission protocol, each command code uniquely corresponds to one data structure, and each data structure comprises any number of fields. In practical application, the data structures and the fields contained in the data structures can be freely set according to the scene requirements.
The unpacking process is described above, and accordingly, a corresponding packing process can be determined, and a schematic diagram of the packing and unpacking process is shown in fig. 3. The specific packaging process is as follows:
s21, acquiring data to be transmitted;
s22, generating a target command code, and further acquiring a target data structure corresponding to the target command code in a preset transmission protocol;
s23, converting the data to be transmitted into data of a target data structure to obtain load data;
s24, determining the target data length of the load data;
and S25, packaging the target command code, the target data length and the load data to obtain a data packet of a preset transmission protocol.
As a preferred embodiment, the packing and unpacking are processed according to continuous buffers, so that the occupation of storage space is reduced, the packing and unpacking efficiency is improved, and the supported device types are expanded from the operating system device to the single chip device.
On the premise that the packing and unpacking are processed according to continuous buffers, the packing and unpacking logic of the embodiment is as follows: firstly, analyzing a command code of a data packet to find a corresponding data structure; then analyzing the data length to obtain the subsequent continuous load data of the data length; then loading the load data, and analyzing the fields in the load data according to the data structure.
In order to facilitate correspondence of command codes and data structures, the predefining of the data structures may be implemented by macros in the program. Assume that some data structure is as follows:
Figure BDA0003121622670000051
Figure BDA0003121622670000061
the data structure is that A comprises 3 fields, namely a, b and c; c comprises 3 fields, which are c1, c2 and c3 respectively; and c2 comprises 3 fields, c21, c22 and c23. Then, in the preset transmission protocol, the above data structure is predefined as follows:
Figure BDA0003121622670000062
/>
by such predefining, the calling of the preset transmission protocol data can be conveniently realized in the program, for example, the data acquisition can be realized by using the following modes:
a=vson_getint(A,A_a);
b=vson_getstring(A,A_b);
c=vson_getvson(A,A_c);
the vson is a name of a preset transmission protocol, the preset transmission protocol supports nesting, and the c is also vson data which is vson data corresponding to a field c in the data structure a, so that the data in the c can be continuously acquired:
c1=vson_getint(c,C_1);
c2=vson_getvson(c,C_2);
similarly, setting the data of the preset transmission protocol is also in a similar manner:
vson _ setint (a, a _ a, 10)// setting a in a =10
vson _ setstring (a, a _ c, "123")// setting c = "123" in a "
c = vson _ mutablevson (a, a _ c)// vson object defining c
vson _ setint (C, C _1, 100)// setting C1=100 for C
In practical application, data structure of a preset transmission protocol can be conveniently represented by codes through predefined enum enumeration data, and a packing and unpacking process can be conveniently realized by using a packing and unpacking function.
According to the data transmission method of the internet of things equipment, data communication among the internet of things equipment is achieved through the preset transmission protocol, the preset transmission protocol distinguishes different data structures through different command codes, and each data structure comprises any number of fields, so that on one hand, storage space occupied by data packets can be reduced, and compression transmission of data is achieved; on the other hand, the method is favorable for improving the packing and unpacking rate, is convenient for analyzing the data format and improves the data communication efficiency. In addition, the expandability of the preset transmission protocol supports the compatibility of low versions.
A second embodiment of the data transmission method for the internet of things device provided by the present application is described in detail below, and the second embodiment is implemented based on the first embodiment, and is expanded to a certain extent on the basis of the first embodiment. Specifically, the first embodiment realizes the use of a preset transmission protocol, namely, a packing and unpacking process, and the second embodiment realizes the conversion between vson and other transmission protocols through a configuration file on the basis of the first embodiment.
The internet of things system generally comprises the internet of things device, a device centralized controller and a cloud server, and in order to control the internet of things device by the cloud server, mutual conversion between a preset transmission protocol (namely vson) and another transmission protocol (such as json) needs to be realized. In order to facilitate the conversion, different configuration files are generated aiming at different command codes, and the corresponding configuration files can be loaded according to the command codes during the conversion, so that the conversion process can be realized according to the configuration files.
Referring to fig. 4, the second embodiment specifically includes:
s41, loading a corresponding configuration file according to the target command code;
and S42, converting the data packet of the preset transmission protocol into the data packet of the target transmission protocol according to the configuration file.
The configuration file is used for recording the corresponding relation between the field identification of the preset transmission protocol and the field name of the target transmission protocol, and the field identifications of different fields in the data structure corresponding to a single command code in the preset transmission protocol are different.
As a specific implementation manner, the field identifier in the preset transmission protocol may be specifically a digital code, and the target transmission protocol may be json.
It should be noted that, since the preset transport protocol supports nesting, the constituent element of the vson format corresponding to each command code may include not only a field but also another vson format, where another vson format may include multiple fields. In consideration of this, the following two cases can be handled:
in the first case: if all the constituent elements of the vson format corresponding to the target command code are fields, the fields are distinguished by field identifiers. Then, in the configuration file, only the corresponding relationship between the field identifier of each field in the vson format and the field name of each field in the target transport protocol needs to be recorded.
In the second case: if the vson format component element corresponding to the target command code includes both the field and other vson formats, and each component element is referred to as a subclass herein, the fields in the vson format corresponding to the target command code are distinguished by "subclass name + field identification of the field in the subclass to which the field belongs". Correspondingly, in the configuration file, the corresponding relationship between the subclass name and the field identifier in the vson format corresponding to the target command code and the field name of each field in the target transport protocol needs to be recorded.
The second case described above is exemplified below. Assume that the target command code corresponds to the following configuration file:
message:Info
optional:int32:version:1
optional:int32:mac:2
optional:int32:sn_low:3
optional:int32:sn_high:4
optional:string:sn:5
optional:int32:type:6
optional:string:name:7
repeated:Channel:channels:8
message:Channel
optional:int32:id:1
repeated:Register:regs:2
optional:int32:type:3
message:Register
optional:int32:addr:1
optional:int32:addr_type:2
optional:int32:type:3
optional:int32:val:4
optional:int32:delay:5
optional:string:name:6
optional:int32:inout:7
message:cmd
repeated:Register:regs:1
message:tab
optional:int32:id:1
optional:int32:function:2
repeated:cmd:cmds:3
message:group
optional:int32:groupId:1
repeated:int32:ids:2
message:config
repeated:tab:tabs:1
optional:string:trigger:2
optional:int32:start:3
optional:int32:end:4
optional:string:week:5
repeated:group:groups:6
optional:int32:brightness:7
in the above configuration file, each message is a subclass, the value following the message is the name of the subclass, and the fields in the individual subclasses are distinguished by field identifiers (specifically, numerical codes used herein). For example, an optional string which is trigger:2 indicates that the field name of the numeric code =2 is trigger, the type is a character string, and the converted json is { "trigger": the character string analyzed in vson }.
As described above, the present embodiment employs "attribute: type (2): the field name: the field identification is configured. Wherein, the attributes have 3 kinds, namely optional, required and required, which respectively represent optional, must fill and array; types are int8, int16, int32, int64, string, subtype and the like, wherein the subtype is defined before the field declaration; the field name is the name of the field in json; the field identification is a unique mark of each field in the subclass, and a digital coding mode is adopted here, generally starting from 1, and the number coding is increased for newly added fields.
It can be understood that the field id in each sub-class is unique, for example, the message group in the configuration file has two fields group and IDs, the number codes of the two fields are 1 and 2, respectively, and if a field is added later, the number code of the field is more than 3, so as to ensure that the number codes of each field do not conflict.
According to the data transmission method of the internet of things equipment, the json convenience is achieved and the struct efficiency is achieved after the internet of things equipment adopts the vson transmission protocol. Tests show that the embodiment has at least the following advantages: (1) The volume of the data is reduced as much as struct due to the fact that the volume of vson is 1/4 of json; (2) Continuous buffers are adopted for packing and unpacking, application scenes are expanded, and the method can be conveniently used in single chip microcomputer equipment; (3) The conversion of the vson and the json is realized through the configuration file, the json of the cloud server can be conveniently converted into the vson to be sent to the Internet of things equipment, and the vson of the Internet of things equipment can also be converted into the json to be reported to the cloud server without modifying codes; (4) The iteration of the versions is more convenient, and the compatibility of the low version is supported.
In the following, embodiments of the data transmission device of the internet of things device provided by the present application are introduced, and the data transmission device of the internet of things device described below and the data transmission method of the internet of things device described above may be referred to in a corresponding manner.
As shown in fig. 5, the data transmission device of the internet of things device of this embodiment includes:
a receiving module 51, configured to receive a data packet of a preset transmission protocol;
a data structure determining module 52, configured to read a command code field of the data packet, obtain a target command code, and further obtain a target data structure corresponding to the target command code in the preset transport protocol;
a data length determining module 53, configured to read a data length field of the data packet to obtain a target data length;
and a load data determining module 54, configured to analyze the load field of the data packet according to the target data structure and the target data length, so as to obtain received data.
The data transmission device of the internet of things device in this embodiment is used to implement the data transmission method of the internet of things device, and therefore, a specific implementation of the device may be found in the foregoing embodiment of the data transmission method of the internet of things device, and a description thereof is not further provided.
In addition, the present application further provides an internet of things device, as shown in fig. 6, including:
the memory 100: for storing a computer program;
the processor 200: for executing the computer program to implement the data transmission method of the internet of things device as described above.
The Internet of things equipment can be specifically an air conditioner, a floor heater, a curtain and the like.
Finally, the application provides an internet of things system, as shown in fig. 7, including the internet of things device as described above, further including an integrated device controller and a cloud server, data communication is performed between the internet of things devices and the integrated device controller through a preset transmission protocol.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above detailed descriptions of the solutions provided in the present application, and the specific examples applied herein are set forth to explain the principles and implementations of the present application, and the above descriptions of the examples are only used to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. A data transmission method of Internet of things equipment is characterized by comprising the following steps:
receiving a data packet of a preset transmission protocol, wherein the data packet of the preset transmission protocol comprises three fields: a command code field, a data length field, and a load field;
reading a command code field of the data packet to obtain a target command code, and further acquiring a target data structure corresponding to the target command code in the preset transmission protocol; the command codes correspond to data structures in the preset transmission protocol one by one, and each data structure comprises any number of fields;
reading a data length field of the data packet to obtain a target data length;
analyzing the load field of the data packet according to the target data structure and the target data length to obtain received data;
after receiving the data packet of the preset transmission protocol, the method further comprises:
and storing the data packet by using the continuous buffer.
2. The method of claim 1, further comprising:
acquiring data to be transmitted;
generating a target command code, and further acquiring a target data structure corresponding to the target command code in a preset transmission protocol;
converting the data to be sent into data of the target data structure to obtain load data;
determining a target data length of the load data;
and packaging the target command code, the target data length and the load data to obtain a data packet of the preset transmission protocol.
3. The method of claim 1, wherein after reading the command code field of the data packet to obtain the target command code, further comprising:
loading a corresponding configuration file according to the target command code;
and converting the data packet of the preset transmission protocol into a data packet of a target transmission protocol according to the configuration file, wherein the configuration file records the corresponding relation between the field identification of the preset transmission protocol and the field name of the target transmission protocol, and in the preset transmission protocol, the field identifications of different fields in a data structure corresponding to a single command code are different.
4. The method of claim 3, wherein the target transport protocol is json.
5. The method of claim 3, wherein the field identification is a numerical encoding.
6. The method according to any of claims 1 to 5, wherein the data structure in the pre-defined transport protocol supports nesting.
7. The utility model provides a data transmission device of thing networking equipment which characterized in that includes:
a receiving module, configured to receive a data packet of a preset transmission protocol, where the data packet of the preset transmission protocol includes three fields: a command code field, a data length field, and a load field;
the data structure determining module is used for reading a command code field of the data packet to obtain a target command code, and further acquiring a target data structure corresponding to the target command code in the preset transmission protocol;
the data length determining module is used for reading the data length field of the data packet to obtain the target data length;
the load data determining module is used for analyzing the load field of the data packet according to the target data structure and the target data length to obtain received data;
after receiving the data packet of the preset transmission protocol, the method further comprises:
and storing the data packet by using the continuous buffer.
8. An internet of things device, comprising:
a memory: for storing a computer program;
a processor: the computer program is executed to implement the data transmission method of the internet of things device as claimed in any one of claims 1 to 6.
9. An internet of things system, comprising the internet of things device as claimed in claim 8, and further comprising an integrated device controller and a cloud server, wherein data communication is performed between the internet of things devices and the integrated device controller through a preset transmission protocol.
CN202110678013.4A 2021-06-18 2021-06-18 Data transmission method and device of Internet of things equipment and Internet of things equipment Active CN113422765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110678013.4A CN113422765B (en) 2021-06-18 2021-06-18 Data transmission method and device of Internet of things equipment and Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110678013.4A CN113422765B (en) 2021-06-18 2021-06-18 Data transmission method and device of Internet of things equipment and Internet of things equipment

Publications (2)

Publication Number Publication Date
CN113422765A CN113422765A (en) 2021-09-21
CN113422765B true CN113422765B (en) 2023-04-07

Family

ID=77789094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110678013.4A Active CN113422765B (en) 2021-06-18 2021-06-18 Data transmission method and device of Internet of things equipment and Internet of things equipment

Country Status (1)

Country Link
CN (1) CN113422765B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783893A (en) * 2021-09-29 2021-12-10 远景智能国际私人投资有限公司 Data transmission method, device and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971704A (en) * 2019-12-11 2020-04-07 杭州安恒信息技术股份有限公司 Data transmission method and device based on JSON configuration file
CN111935196A (en) * 2020-10-13 2020-11-13 之江实验室 Protocol conversion method of Modbus and dnp3 based on EdgeX Foundation
CN111970267A (en) * 2020-08-13 2020-11-20 国网电子商务有限公司 Data protocol conversion method and device, electronic equipment and storage medium
CN112039833A (en) * 2020-06-08 2020-12-04 武汉光谷电气有限公司 Communication manager system and engineering configuration method
CN112087441A (en) * 2020-09-03 2020-12-15 郑州信大先进技术研究院 Multi-protocol communication method, intelligent home gateway and multi-protocol communication system
CN112104664A (en) * 2020-11-02 2020-12-18 长沙树根互联技术有限公司 Protocol conversion method, device and equipment for data of Internet of things
CN112511416A (en) * 2020-11-23 2021-03-16 四川长虹电器股份有限公司 Rule-based data communication protocol conversion system, decoding method and encoding method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015145209A1 (en) * 2014-03-27 2015-10-01 Pismo Labs Technology Limited Methods and systems for identifying data sessions at a vpn gateway

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971704A (en) * 2019-12-11 2020-04-07 杭州安恒信息技术股份有限公司 Data transmission method and device based on JSON configuration file
CN112039833A (en) * 2020-06-08 2020-12-04 武汉光谷电气有限公司 Communication manager system and engineering configuration method
CN111970267A (en) * 2020-08-13 2020-11-20 国网电子商务有限公司 Data protocol conversion method and device, electronic equipment and storage medium
CN112087441A (en) * 2020-09-03 2020-12-15 郑州信大先进技术研究院 Multi-protocol communication method, intelligent home gateway and multi-protocol communication system
CN111935196A (en) * 2020-10-13 2020-11-13 之江实验室 Protocol conversion method of Modbus and dnp3 based on EdgeX Foundation
CN112104664A (en) * 2020-11-02 2020-12-18 长沙树根互联技术有限公司 Protocol conversion method, device and equipment for data of Internet of things
CN112511416A (en) * 2020-11-23 2021-03-16 四川长虹电器股份有限公司 Rule-based data communication protocol conversion system, decoding method and encoding method

Also Published As

Publication number Publication date
CN113422765A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN112688967B (en) Internet of things data processing method, device, equipment and storage medium
EP3014852B1 (en) Methods for dynamically binding header field identifiers in a network control protocol
US20030188054A1 (en) Data transfer apparatus and method
US20040246909A1 (en) Apparatus and method for transferring USB transaction over wireless personal area network
CN101840332B (en) Data processing method, device and system of JAVA intelligent card
JP2009512240A (en) Data transmission rate improvement mechanism in wireless network
US20060083234A1 (en) Method and apparatus for transmitting and receiving data via wireless universal serial bus (WUSB)
CN113422765B (en) Data transmission method and device of Internet of things equipment and Internet of things equipment
WO2022027480A1 (en) Data collection method and apparatus, modbus system, and storage medium
CN110830466B (en) Method and device for framing DL/T645 protocol message based on XML
US8335874B2 (en) Increased speed of processing of data received over a communications link
CN111314004A (en) Time service method and device for smart home, terminal equipment and storage medium
CN101437046A (en) Method for processing data of solid-state hard disk, solid-state hard disk and network appliance
WO2024001163A1 (en) Attribute data conversion method and apparatus, storage medium, and electronic device
JP4990304B2 (en) Frame transmitting / receiving apparatus and communication data processing method
CN108306757B (en) Programmable data plane virtual layer construction method and storage medium
CN101494661A (en) Method and apparatus for reading data of protocol stack of transmission control protocol/internet protocol
CN114079675B (en) Message processing method, device, terminal equipment and mobile broadband internet surfing equipment
CN113115087B (en) Wireless updated content U disk and implementation method thereof
US7089257B2 (en) Method and system for providing a unified data exchange and storage format
CN112511528B (en) Streaming media distribution method, system, server and storage medium
CN113098858B (en) Lock-free processing system and method for link establishment message
WO2022121045A1 (en) Data docking method and apparatus, computer device, and storage medium
WO2023097903A1 (en) Message transmission method and apparatus, electronic device, and storage medium
CN118227343A (en) Data processing method, system, device, equipment, medium and product

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