﻿ 支持向量机的船舶网络丢包率预测数学模型
 舰船科学技术  2022, Vol. 44 Issue (10): 139-142    DOI: 10.3404/j.issn.1672-7649.2022.10.029 PDF

1. 河南师范大学 数学与信息科学学院，河南 新乡 453007;
2. 济源职业技术学院，河南 济源 459000;
3. 南阳理工学院，河南 南阳 473004

Mathematical model for predicting packet loss rate of ship network based on support vector machine
ZHAO Na1,2, WANG Hui3
1. College of Mathematics and Information Science, Henan Normal University, Xinxiang 453007, China;
2. Jiyuan Vocational and Technical College, Jiyuan 459000, China;
3. Nanyang Institute of Technology, Nanyang 473004, China
Abstract: The ship communication network carries the key functions of ship communication, navigation, internal system control and so on. The quality of the communication network directly determines the working state of the ship. Because the ship communication is affected by the bad weather conditions at sea, the problems such as time delay and data packet loss of the ship network have always been the research hotspot in the industry. Support vector machine is an advanced data sorting and classification technology. In this paper, combined with the least square method and support vector machine technology, the packet loss rate prediction model of ship communication network is established. Combined with NS2 software, the packet loss rate prediction of communication network is carried out, and the prediction effect is close to the actual measured data.
Key words: support vector machine     communication network     packet loss rate     NS2     forecast
0 引　言

1 最小二乘法与支持向量机理论的基本研究

 $y = \frac{{{\alpha _0}}}{2} + {\alpha _1}{x_1} + {\alpha _2}{x_2} + \cdots,{\alpha _n}{x_n} + {\delta _x} \text{，}$

 $y = \frac{{{\alpha _0}}}{2} + {\alpha _1}{x_{i1}} + {\alpha _2}{x_{i2}} + \cdots,{\alpha _n}{x_{in}} + {\delta _{ix}} \text{，}$

 ${\boldsymbol{Y}} = \left[ \begin{gathered} {y_1} \hfill \\ {y_2} \hfill \\ \cdots \hfill \\ {y_n} \hfill \\ \end{gathered} \right] \text{，} {\boldsymbol{X}} = {\left[ {\begin{array}{*{20}{c}} 1&{{x_{11}}}&{\cdots}&{{x_{1p}}} \\ 1&{{x_{21}}}&{\cdots}&{{x_{2p}}} \\ {\cdots}&{\cdots}&{\cdots}&{\cdots} \\ 1&{{x_{n1}}}&{}&{{x_{np}}} \end{array}} \right]_p} \text{，}$

 $\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{{\boldsymbol{Y}}} = {\boldsymbol{X}}A \text{，}$

 $e = \overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{{\boldsymbol{Y}}} - {\boldsymbol{Y}} \text{，}$

 ${\left| e \right|^2} = {\left( {\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{{\boldsymbol{Y}}} - {\boldsymbol{Y}}} \right)^{\rm{T}}}\left( {\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{{\boldsymbol{Y}}} - {\boldsymbol{Y}}} \right) \to \min \text{，}$

 $\frac{\partial }{{\partial A}}{\left| e \right|^2} = - 2{{\boldsymbol{X}}^{\rm{T}}}{\boldsymbol{Y}} + {{\boldsymbol{X}}^{\rm{T}}}{\boldsymbol{X}}A = 0 \text{，}$

 ${\boldsymbol{Y}} = {\boldsymbol{X}}{\left( {{{\boldsymbol{X}}^{\rm{T}}}{\boldsymbol{X}}} \right)^{ - 1}}{{\boldsymbol{X}}^{\rm{T}}}{\boldsymbol{Y}} 。$

 $\Delta \delta = \frac{{w{x_i} + b}}{{\left| w \right|}} 。$

 图 1 样本的支持向量机分类 Fig. 1 SVM classification of samples
2 基于支持向量机的船舶网络丢包率预测技术 2.1 DSR网络路由协议

