CN117375845B - Network asset certificate identification method and device - Google Patents

Network asset certificate identification method and device Download PDF

Info

Publication number
CN117375845B
CN117375845B CN202311345134.2A CN202311345134A CN117375845B CN 117375845 B CN117375845 B CN 117375845B CN 202311345134 A CN202311345134 A CN 202311345134A CN 117375845 B CN117375845 B CN 117375845B
Authority
CN
China
Prior art keywords
certificate
information
network asset
network
asset
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
CN202311345134.2A
Other languages
Chinese (zh)
Other versions
CN117375845A (en
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.)
CETC 15 Research Institute
Original Assignee
CETC 15 Research Institute
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 CETC 15 Research Institute filed Critical CETC 15 Research Institute
Priority to CN202311345134.2A priority Critical patent/CN117375845B/en
Publication of CN117375845A publication Critical patent/CN117375845A/en
Application granted granted Critical
Publication of CN117375845B publication Critical patent/CN117375845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a network asset certificate identification method and a device, wherein the method comprises the following steps: acquiring certificate information of a network asset, wherein the certificate information of the network asset forms an asset certificate library; processing the certificate information of the network asset to obtain the characteristic information of the network asset, wherein the characteristic information of the network asset forms a characteristic library; training a preset network asset certificate identification model by utilizing the characteristic information of the network asset to obtain a training network asset certificate identification model; and acquiring the certificate information of the network asset to be identified, and processing the certificate information of the network asset to be identified by utilizing the training network asset certificate identification model to obtain a network asset certificate identification result. The invention combines two similarity measurement methods, and performs similarity comparison from the two aspects of the content and the structure of the certificate; meanwhile, by combining an autonomous learning feedback mechanism, a certificate similarity measurement and recognition query method with high automation degree and higher accuracy are explored.

Description

一种网络资产证书识别方法及装置A network asset certificate identification method and device

技术领域Technical Field

本发明网络资产身份识别技术领域,尤其涉及一种网络资产证书识别方法及装置。The present invention relates to the technical field of network asset identity recognition, and in particular to a network asset certificate recognition method and device.

背景技术Background Art

数字证书是指在互联网通讯中标志通讯各方身份信息的一个数字认证,可以用于识别验证通讯各方的身份。证书信息通常包括以下信息项:版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等。其中版本号是证书的版本信息,每个证书都有一个唯一的证书序列号,签名算法是认证过程所使用的签名算法,颁布者是证书的发行机构名称,有效期标注证书的有效时间,主体是证书所有人的名称,主体公钥是证书所有人的公开密钥,签名值是证书发行者对证书的签名。A digital certificate is a digital certificate that marks the identity information of the communicating parties in Internet communication, and can be used to identify and verify the identities of the communicating parties. Certificate information usually includes the following information items: version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, signature value, etc. The version number is the version information of the certificate, each certificate has a unique certificate serial number, the signature algorithm is the signature algorithm used in the authentication process, the issuer is the name of the issuing organization of the certificate, the validity period marks the validity period of the certificate, the subject is the name of the certificate owner, the subject public key is the public key of the certificate owner, and the signature value is the signature of the certificate issuer on the certificate.

数字证书是用于互联网信息活动中网络资产行为主体的身份证明,也是可以用于验证网络资产发送信息保密性和完整性的电子数据。合理准确地对网络资产的证书实施相似性度量,可以有效地对网络资产进行分类识别和查询检索。Digital certificates are used to prove the identity of the subject of network asset behavior in Internet information activities, and are also electronic data that can be used to verify the confidentiality and integrity of information sent by network assets. Reasonably and accurately implementing similarity measurement on network asset certificates can effectively classify, identify, query and retrieve network assets.

目前还没有直接针对证书相似性度量和识别的相关研究,考虑证书的结构包括若干个信息项(版本号、序列号、签名算法、颁布者等)和每个信息项对应的取值内容,可以参考对文本分类中文本相似性衡量的方法。文本分类中的大多数算法,比如KNN方法、支持向量机方法、K均值方法等都需要通过计算相似度来达到分类的目的。常用的传统的文本相似性度量方法有余弦相似度、Jaccard相似系数、欧式距离、曼哈顿距离、切比雪夫距离、马氏距离等。At present, there is no direct research on certificate similarity measurement and identification. Considering that the structure of a certificate includes several information items (version number, serial number, signature algorithm, issuer, etc.) and the corresponding value content of each information item, you can refer to the method of measuring text similarity in text classification. Most algorithms in text classification, such as KNN method, support vector machine method, K-means method, etc., need to calculate similarity to achieve the purpose of classification. Commonly used traditional text similarity measurement methods include cosine similarity, Jaccard similarity coefficient, Euclidean distance, Manhattan distance, Chebyshev distance, Mahalanobis distance, etc.

现有文本相似性度量方法功能单一,不可以直接应用于证书的相似性度量。鉴于证书的结构包括若干个信息项(版本号、序列号、签名算法、颁布者等)和每个信息项对应的取值内容,可以考虑将两种相似性度量方法相结合,从证书的内容和结构两方面进行相似性比对;同时,结合自主学习反馈机制,探索自动化程度高、准确率更高的证书相似性度量和识别查询方法。The existing text similarity measurement methods have a single function and cannot be directly applied to the similarity measurement of certificates. Given that the structure of a certificate includes several information items (version number, serial number, signature algorithm, issuer, etc.) and the corresponding value content of each information item, it is possible to consider combining the two similarity measurement methods to perform similarity comparison from the two aspects of the content and structure of the certificate; at the same time, combined with the autonomous learning feedback mechanism, explore certificate similarity measurement and identification query methods with high automation and higher accuracy.

发明内容Summary of the invention

本发明所要解决的技术问题在于,提供一种网络资产证书识别方法及装置,能够通过对不同网络资产的证书进行相似性度量来达到对网络资产进行身份识别的目的,来弥补现有技术对网络资产识别自动化程度低、准确率低的问题。为了解决上述技术问题,本发明实施例第一方面公开了一种网络资产证书识别方法,所述方法包括:The technical problem to be solved by the present invention is to provide a network asset certificate identification method and device, which can achieve the purpose of identifying the network asset by measuring the similarity of certificates of different network assets, so as to make up for the low degree of automation and low accuracy of network asset identification in the prior art. In order to solve the above technical problem, the first aspect of the embodiment of the present invention discloses a network asset certificate identification method, the method comprising:

S1,获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S1, obtaining certificate information of network assets, wherein the certificate information of the network assets constitutes an asset certificate library;

S2,对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;S2, processing the certificate information of the network asset to obtain feature information of the network asset, wherein the feature information of the network asset constitutes a feature library;

S3,利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S3, using the characteristic information of the network asset, training a preset network asset certificate identification model to obtain a trained network asset certificate identification model;

S4,获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。S4, obtaining the certificate information of the network asset to be identified, and using the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain a network asset certificate identification result.

作为一种可选的实施方式,本发明实施例第一方面中,所述对所述网络资产的证书信息进行处理,得到网络资产的特征信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the certificate information of the network asset to obtain the characteristic information of the network asset includes:

S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息;S21, performing structural similarity calculation on the certificate information of the network asset to obtain structural similarity information;

S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息;S22, performing content similarity calculation on the certificate information of the network asset to obtain content similarity information;

S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息。S23, fusing the structure similarity information and the content similarity information to obtain feature information of the network asset.

作为一种可选的实施方式,本发明实施例第一方面中,所述对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the performing structural similarity calculation on the certificate information of the network asset to obtain the structural similarity information includes:

S211,获取网络资产A的证书信息,所述待网络资产A的信息项数量为m;S211, obtaining certificate information of network asset A, wherein the number of information items of network asset A to be obtained is m;

S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212, obtaining certificate information of network asset B, the number of information items of network asset B is n;

S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213, processing the certificate information of the network asset A and the certificate information of the network asset B to obtain the number x of information items contained in both the network asset A and the network asset B;

S214,利用结构相似度计算模型,对所述待网络资产A的信息项数量为m、所述网络资产B的信息项数量为n和所述信息项数量x进行处理,得到结构相似度信息;S214, using a structural similarity calculation model, processing the number of information items of the network asset A, which is m, the number of information items of the network asset B, which is n, and the number of information items, which is x, to obtain structural similarity information;

