Malicious webpage identification method and device, equipment and storage medium

By obtaining and encoding the text content and background knowledge information of web pages, generating feature vectors and inputting them into the malicious web page classifier, the problem of low accuracy and weak generalization ability of malicious web page recognition in the existing technology is solved, and more efficient malicious web page recognition is achieved. .

CN118573392APending Publication Date: 2024-08-30BEIJING HUAYUNAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410457483.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-08-30

Smart Images

  • Figure CN118573392A
    Figure CN118573392A
Patent Text Reader

Abstract

The embodiment of the invention provides a malicious webpage identification method and device, equipment and a storage medium, and is applied to the technical field of internet security. The method comprises the following steps: acquiring text content information of a to-be-identified webpage comprising keyword field information and webpage normal field information; obtaining background knowledge information corresponding to the keyword field information; respectively inputting the background knowledge information and the webpage regular field information into a preset language model for coding representation to obtain a background knowledge vector and a webpage text vector; splicing the background knowledge vector and the webpage text vector to obtain a feature vector; and inputting the feature vectors into a pre-trained malicious webpage classifier for classification so as to perform malicious webpage identification on the to-be-identified webpage. In this way, the malicious webpage recognition precision can be improved by training the malicious webpage classifier through background knowledge with universal semantic properties.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, in particular to the field of Internet security technology, and specifically to a method, device, equipment and storage medium for identifying malicious web pages. Background Art

[0002] With the development of Internet technology, more and more users are getting information through the Internet. On this open and shared platform, the Internet provides great convenience to people, but it also brings new network security threats. Security issues are often spread through the Internet, such as various web pages containing malicious code, which seriously threaten the information security of society.

[0003] With the advent of the big data era, the number of new web pages generated every day has also exploded. Massive new web pages continue to pour in, providing attackers with an excellent hiding environment.

[0004] Therefore, in the face of a large number of unknown web pages emerging every day, in order to better protect users' Internet security, how to filter out newly emerging malicious samples from a large number of samples within a limited time has become the biggest challenge facing malicious web page detection. However, the current malicious website identification method has low accuracy in malicious web page identification, and the generalization ability of the malicious website identification model is weak. Summary of the invention

[0005] The present invention provides a method, device, equipment and storage medium for identifying malicious web pages.

[0006] According to a first aspect of the present disclosure, a method for identifying malicious web pages is provided. The method comprises:

[0007] Acquire text content information of the web page to be identified, wherein the text content information includes keyword field information and web page body field information;

[0008] Acquire background knowledge information corresponding to the keyword field information;

[0009] Input the background knowledge information into a preset language model for encoding and representation to obtain a background knowledge vector, and input the webpage text field information into a preset language model for encoding and representation to obtain a webpage text vector;

[0010] Concatenating the background knowledge vector and the webpage text vector to obtain a feature vector;

[0011] The feature vector is input into a pre-trained malicious web page classifier for classification, so as to identify malicious web pages for the web pages to be identified.

[0012] According to the above aspects and any possible implementation, an implementation is further provided, wherein the training process of the malicious web page classifier includes:

[0013] Respectively obtaining historical text content information corresponding to malicious web pages and normal web pages, wherein the historical text content information includes historical keyword field information and historical web page body field information;

[0014] Acquire historical background knowledge information corresponding to the historical keyword field information;

[0015] Inputting the historical background knowledge information into a preset language model for encoding and representation to obtain a historical background knowledge vector, and inputting the historical webpage text field information into a preset language model for encoding and representation to obtain a historical webpage text vector;

[0016] The historical background knowledge vector and the historical webpage text vector are concatenated to obtain a historical feature vector;

[0017] The historical feature vectors corresponding to the malicious web pages and the normal web pages are respectively input into a preset classifier as a training set for training to obtain a trained malicious web page classifier.

[0018] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein obtaining the historical text content information corresponding to the malicious webpage and the normal webpage includes:

