CN117375845A - Network asset certificate identification method and device - Google Patents
Network asset certificate identification method and device Download PDFInfo
- Publication number
- CN117375845A CN117375845A CN202311345134.2A CN202311345134A CN117375845A CN 117375845 A CN117375845 A CN 117375845A CN 202311345134 A CN202311345134 A CN 202311345134A CN 117375845 A CN117375845 A CN 117375845A
- Authority
- CN
- China
- Prior art keywords
- certificate
- network asset
- information
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3263—Cryptographic 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
Description
技术领域Technical field
本发明网络资产身份识别技术领域,尤其涉及一种网络资产证书识别方法及装置。The present invention is in the technical field of network asset identification, and in particular relates to a method and device for identifying network asset certificates.
背景技术Background technique
数字证书是指在互联网通讯中标志通讯各方身份信息的一个数字认证,可以用于识别验证通讯各方的身份。证书信息通常包括以下信息项:版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等。其中版本号是证书的版本信息,每个证书都有一个唯一的证书序列号,签名算法是认证过程所使用的签名算法,颁布者是证书的发行机构名称,有效期标注证书的有效时间,主体是证书所有人的名称,主体公钥是证书所有人的公开密钥,签名值是证书发行者对证书的签名。A digital certificate refers to a digital certification that marks the identity information of communicating parties in Internet communications. It can be used to identify and verify the identities of 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 certification process. The issuer is the name of the issuing authority of the certificate. The validity period marks the validity time 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.
数字证书是用于互联网信息活动中网络资产行为主体的身份证明,也是可以用于验证网络资产发送信息保密性和完整性的电子数据。合理准确地对网络资产的证书实施相似性度量,可以有效地对网络资产进行分类识别和查询检索。Digital certificates are used to prove the identity of network asset actors in Internet information activities. They are also electronic data that can be used to verify the confidentiality and integrity of information sent by network assets. Implementing similarity measurement on certificates of network assets reasonably and accurately can effectively classify, identify and query network assets.
目前还没有直接针对证书相似性度量和识别的相关研究,考虑证书的结构包括若干个信息项(版本号、序列号、签名算法、颁布者等)和每个信息项对应的取值内容,可以参考对文本分类中文本相似性衡量的方法。文本分类中的大多数算法,比如KNN方法、支持向量机方法、K均值方法等都需要通过计算相似度来达到分类的目的。常用的传统的文本相似性度量方法有余弦相似度、Jaccard相似系数、欧式距离、曼哈顿距离、切比雪夫距离、马氏距离等。There is currently no relevant research directly 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 value content corresponding to each information item, it can be Refer to methods for 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.
现有文本相似性度量方法功能单一,不可以直接应用于证书的相似性度量。鉴于证书的结构包括若干个信息项(版本号、序列号、签名算法、颁布者等)和每个信息项对应的取值内容,可以考虑将两种相似性度量方法相结合,从证书的内容和结构两方面进行相似性比对;同时,结合自主学习反馈机制,探索自动化程度高、准确率更高的证书相似性度量和识别查询方法。Existing text similarity measurement methods have single functions and cannot be directly applied to certificate similarity measurement. Given that the structure of a certificate includes several information items (version number, serial number, signature algorithm, issuer, etc.) and the value content corresponding to each information item, it is possible to consider combining the two similarity measurement methods to calculate the content of the certificate from the content of the certificate. Conduct similarity comparisons in both aspects and structure; at the same time, combined with the autonomous learning feedback mechanism, explore certificate similarity measurement and identification query methods with a high degree of automation and higher accuracy.
发明内容Contents of the invention
本发明所要解决的技术问题在于,提供一种网络资产证书识别方法及装置,能够通过对不同网络资产的证书进行相似性度量来达到对网络资产进行身份识别的目的,来弥补现有技术对网络资产识别自动化程度低、准确率低的问题。为了解决上述技术问题,本发明实施例第一方面公开了一种网络资产证书识别方法,所述方法包括:The technical problem to be solved by the present invention is to provide a method and device for identifying network asset certificates, which can achieve the purpose of identifying network assets by measuring the similarity of certificates of different network assets, so as to make up for the existing technology's impact on the network. The problem of low automation and low accuracy in asset identification. In order to solve the above technical problems, the first aspect of the embodiment of the present invention discloses a method for identifying network asset certificates. The method includes:
S1,获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S1. Obtain the certificate information of the network assets. The certificate information of the network assets constitutes the asset certificate library;
S2,对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;S2, process the certificate information of the network asset to obtain the characteristic information of the network asset, and the characteristic information of the network asset constitutes a feature library;
S3,利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S3, use the characteristic information of the network asset to train the preset network asset certificate recognition model to obtain a trained network asset certificate recognition model;
S4,获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。S4: Obtain the certificate information of the network asset to be identified, use the trained network asset certificate recognition model to process the certificate information of the network asset to be identified, and obtain the network asset certificate recognition result.
作为一种可选的实施方式,本发明实施例第一方面中,所述对所述网络资产的证书信息进行处理,得到网络资产的特征信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, processing the certificate information of the network asset to obtain characteristic information of the network asset includes:
S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息;S21, perform structural similarity calculation on the certificate information of the network asset to obtain structural similarity information;
S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息;S22, perform content similarity calculation on the certificate information of the network asset to obtain content similarity information;
S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息。S23: Fusion of the structural similarity information and the content similarity information to obtain characteristic information of the network asset.
作为一种可选的实施方式,本发明实施例第一方面中,所述对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the structural similarity calculation is performed on the certificate information of the network asset to obtain the structural similarity information, including:
S211,获取网络资产A的证书信息,所述待网络资产A的信息项数量为m;S211. Obtain the certificate information of network asset A. The number of information items of network asset A to be processed is m;
S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212. Obtain the certificate information of network asset B. The number of information items of network asset B is n;
S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213. Process 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, use the structural similarity calculation model to process the number of information items of the network asset A to be m, the number of information items of the network asset B to be 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.
作为一种可选的实施方式,本发明实施例第一方面中,所述对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the content similarity calculation is performed on the certificate information of the network asset to obtain the content similarity information, including:
S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of network asset A, and obtain the formal representation of the certificate information item of network asset A, content A = (a 1 , a 2 ,..., a x );
S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of network asset B, and obtain the formal representation of the certificate information item of network asset B, content B = (b 1 , b 2 ,..., b x );
S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223. Use the content similarity information calculation model to formalize the certificate information items of the network asset A as content A = (a 1 , a 2 ,..., a x ) and the certificate information items of the network asset B. Indicates processing to obtain content similarity information;
所述内容相似度计算模型为:The content similarity calculation model is:
其中,con(A,B)为内容相似度信息, Among them, con(A,B) is content similarity information,
作为一种可选的实施方式,本发明实施例第一方面中,所述对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the fusion of the structural similarity information and the content similarity information to obtain characteristic information of network assets includes:
利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain characteristic 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 manner, in the first aspect of the embodiment of the present invention, 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, including :
S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31. Divide the characteristic information of the network assets to obtain labeled certificate samples and unlabeled certificate samples;
S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32. Use the unlabeled certificate sample as a training sample to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model.
作为一种可选的实施方式,本发明实施例第一方面中,所述获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the certificate information of the network asset to be identified is obtained, and the certificate information of the network asset to be identified is used to train the network asset certificate identification model. Process and obtain the network asset certificate identification results, including:
S41,获取待识别网络资产的证书信息;S41, obtain the certificate information of the network asset to be identified;
S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42: Process the certificate information of the network asset to be identified to obtain the characteristic information of the network asset to be identified;
S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43: Obtain the first identification result based on the characteristic information of the network asset to be identified;
S44,根据所述首次识别结果,利用所述训练网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44: According to the first identification result, use the trained network asset certificate identification model to process the characteristic information of the network asset to be identified to obtain a network asset certificate identification result.
作为一种可选的实施方式,本发明实施例第一方面中,所述方法还包括:As an optional implementation, 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 and obtain the first identification result;
根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, mark network asset certificates that are different from the first identification result to obtain a positive example certificate and a counterexample certificate;
将所述反例证书加入所述未标记证书样本中,构成最优训练样本集;Add the counterexample certificate to the unlabeled certificate sample to form the optimal training sample set;
利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型。The optimal training sample set is used to train the preset network asset certificate recognition model to obtain an optimized network asset certificate recognition model.
本发明实施例第二方面公开了一种网络资产证书识别装置,所述装置包括:The second aspect of the embodiment of the present invention discloses a network asset certificate identification device. The device includes:
数据获取模块,用于获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;A data acquisition module, used to obtain certificate information of network assets. The certificate information of network assets constitutes an asset certificate library;
特征提取模块,用于对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;A feature extraction module, used to process the certificate information of the network asset to obtain the characteristic information of the network asset, and the characteristic information of the network asset constitutes a feature library;
模型训练模块,用于利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;A model training module, configured to use the characteristic information of the network asset to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model;
证书识别模块,用于获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。The certificate identification module is used to obtain the certificate information of the network asset to be identified, and use the training 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.
作为一种可选的实施方式,本发明实施例第二方面中,所述对所述网络资产的证书信息进行处理,得到网络资产的特征信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, processing the certificate information of the network asset to obtain characteristic information of the network asset includes:
S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息;S21, perform structural similarity calculation on the certificate information of the network asset to obtain structural similarity information;
S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息;S22, perform content similarity calculation on the certificate information of the network asset to obtain content similarity information;
S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息。S23: Fusion of the structural similarity information and the content similarity information to obtain characteristic information of the network asset.
作为一种可选的实施方式,本发明实施例第二方面中,所述对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the structural similarity calculation is performed on the certificate information of the network asset to obtain the structural similarity information, including:
S211,获取网络资产A的证书信息,所述待网络资产A的信息项数量为m;S211. Obtain the certificate information of network asset A. The number of information items of network asset A to be processed is m;
S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212. Obtain the certificate information of network asset B. The number of information items of network asset B is n;
S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213. Process 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, use the structural similarity calculation model to process the number of information items of the network asset A to be m, the number of information items of the network asset B to be 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.
作为一种可选的实施方式,本发明实施例第二方面中,所述对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the content similarity calculation is performed on the certificate information of the network asset to obtain the content similarity information, including:
S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of network asset A, and obtain the formal representation of the certificate information item of network asset A, content A = (a 1 , a 2 ,..., a x );
S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of network asset B, and obtain the formal representation of the certificate information item of network asset B, content B = (b 1 , b 2 ,..., b x );
S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223. Use the content similarity information calculation model to formalize the certificate information items of the network asset A as content A = (a 1 , a 2 ,..., a x ) and the certificate information items of the network asset B. Indicates processing to obtain content similarity information;
所述内容相似度计算模型为:The content similarity calculation model is:
其中,con(A,B)为内容相似度信息, Among them, con(A,B) is content similarity information,
作为一种可选的实施方式,本发明实施例第二方面中,所述对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the fusion of the structural similarity information and the content similarity information to obtain characteristic information of network assets includes:
利用相似度信息融合模型,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息;Using a similarity information fusion model, the structural similarity information and the content similarity information are fused to obtain characteristic 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 the network asset, str(A,B) is the structural similarity information, and 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 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, including :
S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31. Divide the characteristic information of the network assets to obtain labeled certificate samples and unlabeled certificate samples;
S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32. Use the unlabeled certificate sample as a training sample to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model.
作为一种可选的实施方式,本发明实施例第二方面中,所述获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the certificate information of the network asset to be identified is obtained, and the certificate information of the network asset to be identified is used to train the network asset certificate recognition model. Process and obtain the network asset certificate identification results, including:
S41,获取待识别网络资产的证书信息;S41, obtain the certificate information of the network asset to be identified;
S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42: Process the certificate information of the network asset to be identified to obtain the characteristic information of the network asset to be identified;
S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43: Obtain the first identification result based on the characteristic information of the network asset to be identified;
S44,根据所述首次识别结果,利用所述训练网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44: According to the first identification result, use the trained network asset certificate identification model to process the characteristic information of the network asset to be identified to obtain a network asset certificate identification result.
作为一种可选的实施方式,本发明实施例第二方面中,所述方法还包括:As an optional implementation, 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 and obtain the first identification result;
根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, mark network asset certificates that are different from the first identification result to obtain a positive example certificate and a counterexample certificate;
将所述反例证书加入所述未标记证书样本中,构成最优训练样本集;Add the counterexample certificate to the unlabeled certificate sample to form the optimal training sample set;
利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型。The optimal training sample set is used to train the preset network asset certificate recognition model 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 includes:
存储有可执行程序代码的存储器;Memory that stores executable program code;
与所述存储器耦合的处理器;a processor coupled to said memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行本发明实施例第一方面公开的网络资产证书识别方法中的部分或全部步骤。The processor calls the executable program code stored in the memory to execute some 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 method and device for identifying network asset certificates. By measuring the similarity of certificate samples in terms of structural similarity and content similarity, the structural features, content features and comprehensive features of the certificate are then obtained; a support vector machine is used model, and starting from how to select the most appropriate certificate as a training sample for the support vector machine, introduce the idea of autonomous learning, build a support vector machine based on active learning feedback, and use unlabeled certificate samples as training samples to input into the support vector machine classifier For learning; in the process of continuous identification and query of user-unlabeled samples, for a large certificate database, it can avoid the limited number of user-labeled samples from affecting the classification effect of the support vector machine classifier, or the cost of a large amount of labeling work The processing time increases the calculation amount of the classifier; at the same time, it can mark the certificates with the greatest ambiguity and combine them with user-marked samples to form the optimal training sample set, thus reducing the calculation time, improving the classification query efficiency, and improving the quality of the recognition query results.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是本发明实施例公开的一种网络资产证书识别方法的流程示意图;Figure 1 is a schematic flow chart of a network asset certificate identification method disclosed in an embodiment of the present invention;
图2是本发明实施例公开的另一种网络资产证书识别方法的流程示意图;Figure 2 is a schematic flow chart of another network asset certificate identification method disclosed in an embodiment of the present invention;
图3是本发明实施例公开的基于自主学习反馈的网络资产证书识别查询系统的结构示意图;Figure 3 is a schematic structural diagram of a network asset certificate identification and query system based on autonomous learning feedback disclosed in an embodiment of the present invention;
图4是本发明实施例公开的样本标注示意图;Figure 4 is a schematic diagram of sample labeling disclosed in the embodiment of the present invention;
图5是本发明实施例公开的主动学习模型示意图;Figure 5 is a schematic diagram of the active learning model disclosed in the embodiment of the present invention;
图6是本发明实施例公开的一种网络资产证书识别装置的结构示意图;Figure 6 is a schematic structural diagram of a network asset certificate identification device disclosed in an embodiment of the present invention;
图7是本发明实施例公开的另一种网络资产证书识别装置的结构示意图。Figure 7 is a schematic structural diagram of another network asset certificate identification device disclosed in an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than describing a specific sequence. Furthermore, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. 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 optionally also includes unlisted steps or units, or optionally also includes Other steps or units inherent to such processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
本发明公开了一种网络资产证书识别方法及装置,能够获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;对所述网络资产的证书信息进行处理得到网络资产的特征信息,所述网络资产的特征信息构成特征库;利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练得到训练网络资产证书识别模型;获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。本发明将两种相似性度量方法相结合,从证书的内容和结构两方面进行相似性比对;同时,结合自主学习反馈机制,探索自动化程度高、准确率更高的证书相似性度量和识别查询方法。以下分别进行详细说明。The invention discloses a method and device for identifying network asset certificates, which can obtain certificate information of network assets. The certificate information of the network assets constitutes an asset certificate library; and the certificate information of the network assets is processed to obtain the characteristic information of the network assets. , the characteristic information of the network asset constitutes a feature library; use the characteristic information of the network asset to train the preset network asset certificate recognition model to obtain a trained network asset certificate recognition model; obtain the certificate information of the network asset to be identified, and use The training network asset certificate recognition model processes the certificate information of the network asset to be identified to obtain a network asset certificate recognition result. This invention combines two similarity measurement methods to conduct similarity comparisons from both the content and structure of the certificate; at the same time, it combines the independent learning feedback mechanism to explore certificate similarity measurement and identification with high automation and higher accuracy. Query method. Each is explained in detail below.
实施例一Embodiment 1
请参阅图1,图1是本发明实施例公开的一种网络资产证书识别方法的流程示意图。其中,图1所描述的网络资产证书识别方法应用于网络资产证书识别系统中,本发明实施例不做限定。如图1所示,该网络资产证书识别方法可以包括以下操作:Please refer to Figure 1. Figure 1 is a schematic flow chart of a network asset certificate identification method disclosed in an embodiment of the present invention. Among them, the network asset certificate identification method described in Figure 1 is applied to the network asset certificate identification system, and is not limited in this embodiment of the present invention. As shown in Figure 1, the network asset certificate identification method can include the following operations:
S1,获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S1. Obtain the certificate information of the network assets. The certificate information of the network assets constitutes the asset certificate library;
S2,对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;S2, process the certificate information of the network asset to obtain the characteristic information of the network asset, and the characteristic information of the network asset constitutes a feature library;
S3,利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S3, use the characteristic information of the network asset to train the preset network asset certificate recognition model to obtain a trained network asset certificate recognition model;
S4,获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。S4: Obtain the certificate information of the network asset to be identified, use the trained network asset certificate recognition model to process the certificate information of the network asset to be identified, and obtain the network asset certificate recognition 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 certificate information of the network asset is processed to obtain the characteristic information of the network asset, including:
S21,对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息;S21, perform structural similarity calculation on the certificate information of the network asset to obtain structural similarity information;
S22,对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息;S22, perform content similarity calculation on the certificate information of the network asset to obtain content similarity information;
S23,对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息。S23: Fusion of the structural similarity information and the content similarity information to obtain characteristic information of the network asset.
可选的,所述对所述网络资产的证书信息进行结构相似度计算,得到结构相似度信息,包括:Optionally, perform structural similarity calculation on the certificate information of the network asset to obtain structural similarity information, including:
S211,获取网络资产A的证书信息,所述待网络资产A的信息项数量为m;S211. Obtain the certificate information of network asset A. The number of information items of network asset A to be processed is m;
S212,获取网络资产B的证书信息,所述网络资产B的信息项数量为n;S212. Obtain the certificate information of network asset B. The number of information items of network asset B is n;
S213,对所述网络资产A的证书信息和所述网络资产B的证书信息进行处理,得到所述网络资产A和所述网络资产B都包含的信息项数量x;S213. Process 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, use the structural similarity calculation model to process the number of information items of the network asset A to be m, the number of information items of the network asset B to be 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.
可选的,所述对所述网络资产的证书信息进行内容相似度计算,得到内容相似度信息,包括:Optionally, the content similarity calculation is performed on the certificate information of the network asset to obtain the content similarity information, including:
S221,对网络资产A的证书信息进行处理,得到网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax);S221, process the certificate information of network asset A, and obtain the formal representation of the certificate information item of network asset A, content A = (a 1 , a 2 ,..., a x );
S222,对网络资产B的证书信息进行处理,得到网络资产B的证书信息项形式化表示contentB=(b1,b2,…,bx);S222, process the certificate information of network asset B, and obtain the formal representation of the certificate information item of network asset B, content B = (b 1 , b 2 ,..., b x );
S223,利用内容相似度信息计算模型,对所述网络资产A的证书信息项形式化表示contentA=(a1,a2,…,ax)和所述网络资产B的证书信息项形式化表示进行处理,得到内容相似度信息;S223. Use the content similarity information calculation model to formalize the certificate information items of the network asset A as content A = (a 1 , a 2 ,..., a x ) and the certificate information items of the network asset B. Indicates processing to obtain content similarity information;
所述内容相似度计算模型为:The content similarity calculation model is:
其中,con(A,B)为内容相似度信息, Among them, con(A,B) is content similarity information,
可选的,所述对所述结构相似度信息和所述内容相似度信息进行融合,得到网络资产的特征信息,包括:Optionally, the structural similarity information and the content similarity information are fused 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 characteristic 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 the network asset, str(A,B) is the structural similarity information, and con(A,B) is the content similarity information.
可选的,所述利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型,包括:Optionally, the characteristic information of the network asset is used to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model, including:
S31,对所述网络资产的特征信息进行划分,得到标注证书样本和未标记证书样本;S31. Divide the characteristic information of the network assets to obtain labeled certificate samples and unlabeled certificate samples;
所述划分方法可以按照3:7的比例进行,本发明不做限制。The dividing method can be carried out according to the ratio of 3:7, which is not limited by the present invention.
S32,将所述未标记证书样本作为训练样本,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型。S32. Use the unlabeled certificate sample as a training sample to train a preset network asset certificate recognition model to obtain a trained network asset certificate recognition model.
可选的,所述获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果,包括:Optionally, obtaining the certificate information of the network asset to be identified, using the trained network asset certificate recognition model to process the certificate information of the network asset to be identified, and obtaining the network asset certificate recognition result, including:
S41,获取待识别网络资产的证书信息;S41, obtain the certificate information of the network asset to be identified;
S42,对所述待识别网络资产的证书信息进行处理,得到待识别网络资产的特征信息;S42: Process the certificate information of the network asset to be identified to obtain the characteristic information of the network asset to be identified;
S43,根据所述待识别网络资产的特征信息,得到首次识别结果;S43: Obtain the first identification result based on the characteristic information of the network asset to be identified;
S44,根据所述首次识别结果,利用所述训练网络资产证书识别模型,对所述待识别网络资产的特征信息进行处理,得到网络资产证书识别结果。S44: According to the first identification result, use the trained network asset certificate identification model to process the characteristic information of the network asset to be identified to obtain a network asset certificate identification result.
可选的,所述方法还包括:Optionally, the method also includes:
获取待识别网络资产的证书信息;Obtain the certificate information of the network asset to be identified;
对所述待识别网络资产的证书信息进行识别,得到首次识别结果;Identify the certificate information of the network asset to be identified and obtain the first identification result;
根据首次识别结果,对与所述首次识别结果不同的网络资产证书进行标注,得到正例证书和反例证书;According to the first identification result, mark network asset certificates that are different from the first identification result to obtain a positive example certificate and a counterexample certificate;
用户根据与所述首次识别结果,设置一个阈值,标注正例和反例证书,数量自定义,可以进行二次查询识别得到结果。The user sets a threshold based on the first identification result, marks the positive and negative examples, and customizes the number. The user can perform a second query and identification to obtain the results.
将所述反例证书加入所述未标记证书样本中,构成最优训练样本集;Add the counterexample certificate to the unlabeled certificate sample to form the optimal training sample set;
利用所述最优训练样本集,对预设的网络资产证书识别模型进行训练,得到优化网络资产证书识别模型。The optimal training sample set is used to train the preset network asset certificate recognition model to obtain an optimized network asset certificate recognition model.
可选的,在得到结构相似度信息和内容相似度信息后,可以利用如下方法进行特征融合:Optionally, after obtaining the structural similarity information and content similarity information, the following method can be used for feature fusion:
将结构相似度信息X和内容相似度信息Y投影到一维进行线性表示,分别对应投影向量a和b,则投影后的特征矩阵变为:Project the structural similarity information X and content similarity information Y to one dimension for linear representation, corresponding to the projection vectors a and b respectively, then the projected feature matrix becomes:
X'=aTX,Y'=bTYX'=a T X,Y'=b T Y
使X'与Y'之间的相关系数最大化,从而得到相关系数最大时的投影向量a和b。即:Maximize the correlation coefficient between X' and Y', thereby obtaining the projection vectors a and b when the correlation coefficient is the largest. Right now:
投影前先对数据进行标准化,标准化的目的是使数据的均值为0,方差为1。这种条件下,可以得到:The data is standardized before projection. 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 standardized mean of 0, so
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 process of solving the above function is as follows:
Step3:求解M的奇异值,得到最大的奇异值和它的左右奇异向量u,v。Step3: 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分别为: Step4: The projection vectors a and b of X and Y are respectively:
可选的,预设的网络资产证书识别模型采用离散小波分解对网络资产的特征信息进行处理。网络资产的特征信息被分解到不同频带后计算其能量占比,归一化后利用主成分分析对特征降维,构成的特征向量集作为最小二乘支持向量机输入。再利用混合粒子群算法对最小二乘支持向量机初始参数寻优,从而搭建预设的网络资产证书识别模型。混合粒子群算法将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 its energy proportion is calculated. After normalization, principal component analysis is used to reduce the dimensionality of the features. The resulting feature vector set is used as the input of the least squares support vector machine. Then use the hybrid particle swarm algorithm to optimize the initial parameters of the least squares support vector machine to build a preset network asset certificate identification model. The hybrid particle swarm algorithm combines FSA (Fast Simulated Annealing) and PSO (Particle Swarm Optimization). The PSO algorithm is used to explore the global search area. When PSO searches for the overall optimal solution for the current iteration number, the FSA algorithm is used to find the PSO. Adjust the optimal position to obtain a new solution. Compare the new solution with the optimal solution obtained by the PSO algorithm. If the new solution is better than the optimal solution, the new solution will be regarded as the current optimal solution. Otherwise, the new solution will be accepted with a certain probability. untie. Through this combination, it avoids falling into the local optimal solution prematurely, 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, use the Cauchy distribution to perturb the current solution and 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 the solution as the current solution; otherwise accept the solution with probability according to the Metropolis criterion.
4)重复步骤2)和3),直到温度下降到Tmin。在温度下降的过程中,接受劣解的概率逐渐降低,最终只接受更优的解。4) Repeat steps 2) and 3) until the temperature drops to T min . As the temperature decreases, the probability of accepting inferior solutions gradually decreases, and eventually only better solutions are accepted.
5)当温度降到Tmin时,算法结束,返回找到的最优解。5) When the temperature drops to T min , the algorithm ends and the optimal solution found is returned.
实施例二Embodiment 2
请参阅图2,图2是本发明实施例公开的另一种网络资产证书识别方法的流程示意图。其中,图2所描述的网络资产证书识别方法应用于网络资产证书识别系统中,本发明实施例不做限定。如图2所示,该网络资产证书识别方法可以包括以下操作:Please refer to Figure 2. Figure 2 is a schematic flow chart of another network asset certificate identification method disclosed in an embodiment of the present invention. Among them, the network asset certificate identification method described in Figure 2 is applied to the network asset certificate identification system, and is not limited in this embodiment of the present invention. As shown in Figure 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) Use the certificate similarity measurement method to calculate the structural similarity and content similarity of the certificate through two aspects of structure and content quantification, and then obtain the structural characteristics, content characteristics and comprehensive characteristics of the certificate;
(3)构建基于主动学习反馈的支持向量机,优化训练样本集;(3) Construct a support vector machine based on active learning feedback and optimize the training sample set;
(4)通过上述分类器模型进行待识别资产证书的相似度测量,对网络资产进行识别,进而建立相似网络资产库。(4) Use the above classifier model to measure the similarity of the asset certificates to be identified, identify network assets, and then establish a similar network asset library.
基于自主学习反馈的网络资产证书识别查询系统,具体思想如下:A network asset certificate identification and query system based on independent learning feedback. The specific ideas are as follows:
1)总体结构1) Overall structure
检索反馈接口:包括证书查询、结果反馈。主要基于自主学习训练和认证反馈的方式,通过资产证书相似度计算,实现待识别网络资产证书和网络资产证书库中的特征对比,标识不同类别的证书;进而提供用户对选择样本证书进行再次查询的功能。Retrieval feedback interface: including certificate query and result feedback. Mainly based on the method of independent learning training and certification feedback, through asset certificate similarity calculation, the characteristics of the network asset certificate to be identified and the network asset certificate library are compared, and different types of certificates are identified; and then the user is provided to query the selected sample certificate again. function.
资产证书库:已知的原始资产证书;Asset certificate library: known original asset certificate;
特征库:结构特征、内容特征形成的综合特征库;Feature database: a comprehensive feature database formed by structural features and content features;
2)工作原理2) Working principle
用户通过证书查询模块,选择需要待查询识别的证书,通过系统显示首次识别查询结果;Through the certificate query module, the user selects the certificate that needs to be queried and identified, and the first identification query result is displayed through the system;
用户根据结果,标注正例和反例证书,数量自定义,可以进行二次查询识别得到结果。其中,通过主动学习反馈机制划分具有较大歧义的证书,用户可将其标注为反例证书并再次反馈证书标记结果;Users can mark positive and negative examples based on the results, and customize the number. They can perform secondary query and identification to obtain the results. Among them, the active learning feedback mechanism is used to classify certificates with greater ambiguity. Users can mark them as counterexample certificates and feedback the certificate marking results again;
根据结果反馈模块的相关反馈结果是否符合证书识别查询预期,决策系统执行次数,直至识别结果具备一定的准确性,结束操作。Based on whether the relevant feedback results from the result feedback module meet the certificate recognition query expectations, the system execution times are decided until the recognition results have a certain accuracy and the operation is completed.
基于自主学习反馈的网络资产证书识别查询系统原理示意图如图3。The schematic diagram of the network asset certificate identification and query system based on independent learning feedback is shown in Figure 3.
3)实现设计3) Implement the design
证书特征提取Certificate feature extraction
(1)提取每个网络资产证书样本的信息项和每个信息项的取值内容;(1) Extract the information items of each network asset certificate sample and the value content of each information item;
证书信息包括以下信息项:版本号、序列号、签名算法、颁布者、有效期、主体、主体公钥、主体公钥算法、签名值等。其中版本号是证书的版本信息,每个证书都有一个唯一的证书序列号,签名算法是认证过程所使用的签名算法,颁布者是证书的发行机构名称,有效期标注证书的有效时间,主体是证书所有人的名称,主体公钥是证书所有人的公开密钥,签名值是证书发行者对证书的签名。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 certification process. The issuer is the name of the issuing authority of the certificate. The validity period marks the validity time 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.
证书信息的信息项可以表示成向量的形式,主体A的证书信息可以形式化表示为The information items of certificate information can be expressed in the form of vectors, and 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。Among them, for i=1 to n, A i respectively represents the version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, signature value, etc. of the certificate. 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 A 1 =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. Assume that certificate A has m certificate information items, 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, that is, 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 value contents of the same information items in two certificates, listing the certificate information items that exist in both certificates, measuring the similarity of the values of the information items, and using Euclidean distance Calculate the similarity of the value content of the same information item in two certificates. Assume that certificate A and certificate B both contain x information items such as version number, serial number, signature algorithm, issuer, validity period, subject, subject public key, subject public key algorithm, and signature value. Certificate A and certificate The value content of the same information item B can be formally expressed as content A = (a 1 , a 2 ,..., a x ), content B = (b 1 , b 2 ,..., b x ), and the calculation of the two certificates is the same The Euclidean distance between the value contents of information items is
欧氏距离越小,两个证书的相似度就越大;欧氏距离越大,两个证书相似度就越小。那么证书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) Based on the structural characteristics and content characteristics of the certificate, calculate the comprehensive characteristics of the certificate sample;
根据所述证书A和证书B的结构相似度和内容相似度,计算证书A和证书B之间的总体相似度为According to the structural similarity and content similarity of certificate A and certificate B, the overall similarity between certificate A and certificate B is calculated as
主动学习反馈证书识别模型构建:Active learning feedback certificate recognition model construction:
(1)证书查询(1)Certificate query
主要基于相似度测量方法和证书综合特征进行网络资产证书识别和结果展示。考虑到证书库中与待检测资产证书类似程度高的证书情况,系统界面会基于国别地域、应用等规划展示区域。Network asset certificate identification and result display are mainly based on similarity measurement methods and certificate comprehensive features. Taking into account the certificates in the certificate library that are highly similar to the asset certificates to be detected, the system interface will plan the display area based on country, region, application, etc.
(2)样本标注(2)Sample labeling
主要根据用户标记的正例和反例样本构成标记样本集,作为支持向量机的输入进行训练,进而确保识别查询结果的准确性。The labeled sample set is mainly formed based on the positive and negative example samples marked by the user, and is used as the input of the support vector machine for training, thereby ensuring the accuracy of the recognition query results.
样本标注是实现结果反馈证书识别查询的过程操作,由用户自行考虑标记数量并按需标记相关正例证书样本和反例证书样本。同时,结合主动学习,针对识别查询结果歧义较大的证书,用户也可对这一阶段的识别结果进行正例和反例标注。如图3所示是本发明实施例公开的基于自主学习反馈的网络资产证书识别查询系统的结构示意图。Sample labeling is a process operation to realize the result feedback certificate identification query. The user considers the number of labels and labels relevant positive and negative certificate samples as needed. At the same time, combined with active learning, users can also label positive and negative examples of the recognition results at this stage to identify certificates with large ambiguities in query results. Figure 3 shows a schematic structural diagram of a network asset certificate identification and 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 user certificates are used as training samples and input into the support vector machine classifier for learning, and certificate results with greater ambiguity can be obtained; users can determine whether to mark them as positive certificates by themselves. Or counterexample 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 labeling disclosed in the embodiment of the present invention. Figure 5 is a schematic diagram of an 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 loop execution characteristics. The model is described as S = (A, H, U, M, D), where A represents the support vector machine classifier, H is the query function, and U is the user terminal. M is the labeled sample set, and D is the unlabeled sample set.
模型执行包括:Model execution includes:
(1)结合相似度测量方法,获取证书结构特征、内容特征和综合特征,输出第一次证书识别查询结果;(1) Combined with the similarity measurement method, obtain the certificate structural features, content features and comprehensive features, and output the first certificate identification query results;
(2)基于首次输出结果,由用户选择并标注正例样本和反例样本,获得训练样本;(2) Based on the first output result, the user selects and labels positive samples and negative samples to obtain training samples;
(3)构造训练样本集并对训练样本进行学习,基于分类器,再次进行识别查询;(3) Construct a training sample set and learn the training samples, and perform identification query again based on the classifier;
(4)在上述学习反馈结果中,自动计算输出与用户选择样本识别查询结果具有较大歧义的证书集,用户在歧义证书中自行选择、标注正例证书或者反例证书,并加入标注样本集;(4) In the above learning feedback results, automatically calculate and output a certificate set that has a large ambiguity with the user-selected sample recognition query results. The user can select and label the positive or negative example certificates among the ambiguous certificates, and add the labeled sample set;
(5)循环此过程,能够通过较少的样本集计算得到最优分类识别结果;(5) By looping this process, the optimal classification and recognition results can be obtained through calculations with a smaller sample set;
(6)计算待识别证书与证书库中每个证书的相似度距离,按照相似性排序,获取证书识别结果。(6) Calculate the similarity distance between the certificate to be recognized and each certificate in the certificate database, sort according to similarity, and obtain the certificate recognition results.
实施例三Embodiment 3
请参阅图6,图6是本发明实施例公开的一种网络资产证书识别装置的结构示意图。其中,图6所描述的网络资产证书识别装置应用于网络资产证书识别系统中,本发明实施例不做限定。如图6所示,该网络资产证书识别装置可以包括以下操作:Please refer to FIG. 6 , which is a schematic structural diagram of a network asset certificate identification device disclosed in an embodiment of the present invention. Among them, the network asset certificate identification device described in Figure 6 is used in a network asset certificate identification system, which is not limited by the embodiment of the present invention. As shown in Figure 6, the network asset certificate identification device may include the following operations:
S301,数据获取模块,用于获取网络资产的证书信息,所述网络资产的证书信息构成资产证书库;S301, the data acquisition module is used to obtain the certificate information of network assets. The certificate information of the network assets constitutes the asset certificate library;
S302,特征提取模块,用于对所述网络资产的证书信息进行处理,得到网络资产的特征信息,所述网络资产的特征信息构成特征库;S302. The feature extraction module is used to process the certificate information of the network asset to obtain the characteristic information of the network asset. The characteristic information of the network asset constitutes a feature library;
S303,模型训练模块,用于利用所述网络资产的特征信息,对预设的网络资产证书识别模型进行训练,得到训练网络资产证书识别模型;S303, the model training module is used to use the characteristic information of the network asset to train the preset network asset certificate recognition model to obtain a trained network asset certificate recognition model;
S304,证书识别模块,用于获取待识别网络资产的证书信息,利用所述训练网络资产证书识别模型,对所述待识别网络资产的证书信息进行处理,得到网络资产证书识别结果。S304. The certificate identification module is used to obtain the certificate information of the network asset to be identified, and use the training 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.
实施例四Embodiment 4
请参阅图7,图7是本发明实施例公开的另一种网络资产证书识别装置的结构示意图。其中,图7所描述的网络资产证书识别装置应用于网络资产证书识别系统中,本发明实施例不做限定。如图6所示,该网络资产证书识别装置可以包括以下操作:Please refer to FIG. 7 , which is a schematic structural diagram of another network asset certificate identification device disclosed in an embodiment of the present invention. Among them, the network asset certificate identification device described in Figure 7 is used in a network asset certificate identification system, which is not limited by the embodiment of the present invention. As shown in Figure 6, the network asset certificate identification device may include the following operations:
存储有可执行程序代码的存储器401;Memory 401 storing executable program code;
与存储器401耦合的处理器402;processor 402 coupled to 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 Embodiment 1 or Embodiment 2.
以上所描述的装置实施例仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative. The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place. , or it can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Persons of ordinary skill in the art can understand and implement the method without any creative effort.
通过以上的实施例的具体描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,存储介质包括只读存储器(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 detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment 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 this understanding, the above technical solutions can be embodied in the form of software products in essence or in part that contribute to the existing technology. The computer software products can be stored in computer-readable storage media, and the storage media includes read-only memories. (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), programmable read-only memory (Programmable Read-only Memory, PROM), erasable programmable read-only memory (ErasableProgrammable Read Only Memory, EPROM) , One-time Programmable Read-Only Memory (OTPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), CompactDisc Read-Only Memory , CD-ROM) or other optical disk 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 embodiment of the present invention are only the preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, but not to limit it; Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and These modifications or substitutions do not deviate from the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (10)
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 true CN117375845A (en) | 2024-01-09 |
| CN117375845B 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 (10)
| 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 |
| JP2010278982A (en) * | 2009-06-01 | 2010-12-09 | Nippon Telegr & Teleph Corp <Ntt> | Certification system and certification method |
| US20110246646A1 (en) * | 2010-04-05 | 2011-10-06 | General Instrument Corporation | 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 |
| CN106031086A (en) * | 2014-02-20 | 2016-10-12 | 菲尼克斯电气公司 | Method and system for creating and checking the validity of device certificates |
| WO2018107994A1 (en) * | 2016-12-13 | 2018-06-21 | 阿里巴巴集团控股有限公司 | Method and device for allocating augmented reality-based virtual objects |
| CN111444908A (en) * | 2020-03-25 | 2020-07-24 | 腾讯科技(深圳)有限公司 | Image recognition method, device, terminal and storage medium |
| CN112636924A (en) * | 2020-12-23 | 2021-04-09 | 北京天融信网络安全技术有限公司 | Network asset identification method and device, storage medium and electronic equipment |
| CN114579832A (en) * | 2020-11-30 | 2022-06-03 | 厦门美亚商鼎信息科技有限公司 | Website digital certificate identification method and system based on decision tree |
| US20220272115A1 (en) * | 2021-02-22 | 2022-08-25 | Tenable, Inc. | Predicting cyber risk for assets with limited scan information using machine learning |
-
2023
- 2023-10-17 CN CN202311345134.2A patent/CN117375845B/en active Active
Patent Citations (10)
| 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 |
| JP2010278982A (en) * | 2009-06-01 | 2010-12-09 | Nippon Telegr & Teleph Corp <Ntt> | Certification system and certification method |
| US20110246646A1 (en) * | 2010-04-05 | 2011-10-06 | General Instrument Corporation | 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 |
| CN106031086A (en) * | 2014-02-20 | 2016-10-12 | 菲尼克斯电气公司 | Method and system for creating and checking the validity of device certificates |
| WO2018107994A1 (en) * | 2016-12-13 | 2018-06-21 | 阿里巴巴集团控股有限公司 | Method and device for allocating augmented reality-based virtual objects |
| CN111444908A (en) * | 2020-03-25 | 2020-07-24 | 腾讯科技(深圳)有限公司 | Image recognition method, device, terminal and storage medium |
| CN114579832A (en) * | 2020-11-30 | 2022-06-03 | 厦门美亚商鼎信息科技有限公司 | Website digital certificate identification method and system based on decision tree |
| CN112636924A (en) * | 2020-12-23 | 2021-04-09 | 北京天融信网络安全技术有限公司 | Network asset identification method and device, storage medium and electronic equipment |
| US20220272115A1 (en) * | 2021-02-22 | 2022-08-25 | Tenable, Inc. | Predicting cyber risk for assets with limited scan information using machine learning |
Non-Patent Citations (1)
| Title |
|---|
| 邱云飞: "基于网络结构和文本内容的群体画像构建方法研究", 图书情报工作, vol. 63, no. 22, 30 November 2019 (2019-11-30), pages 3 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117375845B (en) | 2024-08-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Schnitzer et al. | Local and global scaling reduce hubs in space. | |
| Gottlieb et al. | Efficient classification for metric data | |
| CN111797214A (en) | Question screening method, device, computer equipment and medium based on FAQ database | |
| Athitsos et al. | Efficient nearest neighbor classification using a cascade of approximate similarity measures | |
| Liu et al. | Towards optimal binary code learning via ordinal embedding | |
| CN111325033B (en) | Entity identification method, entity identification device, electronic equipment and computer readable storage medium | |
| CN112199451A (en) | Commodity identification method and device, computer equipment and storage medium | |
| CN119006144A (en) | Business project management method, device, computer equipment and storage medium | |
| CN102999635A (en) | Semantic visual search engine | |
| CN107403311B (en) | Account usage identification 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 | |
| CN116703531B (en) | Article data processing method, apparatus, computer device and storage medium | |
| Zou et al. | aware representation for sketch-based 3d model retrieval | |
| CN113887214A (en) | Artificial intelligence based wish presumption method and related equipment thereof | |
| CN117435685A (en) | Document retrieval methods, devices, computer equipment, storage media and products | |
| CN114997507A (en) | Behavior path generation method, device, device and storage medium | |
| CN114020948A (en) | Sketch image retrieval method and system based on sorting clustering sequence identification selection | |
| CN117375845A (en) | Network asset certificate identification method and device | |
| CN119691610A (en) | Text multi-label classification method, device, computer equipment and storage medium | |
| CN119377245A (en) | Log query method, device, computer equipment and storage medium | |
| Zhao et al. | Class concentration with twin variational autoencoders for unsupervised cross-modal hashing | |
| CN114238574A (en) | Artificial intelligence-based intention recognition method and related equipment | |
| JP2006004103A (en) | Structure matching method between document classification systems, structure matching apparatus, structure matching program, and recording medium recording the program | |
| Fang et al. | Searching human actions based on a multi-dimensional time series similarity calculation method |
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 |