所述结构相似度计算模型为:The structural similarity calculation model is:

其中str(A,B)为结构相似度信息。Where str(A,B) is the structural similarity information.

作为一种可选的实施方式,本发明实施例第一方面中,所述对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the performing content similarity calculation on the certificate information of the network asset to obtain content similarity information includes:

S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of the network asset A to obtain a formalized representation of the certificate information item of the network asset A: content A = (a 1 , a 2 , ..., a x );

S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of the network asset B to obtain a formalized representation of the certificate information item of the network asset B: content B = (b 1 , b 2 , ..., b x );

S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223, using a content similarity information calculation model, processing the formalized representation of the certificate information item of the network asset A, content A = (a 1 , a 2 , ..., a x ) and the formalized representation of the certificate information item of the network asset B to obtain content similarity information;

所述内容相似度计算模型为:The content similarity calculation model is:

其中,con(A,B)为内容相似度信息, Among them, con(A,B) is the content similarity information,

作为一种可选的实施方式,本发明实施例第一方面中,所述对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the fusing of the structural similarity information and the content similarity information to obtain the characteristic information of the network asset includes:

利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain feature information of network assets;

所述相似度信息融合模型为:The similarity information fusion model is:

其中,total(A,B)为网络资产的特征信息,str(A,B)为结构相似度信息,con(A,B)为内容相似度信息。Among them, total(A,B) is the characteristic information of network assets, str(A,B) is the structural similarity information, and con(A,B) is the content similarity information.

作为一种可选的实施方式,本发明实施例第一方面中,所述利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型,包括:As an optional implementation, in the first aspect of the embodiment of the present invention, the use of the characteristic information of the network asset to train a preset network asset certificate identification model to obtain a trained network asset certificate identification model includes:

S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31, dividing the characteristic information of the network asset to obtain a marked certificate sample and an unmarked certificate sample;

S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32, using the unlabeled certificate samples as training samples to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model.

作为一种可选的实施方式,本发明实施例第一方面中,所述获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:As an optional implementation, in the first aspect of the embodiment of the present invention, the obtaining of the certificate information of the network asset to be identified, using the trained network asset certificate identification model, processing the certificate information of the network asset to be identified, and obtaining the network asset certificate identification result, includes:

S41,获取待识别网络资产的证书信息;S41, obtaining certificate information of the network asset to be identified;

S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42, processing the certificate information of the network asset to be identified to obtain feature information of the network asset to be identified;

S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43, obtaining a first identification result according to the characteristic information of the network asset to be identified;

S44,根据所述首次识别结果,利用所述训练网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44, based on the first identification result, the trained network asset certificate identification model is used to process the feature information of the network asset to be identified to obtain a network asset certificate identification result.

作为一种可选的实施方式,本发明实施例第一方面中,所述方法还包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the method further includes:

获取待识别网络资产的证书信息;Obtain the certificate information of the network asset to be identified;

对所述待识别网络资产的证书信息进行识别,得到首次识别结果;Identify the certificate information of the network asset to be identified to obtain a first identification result;

根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, the network asset certificates different from the first identification result are marked to obtain positive certificate and negative certificate;

将所述反例证书加入所述未标记证书样本中,构成最优训练样本集;Adding the counter-example certificate to the unlabeled certificate sample to form an optimal training sample set;

利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型。The preset network asset certificate recognition model is trained using the optimal training sample set to obtain an optimized network asset certificate recognition model.

本发明实施例第二方面公开了一种网络资产证书识别装置,所述装置包括:A second aspect of an embodiment of the present invention discloses a network asset certificate identification device, the device comprising:

数据获取模块,用于获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;A data acquisition module, used to acquire certificate information of network assets, wherein the certificate information of the network assets constitutes an asset certificate library;

特征提取模块,用于对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;A feature extraction module, used for processing the certificate information of the network asset to obtain feature information of the network asset, wherein the feature information of the network asset constitutes a feature library;

模型训练模块,用于利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;A model training module, used to train a preset network asset certificate identification model using the characteristic information of the network asset to obtain a trained network asset certificate identification model;

证书识别模块,用于获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。The certificate identification module is used to obtain the certificate information of the network asset to be identified, and use the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain a network asset certificate identification result.

作为一种可选的实施方式,本发明实施例第二方面中,所述对所述网络资产的证书信息进行处理,得到网络资产的特征信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the processing of the certificate information of the network asset to obtain the characteristic information of the network asset includes:

S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息;S21, performing structural similarity calculation on the certificate information of the network asset to obtain structural similarity information;

S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息;S22, performing content similarity calculation on the certificate information of the network asset to obtain content similarity information;

S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息。S23, fusing the structure similarity information and the content similarity information to obtain feature information of the network asset.

作为一种可选的实施方式,本发明实施例第二方面中,所述对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the performing structural similarity calculation on the certificate information of the network asset to obtain the structural similarity information includes:

S211,获取网络资产A的证书信息,所述待网络资产A的信息项数量为m;S211, obtaining certificate information of network asset A, wherein the number of information items of network asset A to be obtained is m;

S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212, obtaining certificate information of network asset B, the number of information items of network asset B is n;

S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213, processing the certificate information of the network asset A and the certificate information of the network asset B to obtain the number x of information items contained in both the network asset A and the network asset B;

S214,利用结构相似度计算模型,对所述待网络资产A的信息项数量为m、所述网络资产B的信息项数量为n和所述信息项数量x进行处理,得到结构相似度信息;S214, using a structural similarity calculation model, processing the number of information items of the network asset A, which is m, the number of information items of the network asset B, which is n, and the number of information items, which is x, to obtain structural similarity information;

所述结构相似度计算模型为:The structural similarity calculation model is:

其中str(A,B)为结构相似度信息。Where str(A,B) is the structural similarity information.

作为一种可选的实施方式,本发明实施例第二方面中,所述对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the performing content similarity calculation on the certificate information of the network asset to obtain content similarity information includes:

S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of the network asset A to obtain a formalized representation of the certificate information item of the network asset A: content A = (a 1 , a 2 , ..., a x );

S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of the network asset B to obtain a formalized representation of the certificate information item of the network asset B: content B = (b 1 , b 2 , ..., b x );

S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223, using a content similarity information calculation model, processing the formalized representation of the certificate information item of the network asset A, content A = (a 1 , a 2 , ..., a x ) and the formalized representation of the certificate information item of the network asset B to obtain content similarity information;

所述内容相似度计算模型为:The content similarity calculation model is:

其中,con(A,B)为内容相似度信息, Among them, con(A,B) is the content similarity information,

作为一种可选的实施方式,本发明实施例第二方面中,所述对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the fusing of the structural similarity information and the content similarity information to obtain the characteristic information of the network asset includes:

利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain feature information of network assets;

所述相似度信息融合模型为:The similarity information fusion model is:

其中,total(A,B)为网络资产的特征信息,str(A,B)为结构相似度信息,con(A,B)为内容相似度信息。Among them, total(A,B) is the characteristic information of network assets, str(A,B) is the structural similarity information, and con(A,B) is the content similarity information.

作为一种可选的实施方式,本发明实施例第二方面中,所述利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型,包括:As an optional implementation, in the second aspect of the embodiment of the present invention, the use of the characteristic information of the network asset to train a preset network asset certificate identification model to obtain a trained network asset certificate identification model includes:

S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31, dividing the characteristic information of the network asset to obtain a marked certificate sample and an unmarked certificate sample;

S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32, using the unlabeled certificate samples as training samples to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model.

作为一种可选的实施方式,本发明实施例第二方面中,所述获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:As an optional implementation, in the second aspect of the embodiment of the present invention, the obtaining of the certificate information of the network asset to be identified, using the trained network asset certificate identification model, processing the certificate information of the network asset to be identified, and obtaining the network asset certificate identification result includes:

S41,获取待识别网络资产的证书信息;S41, obtaining certificate information of the network asset to be identified;

S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42, processing the certificate information of the network asset to be identified to obtain feature information of the network asset to be identified;

S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43, obtaining a first identification result according to the characteristic information of the network asset to be identified;

S44,根据所述首次识别结果,利用所述训练网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44, based on the first identification result, the trained network asset certificate identification model is used to process the feature information of the network asset to be identified to obtain a network asset certificate identification result.