[0019] Based on a preset web page knowledge base and / or a web crawler, historical text content information corresponding to malicious web pages and normal web pages is obtained.

[0020] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the malicious web page classifier adopts a cross entropy loss function as a loss function.

[0021] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein obtaining the background knowledge information corresponding to the keyword field information includes:

[0022] Based on a preset background knowledge base, background knowledge information corresponding to the keyword field information is obtained.

[0023] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein obtaining text content information of a web page to be identified includes:

[0024] The text content information of the web page to be identified is obtained, and the web page body text data including preset special characters in the text content information is removed.

[0025] According to the above aspects and any possible implementation, an implementation is further provided, wherein the preset language model includes a BERT language model.

[0026] According to a second aspect of the present disclosure, a device for identifying malicious web pages is provided. The device comprises:

[0027] An acquisition module, used to acquire text content information of a web page to be identified, wherein the text content information includes keyword field information and web page body field information;

[0028] The acquisition module is also used to acquire background knowledge information corresponding to the keyword field information;

[0029] A processing module, used for inputting the background knowledge information into a preset language model for encoding and representation to obtain a background knowledge vector, and inputting the webpage text field information into a preset language model for encoding and representation to obtain a webpage text vector;

[0030] The processing module is further used to perform splicing processing on the background knowledge vector and the webpage text vector to obtain a feature vector;

[0031] The processing module is further used to input the feature vector into a pre-trained malicious web page classifier for classification, so as to perform malicious web page identification on the web page to be identified.

[0032] According to a third aspect of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.

[0033] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.

[0034] The embodiments of the present application provide a method, apparatus, device and storage medium for identifying malicious web pages. The method can obtain text content information of a web page to be identified, wherein the text content information includes keyword field information and web page body field information; then obtain background knowledge information corresponding to the keyword field information; then input the background knowledge information into a preset language model for encoding and representation to obtain a background knowledge vector, and input the web page body field information into a preset language model for encoding and representation to obtain a web page text vector; then concatenate the background knowledge vector and the web page text vector to obtain a feature vector; input the feature vector into a pre-trained malicious web page classifier for classification, so as to identify malicious web pages for the web pages to be identified; based on this, the text content of the web page to be identified represented by the encoding and the corresponding background knowledge can be fused, and the malicious web page classifier trained with the historical text content and the corresponding background knowledge corresponding to the normal web page and the malicious web page represented by the encoding can be input to identify malicious web pages. The generalization ability of the model can be improved by training the malicious web page classifier with the fused background knowledge having diversity and flexibility, and the accuracy of malicious web page identification can be improved by training the malicious web page classifier with the background knowledge having general semantic properties.

[0035] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:

[0037] Figure 1 A flowchart of a method for identifying a malicious web page according to an embodiment of the present disclosure is shown;

[0038] Figure 2 A flowchart of another method for identifying malicious web pages according to an embodiment of the present disclosure is shown;

[0039] Figure 3 A block diagram of a malicious web page identification device according to an embodiment of the present disclosure is shown;

[0040] Figure 4 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0042] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0043] In the present disclosure, the text content of the web page to be identified represented by the code and the corresponding background knowledge can be integrated, and the malicious web page classifier trained by inputting the historical text content and the corresponding background knowledge corresponding to the normal web page and the malicious web page represented by the code can be used to identify the malicious web page. The generalization ability of the model can be improved by training the malicious web page classifier with the fused background knowledge with diversity and flexibility, and the accuracy of malicious web page identification can be improved by training the malicious web page classifier with the background knowledge with general semantic properties.

[0044] Figure 1 A flowchart of a method 100 for identifying a malicious web page according to an embodiment of the present disclosure is shown.

[0045] In block 110, text content information of the web page to be identified is obtained, where the text content information includes keyword field information and web page body field information.

[0046] In some embodiments, the web page to be identified can be set according to the actual needs of the user.

[0047] In some embodiments, the text content information of the web page to be identified can be obtained by a web crawler based on the requirement information of the web page to be identified received from the user; the text content information of the web page to be identified input by the user can also be directly obtained.

