Page 89 - 《软件学报》2021年第9期
P. 89

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
         Journal of Software,2021,32(9):2713−2728 [doi: 10.13328/j.cnki.jos.005990]   http://www.jos.org.cn
         ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563


                                                             ∗
         基于程序层次树的日志打印位置决策方法

               1
                       2
                              3
         贾   统 ,   李   影 ,   张齐勋 ,   吴中海  2,3
         1
          (北京大学  信息科学技术学院,北京  100871)
         2 (北京大学  软件工程国家工程研究中心,北京  100871)
         3 (北京大学  软件与微电子学院,北京  102600)
         通讯作者:  李影, E-mail: li.ying@pku.edu.cn

         摘   要:  基于日志分析的故障诊断是智能运维的关键技术之一,然而该技术存在关键瓶颈——日志的质量.当今,
         由于程序开发人员缺乏日志打印规范和指导等问题,日志质量欠佳,因此实现日志的自动化打印决策以提升日志质
         量的需求日益迫切.关注自动化日志打印决策问题,与现有研究工作不同,提出一种基于程序层次树和逆序组合的特
         征向量生成方法,能够适用于不同编程语言编写的软件系统.此外,还利用迁移学习算法实现跨组件和跨软件系统的
         日志打印位置决策.在 3 个典型的应用场景——版本升级、组件开发和系统开发及 5 个流行的开源软件系统——
         OpenStack,Tensorflow,SaltCloud,Hadoop 和 Angel 上的实验表明:所述方法在 Java 系统中的日志打印决策准确率约
         为 95%,在 Python 系统中的日志打印决策准确率约为 70%.
         关键词:  日志打印位置决策;程序层次树;迁移学习
         中图法分类号: TP311

         中文引用格式:  贾统,李影,张齐勋,吴中海.基于程序层次树的日志打印位置决策方法.软件学报,2021,32(9):2713−2728.
         http://www.jos.org.cn/1000-9825/5990.htm
         英文引用格式: Jia T, Li Y, Zhang QX, Wu ZH. Automatic logging decision through program layered structure tree and transfer
         learning.  Ruan  Jian Xue Bao/Journal  of Software, 2021,32(9):2713−2728 (in  Chinese).  http://www.jos.org.cn/1000-9825/5990.
         htm

         Automatic Logging Decision Through Program Layered Structure Tree and Transfer Learning

                1
                                        3
                         2
         JIA Tong ,   LI Ying ,  ZHANG Qi-Xun ,   WU Zhong-Hai 2,3
         1
          (School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China)
         2
          (National Engineering Research Center for Software Engineering, Peking University, Beijing 100871, China)
         3
          (School of Software and Microelectronics, Peking University, Beijing 102600, China)
         Abstract:    With the development of AIOps, log-based failure diagnosis has become more and more important. However, this technique
         has a key bottleneck—the quality of logs. Today, the lack of log printing specifications and guidance for programmers is a key factor of
         poor log quality, thus the need of automatic logging decision so as to improve log quality is becoming urgent. This study focuses on
         automatic logging decision. Specifically, the aim is to propose a general logging point decision approach. Different from existing works,
         an automatic feature vector generation method is proposed based on program layered structure tree and reverse composition, which can be
         applied to software systems written in different programming languages. In addition, this study leverages transfer learning algorithms to
         achieve  cross-component  and  cross-project  logging point decision. The  approach is  evaluated on five popular open source software
         systems,  namely, OpenStack, Tensorflow,  SaltCloud, Hadoop, and Angel, in  three  typical application  scenarios  including  software
         upgrading, new component development, and new project development. Results show that the proposed approach performs about 95%
         accuracy in Java projects and 70% accuracy in Python projects on average.

            ∗  基金项目:  国家重点研发计划(2017YFB1002002)
              Foundation item: National Key Research and Development Program of China (2017YFB1002002)
              收稿时间: 2019-05-22;  修改时间: 2019-09-24;  采用时间: 2019-12-02
   84   85   86   87   88   89   90   91   92   93   94