作为一种可选的实施方式,本发明实施例第二方面中,所述方法还包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the method further includes:

获取待识别网络资产的证书信息;Obtain the certificate information of the network asset to be identified;

对所述待识别网络资产的证书信息进行识别,得到首次识别结果;Identify the certificate information of the network asset to be identified to obtain a first identification result;

根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, the network asset certificates different from the first identification result are marked to obtain positive certificate and negative certificate;

将所述反例证书加入所述未标记证书样本中,构成最优训练样本集;Adding the counter-example certificate to the unlabeled certificate sample to form an optimal training sample set;

利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型。The preset network asset certificate recognition model is trained using the optimal training sample set to obtain an optimized network asset certificate recognition model.

本发明第三方面公开了另一种网络资产证书识别装置,所述装置包括:The third aspect of the present invention discloses another network asset certificate identification device, the device comprising:

存储有可执行程序代码的存储器;A memory storing executable program code;

与所述存储器耦合的处理器;a processor coupled to the memory;

所述处理器调用所述存储器中存储的所述可执行程序代码,执行本发明实施例第一方面公开的网络资产证书识别方法中的部分或全部步骤。The processor calls the executable program code stored in the memory to execute part or all of the steps in the network asset certificate identification method disclosed in the first aspect of the embodiment of the present invention.

与现有技术相比,本发明实施例具有以下有益效果:Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

本发明提供了一种网络资产证书识别方法及装置,通过在结构相似性和内容相似性两方面对证书样本进行相似性度量,进而获取证书的结构特征、内容特征和综合特征;采用支持向量机模型,并从如何选择最为合适的证书作为支持向量机的训练样本出发,引入自主学习思想,构建基于主动学习反馈的支持向量机,将未标记证书样本作为训练样本,输入到支持向量机分类器进行学习;在对用户未标记的样本进行不断识别查询过程中,针对规模较大的证书库,能够避免用户标记样本数量受限影响支持向量机分类器的分类效果,或者由于进行大量标记工作花费处理时间而增大分类器计算量;同时,能够标记歧义最大的证书,结合用户标记的样本一起构成最优训练样本集,进而缩减计算时间,提高分类查询效率,提高识别查询结果质量。The present invention provides a network asset certificate identification method and device, which measures the similarity of certificate samples in terms of structural similarity and content similarity, thereby obtaining the structural features, content features and comprehensive features of the certificate; adopts a support vector machine model, and introduces the idea of autonomous learning from how to select the most appropriate certificate as a training sample of the support vector machine, constructs a support vector machine based on active learning feedback, and uses unlabeled certificate samples as training samples and inputs them into the support vector machine classifier for learning; in the process of continuously identifying and querying the user's unlabeled samples, for a large-scale certificate library, it is possible to avoid the impact of the limited number of user-labeled samples on the classification effect of the support vector machine classifier, or the increase in the classifier calculation amount due to the processing time spent on a large amount of labeling work; at the same time, it is possible to label the most ambiguous certificates, and combine them with the user-labeled samples to form an optimal training sample set, thereby reducing the calculation time, improving the classification query efficiency, and improving the quality of the identification query results.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

图1是本发明实施例公开的一种网络资产证书识别方法的流程示意图;FIG1 is a flow chart of a method for identifying a network asset certificate disclosed in an embodiment of the present invention;

图2是本发明实施例公开的另一种网络资产证书识别方法的流程示意图;FIG2 is a flow chart of another network asset certificate identification method disclosed in an embodiment of the present invention;

图3是本发明实施例公开的基于自主学习反馈的网络资产证书识别查询系统的结构示意图;3 is a schematic diagram of the structure of a network asset certificate identification query system based on autonomous learning feedback disclosed in an embodiment of the present invention;

图4是本发明实施例公开的样本标注示意图;FIG4 is a schematic diagram of sample annotation disclosed in an embodiment of the present invention;

图5是本发明实施例公开的主动学习模型示意图;FIG5 is a schematic diagram of an active learning model disclosed in an embodiment of the present invention;

图6是本发明实施例公开的一种网络资产证书识别装置的结构示意图;FIG6 is a schematic diagram of the structure of a network asset certificate identification device disclosed in an embodiment of the present invention;

图7是本发明实施例公开的另一种网络资产证书识别装置的结构示意图。FIG. 7 is a schematic diagram of the structure of another network asset certificate identification device disclosed in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or equipment.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

本发明公开了一种网络资产证书识别方法及装置,能够获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;对所述网络资产的证书信息进行处理得到网络资产的特征信息,所述网络资产的特征信息构成特征库;利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练得到训练网络资产证书识别模型;获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。本发明将两种相似性度量方法相结合,从证书的内容和结构两方面进行相似性比对;同时,结合自主学习反馈机制,探索自动化程度高、准确率更高的证书相似性度量和识别查询方法。以下分别进行详细说明。The present invention discloses a network asset certificate identification method and device, which can obtain the certificate information of the network asset, and the certificate information of the network asset constitutes an asset certificate library; the certificate information of the network asset is processed to obtain the characteristic information of the network asset, and the characteristic information of the network asset constitutes a characteristic library; the characteristic information of the network asset is used to train a preset network asset certificate identification model to obtain a trained network asset certificate identification model; the certificate information of the network asset to be identified is obtained, and the certificate information of the network asset to be identified is processed using the trained network asset certificate identification model to obtain a network asset certificate identification result. The present invention combines two similarity measurement methods to perform similarity comparison from the two aspects of the content and structure of the certificate; at the same time, combined with the autonomous learning feedback mechanism, it explores a certificate similarity measurement and identification query method with a high degree of automation and higher accuracy. The following are detailed descriptions.

实施例一Embodiment 1

请参阅图1,图1是本发明实施例公开的一种网络资产证书识别方法的流程示意图。其中,图1所描述的网络资产证书识别方法应用于网络资产证书识别系统中,本发明实施例不做限定。如图1所示,该网络资产证书识别方法可以包括以下操作:Please refer to FIG. 1, which is a flow chart of a network asset certificate identification method disclosed in an embodiment of the present invention. The network asset certificate identification method described in FIG. 1 is applied to a network asset certificate identification system, which is not limited in the embodiment of the present invention. As shown in FIG. 1, the network asset certificate identification method may include the following operations:

S1,获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S1, obtaining certificate information of network assets, wherein the certificate information of the network assets constitutes an asset certificate library;

S2,对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;S2, processing the certificate information of the network asset to obtain feature information of the network asset, wherein the feature information of the network asset constitutes a feature library;

S3,利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S3, using the characteristic information of the network asset, training a preset network asset certificate identification model to obtain a trained network asset certificate identification model;

S4,获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。S4, obtaining the certificate information of the network asset to be identified, and using the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain a network asset certificate identification result.

资产证书库由网络资产的证书信息构成,包括以下信息项:版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等;The asset certificate library consists of the certificate information of network assets, including the following information items: version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, signature value, etc.

可选的,所述对所述网络资产的证书信息进行处理,得到网络资产的特征信息,包括:Optionally, the processing of the certificate information of the network asset to obtain characteristic information of the network asset includes:

S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息;S21, performing structural similarity calculation on the certificate information of the network asset to obtain structural similarity information;

S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息;S22, performing content similarity calculation on the certificate information of the network asset to obtain content similarity information;

S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息。S23, fusing the structure similarity information and the content similarity information to obtain feature information of the network asset.

可选的,所述对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:Optionally, the performing structural similarity calculation on the certificate information of the network asset to obtain structural similarity information includes:

S211,获取网络资产A的证书信息,所述待网络资产A的信息项数量为m;S211, obtaining certificate information of network asset A, wherein the number of information items of network asset A to be obtained is m;

S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212, obtaining certificate information of network asset B, the number of information items of network asset B is n;

S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213, processing the certificate information of the network asset A and the certificate information of the network asset B to obtain the number x of information items contained in both the network asset A and the network asset B;

S214,利用结构相似度计算模型,对所述待网络资产A的信息项数量为m、所述网络资产B的信息项数量为n和所述信息项数量x进行处理,得到结构相似度信息;S214, using a structural similarity calculation model, processing the number of information items of the network asset A, which is m, the number of information items of the network asset B, which is n, and the number of information items, which is x, to obtain structural similarity information;