DSR路由协议是一种基于源路由方式的协议，按照源路由节点的需求构成数据链路。与表驱动路由协议不同，DSR路由协议的节点可以不负责网络拓扑信息的维护，因此链路组网的形式更加灵活，具有较高的灵活性。

 图 2 Ad hoc网络拓扑与DSR网络拓扑的结构对比 Fig. 2 Structure comparison between Ad hoc network topology and DSR network topology

DSR网络路由协议的工作原理如图3所示。

 图 3 DSR网络路由协议的工作原理 Fig. 3 Working principle of DSR network routing protocol

DSR网络路由协议的特点有：

1）分离节点机制

2）备份路由机制

2.2 基于支持向量机的船舶网络丢包率预测模型

 图 4 支持向量机技术的船舶网络丢包率预测原理 Fig. 4 Prediction principle of packet loss rate of ship network based on support vector machine technology

 $\left( {{x_1},{y_1}} \right),\left( {{x_2},{y_2}} \right),\cdots,\left( {{x_n},{y_n}} \right) \text{，}$

 $y(x) = \sum\limits_{k = 1}^N {{a_k}} \phi {(x)^T}\phi \left( {{x_k}} \right) + b = \sum\limits_{k = 1}^N {{a_k}} K\left( {x,{x_k}} \right) + b \text{，}$

 $K\left( {x,{x_k}} \right) = \exp \left\{ { - {{\left| {x - {x_k}} \right|}^2}/2{\sigma ^2}} \right\} \text{，}$

 $a_i^{} = \frac{{{y_j}(k + i) - {y_0}(k + i)}}{{\Delta {u_j}}},\quad i = 1,2, \cdots ,m \text{，}$

$\Delta {u_j}$ 为第j次阶跃试验的控制参数，对试验获取的阶跃响应系数 $a_i^{}$ 进行加权平均，得到：

 ${\bar a_i} = \sum\limits_{j = 1}^m {{q_j}} a_i^j,\quad i = 1,2, \cdots ,m \text{，}$

 ${\boldsymbol{A}} = \left[ {\begin{array}{*{20}{c}} {{a_1}}&0&0&{}&{}&{} \\ {{a_2}}&{{a_1}}&{}&0&{}&{} \\ \cdots&{{a_2}}&{{a_1}}&{}&0&0 \\ {}&\cdots&{{a_2}}&{}&{}&{} \\ {{a_{L + 1}}}&{}&{}&{{a_3}}&0&0 \\ {{a_m}}&{{a_{m - 1}}}&\cdots&{}&{{a_{m - L + 1}}}&{{a_{m - L + 2}}} \end{array}} \right] 。$
2.3 基于支持向量机的船舶网络丢包率预测试验

NS (Network Simulator)是一个性能优异且开源的网络仿真平台，可以完成诸如链路搭建、路由分析、丢包率检测等众多功能，使用NS2.0版本[5]进行基于支持向量机的船舶网络丢包率预测试验。

 图 5 仿真网络拓扑图 Fig. 5 Simulation network topology

 图 6 3种发包速率的船舶网络数据丢包量 Fig. 6 Packet loss of ship network at three contracting rates
3 结　语

 [1] 朱可. 无线网移动通信数据传输性能优化设计[J]. 计算机仿真, 2017, 34(2): 4. [2] 谢林柏, 冯宏伟, 王艳, 等. 对丢失数据包的网络控制系统的分析及最优控制[J]. 系统工程与电子技术, 2008, 30(7): 4. [3] 胡飞飞, 林旭斌, 李昳. 基于PageRank算法的电力通信网络路由优化设计[J]. 自动化与仪器仪表, 2021(8): 5. [4] 王曦, 周雪. 基于多跳无线网络的TCP速率控制方法设计[J]. 激光杂志, 2017, 38(6): 5. [5] 郝潇, 王晓峰. 光纤通信网络中信息传输可靠性优化设计仿真[J]. 计算机仿真, 2017, 34(2): 4. [6] 唐伦, 张荣荣, 陈前斌. 中继系统基于QoS保障的跨层优化设计[J]. 西安电子科技大学学报, 2013(2): 10.