Website security protection method and device based on sensitive information, equipment and medium
By pre-calculating the sensitivity of website content, the sensitivity of static content is determined and distributed locally. This solves the problems of not being able to detect sensitive words and slow response speed in website security technology, and enables rapid sensitivity detection and content distribution, thereby improving the website's protection capabilities.
Patent Information
- Application Number
- CN202411347418.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing website security technologies are unable to effectively detect sensitive words in web page content, and slow real-time access speeds result in heavy loads on the origin server, making monitoring and auditing impossible.
By pre-requesting content from the origin server and calculating its sensitivity, when the webpage content type is determined to be static content, the sensitivity is determined based on the pre-stored URL and its sensitivity relationship. If it is less than the threshold, the webpage content is retrieved from the local content distribution database and sent, avoiding requests and review from the origin server.
It improves website protection capabilities, reduces the overhead of sensitivity detection, reduces time complexity, solves the problems of heavy load and slow response speed of the origin server, and enables rapid sensitivity detection and content distribution.
Smart Images

Figure CN119402226B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security technology, and more specifically, to a method, apparatus, device, and medium for website security protection based on sensitive information. Background Technology
[0002] Sensitive words refer to words or phrases that carry sensitive political leanings, violent connotations, unhealthy connotations, or uncivilized language. With the development and widespread use of internet technology, problematic web pages containing such words or phrases have proliferated. Therefore, maintaining a healthy online environment is imperative.
[0003] Existing website security technologies can only intercept attack requests and cannot detect whether webpage content contains sensitive words; furthermore, legitimate requests require real-time requests to the origin server for the webpage content before it can be returned to the user. Therefore, there is an urgent need for a website security protection technology that can both detect the sensitivity of webpage content and improve access speed. Summary of the Invention
[0004] In view of this, one of the technical problems solved by the embodiments of this application is to provide a website security protection method, device, equipment and medium based on sensitive information, which improves website security protection capabilities and access speed by requesting source site content in advance and calculating sensitivity.
[0005] A first aspect of this application discloses a website security protection method based on sensitive information, the method comprising:
[0006] Based on the webpage access request initiated by the client, determine the access URL of the target webpage to which the webpage access request points;
[0007] Determine the type of webpage content corresponding to the URL being accessed;
[0008] If the webpage content type is static content, the sensitivity of the static content is determined based on the correspondence between the pre-stored URLs and their sensitivity.
[0009] If the sensitivity of static content is less than the preset sensitivity threshold, the target webpage content is determined in the pre-stored content distribution database and sent to the client so that the client can display the target webpage content.
[0010] A second aspect of this application discloses a website security protection device based on sensitive information, the device comprising:
[0011] The request URL determination module is used to determine the access URL of the target webpage that the webpage access request points to based on the webpage access request initiated by the client.
[0012] The content type determination module is used to determine the content type of the webpage corresponding to the accessed URL;
[0013] The static sensitivity module is used to determine the sensitivity of static content based on the pre-stored correspondence between URLs and their sensitivity if the webpage content type is static.
[0014] The security protection processing module is used to determine the target webpage content in the pre-stored content distribution database if the sensitivity of static content is less than the preset sensitivity threshold, and then send the target webpage content to the client so that the client can display the target webpage content.
[0015] A third aspect of this application discloses an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0016] A fourth aspect of this application discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0017] This application has the following advantages: By determining the webpage content type of the target webpage access URL pointed to by the webpage access request initiated by the client, and in the case of static content, the sensitivity of the static content is determined according to the pre-stored correspondence between URLs and their sensitivity. If the sensitivity of the static content is less than a preset sensitivity threshold, the target webpage content of the target webpage is determined in the pre-stored content distribution database and sent to the client so that the client can display the target webpage content. This method of pre-calculating the sensitivity of website content can quickly determine the sensitivity of the access URL, and can directly find the corresponding webpage content locally under the condition of responding to the client request. It not only eliminates the need to request webpage content from the origin server, but also eliminates the need to review the webpage content. This not only improves the website protection capability and reduces the overhead of sensitivity detection, but also achieves the goal of reducing time complexity. Furthermore, it realizes that the content distribution is distributed from the origin server to the website security protection terminal, solving the problem of heavy load, slow response speed, and inability to monitor and review webpage content caused by the origin server being responsible for content distribution. Attached Figure Description
[0018] Figure 1 A flowchart illustrating a website security protection method based on sensitive information provided in one embodiment of this application;
[0019] Figure 2 A flowchart illustrating a website security protection method based on sensitive information, provided as another embodiment of this application;
[0020] Figure 3 A flowchart illustrating a website security protection method based on sensitive information, provided as another embodiment of this application;
[0021] Figure 4 A timing flowchart illustrating a website security protection method based on sensitive information provided in another embodiment of this application;
[0022] Figure 5 This is a schematic diagram of the structure of a website security protection device based on sensitive information provided in one embodiment of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0024] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0026] According to one embodiment of this application, a website security protection method based on sensitive information is provided, such as... Figure 1 As shown, the method includes steps S101 to S104.
[0027] Step S101: Based on the webpage access request initiated by the client, determine the access URL of the target webpage to which the webpage access request points.
[0028] Step S102: Determine the webpage content type corresponding to the accessed URL.
[0029] In this embodiment of the application, the web page content types include static content and dynamic content. These two types are used to distinguish whether the web page content changes with time, environment, or database operations.
[0030] Specifically, the content type of a webpage can be determined based on predefined type identifiers for different URLs, or by reading the format of a file pre-stored locally corresponding to the URL. For example, if the webpage file is in HTML, JS, CSS, or JPG format, the content type can be determined to be static content; if the webpage file is in ASP or PHP format, the content type can be determined to be dynamic content.
[0031] Step S103: If the webpage content type is static content, then determine the sensitivity of the static content based on the correspondence between the pre-stored URLs and their sensitivity.
[0032] In practice, the mapping between all URLs and their sensitivity levels can be cached, or only URLs with high sensitivity can be stored. In application, if the mapping record contains all websites and their sensitivity levels, the sensitivity of the target webpage can be retrieved from the mapping record for the accessed URL, thus satisfying the sensitivity requirements for whether to perform interception in different scenarios. In application, if the mapping record contains URLs with sensitivity levels higher than the sensitivity threshold, and the accessed URL of the target webpage matches a URL included in the mapping record, then it can be directly determined that the target webpage needs to be intercepted, i.e., interception processing is performed in step S104.
[0033] Step S104: If the sensitivity of static content is less than the preset sensitivity threshold, the target webpage content of the target webpage is determined in the pre-stored content distribution database, and the target webpage content is sent to the client so that the client can display the target webpage content.
[0034] Specifically, the content distribution database can be stored on one or more pre-configured storage nodes. In application, webpage content can be stored according to the origin server, or according to URL or URL identifier.
[0035] This application embodiment stores the web page content requested from the origin server in advance locally. In the case that the sensitivity of the static content is less than the preset sensitivity threshold, the content is directly distributed from the local machine. This serves to decentralize the content distribution business of the origin server to the web page request protection end, which not only reduces the load on the origin server but also improves the response speed to requests, thereby enhancing the user's access experience.
[0036] This application embodiment determines the webpage content type of the target webpage access URL pointed to by the webpage access request initiated by the client. In the case of static content, the sensitivity of the static content is determined according to the pre-stored correspondence between URLs and their sensitivity. If the sensitivity of the static content is less than a preset sensitivity threshold, the target webpage content of the target webpage is determined in the pre-stored content distribution database and sent to the client so that the client can display the target webpage content. This method of pre-calculating the sensitivity of website content can quickly determine the sensitivity of the access URL and can directly find the corresponding webpage content locally under the condition of responding to the client request. It not only eliminates the need to request webpage content from the origin server, but also eliminates the need to review the webpage content. This improves the website protection capability, reduces the overhead of sensitivity detection, and achieves the goal of reducing time complexity. It also realizes that the content distribution is distributed from the origin server to the website security protection terminal, which solves the problem of heavy load, slow response speed, and inability to monitor and review webpage content caused by the origin server being responsible for content distribution.
[0037] In some embodiments, prior to step S103, the method further includes:
[0038] Step S1031 (not shown in the figure): Send static content retrieval requests to different URL source sites;
[0039] Step S1032 (not shown in the figure): Obtain the static response files of the source websites corresponding to different web pages for static content retrieval requests;
[0040] Step S1033 (not shown in the figure): Determine the sensitivity scores of the text and images included in the static response files of the static content retrieval requests from the source websites of different web pages;
[0041] Step S1034 (not shown in the figure): The sensitivity scores of the text and images included in the static response files of the source websites corresponding to different web pages for static content acquisition requests are summed and calculated to obtain the sensitivity of the static content of each web page.
[0042] Specifically, static content retrieval requests can be sent to different website source sites according to a predetermined strategy (e.g., every 48 hours) to obtain real-time updated static response files. This allows for the execution of steps S1031 to S1034 to obtain and store the sensitivity of different web pages. The sensitivity of the target web page's static content can then be obtained through querying, shortening the sensitivity determination time and improving the efficiency of web page content sensitivity detection. In application, web page content can include text, text and images simultaneously, or only images. Specifically, if the web page content includes audio, the audio can be converted to text to calculate the text sensitivity; if the web page content includes video, the sum of the sensitivity of each video frame image can be used as the video sensitivity.
[0043] In some embodiments, the sensitivity score of the text included in the static response file of the URL source site corresponding to each different webpage in response to the static content retrieval request in step S104 includes:
[0044] Using pre-defined regular expressions for sensitive content, the text in the static response files of the URL source sites corresponding to different web pages for static content retrieval requests is extracted to obtain the sensitive content corresponding to each URL.
[0045] Segment the sensitive content corresponding to several URLs into words, and obtain a second array based on the segmentation results, which includes several URLs and their respective sensitive word sets;
[0046] Determine the first array, which includes URL identifiers and their corresponding URLs;
[0047] Based on the first and second arrays, a set of word segments and their corresponding URL identifiers is determined;
[0048] If any word segment hits the preset sensitive word library, then that word segment is identified as a sensitive word segment. Based on the sensitive words that hit the sensitive word library and are identified, several URLs and their corresponding sensitive word sets are obtained.
[0049] Based on several URLs and the sensitivity scores of each sensitive word in their respective sensitive word sets, the sensitivity of each URL is determined.
[0050] Specifically, it may include regular expressions that match at least one sensitive content such as Chinese characters, English characters, or letters. This application provides regular expressions for Chinese characters, English characters, and letters, and simultaneously extracts content from the text to obtain the sensitive content that may be included in the text.
[0051] Specifically, any word segmentation algorithm can be used to segment sensitive content in text. In application, the Jieba word segmentation algorithm can be used. For example, each character in the Chinese text is taken as the initial state, and a state transition table and a result table are initialized. Based on a known corpus, the probability of occurrence between adjacent characters is calculated, and a state transition table is constructed. Starting from the initial state, the maximum probability word segmentation result for each state is calculated step by step according to the state transition table, and the result table is updated. Finally, the final word segmentation result is extracted from the result table. In addition, in application, sensitive content corresponding to several URLs is segmented, resulting in individual word segments for each URL. Since each URL may correspond to multiple segments, to ensure the uniqueness of each segment for each URL, the hash values of the individual segment segments for each URL can be used for deduplication. The resulting word groups for each URL, for example, {segment 1, segment 2, ..., segment n}, are then used to construct key-value pairs with the segment and its corresponding URL identifier to obtain a second array, for example, segment 1 {URL identifier 1, URL identifier 2, ..., URL identifier n}.
[0052] Specifically, the sensitivity scores corresponding to each sensitive word in the sensitive word segmentation set can be summed to obtain the total sensitivity score, which is then used as the sensitivity level. In application, the sensitivity scores corresponding to each sensitive word in the sensitive word segmentation set can also be input into a preset sensitivity calculation model, and the model's output can be used as the sensitivity level. For example, the sensitivity level of a webpage's static content is S = ax + by, where a and b are weighting coefficients, x is the text sensitivity score, and y is the image sensitivity score.
[0053] This application embodiment extracts content containing three types of potentially sensitive words—Chinese characters, English words, and numbers—using regular expressions. This reduces useless matching and eliminates ambiguous matching. Replacing URLs with network identifiers saves space. An inverted index is used to store the relationship between URLs and word segments. A hash algorithm is used to remove duplicate word segments within the same URL. Duplicate word segments between different URLs are removed using a hash algorithm and a union method. By determining whether word segments hit a preset sensitive word library, the method of counting and taking intersections is used to determine whether word segments hit sensitive words. This achieves the goal of restoring the sensitive words hit by the URL using a forward index.
[0054] In some embodiments, step S104, determining the sensitivity scores of images included in the static response files of the static content retrieval requests from the respective URL source sites of different web pages, includes:
[0055] For each webpage, feature extraction is performed on the images included in the static response files of the static content retrieval request from the corresponding URL source site to obtain the image feature matrix for each webpage.
[0056] The similarity between the image feature matrices corresponding to different web pages and the feature matrices of several sensitive images is calculated.
[0057] The image sensitivity of different web pages is determined based on the similarity calculation results.
[0058] Specifically, an image can be input into a pre-constructed image feature extraction model, and the image feature matrix can be obtained based on the output of the model. In application, the image can first be standardized to ensure that the input image feature matrix meets the input requirements. For example, standardization can ensure the image is 5x5 in size. The image feature extraction model is a CNN model, which uses 3x3 convolution kernels to perform convolution operations on the standardized image to obtain the feature mapping matrix.
[0059] In some embodiments, step S102 further includes at least one of the following steps:
[0060] Based on the pre-stored webpage content file formats corresponding to several URLs, determine the type of webpage content file pointed to by the webpage content file format corresponding to the accessed URL;
[0061] The access identifier is converted into a URL identifier, and the webpage content type is determined based on the pre-stored webpage content types corresponding to various URL identifiers.
[0062] In application, the corresponding webpage file can be determined based on the accessed URL. For example, if the accessed URL is zh ihu.com / abc.html, then the webpage content file is abc.html, and its content file type is a static webpage; similarly, if the accessed URL is zh ihu.com / abc.php, its webpage content file is abc.php, and its content file type is a dynamic webpage. Alternatively, the webpage content types corresponding to different URLs can be pre-stored, thus obtaining the target webpage's content type through URL matching. More specifically, the hash value of the accessed URL can be calculated first, and this hash value can be looked up in a pre-stored hash value table for different URLs, thereby using the webpage content type corresponding to the retrieved hash value as the target webpage's content type.
[0063] In application, the mapping between URLs and the file formats of the webpage content displayed on the page can be stored in advance. This mapping allows for quick retrieval of the webpage content file format corresponding to the accessed URL, thus determining the webpage content file type. For example, if the webpage file is in HTML, JS, CSS, or JPG format, the webpage content type can be determined to be static content; if the webpage file is in ASP or PHP format, the webpage content type can be determined to be dynamic content.
[0064] According to one embodiment of this application, a website security protection method based on sensitive information is provided, such as... Figure 2 As shown, the method includes:
[0065] Step S201: Based on the webpage access request initiated by the client, determine the access URL of the target webpage to which the webpage access request points;
[0066] Step S202: Determine the webpage content type corresponding to the accessed URL;
[0067] Step S203: If the webpage content type is static content, then determine the sensitivity of the static content based on the pre-stored URL and its sensitivity correspondence;
[0068] Step S205: If the sensitivity of static content is not less than the preset sensitivity threshold, then the access request will be intercepted.
[0069] Specifically, webpage access requests can be directly blocked when the access URL meets preset sensitivity conditions (i.e., not less than the sensitivity threshold). Alternatively, a secondary review (such as manual review) can be performed when the sensitivity meets the preset conditions. This involves sending the webpage content to a review center and processing it after receiving feedback. For example, if the review result is approved, the corresponding webpage service is provided; otherwise, it is blocked. In practice, the control can be tailored to business needs.
[0070] Specifically, before intercepting access requests, the user group of the client can be identified, and the decision to intercept requests can be based on this group. For example, if the user group consists of minors, access requests will be intercepted. In practice, targeted interception can also be performed based on the type of static content. For example, if text is sensitive, text will be intercepted; if images are sensitive, images will be intercepted.
[0071] According to one embodiment of this application, a website security protection method based on sensitive information is provided, such as... Figure 3 As shown, the method also includes:
[0072] Step S301: Based on the webpage access request initiated by the client, determine the access URL of the target webpage to which the webpage access request points;
[0073] Step S302: Determine the webpage content type corresponding to the accessed URL;
[0074] Step S303: If the webpage content type is dynamic content, then send a dynamic content retrieval request to the target webpage's URL origin server;
[0075] Step S304: Obtain the URL of the target webpage and the dynamic response content of the request based on the dynamic content;
[0076] Step S305: Perform sensitivity analysis on the dynamic response content to obtain the sensitivity of the dynamic response content;
[0077] Step S306: Perform corresponding processing based on the sensitivity of the dynamic response content.
[0078] In application, sensitivity analysis of the dynamic response content can be performed by referring to steps S1033 and S1034 above. First, the dynamic response content is segmented into words; then, the segmentation results are matched against a pre-built sensitive word library. Based on the matching results, sensitive word groups of the dynamic response content are obtained. The sensitivity scores of each sensitive word in the dynamic response content are then accumulated, and the total accumulated sensitivity score is used as the sensitivity value of the dynamic response content. Alternatively, the dynamic response content can be sent to a pre-built sensitivity value calculation center, and the sensitivity of the dynamic response content can be determined based on the feedback from the sensitivity value calculation center.
[0079] This application embodiment achieves sensitivity monitoring of website content updated in real time by analyzing the dynamically acquired content. This avoids the problem of poor webpage monitoring and negative impact on user experience caused by the difference between the pre-calculated sensitivity value and the sensitivity value of the updated content.
[0080] To further illustrate the website security protection method based on sensitive information provided in the embodiments of this application, the following is combined with... Figure 4 Please provide a detailed explanation. (Reference) Figure 4The cloud protection system (providing website protection services) pre-requests content from different website origin servers and stores this content. Simultaneously, it analyzes the content returned by different origin servers, identifying sensitive words within the URLs and calculating the website's sensitivity value based on the weight of these words. This results in a correspondence between different URLs and their sensitivity levels. When the cloud protection center receives a request from a user through a client to access a URL, if the URL is a static page, it queries the pre-stored correspondence between different URLs and their sensitivity levels in the cloud protection system. It determines whether the sensitivity of the accessed URL exceeds a sensitivity threshold. If the sensitivity is not less than the threshold, the request is blocked, and an error page or a 404 error message indicating that the webpage cannot be displayed correctly is displayed to the user's client. If the sensitivity is less than the threshold, the cloud protection system displays the website content for that URL stored locally. If the accessed URL is a dynamic page, a request for the URL's content needs to be sent to the origin server. Upon receiving the dynamic response, the system analyzes it to determine if the sensitivity level is not less than a sensitivity threshold. If so, the page is blocked, and an error page is displayed, or a 404 error message indicating that the webpage cannot be displayed correctly is sent to the user's client. Otherwise, the dynamic response content is provided to the user's client for loading and display. This method of distributing website content directly to users from the cloud protection system effectively offloads Content Delivery Network (CDN) technology from the network origin server to the cloud protection system, achieving both sensitivity detection and improved content distribution efficiency.
[0081] One embodiment of this application provides a website security protection device based on sensitive information, such as... Figure 5 As shown, the device 50 includes: a data acquisition module 501, a data preprocessing module 502, a trend prediction module 503, and a navigation and orientation module 504.
[0082] The request URL determination module is used to determine the access URL of the target webpage that the webpage access request points to based on the webpage access request initiated by the client.
[0083] The content type determination module is used to determine the content type of the webpage corresponding to the accessed URL;
[0084] The static sensitivity module is used to determine the sensitivity of static content based on the pre-stored correspondence between URLs and their sensitivity if the webpage content type is static.
[0085] The security protection processing module is used to determine the target webpage content in the pre-stored content distribution database if the sensitivity of static content is less than the preset sensitivity threshold, and then send the target webpage content to the client so that the client can display the target webpage content.
[0086] This application embodiment determines the webpage content type of the target webpage access URL pointed to by the webpage access request initiated by the client. In the case of static content, the sensitivity of the static content is determined according to the pre-stored correspondence between URLs and their sensitivity. If the sensitivity of the static content is less than a preset sensitivity threshold, the target webpage content of the target webpage is determined in the pre-stored content distribution database and sent to the client so that the client can display the target webpage content. This method of pre-calculating the sensitivity of website content can quickly determine the sensitivity of the access URL and can directly find the corresponding webpage content locally under the condition of responding to the client request. It not only eliminates the need to request webpage content from the origin server, but also eliminates the need to review the webpage content. This improves the website protection capability, reduces the overhead of sensitivity detection, and achieves the goal of reducing time complexity. It also realizes that the content distribution is distributed from the origin server to the website security protection terminal, which solves the problem of heavy load, slow response speed, and inability to monitor and review webpage content caused by the origin server being responsible for content distribution.
[0087] Furthermore, before determining the sensitivity of static content based on the pre-stored correspondence between URLs and their sensitivity levels, the static sensitivity module also includes:
[0088] The content request submodule is used to send static content retrieval requests to different URL source sites;
[0089] The content retrieval submodule is used to retrieve the static response files returned by the source websites of different web pages in response to static content retrieval requests;
[0090] The content analysis submodule is used to determine the sensitivity scores of the text and images included in the static response files of the corresponding URL source sites for static content retrieval requests for different web pages.
[0091] The sensitivity determination submodule calculates the sensitivity of the static content of each webpage by summing the sensitivity scores of the text and images included in the static response files of the corresponding URL source sites for static content retrieval requests.
[0092] Furthermore, the sensitivity determination submodule includes:
[0093] The sensitive content extraction unit is used to extract the text from the static response files of the source websites of different web pages that respond to requests for static content, using multiple preset regular expressions for sensitive content, and to obtain the sensitive content corresponding to each of the several web pages.
[0094] The sensitive content phrase determination unit is used to segment the sensitive content corresponding to several URLs into words, and obtains a second array including several URLs and their respective sensitive word sets based on the segmentation results;
[0095] The first array determination unit is used to determine a first array including URL identifiers and corresponding URLs;
[0096] The second number determination unit is used to determine a set of several word segments and their corresponding URL identifiers based on the first array and the second array;
[0097] The sensitive word segmentation determination unit is used to determine any word segmentation as a sensitive word segmentation if any word segmentation hits the preset sensitive word library. Based on the sensitive words that hit the sensitive word library and are determined, several URLs and their corresponding sensitive word sets are obtained.
[0098] The text sensitivity determination unit is used to determine the sensitivity of each of the several URLs based on the sensitivity scores of each sensitive word in their respective sensitive word sets.
[0099] Furthermore, the sensitivity determination submodule includes:
[0100] The image feature extraction unit is used to extract features from the images included in the static response files of the static content acquisition requests from the source sites of different web pages, and to obtain the image feature matrices corresponding to each web page.
[0101] The image similarity calculation unit is used to calculate the similarity between the image feature matrices corresponding to different web pages and the feature matrices of several sensitive images.
[0102] The image sensitivity determination unit is used to determine the image sensitivity of different web pages based on the similarity calculation results.
[0103] Furthermore, the content type determination module includes at least one of the following sub-modules:
[0104] The first determining submodule is used to determine the type of web page content file pointed to by the web page content file format corresponding to the accessed URL based on the pre-stored web page content file formats corresponding to each of the several URLs.
[0105] The second determination submodule is used to convert the access identifier into a URL identifier and determine the webpage content type based on the webpage content types corresponding to the various pre-stored URL identifiers.
[0106] Furthermore, the device also includes:
[0107] The dynamic content request module is used to send a dynamic content retrieval request to the source website of the target webpage if the webpage content type is dynamic content.
[0108] The dynamic content acquisition module is used to acquire the dynamic response content returned by the URL source site of the target webpage based on the dynamic content acquisition request;
[0109] The Dynamic Content Sensitivity Determination Module is used to perform sensitivity analysis on dynamic response content and obtain the sensitivity of the dynamic response content.
[0110] The dynamic content processing module is used to perform corresponding processing based on the sensitivity of the dynamic response content.
[0111] Furthermore, the security protection processing module also includes:
[0112] The interception processing submodule is used to intercept access requests if the sensitivity of static content is not less than a preset sensitivity threshold.
[0113] Another embodiment of this application provides a terminal, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described search engine-based data processing method.
[0114] Specifically, the processor can be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0115] Specifically, the processor connects to the memory via a bus, which may include a path for transmitting information. The bus can be a PCI bus or an EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc.
[0116] The memory may be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0117] Optionally, the memory stores the code of the computer program that executes the scheme of this application, and the execution is controlled by the processor. The processor executes the application code stored in the memory to implement... Figure 5The operation of the device provided in the illustrated embodiment.
[0118] Another embodiment of this application provides a computer-readable storage medium storing computer-executable instructions for performing the above-described... Figures 1-3 The method shown.
[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0120] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0121] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A website security protection method based on sensitive information, characterized in that, The method includes: Based on the webpage access request initiated by the client, determine the access URL of the target webpage to which the webpage access request points; Determine the webpage content type corresponding to the accessed URL; If the webpage content type is static content, the sensitivity of the static content is determined based on the pre-stored correspondence between URLs and their sensitivity. If the sensitivity of the static content is less than a preset sensitivity threshold, the target webpage content of the target webpage is determined in the pre-stored content distribution database, and the target webpage content is sent to the client so that the client can display the target webpage content.
2. The method according to claim 1, characterized in that, Before determining the sensitivity of the static content based on the pre-stored correspondence between URLs and their sensitivity, the method further includes: Send static content retrieval requests to different URL origin sites; Obtain the static response files from the source websites of different web pages in response to the requests for static content; Determine the sensitivity scores of the text and images included in the static response files of the static content retrieval requests from the respective URL source sites of different web pages; The sensitivity scores of the text and images included in the static response files of the corresponding URL source sites for the static content retrieval request of different web pages are summed to calculate the sensitivity of the static content of each web page.
3. The method according to claim 2, characterized in that, Determine the sensitivity scores of the text included in the static response files of the respective URL source sites for the static content retrieval requests of different web pages, including: Using multiple pre-defined regular expressions for sensitive content, the text included in the static response files of the URL source sites corresponding to the static content acquisition requests of different web pages is extracted to obtain the sensitive content corresponding to each URL. Segment the sensitive content corresponding to several URLs into words, and obtain a second array based on the segmentation results, which includes several URLs and their respective sensitive word sets; Determine the first array, which includes URL identifiers and their corresponding URLs; Based on the first array and the second array, a set of several word segments and their corresponding URL identifiers is determined; If any word segment hits the preset sensitive word library, then that word segment is identified as a sensitive word segment. Based on the sensitive words that hit the sensitive word library and are identified, several URLs and their corresponding sensitive word sets are obtained. Based on several URLs and the sensitivity scores of each sensitive word in their respective sensitive word sets, the sensitivity of each URL is determined.
4. The method according to claim 2, characterized in that, Determine the sensitivity scores of the images included in the static response files of the static content retrieval requests from the respective URL source sites of different web pages, including: For each webpage, feature extraction is performed on the images included in the static response files of the static content retrieval request from the corresponding URL source site to obtain the image feature matrix for each webpage. The similarity between the image feature matrices corresponding to different web pages and the feature matrices of several sensitive images is calculated. The image sensitivity of different web pages is determined based on the similarity calculation results.
5. The method according to claim 1, characterized in that, Determining the webpage content type corresponding to the accessed URL includes at least one of the following: Based on the pre-stored webpage content file formats corresponding to several URLs, determine the type of webpage content file pointed to by the webpage content file format corresponding to the accessed URL; The access identifier is converted into a URL identifier, and the webpage content type is determined based on the webpage content types corresponding to the various pre-stored URL identifiers.
6. The method according to claim 1, characterized in that, The method further includes: If the webpage content type is dynamic content, then a dynamic content retrieval request is sent to the URL source site of the target webpage; The URL source site of the target webpage is obtained, and the dynamic response content of the request is obtained based on the dynamic content; Sensitivity analysis is performed on the dynamic response content to obtain the sensitivity of the dynamic response content; The appropriate processing is performed based on the sensitivity of the dynamic response content.
7. The method according to claim 1, characterized in that, The method further includes: If the sensitivity of the static content is not less than a preset sensitivity threshold, then the access request will be intercepted.
8. A website security protection device based on sensitive information, characterized in that, include: The request URL determination module is used to determine the access URL of the target webpage to which the webpage access request is directed based on the webpage access request initiated by the client. The content type determination module is used to determine the webpage content type corresponding to the accessed URL; A static sensitivity module is used to determine the sensitivity of the static content based on a pre-stored correspondence between URLs and their sensitivity if the webpage content type is static content. The security protection processing module is used to determine the target webpage content of the target webpage in the pre-stored content distribution database if the sensitivity of the static content is less than a preset sensitivity threshold, and send the target webpage content to the client so that the client can display the target webpage content.
9. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-readable instructions, and the processor being configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions for performing the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Website security monitoring method and device
CN107547555A
Flow monitoring data throughput management and control system and method
CN117955917A