CN108650280A - A kind of adaptive multi-protocol adaptation method - Google Patents
A kind of adaptive multi-protocol adaptation method Download PDFInfo
- Publication number
- CN108650280A CN108650280A CN201810878690.9A CN201810878690A CN108650280A CN 108650280 A CN108650280 A CN 108650280A CN 201810878690 A CN201810878690 A CN 201810878690A CN 108650280 A CN108650280 A CN 108650280A
- Authority
- CN
- China
- Prior art keywords
- data
- protocol
- distance
- adaptive multi
- adaptation method
- 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
- 238000000034 method Methods 0.000 title claims abstract description 16
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 13
- 230000006978 adaptation Effects 0.000 title claims abstract description 11
- 238000007493 shaping process Methods 0.000 claims description 6
- 239000003550 marker Substances 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000009430 construction management Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
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/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a kind of adaptive multi-protocol adaptation methods, client data and addition custom protocol two methods acquisition protocols data are received using TCP server services, custom protocol directly stores, by the data of TCP server service acquisitions after KNN is trained, it can obtain prediction classification, subdivision group is obtained after subdivision to be stored, it is trained by KNN in the present invention, adaptive distinct device data can be properly arrived at, in conjunction with the input of custom protocol, various different types of equipment can be preferably adapted to, administrator is facilitated to be managed different types of equipment and data, save operation cost, improve service efficiency.
Description
Technical field
The invention belongs to communication protocol fields, and in particular to a kind of adaptive multi-protocol adaptation method.
Background technology
It is mostly user management, work attendance statistics, project management, equipment management etc. in existing construction management system.It is setting
In standby management, usually the typing of the information such as the usage time of equipment, user of service and check.It has the following problems:
1, cannot collecting device in real time data information, manager can not grasp the real time status of equipment in time.
2, administrator cannot be arranged or control device in real time, not reach effective management of polymorphic type equipment, then
Scene just needs manually to go control device, waste of manpower.
Invention content
The purpose of the present invention is to overcome the above shortcomings and to provide a kind of adaptive multi-protocol adaptation methods, can be better
Various agreements are adapted to, grasp the data mode of field device in time.
In order to achieve the above object, the present invention includes the following steps:
Step 1 starts the TCP server services in background system or/and adds custom protocol in background system,
Custom protocol include data, order, device number offset and length;
The data information received or/and custom protocol information are committed to background server by step 2, background system;
Step 3, background server classify the data information received, and by sorted same data message
As training sample, remainder data information carries out KNN training, the prediction classification marker that will be obtained after training as test data
For major class;
Background server stores custom protocol information;
Major class is carried out secondary classification by step 4, obtains the subdivision group of corresponding agreement, and stored.
In step 1, custom protocol can add characteristic value.
In step 1, custom protocol is to be converted to json character strings.
In step 3, in KNN training, it is used as the non-phase between each training sample by calculating the distance between training sample
Like property index, the distance between training sample uses Euclidean distance or manhatton distance.
Euclidean distance isManhatton distance is
Wherein, x is the feature header byte shaping number and trail byte shaping number average value of custom protocol, and y is custom protocol
Single packet packet length.
The specific method is as follows for KNN training:
The first step calculates the distance between test data and each training sample;
Second step is ranked up according to the incremental relationship of distance;
Third walks, K point of selected distance minimum;
4th step, the frequency of occurrences of classification where K point before determining;
5th step is classified the highest classification of the frequency of occurrences in preceding K point as the prediction of test data.
Compared with prior art, the present invention receives client data and addition custom protocol using TCP server services
Two methods acquisition protocols data, custom protocol directly store, and are instructed by KNN by the data of TCP server service acquisitions
After white silk, prediction classification can be obtained, subdivision group is obtained after subdivision and is stored, is trained by KNN in the present invention, it can be fine
Ground reaches adaptive distinct device data, in conjunction with the input of custom protocol, can preferably be adapted to various different types of
Equipment facilitates administrator and is managed to different types of equipment and data, saves operation cost, improves using effect
Rate.
Description of the drawings
Fig. 1 is the control flow chart of the present invention;
Fig. 2 is the characteristic value statistical chart of the present invention.
Specific implementation mode
The present invention will be further described below in conjunction with the accompanying drawings.
Referring to Fig. 1, the present invention includes the following steps:
Step 1 starts the TCP server services in background system or/and adds custom protocol in background system,
Custom protocol include data, order, device number offset and length;
The data information received or/and custom protocol information are committed to background server by step 2, background system;
Step 3, background server classify the data information received, and by sorted same data message
As training sample, other data informations carry out KNN training, the prediction classification marker that will be obtained after training as test data
For major class;
Background server stores custom protocol information;
Major class is carried out secondary classification by step 4, obtains the subdivision group of corresponding agreement, and stored.
Custom protocol can add characteristic value, such as
1, be beginning with 0xF0, with r n terminate
2, it is beginning with 0xF1, is to terminate with 0xF1, length n, and wherein the 2nd, 3 byte is data length, most
The latter byte is 0xF1, and n-1 byte is data check value.It will be changed as other characters when there is data to be 0xF1.
3, it is beginning with 0xF2,0xF2 is to terminate.
4, all agreements are json character strings, in case for beginning, in case it is to terminate, wherein protocol data all transforms into word
Symbol string.
5, agreement uses http standard protocol transmissions.
6, other standards agreement.
Referring to Fig. 2, in KNN training, it is used as the non-phase between each training sample by calculating the distance between training sample
Like property index, the distance between training sample uses Euclidean distance or manhatton distance;
Euclidean distance isManhatton distance is
Wherein, x is the feature header byte shaping number and trail byte shaping number average value of custom protocol, and y is custom protocol
Single packet packet length.
The specific method is as follows for KNN training:
The first step calculates the distance between test data and each training sample;
Second step is ranked up according to the incremental relationship of distance;
Third walks, K point of selected distance minimum;
4th step, the frequency of occurrences of classification where K point before determining;
5th step is classified the highest classification of the frequency of occurrences in preceding K point as the prediction of test data.
Shown in its following format of semantic file formed:
In use, background system receives the data that client is sent, background system parses the data received, will
It stores data in data and database after parsing to be compared, to select compatible agreement.
Claims (6)
1. a kind of adaptive multi-protocol adaptation method, which is characterized in that include the following steps:
Step 1 starts the TCP server services in background system or/and adds custom protocol in background system, makes by oneself
Adopted agreement include data, order, device number offset and length;
The data information received or/and custom protocol information are committed to background server by step 2, background system;
Step 3, background server classify the data information received, and using sorted same data message as
Training sample, remainder data information carry out KNN training, are big by the prediction classification marker obtained after training as test data
Class;
Background server stores custom protocol information;
Major class is carried out secondary classification by step 4, obtains the subdivision group of corresponding agreement, and stored.
2. a kind of adaptive multi-protocol adaptation method according to claim 1, which is characterized in that self-defined in step 1
Agreement can add characteristic value.
3. a kind of adaptive multi-protocol adaptation method according to claim 1, which is characterized in that self-defined in step 1
Agreement is to be converted to json character strings.
4. a kind of adaptive multi-protocol adaptation method according to claim 1, which is characterized in that in step 3, instructed in KNN
In white silk, by calculate training sample between distance be used as the non-similarity index between each training sample, between training sample away from
From using Euclidean distance or manhatton distance.
5. a kind of adaptive multi-protocol adaptation method according to claim 4, which is characterized in that Euclidean distance isManhatton distance isWherein, x is custom protocol
Feature header byte shaping number and trail byte shaping number, y be custom protocol single packet packet length.
6. a kind of adaptive multi-protocol adaptation method according to claim 1, which is characterized in that the specific side of KNN training
Method is as follows:
The first step calculates the distance between test data and each training sample;
Second step is ranked up according to the incremental relationship of distance;
Third walks, K point of selected distance minimum;
4th step, the frequency of occurrences of classification where K point before determining;
5th step is classified the highest classification of the frequency of occurrences in preceding K point as the prediction of test data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810878690.9A CN108650280A (en) | 2018-08-03 | 2018-08-03 | A kind of adaptive multi-protocol adaptation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810878690.9A CN108650280A (en) | 2018-08-03 | 2018-08-03 | A kind of adaptive multi-protocol adaptation method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108650280A true CN108650280A (en) | 2018-10-12 |
Family
ID=63760806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810878690.9A Pending CN108650280A (en) | 2018-08-03 | 2018-08-03 | A kind of adaptive multi-protocol adaptation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108650280A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111586027A (en) * | 2020-04-30 | 2020-08-25 | 浙江省机电设计研究院有限公司 | Multi-protocol-adaptive Internet of things terminal and protocol self-adaption method thereof |
CN111671405A (en) * | 2020-05-29 | 2020-09-18 | 昭苏县西域马业有限责任公司 | Saddle with health detection device, health detection system and method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102394827A (en) * | 2011-11-09 | 2012-03-28 | 浙江万里学院 | Hierarchical classification method for internet flow |
CN103297427A (en) * | 2013-05-21 | 2013-09-11 | 中国科学院信息工程研究所 | Unknown network protocol identification method and system |
US20130289989A1 (en) * | 2012-04-26 | 2013-10-31 | Fadi Biadsy | Sampling Training Data for an Automatic Speech Recognition System Based on a Benchmark Classification Distribution |
CN104270392A (en) * | 2014-10-24 | 2015-01-07 | 中国科学院信息工程研究所 | A network protocol recognition method and system based on three-classifier cooperative training and learning |
CN104506484A (en) * | 2014-11-11 | 2015-04-08 | 中国电子科技集团公司第三十研究所 | Proprietary protocol analysis and identification method |
CN106850338A (en) * | 2016-12-30 | 2017-06-13 | 西可通信技术设备(河源)有限公司 | A kind of R+1 classes application protocol recognition method and device based on semantic analysis |
-
2018
- 2018-08-03 CN CN201810878690.9A patent/CN108650280A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102394827A (en) * | 2011-11-09 | 2012-03-28 | 浙江万里学院 | Hierarchical classification method for internet flow |
US20130289989A1 (en) * | 2012-04-26 | 2013-10-31 | Fadi Biadsy | Sampling Training Data for an Automatic Speech Recognition System Based on a Benchmark Classification Distribution |
CN103297427A (en) * | 2013-05-21 | 2013-09-11 | 中国科学院信息工程研究所 | Unknown network protocol identification method and system |
CN104270392A (en) * | 2014-10-24 | 2015-01-07 | 中国科学院信息工程研究所 | A network protocol recognition method and system based on three-classifier cooperative training and learning |
CN104506484A (en) * | 2014-11-11 | 2015-04-08 | 中国电子科技集团公司第三十研究所 | Proprietary protocol analysis and identification method |
CN106850338A (en) * | 2016-12-30 | 2017-06-13 | 西可通信技术设备(河源)有限公司 | A kind of R+1 classes application protocol recognition method and device based on semantic analysis |
Non-Patent Citations (1)
Title |
---|
黄勤龙 等: "《云计算数据安全》", 31 January 2018 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111586027A (en) * | 2020-04-30 | 2020-08-25 | 浙江省机电设计研究院有限公司 | Multi-protocol-adaptive Internet of things terminal and protocol self-adaption method thereof |
CN111671405A (en) * | 2020-05-29 | 2020-09-18 | 昭苏县西域马业有限责任公司 | Saddle with health detection device, health detection system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103595576B (en) | Interconnection port ICP flow statistical system and method based on content provider identifications | |
CN111970353B (en) | Data processing method and device for heterogeneous equipment in Internet of things of cloud computing platform | |
CN101202652B (en) | Device for classifying and recognizing network application flow quantity and method thereof | |
CN102624700B (en) | Based on method for identifying ID and the system of customizing messages | |
CN104809117B (en) | Video data aggregation processing method, paradigmatic system and video search platform | |
CN100563168C (en) | Applied traffic statistics method and device | |
CN108650280A (en) | A kind of adaptive multi-protocol adaptation method | |
CN101605126A (en) | A method and system for classification and identification of multi-protocol data | |
CN103414693B (en) | Get method and device for dotting ready | |
CN104333483A (en) | Identification method, system and identification device for internet application flow | |
CN102938764A (en) | Application identification processing method and device | |
CN108462615A (en) | A kind of network user's group technology and device | |
CN108920689A (en) | Source of goods recommended method and system | |
CN109548063A (en) | Handle method, apparatus, equipment and the storage medium of message | |
CN101022403B (en) | A Blind Recognition Method for Stateful Applications | |
CN105515921A (en) | Method and device for achieving real-time monitoring over network fragment message flow | |
US7853654B2 (en) | Mass mail detection system and mail server | |
CN104333461A (en) | Identification method, system and identification device for internet application flow | |
CN105701224B (en) | Security information customized service system based on big data | |
CN108600107A (en) | A kind of stream matching process can customize content field | |
CN108809752B (en) | Adaptive monitoring method and device for network traffic, NPB (network provider node B) equipment and medium | |
JP5955943B2 (en) | Method and apparatus for extracting data from a data stream moving over an IP network | |
CN102984242A (en) | Automatic identification method and device of application protocols | |
CN109217986A (en) | A kind of data transmission method and system based on Internet of Things | |
CN102663053A (en) | Distributed server system based on image content search |
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: 20181012 |