所述结构相似度计算模型为:The structural similarity calculation model is:

其中str(A,B)为结构相似度信息。Where str(A,B) is the structural similarity information.

可选的,所述对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:Optionally, the performing content similarity calculation on the certificate information of the network asset to obtain content similarity information includes:

S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of the network asset A to obtain a formalized representation of the certificate information item of the network asset A: content A = (a 1 , a 2 , ..., a x );

S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of the network asset B to obtain a formalized representation of the certificate information item of the network asset B: content B = (b 1 , b 2 , ..., b x );

S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223, using a content similarity information calculation model, processing the formalized representation of the certificate information item of the network asset A, content A = (a 1 , a 2 , ..., a x ) and the formalized representation of the certificate information item of the network asset B to obtain content similarity information;

所述内容相似度计算模型为:The content similarity calculation model is:

其中,con(A,B)为内容相似度信息, Among them, con(A,B) is the content similarity information,

可选的,所述对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:Optionally, the fusing the structural similarity information and the content similarity information to obtain feature information of the network asset includes:

利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain feature information of network assets;

所述相似度信息融合模型为:The similarity information fusion model is:

其中,total(A,B)为网络资产的特征信息,str(A,B)为结构相似度信息,con(A,B)为内容相似度信息。Among them, total(A,B) is the characteristic information of network assets, str(A,B) is the structural similarity information, and con(A,B) is the content similarity information.

可选的,所述利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型,包括:Optionally, the using the characteristic information of the network asset to train a preset network asset certificate identification model to obtain a trained network asset certificate identification model includes:

S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31, dividing the characteristic information of the network asset to obtain a marked certificate sample and an unmarked certificate sample;

所述划分方法可以按照3:7的比例进行,本发明不做限制。The division method may be performed in a ratio of 3:7, which is not limited in the present invention.

S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32, using the unlabeled certificate samples as training samples to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model.

可选的,所述获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:Optionally, the acquiring certificate information of the network asset to be identified, and using the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain a network asset certificate identification result, includes:

S41,获取待识别网络资产的证书信息;S41, obtaining certificate information of the network asset to be identified;

S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42, processing the certificate information of the network asset to be identified to obtain feature information of the network asset to be identified;

S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43, obtaining a first identification result according to the characteristic information of the network asset to be identified;

S44,根据所述首次识别结果,利用所述训练网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44, based on the first identification result, the trained network asset certificate identification model is used to process the feature information of the network asset to be identified to obtain a network asset certificate identification result.

可选的,所述方法还包括:Optionally, the method further includes:

获取待识别网络资产的证书信息;Obtain the certificate information of the network asset to be identified;

对所述待识别网络资产的证书信息进行识别,得到首次识别结果;Identify the certificate information of the network asset to be identified to obtain a first identification result;

根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, the network asset certificates different from the first identification result are marked to obtain positive certificate and negative certificate;

用户根据与所述首次识别结果,设置一个阈值,标注正例和反例证书,数量自定义,可以进行二次查询识别得到结果。The user sets a threshold based on the first recognition result, annotates the positive and negative examples, and customizes the number of them, and can perform a secondary query to obtain the result.

将所述反例证书加入所述未标记证书样本中,构成最优训练样本集;Adding the counter-example certificate to the unlabeled certificate sample to form an optimal training sample set;

利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型。The preset network asset certificate recognition model is trained using the optimal training sample set to obtain an optimized network asset certificate recognition model.

可选的,在得到结构相似度信息和内容相似度信息后,可以利用如下方法进行特征融合:Optionally, after obtaining the structural similarity information and the content similarity information, the following method can be used for feature fusion:

将结构相似度信息X和内容相似度信息Y投影到一维进行线性表示,分别对应投影向量a和b,则投影后的特征矩阵变为:The structural similarity information X and the content similarity information Y are projected into one dimension for linear representation, corresponding to the projection vectors a and b respectively, and the feature matrix after projection becomes:

X'=aTX,Y'=bTYX'=a T X,Y'=b T Y

使X'与Y'之间的相关系数最大化,从而得到相关系数最大时的投影向量a和b。即:Maximize the correlation coefficient between X' and Y' to obtain the projection vectors a and b when the correlation coefficient is maximum. That is:

投影前先对数据进行标准化,标准化的目的是使数据的均值为0,方差为1。这种条件下,可以得到:Before projection, the data is standardized. The purpose of standardization is to make the mean of the data 0 and the variance 1. Under this condition, we can get:

cov(X',Y')=cov(aTX,bTY)=E(<aTX,bTY>)=E((aTX)(bTY)T)=aTE(XYT)bcov(X',Y')=cov ( a T X,b T Y)=E( <a T X,b T Y> )=E ( ( a T E(XY T )b

D(X')=D(aTX)=aTE(XXT)aD(X')=D(a T X)=a T E(XX T )a

D(Y')=D(bTY)=bTE(YYT)bD(Y')=D(b T Y)=b T E(YY T )b

因为X和Y经过标准化后均值为0,所以Since X and Y have a mean of 0 after standardization,

D(X)=cov(X,X)=E(XXT)D(X)=cov(X,X)=E(XX T )

D(Y)=cov(Y,Y)=E(YYT)D(Y)=cov(Y,Y)=E(YY T )

cov(X,Y)=E(XYT),cov(Y,X)=E(YXT)cov(X,Y)=E(XY T ),cov(Y,X)=E(YX T )

设SXX=cov(X,X),则求解目标转化为:Assume S XX = cov(X,X), then the solution objective is transformed into:

上式函数的求解方法流程为:The solution process of the above function is:

Step3:求解M的奇异值,得到最大的奇异值和它的左右奇异向量u,v。Step 3: Solve the singular values of M and obtain the largest singular value and its left and right singular vectors u, v.

Step4:X与Y的投影向量a和b分别为: Step 4: The projection vectors a and b of X and Y are:

可选的,预设的网络资产证书识别模型采用离散小波分解对网络资产的特征信息进行处理。网络资产的特征信息被分解到不同频带后计算其能量占比,归一化后利用主成分分析对特征降维,构成的特征向量集作为最小二乘支持向量机输入。再利用混合粒子群算法对最小二乘支持向量机初始参数寻优,从而搭建预设的网络资产证书识别模型。混合粒子群算法将FSA(快速模拟退火法)和PSO(粒子群算法)结合,PSO算法用于全局搜索区域的探索,当PSO搜索到当前迭代次数的全体最优解时使用FSA算法对PSO找到的最佳位置进行调整得到新解,将新解与PSO算法得出的最优解进行对比,如果新解优于最优解,则将新解作为当前最优解,否则以一定概率接受新解。通过这种结合得方式,避免了过早陷入局部最优解,进一步平衡了全局搜索和局部搜索之间的关系,优化了算法的效率和精度。Optionally, the preset network asset certificate identification model uses discrete wavelet decomposition to process the characteristic information of network assets. The characteristic information of network assets is decomposed into different frequency bands and then its energy proportion is calculated. After normalization, the characteristic dimension is reduced by principal component analysis, and the characteristic vector set is used as the input of the least squares support vector machine. The hybrid particle swarm algorithm is then used to optimize the initial parameters of the least squares support vector machine, thereby building a preset network asset certificate identification model. The hybrid particle swarm algorithm combines FSA (fast simulated annealing) and PSO (particle swarm algorithm). The PSO algorithm is used to explore the global search area. When PSO searches for the optimal solution of the current number of iterations, the FSA algorithm is used to adjust the best position found by PSO to obtain a new solution. The new solution is compared with the optimal solution obtained by the PSO algorithm. If the new solution is better than the optimal solution, the new solution is used as the current optimal solution, otherwise the new solution is accepted with a certain probability. Through this combination, it is avoided to fall into the local optimal solution too early, further balances the relationship between global search and local search, and optimizes the efficiency and accuracy of the algorithm.

FSA算法流程:FSA algorithm process:

1)从初始解开始,定义初始温度T、终止温度Tmin、降温速率r;1) Starting from the initial solution, define the initial temperature T, the end temperature T min , and the cooling rate r;

2)在每个温度下,使用柯西分布对当前解进行扰动,得到新的解;2) At each temperature, the current solution is perturbed using the Cauchy distribution to obtain a new solution;

3)对于每个新解,计算其目标函数值或成本函数值。如果新解更优,则接受该解作为当前解;否则根据Metropolis准则概率接受该解。3) For each new solution, calculate its objective function value or cost function value. If the new solution is better, accept it as the current solution; otherwise, accept it according to the Metropolis criterion probability.

4)重复步骤2)和3),直到温度下降到Tmin。在温度下降的过程中,接受劣解的概率逐渐降低,最终只接受更优的解。4) Repeat steps 2) and 3) until the temperature drops to T min . During the temperature drop, the probability of accepting an inferior solution gradually decreases, and eventually only the better solution is accepted.

5)当温度降到Tmin时,算法结束,返回找到的最优解。5) When the temperature drops to T min , the algorithm ends and returns the optimal solution found.

实施例二Embodiment 2

请参阅图2,图2是本发明实施例公开的另一种网络资产证书识别方法的流程示意图。其中,图2所描述的网络资产证书识别方法应用于网络资产证书识别系统中,本发明实施例不做限定。如图2所示,该网络资产证书识别方法可以包括以下操作:Please refer to FIG. 2, which is a flowchart of another network asset certificate identification method disclosed in an embodiment of the present invention. The network asset certificate identification method described in FIG. 2 is applied to a network asset certificate identification system, which is not limited in the embodiment of the present invention. As shown in FIG. 2, the network asset certificate identification method may include the following operations:

(1)获取待识别网络资产的证书信息(1) Obtain the certificate information of the network asset to be identified

(2)利用所述证书相似性度量方法,通过结构和内容量化两个方面,计算证书的结构相似度和内容相似度,进而获取证书的结构特征、内容特征和综合特征;(2) Using the certificate similarity measurement method, the structural similarity and content similarity of the certificates are calculated by quantifying the structure and content, thereby obtaining the structural features, content features and comprehensive features of the certificates;

(3)构建基于主动学习反馈的支持向量机,优化训练样本集;(3) Construct a support vector machine based on active learning feedback to optimize the training sample set;

(4)通过上述分类器模型进行待识别资产证书的相似度测量,对网络资产进行识别,进而建立相似网络资产库。(4) The similarity of the asset certificates to be identified is measured through the above-mentioned classifier model, the network assets are identified, and then a similar network asset library is established.

基于自主学习反馈的网络资产证书识别查询系统,具体思想如下:The network asset certificate identification and query system based on autonomous learning feedback has the following specific ideas:

1)总体结构1) Overall structure

检索反馈接口:包括证书查询、结果反馈。主要基于自主学习训练和认证反馈的方式,通过资产证书相似度计算,实现待识别网络资产证书和网络资产证书库中的特征对比,标识不同类别的证书;进而提供用户对选择样本证书进行再次查询的功能。Retrieval feedback interface: including certificate query and result feedback. Mainly based on self-learning training and certification feedback, it realizes the feature comparison between the network asset certificate to be identified and the network asset certificate library through asset certificate similarity calculation, and identifies different types of certificates; and then provides users with the function of re-querying the selected sample certificate.

资产证书库:已知的原始资产证书;Asset certificate library: known original asset certificates;

特征库:结构特征、内容特征形成的综合特征库;Feature library: a comprehensive feature library formed by structural features and content features;

2)工作原理2) Working principle

用户通过证书查询模块,选择需要待查询识别的证书,通过系统显示首次识别查询结果;The user selects the certificate to be queried and identified through the certificate query module, and the system displays the first identification query result;

用户根据结果,标注正例和反例证书,数量自定义,可以进行二次查询识别得到结果。其中,通过主动学习反馈机制划分具有较大歧义的证书,用户可将其标注为反例证书并再次反馈证书标记结果;Based on the results, users can mark positive and negative certificates, with a custom number, and can perform secondary query identification to obtain the results. Among them, certificates with large ambiguity are divided through the active learning feedback mechanism, and users can mark them as negative certificates and feedback the certificate marking results again;

根据结果反馈模块的相关反馈结果是否符合证书识别查询预期,决策系统执行次数,直至识别结果具备一定的准确性,结束操作。Depending on whether the relevant feedback results of the result feedback module meet the expectations of the certificate identification query, the decision system will execute the number of times until the identification result has a certain degree of accuracy and the operation is terminated.

基于自主学习反馈的网络资产证书识别查询系统原理示意图如图3。The schematic diagram of the principle of the network asset certificate identification and query system based on autonomous learning feedback is shown in Figure 3.

3)实现设计3) Implementation design

证书特征提取Certificate feature extraction

(1)提取每个网络资产证书样本的信息项和每个信息项的取值内容;(1) extracting the information items of each network asset certificate sample and the value content of each information item;

证书信息包括以下信息项:版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等。其中版本号是证书的版本信息,每个证书都有一个唯一的证书序列号,签名算法是认证过程所使用的签名算法,颁布者是证书的发行机构名称,有效期标注证书的有效时间,主体是证书所有人的名称,主体公钥是证书所有人的公开密钥,签名值是证书发行者对证书的签名。The certificate information includes the following information items: version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, signature value, etc. The version number is the version information of the certificate, each certificate has a unique certificate serial number, the signature algorithm is the signature algorithm used in the authentication process, the issuer is the name of the issuing organization of the certificate, the validity period marks the validity period of the certificate, the subject is the name of the certificate owner, the subject public key is the public key of the certificate owner, and the signature value is the signature of the certificate issuer on the certificate.

证书信息的信息项可以表示成向量的形式,主体A的证书信息可以形式化表示为The information items of the certificate information can be expressed in the form of a vector. The certificate information of subject A can be formally expressed as

certA=(A1,A2,…,An),cert A =(A 1 ,A 2 ,…,A n ),

其中对于i=1到n,Ai分别表示证书的版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等。每个证书信息项都会有相应的取值,称为信息项的内容,比如,版本号可以是V3,形式化表示为A1=V3。For i=1 to n, Ai represents the certificate version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, signature value, etc. Each certificate information item will have a corresponding value, which is called the content of the information item. For example, the version number can be V3, which is formally expressed as A1 =V3.

(2)计算每个网络资产证书样本的与已知网络资产证书间的结构相似度,作为证书的结构特征;(2) Calculate the structural similarity between each network asset certificate sample and the known network asset certificate as the structural feature of the certificate;

结构相似性,是指计算两个证书信息之间的结构相似性,列出两个证书的所有证书信息项,利用Jaccard相似系数计算两个证书信息之间的结构相似度。假设证书A有m个证书信息项,证书B有n个证书信息项,其中A和B均包含的信息项有x个,那么证书A和证书B的结构相似度表示为Structural similarity refers to calculating the structural similarity between two certificate information, listing all certificate information items of the two certificates, and using the Jaccard similarity coefficient to calculate the structural similarity between the two certificate information. Assuming that certificate A has m certificate information items and certificate B has n certificate information items, and both A and B contain x information items, then the structural similarity between certificate A and certificate B is expressed as

如果两个证书包含的信息项的名称和数目相同,即m=n,并且x=m=n,那么两个证书的结构相似度为1。If two certificates contain the same name and number of information items, ie, m=n, and x=m=n, then the structural similarity of the two certificates is 1.

计算每个网络资产证书样本的与已知网络资产证书间的内容相似度,作为证书的内容特征;Calculate the content similarity between each network asset certificate sample and the known network asset certificate as the content feature of the certificate;

(3)内容相似性,是指计算两个证书相同信息项取值内容的相似性,列出两个证书均存在的证书信息项,对信息项的取值进行相似性度量,利用欧氏距离计算两个证书相同信息项取值内容的相似度。假设证书A和证书B均包含的证书信息项包括版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等x个信息项,证书A和证书B相同信息项的取值内容可以形式化表示为contentA=(a1,a2,…,ax),contentB=(b1,b2,…,bx),计算两个证书相同信息项取值内容之间的欧氏距离为(3) Content similarity refers to calculating the similarity of the values of the same information items in two certificates. The certificate information items that exist in both certificates are listed, and the similarity of the values of the information items is measured. The Euclidean distance is used to calculate the similarity of the values of the same information items in the two certificates. Assume that the certificate information items contained in both certificates A and B include x information items such as version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, signature value, etc. The values of the same information items in certificates A and B can be formally expressed as content A = (a 1 , a 2 ,…, a x ) and content B = (b 1 , b 2 ,…, b x ). The Euclidean distance between the values of the same information items in the two certificates is calculated as

欧氏距离越小,两个证书的相似度就越大;欧氏距离越大,两个证书相似度就越小。那么证书A和证书B的内容相似度为The smaller the Euclidean distance, the greater the similarity between the two certificates; the larger the Euclidean distance, the smaller the similarity between the two certificates. Then the content similarity between certificate A and certificate B is

(4)基于证书的结构特征和内容特征,计算证书样本的综合特征;(4) Calculate the comprehensive characteristics of the certificate sample based on the structural characteristics and content characteristics of the certificate;

根据所述证书A和证书B的结构相似度和内容相似度,计算证书A和证书B之间的总体相似度为According to the structural similarity and content similarity of the certificates A and B, the overall similarity between the certificates A and B is calculated as follows:

主动学习反馈证书识别模型构建:Active learning feedback certificate recognition model construction:

(1)证书查询(1) Certificate Query

主要基于相似度测量方法和证书综合特征进行网络资产证书识别和结果展示。考虑到证书库中与待检测资产证书类似程度高的证书情况,系统界面会基于国别地域、应用等规划展示区域。The identification and result display of network asset certificates are mainly based on similarity measurement methods and comprehensive features of certificates. Considering the certificates in the certificate library that are highly similar to the asset certificates to be tested, the system interface will plan the display area based on country, region, application, etc.

(2)样本标注(2) Sample labeling

主要根据用户标记的正例和反例样本构成标记样本集,作为支持向量机的输入进行训练,进而确保识别查询结果的准确性。The labeled sample set is mainly composed of positive and negative samples marked by users, which is used as the input of the support vector machine for training to ensure the accuracy of the recognition query results.

样本标注是实现结果反馈证书识别查询的过程操作,由用户自行考虑标记数量并按需标记相关正例证书样本和反例证书样本。同时,结合主动学习,针对识别查询结果歧义较大的证书,用户也可对这一阶段的识别结果进行正例和反例标注。如图3所示是本发明实施例公开的基于自主学习反馈的网络资产证书识别查询系统的结构示意图。Sample labeling is the process operation of realizing the result feedback certificate identification query. The user considers the number of labels and labels the relevant positive and negative certificate samples as needed. At the same time, combined with active learning, for certificates with large ambiguity in the identification query results, users can also label the positive and negative examples of the identification results at this stage. As shown in Figure 3, it is a structural diagram of the network asset certificate identification query system based on autonomous learning feedback disclosed in an embodiment of the present invention.

(3)基于主动学习的结果反馈(3) Result feedback based on active learning

通过采用主动学习反馈的模式,将用户大量未标记证书作为训练样本,输入到支持向量机分类器进行学习,能够得到具有较大歧义的证书结果;通过用户自行判定是否将其标记为正例证书或者反例证书,更新标记样本集,进而逐步构成最优训练样本集,提高识别查询准确性。图4是本发明实施例公开的样本标注示意图。图5是本发明实施例公开的主动学习模型示意图。By adopting the active learning feedback mode, a large number of unlabeled certificates of users are used as training samples and input into the support vector machine classifier for learning, which can obtain certificate results with greater ambiguity; the user can decide whether to mark it as a positive certificate or a negative certificate, update the labeled sample set, and then gradually form the optimal training sample set to improve the accuracy of recognition query. Figure 4 is a schematic diagram of sample annotation disclosed in an embodiment of the present invention. Figure 5 is a schematic diagram of the active learning model disclosed in an embodiment of the present invention.

基于主动学习的支持向量机模型具有循环执行特性,模型描述为S=(A,H,U,M,D),其中,A代表支持向量机分类器,H为查询函数,U为用户终端,M为标记的样本集,D为未标记的样本集。The support vector machine model based on active learning has a cyclic execution characteristic, and the model is described as S = (A, H, U, M, D), where A represents the support vector machine classifier, H is the query function, U is the user terminal, M is the labeled sample set, and D is the unlabeled sample set.

模型执行包括:Model execution includes:

(1)结合相似度测量方法,获取证书结构特征、内容特征和综合特征,输出第一次证书识别查询结果;(1) Combine the similarity measurement method to obtain the certificate structure features, content features and comprehensive features, and output the first certificate identification query result;

(2)基于首次输出结果,由用户选择并标注正例样本和反例样本,获得训练样本;(2) Based on the first output results, the user selects and labels positive and negative samples to obtain training samples;

(3)构造训练样本集并对训练样本进行学习,基于分类器,再次进行识别查询;(3) Construct a training sample set and learn the training samples, and then perform recognition query again based on the classifier;

(4)在上述学习反馈结果中,自动计算输出与用户选择样本识别查询结果具有较大歧义的证书集,用户在歧义证书中自行选择、标注正例证书或者反例证书,并加入标注样本集;(4) In the above learning feedback results, the certificate set with large ambiguity with the sample identification query result selected by the user is automatically calculated and output, and the user selects and annotates the positive certificate or the negative certificate in the ambiguous certificate and adds it to the annotated sample set;

(5)循环此过程,能够通过较少的样本集计算得到最优分类识别结果;(5) By repeating this process, the optimal classification and recognition result can be obtained by calculating a small number of sample sets;

(6)计算待识别证书与证书库中每个证书的相似度距离,按照相似性排序,获取证书识别结果。(6) Calculate the similarity distance between the certificate to be identified and each certificate in the certificate library, sort them according to similarity, and obtain the certificate identification result.

实施例三Embodiment 3

请参阅图6,图6是本发明实施例公开的一种网络资产证书识别装置的结构示意图。其中,图6所描述的网络资产证书识别装置应用于网络资产证书识别系统中,本发明实施例不做限定。如图6所示,该网络资产证书识别装置可以包括以下操作:Please refer to FIG6 , which is a schematic diagram of the structure of a network asset certificate identification device disclosed in an embodiment of the present invention. The network asset certificate identification device described in FIG6 is applied to a network asset certificate identification system, which is not limited in the embodiment of the present invention. As shown in FIG6 , the network asset certificate identification device may include the following operations:

S301,数据获取模块,用于获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S301, a data acquisition module, used to acquire certificate information of network assets, where the certificate information of the network assets constitutes an asset certificate library;

S302,特征提取模块,用于对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;S302, a feature extraction module, used to process the certificate information of the network asset to obtain feature information of the network asset, and the feature information of the network asset constitutes a feature library;

S303,模型训练模块,用于利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S303, a model training module, used to train a preset network asset certificate identification model using the characteristic information of the network asset to obtain a trained network asset certificate identification model;

S304,证书识别模块,用于获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。S304, a certificate identification module is used to obtain the certificate information of the network asset to be identified, and use the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain a network asset certificate identification result.

实施例四Embodiment 4

请参阅图7,图7是本发明实施例公开的另一种网络资产证书识别装置的结构示意图。其中,图7所描述的网络资产证书识别装置应用于网络资产证书识别系统中,本发明实施例不做限定。如图6所示,该网络资产证书识别装置可以包括以下操作:Please refer to FIG. 7, which is a schematic diagram of the structure of another network asset certificate identification device disclosed in an embodiment of the present invention. The network asset certificate identification device described in FIG. 7 is applied to a network asset certificate identification system, which is not limited in the embodiment of the present invention. As shown in FIG. 6, the network asset certificate identification device may include the following operations:

存储有可执行程序代码的存储器401;A memory 401 storing executable program codes;

与存储器401耦合的处理器402;a processor 402 coupled to the memory 401;

处理器402调用存储器401中存储的可执行程序代码,用于执行实施例一或实施例二所描述的网络资产证书识别方法中的步骤。The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the network asset certificate identification method described in the first or second embodiment.

以上所描述的装置实施例仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without paying creative labor.

通过以上的实施例的具体描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(ErasableProgrammable Read Only Memory,EPROM)、一次可编程只读存储器(One-timeProgrammable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(CompactDisc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

最后应说明的是:本发明实施例公开的一种网络资产证书识别方法及装置所揭露的仅为本发明较佳实施例而已,仅用于说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解;其依然可以对前述各项实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应的技术方案的本质脱离本发明各项实施例技术方案的精神和范围。Finally, it should be noted that the network asset certificate identification method and device disclosed in the embodiments of the present invention disclose only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (4)

1.一种网络资产证书识别方法,其特征在于,所述方法包括:1. A network asset certificate identification method, characterized in that the method comprises: S1,获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S1, obtaining certificate information of network assets, wherein the certificate information of the network assets constitutes an asset certificate library; S2,对所述资产证书库中的网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库,包括:S2, processing the certificate information of the network assets in the asset certificate library to obtain feature information of the network assets, wherein the feature information of the network assets constitutes a feature library, including: S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:S21, performing structural similarity calculation on the certificate information of the network asset to obtain structural similarity information, including: S211,获取网络资产A的证书信息,所述网络资产A的信息项数量为m;S211, obtaining certificate information of network asset A, the number of information items of network asset A is m; S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212, obtaining certificate information of network asset B, the number of information items of network asset B is n; S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213, processing the certificate information of the network asset A and the certificate information of the network asset B to obtain the number x of information items contained in both the network asset A and the network asset B; S214,利用结构相似度计算模型,对所述网络资产A的信息项数量为m、所述网络资产B的信息项数量为n和所述信息项数量x进行处理,得到结构相似度信息;S214, using a structural similarity calculation model, processing the number of information items of the network asset A (m), the number of information items of the network asset B (n), and the number of information items (x) to obtain structural similarity information; 所述结构相似度计算模型为:The structural similarity calculation model is: 其中str(A,B)为结构相似度信息;Among them, str(A,B) is the structural similarity information; S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:S22, performing content similarity calculation on the certificate information of the network asset to obtain content similarity information, including: S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of the network asset A to obtain a formalized representation of the certificate information item of the network asset A: content A = (a 1 , a 2 , ..., a x ); S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of the network asset B to obtain a formalized representation of the certificate information item of the network asset B: content B = (b 1 , b 2 , ..., b x ); S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223, using a content similarity information calculation model, processing the formalized representation of the certificate information item of the network asset A, content A = (a 1 , a 2 , ..., a x ) and the formalized representation of the certificate information item of the network asset B to obtain content similarity information; 所述内容相似度计算模型为:The content similarity calculation model is: 其中,con(A,B)为内容相似度信息, Among them, con(A,B) is the content similarity information, S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:S23, fusing the structural similarity information and the content similarity information to obtain characteristic information of the network asset, including: 利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain feature information of network assets; 所述相似度信息融合模型为:The similarity information fusion model is: 其中,total(A,B)为网络资产的特征信息,str(A,B)为结构相似度信息,con(A,B)为内容相似度信息;Among them, total(A,B) is the characteristic information of network assets, str(A,B) is the structural similarity information, and con(A,B) is the content similarity information; S3,利用所述特征库中的网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S3, using the characteristic information of the network assets in the characteristic library, training a preset network asset certificate identification model to obtain a trained network asset certificate identification model; 所述预设的网络资产证书识别模型的获取方法为:The method for obtaining the preset network asset certificate identification model is: 采用离散小波分解对网络资产的特征信息进行处理;Discrete wavelet decomposition is used to process the characteristic information of network assets; 网络资产的特征信息被分解到不同频带后计算其能量占比,归一化后利用主成分分析对特征降维,构成的特征向量集作为最小二乘支持向量机输入;The characteristic information of network assets is decomposed into different frequency bands and their energy proportions are calculated. After normalization, the characteristic dimension is reduced using principal component analysis, and the constructed characteristic vector set is used as the input of the least squares support vector machine. 利用混合粒子群算法对最小二乘支持向量机初始参数寻优,从而搭建预设的网络资产证书识别模型;The hybrid particle swarm algorithm is used to optimize the initial parameters of the least squares support vector machine, so as to build a preset network asset certificate recognition model; 混合粒子群算法将快速模拟退火法和粒子群算法结合,粒子群算法用于全局搜索区域的探索,当粒子群算法搜索到当前迭代次数的全体最优解时使用快速模拟退火法对粒子群算法找到的最佳位置进行调整得到新解,将新解与粒子群算法得出的最优解进行对比,如果新解优于最优解,则将新解作为当前最优解,否则以一定概率接受新解;The hybrid particle swarm algorithm combines the fast simulated annealing method with the particle swarm algorithm. The particle swarm algorithm is used to explore the global search area. When the particle swarm algorithm searches for the optimal solution of the current number of iterations, the fast simulated annealing method is used to adjust the best position found by the particle swarm algorithm to obtain a new solution. The new solution is compared with the optimal solution obtained by the particle swarm algorithm. If the new solution is better than the optimal solution, the new solution is used as the current optimal solution, otherwise the new solution is accepted with a certain probability. S4,获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:S4, obtaining the certificate information of the network asset to be identified, and using the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain a network asset certificate identification result, including: S41,获取待识别网络资产的证书信息;S41, obtaining certificate information of the network asset to be identified; S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42, processing the certificate information of the network asset to be identified to obtain feature information of the network asset to be identified; S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43, obtaining a first identification result according to the characteristic information of the network asset to be identified; 根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, the network asset certificates different from the first identification result are marked to obtain positive certificate and negative certificate; 将所述反例证书加入未标记证书样本中,构成最优训练样本集;Adding the counter-example certificate to the unlabeled certificate sample to form an optimal training sample set; 利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型;Using the optimal training sample set, training the preset network asset certificate recognition model to obtain an optimized network asset certificate recognition model; S44,根据所述首次识别结果,利用所述优化网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44, according to the first identification result, using the optimized network asset certificate identification model, processing the feature information of the network asset to be identified to obtain a network asset certificate identification result. 2.根据权利要求1所述的网络资产证书识别方法,其特征在于,所述利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型,包括:2. The network asset certificate identification method according to claim 1, characterized in that the use of the characteristic information of the network asset to train a preset network asset certificate identification model to obtain a trained network asset certificate identification model comprises: S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31, dividing the characteristic information of the network asset to obtain a marked certificate sample and an unmarked certificate sample; S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32, using the unlabeled certificate samples as training samples to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model. 3.一种网络资产证书识别装置,其特征在于,所述装置包括:3. A network asset certificate identification device, characterized in that the device comprises: 数据获取模块,用于获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;A data acquisition module, used to acquire certificate information of network assets, wherein the certificate information of the network assets constitutes an asset certificate library; 特征提取模块,用于对所述资产证书库中的网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库,包括:The feature extraction module is used to process the certificate information of the network assets in the asset certificate library to obtain feature information of the network assets. The feature information of the network assets constitutes a feature library, including: S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:S21, performing structural similarity calculation on the certificate information of the network asset to obtain structural similarity information, including: S211,获取网络资产A的证书信息,所述网络资产A的信息项数量为m;S211, obtaining certificate information of network asset A, the number of information items of network asset A is m; S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212, obtaining certificate information of network asset B, the number of information items of network asset B is n; S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213, processing the certificate information of the network asset A and the certificate information of the network asset B to obtain the number x of information items contained in both the network asset A and the network asset B; S214,利用结构相似度计算模型,对所述网络资产A的信息项数量为m、所述网络资产B的信息项数量为n和所述信息项数量x进行处理,得到结构相似度信息;S214, using a structural similarity calculation model, processing the number of information items of the network asset A (m), the number of information items of the network asset B (n), and the number of information items (x) to obtain structural similarity information; 所述结构相似度计算模型为:The structural similarity calculation model is: 其中str(A,B)为结构相似度信息;Among them, str(A,B) is the structural similarity information; S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:S22, performing content similarity calculation on the certificate information of the network asset to obtain content similarity information, including: S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of the network asset A to obtain a formalized representation of the certificate information item of the network asset A: content A = (a 1 , a 2 , ..., a x ); S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of the network asset B to obtain a formalized representation of the certificate information item of the network asset B: content B = (b 1 , b 2 , ..., b x ); S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223, using a content similarity information calculation model, processing the formalized representation of the certificate information item of the network asset A, content A = (a 1 , a 2 , ..., a x ) and the formalized representation of the certificate information item of the network asset B to obtain content similarity information; 所述内容相似度计算模型为:The content similarity calculation model is: 产的特征信息,包括: Product characteristics information, including: 利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain feature information of network assets; 所述相似度信息融合模型为:The similarity information fusion model is: 其中,total(A,B)为网络资产的特征信息,str(A,B)为结构相似度信息,con(A,B)为内容相似度信息;Among them, total(A,B) is the characteristic information of network assets, str(A,B) is the structural similarity information, and con(A,B) is the content similarity information; 模型训练模块,用于利用所述特征库中的网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;A model training module, used to train a preset network asset certificate identification model using the feature information of the network assets in the feature library to obtain a trained network asset certificate identification model; 所述预设的网络资产证书识别模型的获取方法为:The method for obtaining the preset network asset certificate identification model is: 采用离散小波分解对网络资产的特征信息进行处理;Discrete wavelet decomposition is used to process the characteristic information of network assets; 网络资产的特征信息被分解到不同频带后计算其能量占比,归一化后利用主成分分析对特征降维,构成的特征向量集作为最小二乘支持向量机输入;The characteristic information of network assets is decomposed into different frequency bands and their energy proportions are calculated. After normalization, the feature dimension is reduced using principal component analysis, and the resulting feature vector set is used as the input of the least squares support vector machine. 利用混合粒子群算法对最小二乘支持向量机初始参数寻优,从而搭建预设的网络资产证书识别模型;The hybrid particle swarm algorithm is used to optimize the initial parameters of the least squares support vector machine, so as to build a preset network asset certificate recognition model; 混合粒子群算法将快速模拟退火法和粒子群算法结合,粒子群算法用于全局搜索区域的探索,当粒子群算法搜索到当前迭代次数的全体最优解时使用快速模拟退火法对粒子群算法找到的最佳位置进行调整得到新解,将新解与粒子群算法得出的最优解进行对比,如果新解优于最优解,则将新解作为当前最优解,否则以一定概率接受新解;The hybrid particle swarm algorithm combines the fast simulated annealing method with the particle swarm algorithm. The particle swarm algorithm is used to explore the global search area. When the particle swarm algorithm searches for the optimal solution of the current number of iterations, the fast simulated annealing method is used to adjust the best position found by the particle swarm algorithm to obtain a new solution. The new solution is compared with the optimal solution obtained by the particle swarm algorithm. If the new solution is better than the optimal solution, the new solution is used as the current optimal solution, otherwise the new solution is accepted with a certain probability. 证书识别模块,用于获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:The certificate identification module is used to obtain the certificate information of the network asset to be identified, and use the trained network asset certificate identification model to process the certificate information of the network asset to be identified to obtain the network asset certificate identification result, including: S41,获取待识别网络资产的证书信息;S41, obtaining certificate information of the network asset to be identified; S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42, processing the certificate information of the network asset to be identified to obtain feature information of the network asset to be identified; S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43, obtaining a first identification result according to the characteristic information of the network asset to be identified; 根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, the network asset certificates different from the first identification result are marked to obtain positive certificate and negative certificate; 将所述反例证书加入未标记证书样本中,构成最优训练样本集;Adding the counter-example certificate to the unlabeled certificate sample to form an optimal training sample set; 利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型;Using the optimal training sample set, training the preset network asset certificate recognition model to obtain an optimized network asset certificate recognition model; S44,根据所述首次识别结果,利用所述优化网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44, based on the first identification result, the optimized network asset certificate identification model is used to process the feature information of the network asset to be identified to obtain a network asset certificate identification result. 4.一种网络资产证书识别装置,其特征在于,所述装置包括:4. A network asset certificate identification device, characterized in that the device comprises: 存储有可执行程序代码的存储器;A memory storing executable program code; 与所述存储器耦合的处理器;a processor coupled to the memory; 所述处理器调用所述存储器中存储的所述可执行程序代码,执行如权利要求1-2任一项所述的网络资产证书识别方法。The processor calls the executable program code stored in the memory to execute the network asset certificate identification method as described in any one of claims 1-2.
CN202311345134.2A 2023-10-17 2023-10-17 Network asset certificate identification method and device Active CN117375845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311345134.2A CN117375845B (en) 2023-10-17 2023-10-17 Network asset certificate identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311345134.2A CN117375845B (en) 2023-10-17 2023-10-17 Network asset certificate identification method and device

Publications (2)

Publication Number Publication Date
CN117375845A CN117375845A (en) 2024-01-09
CN117375845B true CN117375845B (en) 2024-08-20

Family

ID=89388668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311345134.2A Active CN117375845B (en) 2023-10-17 2023-10-17 Network asset certificate identification method and device

Country Status (1)

Country Link
CN (1) CN117375845B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579832A (en) * 2020-11-30 2022-06-03 厦门美亚商鼎信息科技有限公司 Website digital certificate identification method and system based on decision tree

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030080780A (en) * 2002-04-10 2003-10-17 (주)송원정보시스템 Method for managing cyber license and computer-readable recording medium on which a program relating thereto is recorded
JP5292189B2 (en) * 2009-06-01 2013-09-18 日本電信電話株式会社 Certification system and certification method
US9178869B2 (en) * 2010-04-05 2015-11-03 Google Technology Holdings LLC Locating network resources for an entity based on its digital certificate
CN103391196A (en) * 2013-07-04 2013-11-13 黄铁军 Asset digital authentication method and device
DE102014102168A1 (en) * 2014-02-20 2015-09-03 Phoenix Contact Gmbh & Co. Kg Method and system for creating and validating device certificates
CN106888203B (en) * 2016-12-13 2020-03-24 阿里巴巴集团控股有限公司 Augmented reality-based virtual object assignment method and device
CN111444908B (en) * 2020-03-25 2024-02-02 腾讯科技(深圳)有限公司 Image recognition method, device, terminal and storage medium
CN112636924B (en) * 2020-12-23 2021-10-15 北京天融信网络安全技术有限公司 Network asset identification method and device, storage medium and electronic equipment
US11818160B2 (en) * 2021-02-22 2023-11-14 Tenable, Inc. Predicting cyber risk for assets with limited scan information using machine learning

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579832A (en) * 2020-11-30 2022-06-03 厦门美亚商鼎信息科技有限公司 Website digital certificate identification method and system based on decision tree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于网络结构和文本内容的群体画像构建方法研究;邱云飞;图书情报工作;20191130;第63卷(第22期);第3.5节 *

Also Published As

Publication number Publication date
CN117375845A (en) 2024-01-09

Similar Documents

Publication Publication Date Title
CN111797214A (en) Question screening method, device, computer equipment and medium based on FAQ database
CN112801773B (en) Enterprise risk early warning method, device, equipment and storage medium
WO2018040068A1 (en) Knowledge graph-based semantic analysis system and method
CN113869398B (en) Imbalanced text classification method, device, equipment and storage medium
CN113283222B (en) Automatic report generation method and device, computer equipment and storage medium
CN103886067A (en) Method for recommending books through label implied topic
CN110825873A (en) Method and device for expanding log exception classification rules
US20240296402A1 (en) Method, system, and software for tracing paths in graph
CN114996215B (en) File search methods, devices, equipment, and storage media
CN118656495B (en) Public opinion publishing traceability method, device, equipment and storage medium thereof
CN114756611A (en) Artificial intelligence platform sample library management method and system
CN107403311B (en) Account usage identification method and device
CN115564486A (en) Data pushing method, device, equipment and medium
CN116578693A (en) Text retrieval method and device
CN117194710A (en) Multi-granularity video retrieval method and device
CN110188422B (en) A method and device for extracting feature vectors of nodes based on network data
CN115098440A (en) Electronic archive query method, device, storage medium and equipment
CN115618355A (en) Injection attack result determination method, device, equipment and storage medium
CN115269765A (en) Account identification method and device, electronic equipment and storage medium
CN112769540B (en) Diagnosis method, system, equipment and storage medium for side channel information leakage
CN113887214A (en) Artificial intelligence based wish presumption method and related equipment thereof
CN117375845B (en) Network asset certificate identification method and device
CN119691610A (en) Text multi-label classification method, device, computer equipment and storage medium
Jin et al. Causal Inference Hashing for Long-Tailed Image Retrieval
CN119988520B (en) A data storage method based on artificial intelligence learning

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