[0048] In some embodiments, the text content information may directly include keyword field information and web page body field information.

[0049] In some embodiments, the text contents of two fields, namely keywords and web page text, in a web page can be extracted from the text content information by field extraction to obtain keyword field information and web page text field information.

[0050] In some embodiments, obtaining the text content information of the web page to be identified includes:

[0051] The text content information of the web page to be identified is obtained, and the web page body text data including preset special characters in the text content information is removed.

[0052] In some embodiments, the preset special characters can be set according to the actual needs of the user, and the preset special characters include but are not limited to arrow-type, snowflake-type, heart-type, data-type, and right and wrong number-type special characters.

[0053] In some embodiments, before / after / while obtaining the text content information of the web page to be identified, the text content information of the web page to be identified may also be cleaned to remove special characters in the web page body text data corresponding to the text content information field.

[0054] According to the embodiments of the present disclosure, by performing data preprocessing on the text content information as described above, special characters in the body text data of the web page are removed, data cleaning is completed, and the accuracy and efficiency of malicious web page identification are further improved.

[0055] In some embodiments, text content information may be stored in a structured manner to facilitate subsequent prediction of malicious web page identification.

[0056] In block 120 , background knowledge information corresponding to the keyword field information is obtained.

[0057] In some embodiments, the keywords in the keyword field information can be keywords used by the website to describe the website itself, which can fully reflect the characteristic information of the web page. For users, generally, the category to which a web page belongs can be determined through the background knowledge corresponding to the keywords, and the category of the web page can be more accurately known in combination with the content of the specific web page. Due to the diversity and flexibility of natural language, people often use different words to express the same or similar concepts. For users, with the help of the background knowledge of words, they can still quickly understand the meaning contained in unfamiliar words. Therefore, in the identification of malicious web pages, the background knowledge is integrated to identify malicious web pages, which can improve the generalization ability of the malicious web page classifier model and the accuracy of malicious web page identification.

[0058] In some embodiments, since different web pages have different keywords, it is necessary to obtain the subject semantic sample corresponding to each input web page keyword, that is, the background knowledge information corresponding to the keyword field information, that is, the summary description of the background knowledge of the keyword.

[0059] For example, the description of the keyword "cyber security" includes "cyber security refers to the protection of the hardware, software and data in the network system from damage, change or leakage due to accidental or malicious reasons, and the continuous, reliable and normal operation of the system and the uninterrupted network services."

[0060] In some embodiments, sample examples of obtaining background knowledge information corresponding to keyword field information may also include: {Malicious URLs: "Malicious URLs refer to malicious Trojans, viruses and other malicious programs planted in websites, which induce users to visit the website through "disguised website service content". Once entering these websites, they will trigger Trojans, viruses and other programs planted in the website, causing the visitor's computer to be infected and face the risk of losing accounts or privacy information."}.

[0061] In some embodiments, the background knowledge information corresponding to the keyword field information obtained above includes:

[0062] Based on a preset background knowledge base, background knowledge information corresponding to the keyword field information is obtained.

[0063] In some embodiments, the preset background knowledge base can be set according to the actual needs of the user, such as Baidu Encyclopedia, Wikipedia, etc. For example, the data of Baidu Encyclopedia can be obtained by means of data collection from the Internet, and the description of the background knowledge can be obtained for each keyword.

[0064] According to the embodiments of the present disclosure, through the above method, a method for obtaining background knowledge information corresponding to keyword field information based on a background knowledge base can be provided, thereby further improving the accuracy and efficiency of malicious web page identification.

[0065] In box 130, the background knowledge information is input into a preset language model for encoding and representation to obtain a background knowledge vector, and the web page text field information is input into a preset language model for encoding and representation to obtain a web page text vector.

[0066] In some embodiments, the preset language model can be set according to the actual needs of the user.

