CN109818811B - Method for identifying distribution type and mixed type MAC protocol - Google Patents
Method for identifying distribution type and mixed type MAC protocol Download PDFInfo
- Publication number
- CN109818811B CN109818811B CN201910227220.0A CN201910227220A CN109818811B CN 109818811 B CN109818811 B CN 109818811B CN 201910227220 A CN201910227220 A CN 201910227220A CN 109818811 B CN109818811 B CN 109818811B
- Authority
- CN
- China
- Prior art keywords
- frame
- signal
- protocol
- distribution
- noise
- 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
Links
Images
Landscapes
- Small-Scale Networks (AREA)
- Time-Division Multiplex Systems (AREA)
Abstract
The invention discloses a method for identifying distribution type and mixed type MAC protocols, which comprises the following steps: s1, building a network model, and acquiring simulation signals in the network; s2, carrying out BPSK modulation on the simulation signal, sampling and adding noise; s3, determining the start-stop positions of all signal frames in the noise-added sampling signal and calculating the frame length; s4, dividing the signal frame into a control frame and a data frame; s5, acquiring the frame type and frame distribution of each protocol; s6, training a support vector machine by taking the frame type and the frame distribution of each protocol as training data to obtain an MAC protocol recognition model; and S7, identifying the protocol to be identified through the MAC protocol identification model, and completing identification, distribution and mixed MAC protocols. The method has good identification effect, is more suitable for being applied to practical scenes, and solves the problems that the energy characteristics are greatly influenced by noise and the time characteristics are difficult to extract accurately.
Description
Technical Field
The invention relates to the field of communication, in particular to a method for identifying distribution type and mixed type MAC protocols.
Background
The existing MAC protocol identification method usually adopts energy characteristics or time characteristics as characteristic parameters, the method can only identify different types or MAC protocols with larger differences, the energy characteristics are easily influenced by noise, and the time accuracy requirement is high when the time characteristics are extracted, so that the method is limited in the practical application process.
Disclosure of Invention
Aiming at the defects in the prior art, the method for identifying the distribution type and the mixed type MAC protocols solves the problems that the energy characteristics are greatly influenced by noise and the time characteristics are difficult to extract accurately.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
a method for identifying an allocation class and a hybrid class MAC protocol is provided, which comprises the following steps:
s1, building a network model, simulating three distribution type and mixed type MAC protocols, and acquiring a simulation signal of each node in the network within a period of time;
s2, carrying out BPSK modulation and sampling on the simulation signal, and adding noise to obtain a noise-added sampling signal;
s3, carrying out energy detection on the noise-added sampling signals, determining the start and stop positions of all signal frames and calculating the length of each signal frame;
s4, classifying the signal frames according to different lengths to obtain control frames and data frames;
s5, acquiring the frame type and frame distribution of each protocol according to the number and distribution of the control frames and the data frames of the same protocol;
s6, extracting the frame type and frame distribution of each protocol from the noise-added sampling signal, and training a support vector machine by taking the frame type and frame distribution as training data to obtain an MAC protocol recognition model;
and S7, acquiring the frame type and the frame distribution of the signal to be recognized by adopting the same method as the steps S2 to S5, and finishing the protocol recognition of the signal to be recognized by taking the frame type and the frame distribution of the signal to be recognized as the input of an MAC protocol recognition model.
Further, the specific method of step S1 includes:
building a network model in OPNET Modeller simulation software, simulating three distribution type and mixed type MAC protocols, and acquiring simulation signals of each node in the network within a period of time; the three distribution type and mixed type MAC protocols are TDMA protocol, ABROAD protocol and P-TDMA protocol respectively.
Further, the specific method of step S2 includes:
BPSK modulation and sampling are carried out on the simulation signal, noise is added, the signal-to-noise ratio of the noise-added sampling signal is respectively 20dB, 18dB, 14dB, 10dB, 8dB, 6dB, 4dB, 3dB, 2dB, 1dB and 0dB, and the noise-added sampling signal under different signal-to-noise ratios is obtained.
Further, the specific method of step S3 includes:
carrying out energy detection on the noise-added sampling signal to obtain an energy detection result, and judging the signal larger than an energy threshold value as an effective signal, namely a signal frame; and taking the signal less than or equal to the energy threshold value as a noise signal, taking the boundary position of the signal frame and the noise as the initial position or the end position of the signal frame, and acquiring the difference between all the start and end positions to obtain the frame length of each signal frame.
Further, the specific method of step S4 includes:
classifying the signal frames according to different lengths, and taking the frames with the frame length smaller than a frame length threshold as control frames; and taking the frame with the frame length larger than the frame length threshold as a data frame.
Further, the specific method of step S5 includes:
obtaining frame types according to the type number of the signal frames of each protocol; obtaining frame distribution according to the distribution condition of the control frame and the data frame of each protocol; the frame type of the TDMA protocol is 1, and the frame types of the ABROAD protocol and the P-TDMA protocol are both 2; setting the frame distribution of the TDMA protocol and the P-TDMA protocol as 0, wherein the data frames are continuously distributed in one frame period; the frame distribution of the ABROAD protocol is set to 1, and the control frame and the data frame are distributed alternately.
Further, the specific method of step S6 includes the following sub-steps:
s6-1, taking the frame type and frame distribution of each protocol as training data;
s6-2, randomly setting initial values of the weight and the offset of the support vector machine, and inputting training data to obtain the difference between a training result and a real result;
s6-3, judging whether the difference between the training result and the real result is smaller than a threshold value, if so, finishing the training to obtain an MAC protocol recognition model, otherwise, returning to the step S6-2;
the model of the support vector machine is as follows:
s.t.yi(wTxi+b)≥1-ξi,i=1,2,…,m,ξi≥0
in model (x)i,yi) For the ith set of training data, xiRepresenting a feature vector, y, composed of both frame classes and frame distributionsiDenotes xiCorresponding true results, i.e., labels, w and b are the weight and offset, respectively, of the support vector machine ξiIs a relaxation variable; c is a penalty factor; m is the total number of training data; (.)TRepresenting a matrix transposition; s.t. (. cndot.) is a constraint.
The invention has the beneficial effects that: the invention uses the frame type and the frame distribution as the characteristics of the MAC protocol identification, so that the MAC protocol identification model has stronger anti-interference capability, and solves the problems that the energy characteristics are greatly influenced by noise and the time characteristics are difficult to accurately extract.
Drawings
FIG. 1 is a schematic flow diagram of the present invention;
fig. 2 shows the accuracy of MAC protocol identification at different signal-to-noise ratios.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 1, the method for identifying the allocation class and the hybrid class MAC protocol includes the following steps:
s1, building a network model, simulating three distribution type and mixed type MAC protocols, and acquiring a simulation signal of each node in the network within a period of time;
s2, carrying out BPSK modulation and sampling on the simulation signal, and adding noise to obtain a noise-added sampling signal;
s3, carrying out energy detection on the noise-added sampling signals, determining the start and stop positions of all signal frames and calculating the length of each signal frame;
s4, classifying the signal frames according to different lengths to obtain control frames and data frames;
s5, acquiring the frame type and frame distribution of each protocol according to the number and distribution of the control frames and the data frames of the same protocol;
s6, extracting the frame type and frame distribution of each protocol from the noise-added sampling signal, and training a support vector machine by taking the frame type and frame distribution as training data to obtain an MAC protocol recognition model;
and S7, acquiring the frame type and the frame distribution of the signal to be recognized by adopting the same method as the steps S2 to S5, and finishing the protocol recognition of the signal to be recognized by taking the frame type and the frame distribution of the signal to be recognized as the input of an MAC protocol recognition model.
The specific method of step S1 includes: building a network model in OPNET Modeller simulation software, simulating three distribution type and mixed type MAC protocols, and acquiring simulation signals of each node in the network within a period of time; the three distribution type and mixed type MAC protocols are TDMA protocol, ABROAD protocol and P-TDMA protocol respectively.
The specific method of step S2 includes: BPSK modulation and sampling are carried out on the simulation signal, noise is added, the signal-to-noise ratio of the noise-added sampling signal is respectively 20dB, 18dB, 14dB, 10dB, 8dB, 6dB, 4dB, 3dB, 2dB, 1dB and 0dB, and the noise-added sampling signal under different signal-to-noise ratios is obtained.
The specific method of step S3 includes: carrying out energy detection on the noise-added sampling signal to obtain an energy detection result, and judging the signal larger than an energy threshold value as an effective signal, namely a signal frame; and taking the signal less than or equal to the energy threshold value as a noise signal, taking the boundary position of the signal frame and the noise as the initial position or the end position of the signal frame, and acquiring the difference between all the start and end positions to obtain the frame length of each signal frame.
The specific method of step S4 includes: classifying the signal frames according to different lengths, and taking the frames with the frame length smaller than a frame length threshold as control frames; and taking the frame with the frame length larger than the frame length threshold as a data frame.
The specific method of step S5 includes: obtaining frame types according to the type number of the signal frames of each protocol; obtaining frame distribution according to the distribution condition of the control frame and the data frame of each protocol; the frame type of the TDMA protocol is 1, and the frame types of the ABROAD protocol and the P-TDMA protocol are both 2; setting the frame distribution of the TDMA protocol and the P-TDMA protocol as 0, wherein the data frames are continuously distributed in one frame period; the frame distribution of the ABROAD protocol is set to 1, and the control frame and the data frame are distributed alternately. In the specific implementation process, the characteristic data of three MAC protocols are shown in table 1:
table 1: characteristic data of three MAC protocols
Frame classification | Frame distribution | |
TDMA protocol | 1 | 0 |
ABROAD protocol | 2 | 1 |
P-TDMA protocol | 2 | 0 |
The specific method of step S6 includes the following substeps:
s6-1, taking the frame type and frame distribution of each protocol as training data from the noise-added sampling signal with the signal-to-noise ratio of 20 dB;
s6-2, randomly setting initial values of the weight and the offset of the support vector machine, and inputting training data to obtain the difference between a training result and a real result;
s6-3, judging whether the difference between the training result and the real result is smaller than a threshold value, if so, finishing the training to obtain an MAC protocol recognition model, otherwise, returning to the step S6-2;
the model of the support vector machine is as follows:
s.t.yi(wTxi+b)≥1-ξi,i=1,2,…,m,ξi≥0
in model (x)i,yi) For the ith set of training data, xiRepresenting a feature vector, y, composed of both frame classes and frame distributionsiDenotes xiCorresponding true results, i.e., labels, w and b are the weight and offset, respectively, of the support vector machine ξiIs a relaxation variable; c is a penalty factor; m is the total number of training data; (.)TRepresenting a matrix transposition; s.t. (. cndot.) is a constraint.
In one example of the present invention, as shown in fig. 2, the accuracy of MAC protocol identification is different at different snr, and the method of the present invention has very good performance at snr higher than 3 dB.
In summary, the invention improves the aspect of extracting features, two extracted features of frame type and frame distribution are not easily affected by noise like energy features any more, and have very accurate requirements like time features, although a low signal-to-noise ratio also has a certain influence on the extraction of the features, the invention has relatively good recognition effect, is relatively suitable for being applied to practical scenes, and solves the problems that the energy features are greatly affected by noise and the time features are difficult to extract accurately.
Claims (6)
1. A method for identifying an allocation class and a hybrid class MAC protocol, comprising the steps of:
s1, building a network model, simulating three distribution type and mixed type MAC protocols, and acquiring a simulation signal of each node in the network within a period of time;
s2, carrying out BPSK modulation and sampling on the simulation signal, and adding noise to obtain a noise-added sampling signal;
s3, carrying out energy detection on the noise-added sampling signals, determining the start and stop positions of all signal frames and calculating the length of each signal frame;
s4, classifying the signal frames according to different lengths to obtain control frames and data frames;
s5, acquiring the frame type and frame distribution of each protocol according to the number and distribution of the control frames and the data frames of the same protocol;
s6, extracting the frame type and frame distribution of each protocol from the noise-added sampling signal, and training a support vector machine by taking the frame type and frame distribution as training data to obtain an MAC protocol recognition model;
s7, acquiring the frame type and the frame distribution of the signal to be recognized by adopting the same method as the steps S2 to S5, and finishing the protocol recognition of the signal to be recognized by taking the frame type and the frame distribution of the signal to be recognized as the input of an MAC protocol recognition model;
the specific method of step S5 includes:
obtaining frame types according to the type number of the signal frames of each protocol; obtaining frame distribution according to the distribution condition of the control frame and the data frame of each protocol; the frame type of the TDMA protocol is 1, and the frame types of the ABROAD protocol and the P-TDMA protocol are both 2; setting the frame distribution of the TDMA protocol and the P-TDMA protocol as 0, wherein the data frames are continuously distributed in one frame period; the frame distribution of the ABROAD protocol is set to 1, and the control frame and the data frame are distributed alternately.
2. The method according to claim 1, wherein the specific method of step S1 includes:
building a network model in OPNET Modeller simulation software, simulating three distribution type and mixed type MAC protocols, and acquiring simulation signals of each node in the network within a period of time; the three distribution type and mixed type MAC protocols are TDMA protocol, ABROAD protocol and P-TDMA protocol respectively.
3. The method according to claim 1, wherein the specific method of step S2 includes:
BPSK modulation and sampling are carried out on the simulation signal, noise is added, the signal-to-noise ratio of the noise-added sampling signal is respectively 20dB, 18dB, 14dB, 10dB, 8dB, 6dB, 4dB, 3dB, 2dB, 1dB and 0dB, and the noise-added sampling signal under different signal-to-noise ratios is obtained.
4. The method according to claim 1, wherein the specific method of step S3 includes:
carrying out energy detection on the noise-added sampling signal to obtain an energy detection result, and judging the signal larger than an energy threshold value as an effective signal, namely a signal frame; and taking the signal less than or equal to the energy threshold value as a noise signal, taking the boundary position of the signal frame and the noise as the initial position or the end position of the signal frame, and acquiring the difference between all the start and end positions to obtain the frame length of each signal frame.
5. The method according to claim 1, wherein the specific method of step S4 includes:
classifying the signal frames according to different lengths, and taking the frames with the frame length smaller than a frame length threshold as control frames; and taking the frame with the frame length larger than the frame length threshold as a data frame.
6. The method for identifying an allocation class and a hybrid class MAC protocol as claimed in claim 1, wherein the specific method of the step S6 comprises the following sub-steps:
s6-1, taking the frame type and frame distribution of each protocol as training data;
s6-2, randomly setting initial values of the weight and the offset of the support vector machine, and inputting training data to obtain the difference between a training result and a real result;
s6-3, judging whether the difference between the training result and the real result is smaller than a threshold value, if so, finishing the training to obtain an MAC protocol recognition model, otherwise, returning to the step S6-2;
the model of the support vector machine is as follows:
s.t.yi(wTxi+b)≥1-ξi,i=1,2,…,m,ξi≥0
in model (x)i,yi) For the ith set of training data, xiRepresenting a feature vector, y, composed of both frame classes and frame distributionsiDenotes xiCorresponding true results, i.e., labels, w and b are the weight and offset, respectively, of the support vector machine ξiIs a relaxation variable; c is a penalty factor; m is the total number of training data; (.)TRepresenting a matrix transposition; s.t. (. cndot.) is a constraint.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910227220.0A CN109818811B (en) | 2019-03-25 | 2019-03-25 | Method for identifying distribution type and mixed type MAC protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910227220.0A CN109818811B (en) | 2019-03-25 | 2019-03-25 | Method for identifying distribution type and mixed type MAC protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109818811A CN109818811A (en) | 2019-05-28 |
CN109818811B true CN109818811B (en) | 2020-05-12 |
Family
ID=66610202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910227220.0A Active CN109818811B (en) | 2019-03-25 | 2019-03-25 | Method for identifying distribution type and mixed type MAC protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109818811B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111355616B (en) * | 2020-03-17 | 2022-10-14 | 电子科技大学 | Tactical communication network key node identification method based on physical layer data |
CN113365366B (en) * | 2021-05-19 | 2023-07-25 | 电子科技大学 | Handshake-based competitive MAC protocol distinguishing method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325521A (en) * | 2008-07-24 | 2008-12-17 | 哈尔滨工业大学 | Method for detecting and displaying Ethernet MAC frame |
CN103731360A (en) * | 2012-10-16 | 2014-04-16 | 深圳市中兴微电子技术有限公司 | Method and device for data processing of Ethernet MAC frames |
CN104954259A (en) * | 2015-04-28 | 2015-09-30 | 瑞斯康达科技发展股份有限公司 | PTN (packet transport network) service convergence realization method and PE (provider edge router) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105553574A (en) * | 2015-05-13 | 2016-05-04 | 南京理工大学 | Support-vector-machine-based MAC protocol identification method in cognitive radio |
CN107231427B (en) * | 2017-06-19 | 2020-04-07 | 中国人民解放军理工大学 | MAC protocol identification method based on support vector machine |
CN108683526B (en) * | 2018-04-25 | 2020-11-24 | 电子科技大学 | Method for identifying competitive MAC protocol |
-
2019
- 2019-03-25 CN CN201910227220.0A patent/CN109818811B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325521A (en) * | 2008-07-24 | 2008-12-17 | 哈尔滨工业大学 | Method for detecting and displaying Ethernet MAC frame |
CN103731360A (en) * | 2012-10-16 | 2014-04-16 | 深圳市中兴微电子技术有限公司 | Method and device for data processing of Ethernet MAC frames |
CN104954259A (en) * | 2015-04-28 | 2015-09-30 | 瑞斯康达科技发展股份有限公司 | PTN (packet transport network) service convergence realization method and PE (provider edge router) |
Also Published As
Publication number | Publication date |
---|---|
CN109818811A (en) | 2019-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109818811B (en) | Method for identifying distribution type and mixed type MAC protocol | |
CN110266620A (en) | 3D MIMO-OFDM system channel estimation method based on convolutional neural networks | |
CN109462853B (en) | Network capacity prediction method based on neural network model | |
CN108683526B (en) | Method for identifying competitive MAC protocol | |
CN114337880B (en) | Spectrum sensing method considering random arrival and departure of main user signals | |
CN110166387A (en) | A kind of method and system based on convolutional neural networks identification signal modulation system | |
CN110784286B (en) | Multi-user detection method of non-orthogonal multiple access system based on compressed sensing | |
CN112014801B (en) | SPWVD and improved AlexNet based composite interference identification method | |
CN110084126B (en) | Xgboost-based satellite communication interference pattern identification method | |
CN106357369A (en) | Method for identifying MIMO (multiple input multiple output) code types on basis of above-threshold features of correlation spectra | |
CN107770778B (en) | Blind cooperative spectrum sensing method based on soft fusion strategy | |
CN105721086A (en) | Wireless channel scene recognition method based on unscented Kalman filter artificial neural network (UKFNN) | |
CN106656612A (en) | Approximation method for traversal and rate of ultra-dense network system | |
CN103346849A (en) | Spectrum sensing method resisting hostile attack simulating master user signals | |
CN107682119B (en) | MIMO space-time code identification method based on grouping extreme value model | |
CN108270495B (en) | Background noise extraction method and system | |
CN101098172B (en) | Method for evaluating special channel uplink loading and capacity in WCDMA system | |
CN110071884A (en) | A kind of Modulation Recognition of Communication Signal method based on improvement entropy cloud feature | |
CN113343796B (en) | Knowledge distillation-based radar signal modulation mode identification method | |
CN110311743B (en) | Method for estimating main user duty ratio through variation inference | |
CN101453236A (en) | Common frequency multi-cell channel estimation method | |
CN114567398A (en) | Frequency spectrum sensing method based on convolution long-time and short-time memory neural network | |
CN110191430A (en) | For the single-bit distribution sparse signal detection method of generalized Gaussian distribution situation | |
CN101465759B (en) | Method for estimating network flux parameter based on logarithmic coordinate average filtrate | |
CN113241083B (en) | Integrated voice enhancement system based on multi-target heterogeneous 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |