CN105868375B - 一种基于多线程的安全基线知识库文件解析方法 - Google Patents

一种基于多线程的安全基线知识库文件解析方法 Download PDF

Info

Publication number
CN105868375B
CN105868375B CN201610198361.0A CN201610198361A CN105868375B CN 105868375 B CN105868375 B CN 105868375B CN 201610198361 A CN201610198361 A CN 201610198361A CN 105868375 B CN105868375 B CN 105868375B
Authority
CN
China
Prior art keywords
baseline
file
scm
knowledge base
package file
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
Application number
CN201610198361.0A
Other languages
English (en)
Other versions
CN105868375A (zh
Inventor
王唯融
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201610198361.0A priority Critical patent/CN105868375B/zh
Publication of CN105868375A publication Critical patent/CN105868375A/zh
Application granted granted Critical
Publication of CN105868375B publication Critical patent/CN105868375B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种基于多线程的安全基线知识库文件解析方法,涉及计算机安全领域、Windows平台安全基线技术,本发明将文件读取方式分为基线包文件快速扫描、基线包文件完全读取两种,以便解决不同应用场景下的程序性能问题;通过运用该方法,可以在保证正确获取所需数据的前提下,有效提高文件的解析速度,并减少由于知识库文件解析缓慢而带来各种问题的可能性。

Description

一种基于多线程的安全基线知识库文件解析方法
技术领域
本发明涉及计算机安全领域、Windows平台安全基线技术,尤其涉及一种基于多线程的安全基线知识库文件解析方法。
背景技术
在Windows平台的安全基线技术领域,微软官方所提供的Microsoft SecurityCompliance Manager(简称SCM)工具是当之无愧的权威。该工具所提供的安全基线知识库文件包,以XML文件的形式对安全基线检查所需的设定项、检查项等信息进行包装,被称为SCM基线包。为了能够使用SCM基线包,第三方安全基线检查、修复工具需要对SCM基线包文件进行读取,并解析为自身所需的内存数据。
在解析过程中,对于SCM安全基线数据文件,一般采用按顺序逐项读取的方式。在知识库文件中项目数量较少时,这一过程所耗费的时间较短,产生的负面影响不明显。但是,在解析项目数量大、层次结构较为复杂的基线包时,顺序逐项读取的性能问题便会凸显,进而导致程序运行缓慢、系统资源占有率高,甚至由于并发竞争而导致资源抢夺、死锁,严重影响程序的正常运行。
发明内容
为了解决以上的传统SCM文件读取方式的性能问题,本发明提出了一种基于多线程的安全基线知识库文件解析方法。
在应用角度层面,本发明将文件读取方式分为了基线包文件快速扫描、基线包文件完全读取两种,以便解决不同应用场景下的程序性能问题。
其中,SCM基线包文件快速扫描指的是仅读取SCM基线包文件中的重点标签、重点属性的概览式读取方式,用于知识库的概要查看、初始化等工作;
SCM基线包文件完全读取是将S基线包文件中的所有有效标签、有效属性全部读到内存中,用作全面扫描、修复时使用。
在划分读取方式的基础上,可以发现,SCM基线包中的设定项组、检查项之间彼此独立,功能、数据之间不存在任何实质性的依赖。因此,本发明采用了两个基础线程,对设定项组、检查项进行分别解析。同时,由于设定项组之间同样具备相互独立的条件,因此本发明中设置了数个对等并列的子级业务线程,构成一个线程池,依次分别处理SCM基线包中的设定项组。此处的子级业务线程池的容量,由当前系统中CPU的线程数决定,以避免产生不必要性能浪费。通过划分线程的方式对SCM基线包进行处理,避免了CPU在解析SCM基线包时出现“CPU0长期满载,其他核心闲置”的高运算负荷常见问题,有效减少了SCM基线包读取时的时间消耗。
本发明的有益效果是
通过运用该方法,可以在保证正确获取所需数据的前提下,有效提高文件的解析速度,并减少由于知识库文件解析缓慢而带来各种问题的可能性。
附图说明
图1是基线包按照不同读取方式进行读取的流程逻辑示意图;
图2是多线程读取基线包文件的流程图。
具体实施方式
下面对本发明的内容进行更加详细的阐述:
在应用角度层面,本发明将文件读取方式分为了基线包文件快速扫描、基线包文件完全读取两种,以便解决不同应用场景下的程序性能问题。
其中,SCM基线包文件快速扫描指的是仅读取SCM基线包文件中的重点标签、重点属性的概览式读取方式,用于知识库的概要查看、初始化等工作;
SCM基线包文件完全读取是将S基线包文件中的所有有效标签、有效属性全部读到内存中,用作全面扫描、修复时使用。基线包按照不同读取方式进行读取的流程逻辑如图1所示。
在划分读取方式的基础上,可以发现,SCM基线包中的设定项组、检查项之间彼此独立,功能、数据之间不存在任何实质性的依赖。因此,本发明采用了两个基础线程,对设定项组、检查项进行分别解析。同时,由于设定项组之间同样具备相互独立的条件,因此本发明中设置了多个对等并列的子级业务线程,构成一个线程池,依次分别处理SCM基线包中的设定项组。此处的子级业务线程池的容量,由当前系统中CPU的线程数决定,以避免产生不必要性能浪费。多线程读取基线包文件的流程如图2所示。
本发明作为一种抽象的文件读取方法,将作为某商业软件的业务读取模块,存在于该软件的各个部分中,并以多种不同语言、依赖不同XML解析库的形式存在。

Claims (1)

1.一种基于多线程的安全基线知识库文件解析方法,其特征在于,将文件读取方式分为基线包文件快速扫描、基线包文件完全读取两种,以便解决不同应用场景下的程序性能问题;
其中,SCM基线包文件快速扫描指的是仅读取SCM基线包文件中的重点标签、重点属性的概览式读取方式,用于知识库的概要查看、初始化;
SCM基线包文件完全读取是将SCM基线包文件中的所有有效标签、有效属性全部读到内存中,用作全面扫描、修复时使用;
采用两个基础线程,对设定项组、检查项进行分别解析;同时,由于设定项组之间同样具备相互独立的条件,因此设置了数个对等并列的子级业务线程,构成一个线程池,依次分别处理SCM基线包中的设定项组,此处的子级业务线程池的容量,由当前系统中CPU的线程数决定。
CN201610198361.0A 2016-04-01 2016-04-01 一种基于多线程的安全基线知识库文件解析方法 Active CN105868375B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610198361.0A CN105868375B (zh) 2016-04-01 2016-04-01 一种基于多线程的安全基线知识库文件解析方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610198361.0A CN105868375B (zh) 2016-04-01 2016-04-01 一种基于多线程的安全基线知识库文件解析方法

Publications (2)

Publication Number Publication Date
CN105868375A CN105868375A (zh) 2016-08-17
CN105868375B true CN105868375B (zh) 2019-12-31

Family

ID=56627687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610198361.0A Active CN105868375B (zh) 2016-04-01 2016-04-01 一种基于多线程的安全基线知识库文件解析方法

Country Status (1)

Country Link
CN (1) CN105868375B (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106326407B (zh) * 2016-08-23 2019-09-06 浪潮电子信息产业股份有限公司 一种对不同格式安全基线知识库进行抽象的方法
CN106886439B (zh) * 2017-02-15 2020-03-10 郑州云海信息技术有限公司 一种对scm安全基线知识库进行快速初始化的方法
CN106909657A (zh) * 2017-02-27 2017-06-30 郑州云海信息技术有限公司 一种scap协议安全基线知识库快速初始化方法
CN107480547A (zh) * 2017-08-18 2017-12-15 郑州云海信息技术有限公司 一种管理平台规则库和默认策略的初始化方法及系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104966021A (zh) * 2015-05-21 2015-10-07 浪潮电子信息产业股份有限公司 一种安全基线数据文件的建立和解析方法及装置
CN105279284A (zh) * 2015-11-23 2016-01-27 吟飞科技(江苏)有限公司 一种电子琴音乐文件及其使用方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8209605B2 (en) * 2006-12-13 2012-06-26 Pado Metaware Ab Method and system for facilitating the examination of documents

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104966021A (zh) * 2015-05-21 2015-10-07 浪潮电子信息产业股份有限公司 一种安全基线数据文件的建立和解析方法及装置
CN105279284A (zh) * 2015-11-23 2016-01-27 吟飞科技(江苏)有限公司 一种电子琴音乐文件及其使用方法

Also Published As

Publication number Publication date
CN105868375A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
CN105868375B (zh) 一种基于多线程的安全基线知识库文件解析方法
US9619430B2 (en) Active non-volatile memory post-processing
US7844953B2 (en) Program, apparatus and method for verifying program
Jeong et al. A fast built-in redundancy analysis for memories with optimal repair rate using a line-based search tree
CN101777007B (zh) 片上多核处理器的并行功能仿真系统及其方法
US20110307502A1 (en) Extensible event-driven log analysis framework
WO2017074770A1 (en) Test failure bucketing
CN103440201A (zh) 动态污点分析装置及其在文件格式逆向解析中的应用
US8141082B2 (en) Node-based representation of multi-threaded computing environment tasks, and node-based data race evaluation
CN103927305B (zh) 一种对内存溢出进行控制的方法和设备
CN101067835A (zh) 用于可信平台模块数据一致性的方法和数据处理系统
US10496659B2 (en) Database grouping set query
CN107168868B (zh) 一种基于采样和集成学习的软件更改缺陷预测方法
CN112732567A (zh) 基于ip的mock数据测试方法、装置、电子设备及存储介质
CN104331335A (zh) 门户网站的死链检查方法和装置
CN101295316B (zh) 位图索引方法、位图索引单元以及智能卡
US8997030B1 (en) Enhanced case-splitting based property checking
CN114880368A (zh) 数据查询方法、装置、电子设备及可读存储介质
CN111083189A (zh) 用于在运行时处理数据倾斜的系统和方法
Siebra et al. The software perspective for energy-efficient mobile applications development
Zhao et al. MapReduce model-based optimization of range queries
Wu et al. An i/o efficient model checking algorithm for large-scale systems
CN101000575A (zh) 计算机程序执行瓶颈分析处理方法及系统
US20120260224A1 (en) Digital Netlist Partitioning System For Faster Circuit Reverse-Engineering
Shan Testing methods of computer software

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20191203

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: Suzhou Wave Intelligent Technology Co., Ltd.

Address before: 250101 Ji'nan high tech Zone, Shandong, No. 1036 wave road

Applicant before: Langchao Electronic Information Industry Co., Ltd.

GR01 Patent grant
GR01 Patent grant