CN109981676A - One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol - Google Patents
One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol Download PDFInfo
- Publication number
- CN109981676A CN109981676A CN201910275783.7A CN201910275783A CN109981676A CN 109981676 A CN109981676 A CN 109981676A CN 201910275783 A CN201910275783 A CN 201910275783A CN 109981676 A CN109981676 A CN 109981676A
- Authority
- CN
- China
- Prior art keywords
- protocol
- attribute module
- binary system
- attribute
- system analysis
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Abstract
The embodiment of the invention discloses one kind to be based on the customized Internet of Things information interacting method of binary system analysis protocol, including creation attribute module, creates protocol rule, binary data dismantling, and data parsing ultimately generates json formatted data.It is provided in an embodiment of the present invention it is a kind of based on the customized Internet of Things information interacting method of binary system analysis protocol by the way that the protocol frame of general parsing binary system reported data a kind of is arranged, support the parsing of a variety of binary system reported datas, it does not need user and writes code, it can complete the parsing of binary system reported data, test method is parsed convenient for forming intuitive, easy-to-use protocol rule configuration interface and binary protocol, convenient for the customized of binary protocol parsing and calculates popularization.
Description
Technical field
The present embodiments relate to Internet of Things fields of communication technology, and in particular to one kind is made by oneself based on binary system analysis protocol
The Internet of Things information interacting method of justice.
Background technique
There are mainly two types of the upper datagram protocols of current internet of things equipment, json agreement, binary system analysis protocol.Json agreement,
It is easy to use, it is easy parsing, is easy application, but for the performance requirement of Internet of Things chip height, the chip of some low sides can not
It supports.And what if the pervious product of conventional hardware business men generally used is not josn agreement, to Json protocol migration, cost
It is higher.Binary system analysis protocol, performance is good, and agreement is brief, but do not have versatility, it is not easy to parse, chip it is supportive
It is relatively good and particularly troublesome from old Internet of things system to platform of internet of things transplanting.
Summary of the invention
For this purpose, the embodiment of the present invention provides one kind based on the customized Internet of Things information exchange side of binary system analysis protocol
Method, it is high to solve development cost in the prior art, do not have versatility, non-intuitive problem.
To achieve the goals above, embodiments of the present invention provide the following technical solutions:
One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol, comprising the following steps:
Attribute module is created, each attribute module includes at least index mark and attribute type;
Protocol rule is created, the protocol logic frame being made of at least one attribute module is built, if the quantity of attribute module is more
In 1, then logical relation route between the module that needs to set a property generates binary system analysis protocol, adds protocol identification code;
Binary data dismantling receives the binary data that internet-of-things terminal uploads, according to the identification code on binary data head
Match protocol identification code transfers binary system analysis protocol, according to the byte set in binary system analysis protocol/position rule to two into
Data processed are split, and obtain splitting attribute module;
Data parsing is matched to attribute module is split in the attribute module in protocol logic frame according to attribute type, and presses
It is recombinated according to the logical relation route of protocol logic frame, obtains json formatted data.
It include complex attribute module in the protocol logic frame in yet another embodiment of the present invention, it is described compound
The removable fractionation attribute module for being divided at least two different attribute type of attribute module, addition split the logic between attribute module
Relationship route.
It include that Property Name, function classification and attribute are fixed in yet another embodiment of the present invention, in the attribute module
Justice.
Detection binary data is received in yet another embodiment of the present invention, after the creation protocol rule, according to
The identification code match protocol identification code for detecting binary data head, transfers corresponding binary system analysis protocol, according to binary system
The byte set in analysis protocol/position rule splits binary data, obtains detection and splits attribute module, according to attribute
Type is matched to attribute module is split in the attribute module in binary system analysis protocol, and according to the logic between attribute module
Relationship route is recombinated, and the accuracy of testing result is verified.
Embodiment according to the present invention has the advantages that
A kind of passed through based on the customized Internet of Things information interacting method of binary system analysis protocol provided in an embodiment of the present invention is set
The protocol frame for setting a kind of general parsing binary system reported data, supports the parsing of a variety of binary system reported datas, is not required to
User is wanted to write code, so that it may the parsing of binary system reported data is completed, convenient for forming intuitive, easy-to-use protocol rule configuration
Interface and binary protocol parse test method, convenient for the customized of binary protocol parsing and calculate popularization.
Detailed description of the invention
It, below will be to embodiment party in order to illustrate more clearly of embodiments of the present invention or technical solution in the prior art
Formula or attached drawing needed to be used in the description of the prior art are briefly described.It should be evident that the accompanying drawings in the following description is only
It is merely exemplary, it for those of ordinary skill in the art, without creative efforts, can also basis
The attached drawing of offer, which is extended, obtains other implementation attached drawings.
Structure depicted in this specification, ratio, size etc., only to cooperate the revealed content of specification, for
Those skilled in the art understands and reads, and is not intended to limit the invention enforceable qualifications, therefore does not have technical
Essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the function of the invention that can be generated
Under effect and the purpose that can reach, should all still it fall in the range of disclosed technology contents obtain and can cover.
Fig. 1 is provided in an embodiment of the present invention a kind of based on the customized Internet of Things information exchange side of binary system analysis protocol
The method flow diagram of method;
Fig. 2 is the building structure figure of binary system analysis protocol provided in an embodiment of the present invention.
In figure:
1, attribute module;2, complex attribute module;3, logic relationship;4, attribute module is split.
Specific embodiment
Embodiments of the present invention are illustrated by particular specific embodiment below, those skilled in the art can be by this explanation
Content disclosed by book is understood other advantages and efficacy of the present invention easily, it is clear that described embodiment is the present invention one
Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
The term of cited such as "upper", "lower", "left", "right", " centre ", is merely convenient to describe in this specification
Be illustrated, rather than to limit the scope of the invention, relativeness is altered or modified, and is changing technology without essence
It inside holds, when being also considered as the enforceable scope of the present invention.
As shown in Figure 1, a kind of be based on the customized Internet of Things information interacting method of binary system analysis protocol, including following step
It is rapid:
Attribute module 1 is created, each attribute module 1 includes at least index mark and attribute type, and index mark is for building two
System search transfers attribute module 1, the data type for the field that attribute type is used to generate after parsing when system builds protocol rule.
Further include Property Name, function classification and attribute definition in attribute module 1, Property Name refers to the name of easy-to-read, as temperature,
Pm2.5, function classification can be divided into it is common with it is special, the effect of attribute definition is the meaning of particular value for describing, such as 1 indicate
Normally, 2 starting is indicated, 3 indicate to close.Binary data as air purifier uploads is parsed, the binary number of upload
According to including pm2.5, temperature and gas concentration lwevel, index mark is respectively pm25, temperature, co2, and function classification is equal
To be common, attribute type is followed successively by integer type, floating type, integer type, and attribute definition is "None", and remarks frame could fill out air
Pm2.5, current indoor temperature, current indoor gas concentration lwevel.
Protocol rule is created, as shown in Fig. 2, the protocol logic frame being made of at least one attribute module 1 is built, if belonging to
Property module 1 quantity more than one, then the logical relation route between the module 1 that needs to set a property generates binary system analysis protocol,
Protocol identification code is added, protocol identification code is the unique identification of binary system analysis protocol, and protocol identification code is arranged in each generation
Binary data head, the content of protocol identification code can set according to the identification code for the binary data to be parsed, and use
It is that binary data matches analysis protocol in the later period.The attribute module 1 of parsing pm2.5, temperature and gas concentration lwevel is such as indexed,
Logical relation route is the company of series connection between pm2.5 attribute module 1, temperature property module 1 and gas concentration lwevel attribute module 1
It connects, forms successive parsing sequence.
In order to increase the diversity of analysis protocol, meet the parsing demand of complicated binary data, in protocol logic frame
Complex attribute module 2, the removable fractionation attribute mould for being divided at least two different attribute type of the complex attribute module 2 can be increased
Block 4, addition split the logical relation route between attribute module 4.Splitting attribute module 4 also may include detachable meeting attribute
Module 1, setting method with aforementioned to meet attribute module 1 identical, it can be achieved that multistage fractionation.Such as temperature attribute module in the example above
There is relevance, therefore by two attributes between the gas concentration lwevel attribute module 1 that 1 and pm2.5 attribute module 1 is connected in series
Module 1 merges into one and complex attribute module 2, forms level-one Splitting Logic relationship.
Binary data dismantling receives the binary data that internet-of-things terminal uploads, according to the knowledge on binary data head
Other code match protocol identification code, transfers the binary system analysis protocol of corresponding protocol identification code, sets according in binary system analysis protocol
Fixed byte/position rule splits binary data, obtains splitting attribute module 4.
Data parsing is matched to the attribute module 1 in protocol logic frame for attribute module 4 is split according to attribute type
On, and recombinated according to the logical relation route of protocol logic frame, obtain json formatted data.
Detection binary data is received after the creation protocol rule, according to the identification code on detection binary data head
Match protocol identification code transfers corresponding binary system analysis protocol, according to the byte set in binary system analysis protocol/position rule
Binary data is split, detection is obtained and splits attribute module 4, is matched to according to attribute type by attribute module 4 is split
It in attribute module 1 in binary system analysis protocol, and is recombinated, is verified according to the logical relation route between attribute module 1
The accuracy of testing result.
Although above having used general explanation and specific embodiment, the present invention is described in detail, at this
On the basis of invention, it can be made some modifications or improvements, this will be apparent to those skilled in the art.Therefore,
These modifications or improvements without departing from theon the basis of the spirit of the present invention are fallen within the scope of the claimed invention.
Claims (4)
1. one kind is based on the customized Internet of Things information interacting method of binary system analysis protocol, which is characterized in that including following step
It is rapid:
Attribute module is created, each attribute module includes at least index mark and attribute type;
Protocol rule is created, the protocol logic frame being made of at least one attribute module is built, if the quantity of attribute module is more
In 1, then logical relation route between the module that needs to set a property generates binary system analysis protocol, adds protocol identification code;
Binary data dismantling receives the binary data that internet-of-things terminal uploads, according to the identification code on binary data head
Match protocol identification code transfers binary system analysis protocol, according to the byte set in binary system analysis protocol/position rule to two into
Data processed are split, and obtain splitting attribute module;
Data parsing is matched to attribute module is split in the attribute module in protocol logic frame according to attribute type, and presses
It is recombinated according to the logical relation route of protocol logic frame, obtains json formatted data.
2. according to claim 1 be based on the customized Internet of Things information interacting method of binary system analysis protocol, feature
Be: comprising complex attribute module in the protocol logic frame, described removable at least two that is divided into of complex attribute module is not belonged to
Property type fractionation attribute module, addition split attribute module between logical relation route.
3. according to claim 1 be based on the customized Internet of Things information interacting method of binary system analysis protocol, feature
It is: includes Property Name, function classification and attribute definition in the attribute module.
4. according to claim 1 be based on the customized Internet of Things information interacting method of binary system analysis protocol, feature
It is: detection binary data is received after the creation protocol rule, according to the identification code on detection binary data head
With protocol identification code, corresponding binary system analysis protocol is transferred, it is right according to the byte set in binary system analysis protocol/position rule
Binary data is split, obtain detection split attribute module, according to attribute type will split attribute module be matched to two into
It in attribute module in analysis protocol processed, and is recombinated according to the logical relation route between attribute module, verifying detection knot
The accuracy of fruit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910275783.7A CN109981676A (en) | 2019-04-08 | 2019-04-08 | One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910275783.7A CN109981676A (en) | 2019-04-08 | 2019-04-08 | One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109981676A true CN109981676A (en) | 2019-07-05 |
Family
ID=67083401
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910275783.7A Pending CN109981676A (en) | 2019-04-08 | 2019-04-08 | One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109981676A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110933146A (en) * | 2019-11-14 | 2020-03-27 | 厦门网宿有限公司 | Data conversion method and device and server |
CN110971704A (en) * | 2019-12-11 | 2020-04-07 | 杭州安恒信息技术股份有限公司 | Data transmission method and device based on JSON configuration file |
CN111614507A (en) * | 2020-04-01 | 2020-09-01 | 西安电子科技大学 | Network protocol feature identification method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073534A (en) * | 2011-02-24 | 2011-05-25 | 深圳市同洲电子股份有限公司 | Data analysis method and device |
CN102571939A (en) * | 2011-12-26 | 2012-07-11 | 广州市玄武无线科技有限公司 | Cross-platform communication method and system |
CN103428192A (en) * | 2012-05-25 | 2013-12-04 | 腾讯科技(北京)有限公司 | Method and apparatus for encapsulating and parsing binary protocol data |
US9473380B1 (en) * | 2013-06-13 | 2016-10-18 | Narus, Inc. | Automatic parsing of binary-based application protocols using network traffic |
CN108881251A (en) * | 2018-06-28 | 2018-11-23 | 广州大学 | A kind of any binary device access parsing and standardized system and method |
CN109104300A (en) * | 2018-07-12 | 2018-12-28 | 华清慧商(北京)科技有限公司 | A kind of general sensing data acquisition parsing of software definition reports things system and method |
CN109217986A (en) * | 2018-10-24 | 2019-01-15 | 杭州倍图自动化系统有限公司 | A kind of data transmission method and system based on Internet of Things |
-
2019
- 2019-04-08 CN CN201910275783.7A patent/CN109981676A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073534A (en) * | 2011-02-24 | 2011-05-25 | 深圳市同洲电子股份有限公司 | Data analysis method and device |
CN102571939A (en) * | 2011-12-26 | 2012-07-11 | 广州市玄武无线科技有限公司 | Cross-platform communication method and system |
CN103428192A (en) * | 2012-05-25 | 2013-12-04 | 腾讯科技(北京)有限公司 | Method and apparatus for encapsulating and parsing binary protocol data |
US9473380B1 (en) * | 2013-06-13 | 2016-10-18 | Narus, Inc. | Automatic parsing of binary-based application protocols using network traffic |
CN108881251A (en) * | 2018-06-28 | 2018-11-23 | 广州大学 | A kind of any binary device access parsing and standardized system and method |
CN109104300A (en) * | 2018-07-12 | 2018-12-28 | 华清慧商(北京)科技有限公司 | A kind of general sensing data acquisition parsing of software definition reports things system and method |
CN109217986A (en) * | 2018-10-24 | 2019-01-15 | 杭州倍图自动化系统有限公司 | A kind of data transmission method and system based on Internet of Things |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110933146A (en) * | 2019-11-14 | 2020-03-27 | 厦门网宿有限公司 | Data conversion method and device and server |
CN110933146B (en) * | 2019-11-14 | 2022-09-16 | 厦门网宿有限公司 | Data conversion method and device and server |
CN110971704A (en) * | 2019-12-11 | 2020-04-07 | 杭州安恒信息技术股份有限公司 | Data transmission method and device based on JSON configuration file |
CN110971704B (en) * | 2019-12-11 | 2022-07-19 | 杭州安恒信息技术股份有限公司 | Data transmission method and device based on JSON configuration file |
CN111614507A (en) * | 2020-04-01 | 2020-09-01 | 西安电子科技大学 | Network protocol feature identification method |
CN111614507B (en) * | 2020-04-01 | 2021-11-05 | 西安电子科技大学 | Network protocol feature identification method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109981676A (en) | One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol | |
CN106648945B (en) | Interface data testing method and device and electronic equipment | |
CN102622396B (en) | A kind of web services clustering method based on label | |
CN106354568A (en) | Method and device for communication between different processes | |
CN102346747B (en) | Method for searching parameters in data model | |
CN111970353A (en) | Data processing method and device for heterogeneous equipment in Internet of things of cloud computing platform | |
CN108762808A (en) | The generation method and system of interface document | |
CN104615765A (en) | Data processing method and data processing device for browsing internet records of mobile subscribers | |
CN104618955B (en) | A kind of mobile communication terminal uniformity test project set creation method and its generation system | |
CN104133765B (en) | The test case sending method of network activity and test case server | |
CN105335570A (en) | Method for netlist comparison based on connection relationship of pins of components | |
CN102147726B (en) | Script-based method for implementing service configuration | |
CN101609399A (en) | Intelligent website development system and method based on modeling | |
CN108170638A (en) | Computational methods, device, equipment and storage medium based on Excel tables | |
CN103530211A (en) | PCIE loop back self-test method based on UVM platform | |
CN107171897A (en) | A kind of interface test method and data-interface test system | |
CN105046289A (en) | Text field type identification method and text field type identification system | |
CN109002483A (en) | Document management method, device, computer equipment and storage medium | |
CN101794283A (en) | Method and system for processing character strings and matcher | |
CN108494613B (en) | System and method for testing interconnection and intercommunication among police digital cluster systems | |
CN104753891B (en) | A kind of XML message analysis method and device | |
CN111898351B (en) | Automatic Excel data importing method and device based on Aviator, terminal equipment and storage medium | |
CN103309851A (en) | Method and system for spam identification of short text | |
CN103024787B (en) | Information processing method and equipment | |
CN108053243A (en) | A kind of commercial product recommending system based on community network |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190705 |