[0067] For example, common text vector and word embedding models can be selected, including but not limited to the One Hot Model, Bag of Words Model, TF-IDF, N-Gram, Word2vec, and Doc2vec.

[0068] In some embodiments, the preset language model includes a BERT language model.

[0069] In some embodiments, the BERT language model (Bidirectional Encoder Representation from Transformers) is a bidirectional encoder representation model based on Transformer, which is a model that uses self-attention to calculate the representation of its input and output. The word vector encoding representation of the BERT language model is obtained by mapping each word into a high-dimensional vector space after word segmentation of the input text, that is, a bidirectional Transformer encoder is used to generate context-related word vector representations.

[0070] According to an embodiment of the present disclosure, through the above-mentioned method, a method for encoding and representing background knowledge information and web page body field information using a BERT language model is provided, thereby further improving the accuracy and efficiency of malicious web page identification.

[0071] In some embodiments, the BERT language model is used to encode the background knowledge information and the web page text field information. The encoded background knowledge information is a background knowledge vector, which can be referred to as a BK vector, and is represented as follows: BK = BERT (background knowledge sample), and the encoded web page text field information is a web page text vector, which can be referred to as a TEXT vector, and is represented as follows: TEXT = BERT (web page text sample).

[0072] In box 140, the background knowledge vector and the web page text vector are concatenated to obtain a feature vector.

[0073] In some embodiments, in order to integrate the background knowledge information and the web page text field information, the final feature vector to be classified selects the BK vector and the TEXT vector to concatenate to obtain the classification feature F, that is, the feature vector: F = Topic ⊕ TEXT.

[0074] In block 150 , the feature vector is input into a pre-trained malicious web page classifier for classification, so as to identify malicious web pages for the web pages to be identified.

[0075] In some embodiments, the malicious web page classifier may be based on a linear classifier, that is, trained using a fully connected layer in a convolutional neural network.

[0076] In some embodiments, the feature vector is input into a pre-trained malicious web page classifier for classification, so as to confirm whether the web page to be identified is a malicious web page.

[0077] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0078] The method can obtain text content information of a web page to be identified, wherein the text content information includes keyword field information and web page body field information; then obtain background knowledge information corresponding to the keyword field information; then input the background knowledge information into a preset language model for encoding representation to obtain a background knowledge vector, and input the web page body field information into a preset language model for encoding representation to obtain a web page text vector; then concatenate the background knowledge vector and the web page text vector to obtain a feature vector; input the feature vector into a pre-trained malicious web page classifier for classification, so as to identify malicious web pages for the web pages to be identified; based on this, the text content of the web page to be identified represented by the encoding and the corresponding background knowledge can be fused, and the malicious web page classifier trained with the historical text content and the corresponding background knowledge corresponding to the normal web page and the malicious web page represented by the encoding can be input to identify malicious web pages. The generalization ability of the model can be improved by training the malicious web page classifier with the fused background knowledge having diversity and flexibility, and the accuracy of malicious web page identification can be improved by training the malicious web page classifier with the background knowledge having general semantic properties.

[0079] In some embodiments, the training process of the malicious web page classifier includes:

[0080] Respectively obtain historical text content information corresponding to malicious web pages and normal web pages, the historical text content information including historical keyword field information and historical web page body field information;

[0081] Obtain historical background knowledge information corresponding to historical keyword field information;

[0082] Inputting historical background knowledge information into a preset language model for encoding and representation to obtain a historical background knowledge vector, and inputting historical web page text field information into a preset language model for encoding and representation to obtain a historical web page text vector;

[0083] The historical background knowledge vector and the historical webpage text vector are concatenated to obtain the historical feature vector;

[0084] The historical feature vectors corresponding to the malicious web pages and the normal web pages are respectively input into a preset classifier as a training set for training to obtain a trained malicious web page classifier.

[0085] In some embodiments, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the steps in the training process of the malicious web page classifier described in the description "respectively obtain historical text content information corresponding to malicious web pages and normal web pages, the historical text content information includes historical keyword field information and historical web page body field information; obtain historical background knowledge information corresponding to the historical keyword field information; input the historical background knowledge information into a preset language model for encoding and representation, to obtain a historical background knowledge vector, input the historical web page body field information into a preset language model for encoding and representation, to obtain a historical web page text vector; splice the historical background knowledge vector and the historical web page text vector to obtain a historical feature vector" can refer to the corresponding process in the aforementioned malicious web page identification method embodiment, and will not be repeated here.

[0086] In some embodiments, the historical feature vectors corresponding to malicious web pages and the historical feature vectors corresponding to normal web pages may be used as training sets for a preset classifier, and the preset classifier may be trained to obtain a trained malicious web page classifier.

[0087] According to an embodiment of the present disclosure, through the above process, a specific training process of a malicious web page classifier is provided to further improve the accuracy and efficiency of malicious web page identification.

[0088] In some embodiments, the above-mentioned obtaining of historical text content information corresponding to malicious web pages and normal web pages includes:

[0089] Based on a preset web page knowledge base and / or a web crawler, historical text content information corresponding to malicious web pages and normal web pages is obtained.

[0090] In some embodiments, the historical text content information corresponding to malicious web pages and normal web pages can be obtained by means of a web crawler; the historical text content information corresponding to malicious web pages and normal web pages can also be obtained from a known preset web page knowledge base.

[0091] In some embodiments, the preset web page knowledge base can be set according to the actual needs of the user.

[0092] According to an embodiment of the present disclosure, through the above process, a specific method for obtaining historical text content information corresponding to malicious web pages and normal web pages is provided, which further improves the accuracy and efficiency of malicious web page identification.

[0093] In some embodiments, the malicious web page classifier uses a cross entropy loss function as a loss function.

[0094] In some embodiments, a cross entropy loss function can be used as a loss function, and the number of training rounds (epochs), batch size (batch size), and learning rate (lr) are set. The test results repeatedly adjust the hyperparameters to the optimal state.

[0095] According to an embodiment of the present disclosure, through the above process, a loss function specifically adopted by a malicious web page classifier is provided to further improve the accuracy and efficiency of malicious web page identification.

[0096] Figure 2 A flowchart of another method 200 for identifying malicious web pages according to an embodiment of the present disclosure is shown.

[0097] At block 210 , training of a malicious web page classifier is performed and completed.

[0098] In block 220, text content information of the web page to be identified is obtained, where the text content information includes keyword field information and web page body field information.

[0099] In block 230, the web page body text data including the preset special characters in the text content information is removed.

[0100] In block 240 , background knowledge information corresponding to the keyword field information is obtained based on a preset background knowledge base.

[0101] In box 250, the background knowledge information and the web page body text field information without the preset special characters are respectively input into the preset language model for encoding representation to obtain the background knowledge vector and the web page text vector.

[0102] In box 260, the background knowledge vector and the web page text vector are concatenated to obtain a feature vector.

[0103] In block 270, the feature vector is input into a pre-trained malicious web page classifier for classification, so as to identify malicious web pages for the web pages to be identified.

[0104] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0105] The text content of the web page to be identified represented by the encoding and the corresponding background knowledge can be fused, and the historical text content corresponding to the normal web page and the malicious web page represented by the encoding and the corresponding background knowledge can be input into the malicious web page classifier trained to perform malicious web page identification. The generalization ability of the model can be improved by training the malicious web page classifier with diverse and flexible fused background knowledge, and the accuracy of malicious web page identification can also be improved by training the malicious web page classifier with background knowledge with general semantic properties.

[0106] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0107] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.

[0108] Figure 3 FIG. 3 is a block diagram of a malicious web page identification device 300 according to an embodiment of the present disclosure. Figure 3 As shown, the device 300 includes:

[0109] The acquisition module 310 is used to acquire text content information of the web page to be identified, where the text content information includes keyword field information and web page body field information;

[0110] The acquisition module 310 is also used to acquire background knowledge information corresponding to the keyword field information;

[0111] Processing module 320, used for inputting background knowledge information into a preset language model for encoding and representation to obtain a background knowledge vector, and inputting webpage text field information into a preset language model for encoding and representation to obtain a webpage text vector;

[0112] The processing module 320 is further used to perform concatenation processing on the background knowledge vector and the webpage text vector to obtain a feature vector;

[0113] The processing module 320 is further used to input the feature vector into a pre-trained malicious web page classifier for classification, so as to identify the malicious web page for the web page to be identified.

[0114] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0115] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0116] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0117] Figure 4A block diagram of an exemplary electronic device 400 capable of implementing an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0118] The electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in the ROM 402 or a computer program loaded from the storage unit 408 into the RAM 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An I / O interface 405 is also connected to the bus 404.

[0119] Multiple components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0120] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408.

[0121] In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the method 100 in any other appropriate manner (e.g., by means of firmware).

[0122] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0123] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0126] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0127] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0129] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for identifying malicious web pages, characterized in that: include: Acquire text content information of the web page to be identified, wherein the text content information includes keyword field information and web page body field information; Acquire background knowledge information corresponding to the keyword field information; Input the background knowledge information into a preset language model for encoding and representation to obtain a background knowledge vector, and input the webpage text field information into a preset language model for encoding and representation to obtain a webpage text vector; Concatenating the background knowledge vector and the webpage text vector to obtain a feature vector; The feature vector is input into a pre-trained malicious web page classifier for classification, so as to identify malicious web pages for the web pages to be identified.

2. The method according to claim 1, characterized in that The training process of the malicious web page classifier includes: Respectively obtaining historical text content information corresponding to malicious web pages and normal web pages, wherein the historical text content information includes historical keyword field information and historical web page body field information; Acquire historical background knowledge information corresponding to the historical keyword field information; Inputting the historical background knowledge information into a preset language model for encoding and representation to obtain a historical background knowledge vector, and inputting the historical web page text field information into a preset language model for encoding and representation to obtain a historical web page text vector; The historical background knowledge vector and the historical webpage text vector are concatenated to obtain a historical feature vector; The historical feature vectors corresponding to the malicious web pages and the normal web pages are respectively input into a preset classifier as a training set for training to obtain a trained malicious web page classifier.

3. The method according to claim 2, characterized in that The obtaining of historical text content information corresponding to malicious web pages and normal web pages includes: Based on a preset web page knowledge base and / or a web crawler, historical text content information corresponding to malicious web pages and normal web pages is obtained.

4. The method according to claim 1, characterized in that: The malicious web page classifier adopts a cross entropy loss function as a loss function.

5. The method according to claim 1, characterized in that The obtaining of background knowledge information corresponding to the keyword field information includes: Based on a preset background knowledge base, background knowledge information corresponding to the keyword field information is obtained.

6. The method according to claim 1, characterized in that The step of obtaining text content information of a web page to be identified includes: The text content information of the web page to be identified is obtained, and the web page body text data including preset special characters in the text content information is removed.

7. The method according to any one of claims 1 to 6, characterized in that: The preset language model includes a BERT language model.

8. A device for identifying malicious web pages, characterized in that: include: An acquisition module, used to acquire text content information of a web page to be identified, wherein the text content information includes keyword field information and web page body field information; The acquisition module is also used to acquire background knowledge information corresponding to the keyword field information; A processing module, used for inputting the background knowledge information into a preset language model for encoding and representation to obtain a background knowledge vector, and inputting the webpage text field information into a preset language model for encoding and representation to obtain a webpage text vector; The processing module is further used to perform splicing processing on the background knowledge vector and the webpage text vector to obtain a feature vector; The processing module is further used to input the feature vector into a pre-trained malicious web page classifier for classification, so as to perform malicious web page identification on the web page to be identified.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

Citation Information

Cited By

  • Method for resisting malicious spider pool based on large model

    CN119149801A