Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (4): 1263-1270.DOI: 10.11772/j.issn.1001-9081.2024040534

• Network and communications • Previous Articles     Next Articles

Protocol conversion method based on semantic similarity

Dingmu YANG, Longqiang NI(), Jing LIANG, Zhaoyuan QIU, Yongzhen ZHANG, Zhiqiang QI   

  1. Northwest Institute of Mechanical and Electrical Engineering,Xianyang Shaanxi 712099,China
  • Received:2024-05-09 Revised:2024-08-30 Accepted:2024-09-02 Online:2025-04-08 Published:2025-04-10
  • Contact: Longqiang NI
  • About author:YANG Dingmu, born in 1999, M. S. candidate. His research interests include information communication, intelligent decision-making.
    LIANG Jing, born in 1998, M. S., research assistant. Her research interests include command and control, intelligent decision-making.
    QIU Zhaoyuan, born in 1999, M. S. candidate. His research interests include human-computer interaction in command and control.
    ZHANG Yongzhen, born in 2000, M. S. candidate. His research interests include intelligent unmanned systems.
    QI Zhiqiang, born in 2000, M. S. candidate. His research interests include software architecture.

基于语义相似度的协议转换方法

杨定木, 倪龙强(), 梁晶, 邱照原, 张永真, 齐志强   

  1. 西北机电工程研究所,陕西 咸阳 712099
  • 通讯作者: 倪龙强
  • 作者简介:杨定木(1999—),男(布依族),贵州安龙人,硕士研究生,主要研究方向:信息通信、智能决策
    梁晶(1998—),女,陕西咸阳人,研究实习员,硕士,主要研究方向:指挥控制、智能决策
    邱照原(1999—),男,河南驻马店人,硕士研究生,主要研究方向:指挥控制人机交互
    张永真(2000—),男,陕西兴平人,硕士研究生,主要研究方向:智能无人系统
    齐志强(2000—),男,陕西延安人,硕士研究生,主要研究方向:软件架构。

Abstract:

Protocol conversion is usually used to solve the problem of data interaction between different protocols, and its nature is to find mapping relationship between different protocol fields. In the traditional methods of protocol conversion, several drawbacks are identified: traditional conversions are mainly designed on the basis of specific protocols, so that they are static and lack flexibility, and are not suitable for environments with multi-protocol conversion; whenever a protocol changes, a reanalysis of the protocol’s structure and semantic fields is required to reconstruct the mapping relationship between fields, leading to an exponential increase in workload and a decrease in protocol conversion efficiency. Therefore, a general method of protocol conversion based on semantic similarity was proposed to enhance protocol conversion efficiency by exploring the relationship between fields intelligently. Firstly, the BERT (Bidirectional Encoder Representations from Transformers) model was employed to classify the protocol fields, and eliminate the fields that “should not” have mapping relationship. Secondly, the semantic similarities between fields were computed to reason the mapping relationship between fields, resulting in the formation of a field mapping table. Finally, a general framework for protocol conversion based on semantic similarity was introduced, and related protocols were defined for validation. Simulation results show that the precision of field classification of the proposed method reaches 94.44%; and the precision of mapping relationship identification of the proposed method reaches 90.70%, which is 13.93% higher than that of the method based on knowledge extraction. The above results verify that the proposed method is feasible, can identify the mapping relationships between different protocol fields quickly, and is suitable for scenarios with multi-protocol conversion in unmanned collaboration.

Key words: semantic similarity, field mapping, protocol conversion, BERT (Bidirectional Encoder Representations from Transformers) model, Sentence-BERT model

摘要:

协议转换通常用于解决不同协议之间的数据交互问题,它的本质是寻找不同协议字段之间的映射关系。传统的协议转换方法存在以下缺点:转换大多是在特定协议的基础上设计的,因而这些转换是静态的,灵活性较差,不适用于多协议转换的场景;一旦协议发生改变,就需要再次分析协议的结构和字段语义以重新构建字段之间的映射关系,从而产生指数级的工作量,降低了协议转换的效率。因此,提出基于语义相似度的通用协议转换方法,旨在通过智能的方法发掘字段间的映射关系,进而提高协议转换的效率。首先,通过BERT (Bidirectional Encoder Representations from Transformers)模型分类协议字段,并排除“不应该”存在映射关系的字段;其次,通过计算字段之间的语义相似度,推理字段之间的映射关系,进而构建字段映射表;最后,提出基于语义相似度的通用协议转换框架,并定义相关协议以进行验证。仿真实验结果表明:所提方法的字段分类精准率达到了94.44%;映射关系识别精准率达到了90.70%,相较于基于知识抽取的方法提高了13.93%。以上结果验证了所提方法的有可行性,该方法可以快速识别不同协议字段之间的映射关系,适用于无人协同中多协议转换的场景。

关键词: 语义相似度, 字段映射, 协议转换, BERT模型, Sentence-BERT模型

CLC Number: