Page information obfuscation method, apparatus, device, and storage medium

By obfuscating webpage information when a page access request is received, the problem of data loss caused by directly outputting HTML is solved, thus achieving data protection and server load optimization.

CN116264569BActive Publication Date: 2026-11-10BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111536422.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2026-11-10
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

In existing technologies, web pages directly output HTML, which makes valuable data easily crawlable by machines, resulting in the loss of data value and increased usage costs for servers, bandwidth, etc.

Method used

Upon receiving a page access request, the information of the page to be displayed is obfuscated according to a preset obfuscation strategy, including obtaining node information, adding pseudo-elements, monitoring scripts, and adding redundant data, to prevent the data from being directly distributed.

Benefits of technology

This effectively prevents the loss of valuable data, raises the bar for machine data crawling, reduces invalid access, and lowers server load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116264569B_ABST
    Figure CN116264569B_ABST
Patent Text Reader

Abstract

The application belongs to the field of webpage services, and discloses a webpage information confusion method, device, equipment and storage medium. The method comprises the following steps: when a webpage access request is received, determining to-be-displayed webpage information corresponding to the webpage access request; performing confusion processing on the to-be-displayed webpage information according to a preset confusion strategy; and distributing the to-be-displayed webpage after the confusion processing. According to the application, when a webpage access request is received, to-be-displayed webpage information corresponding to the webpage access request is determined, confusion processing is performed on the to-be-displayed webpage information according to a preset confusion strategy, and the to-be-displayed webpage after the confusion processing is distributed. Compared with the prior art of directly distributing to-be-displayed webpage information to a display webpage for display, the application can perform confusion processing on to-be-displayed webpage information, avoid the loss of valuable data, and improve the threshold of machine data crawling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of web page technology, and in particular to a method, apparatus, device, and storage medium for obfuscating page information. Background Technology

[0002] Web pages typically output HTML directly, which contains valuable data created by website owners or users. In the current network environment, this data can easily become the target of web crawlers, leading to the loss of data value. Furthermore, it generates many invalid visits, increasing the server and bandwidth costs for website owners.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for obfuscating page information, aiming to solve the technical problem of loss of valuable data caused by directly outputting the page information to be displayed in the prior art.

[0005] To achieve the above objectives, the present invention provides a page information obfuscation method, the method comprising the following steps:

[0006] Upon receiving a page access request, determine the page information to be displayed corresponding to the page access request;

[0007] The information of the page to be displayed is obfuscated according to a preset obfuscation strategy;

[0008] Distribute the obfuscated pages to be displayed.

[0009] Optionally, the step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy includes:

[0010] Obtain node information from the page to be displayed based on the page information to be displayed;

[0011] Find the target obfuscation strategy corresponding to the node information from the preset obfuscation strategy;

[0012] The page information to be displayed is obfuscated according to the target obfuscation strategy.

[0013] Optionally, the step of obfuscating the page information to be displayed according to the target obfuscation strategy includes:

[0014] When the target obfuscation strategy is pseudo-element obfuscation, the text content to be obfuscated is obtained according to the information of the page to be displayed;

[0015] Add the text content to be obfuscated to the Cascading Style Sheet corresponding to the text content to be obfuscated.

[0016] Optionally, the step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy includes:

[0017] Retrieve the monitoring script from the preset obfuscation strategy;

[0018] The monitoring script is added to the information of the page to be displayed for obfuscation.

[0019] Optionally, after the step of adding the monitoring script to the information of the page to be displayed for obfuscation, the method further includes:

[0020] Obtain the monitoring information fed back by the monitoring script;

[0021] Based on the monitoring information, determine whether the current browser is a headless browser;

[0022] When the current browser is the headless browser, obtain the interaction information with the headless browser;

[0023] The preset obfuscation strategy is updated based on the interaction information.

[0024] Optionally, the step of updating the preset obfuscation strategy based on the interaction information includes:

[0025] The interaction frequency and page dwell time are determined based on the interaction information.

[0026] Determine whether the current user is an abnormal user based on the interaction frequency and the dwell time.

[0027] When the current user is not an abnormal user, the preset obfuscation strategy is disabled.

[0028] Optionally, the step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy includes:

[0029] When the preset obfuscation strategy is to add a dirty data obfuscation strategy, the language information corresponding to the page information to be displayed is obtained;

[0030] Redundant dirty data is identified based on the language information;

[0031] The information of the page to be displayed is obfuscated based on the redundant dirty data.

[0032] Optionally, after the step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy, the method further includes:

[0033] Start the preset timer to begin counting;

[0034] When the timer ends, the process of obfuscating the page information to be displayed according to the preset obfuscation strategy is terminated, and the obfuscated page to be displayed is obtained.

[0035] The obfuscated page to be displayed is then distributed.

[0036] Optionally, after determining the page information to be displayed corresponding to the page access request upon receiving the page access request, the method further includes:

[0037] The annotation information of the page to be displayed is determined based on the page information to be displayed;

[0038] Determine whether the page to be displayed is a page to be obfuscated based on the annotation information;

[0039] When the page to be displayed is a page to be obfuscated, the page to be obfuscated is obfuscated according to a preset obfuscation strategy.

[0040] Optionally, after the step of determining whether the page to be displayed is a page to be obfuscated based on the annotation information, the method further includes:

[0041] If the page to be displayed is not the page to be obfuscated, delete the annotation information corresponding to the page to be displayed;

[0042] Distribute the page to be displayed after removing the comments to the target browser.

[0043] Furthermore, to achieve the above objectives, the present invention also provides a page information obfuscation device, the device comprising:

[0044] The module for determining page information to be displayed is used to determine the page information to be displayed corresponding to the page access request when a page access request is received.

[0045] The obfuscation processing module is used to obfuscate the information of the page to be displayed according to a preset obfuscation strategy;

[0046] The distribution module is used to distribute the obfuscated pages to be displayed.

[0047] Optionally, the obfuscation processing module is further configured to obtain node information in the page to be displayed based on the page information to be displayed; search for the target obfuscation strategy corresponding to the node information from a preset obfuscation strategy; and perform obfuscation processing on the page information to be displayed according to the target obfuscation strategy.

[0048] Optionally, the obfuscation processing module is further configured to, when the target obfuscation strategy is pseudo-element obfuscation, obtain the text content to be obfuscated based on the page information to be displayed; and add the text content to be obfuscated to the Cascading Style Sheet corresponding to the text content to be obfuscated.

[0049] Optionally, the obfuscation processing module is further configured to obtain the monitoring script in the preset obfuscation strategy; and add the monitoring script to the information of the page to be displayed for obfuscation processing.

[0050] Optionally, the obfuscation processing module is further configured to: obtain monitoring information fed back by the monitoring script; determine whether the current browser is a headless browser based on the monitoring information; when the current browser is the headless browser, obtain interaction information with the headless browser; and update the preset obfuscation strategy based on the interaction information.

[0051] Optionally, the obfuscation processing module is further configured to determine the interaction frequency and page dwell time based on the interaction information; determine whether the current user is an abnormal user based on the interaction frequency and the dwell time; and disable the preset obfuscation strategy when the current user is not an abnormal user.

[0052] Optionally, the obfuscation processing module is further configured to, when the preset obfuscation strategy is a dirty data obfuscation strategy, obtain the language information corresponding to the page information to be displayed; determine redundant dirty data based on the language information; and perform obfuscation processing on the page information to be displayed based on the redundant dirty data.

[0053] Optionally, the obfuscation processing module is further configured to start a preset timer to begin timing; when the timing ends, terminate the process of obfuscating the information of the page to be displayed according to the preset obfuscation strategy, and obtain the obfuscated page to be displayed; and distribute the obfuscated page to be displayed.

[0054] Optionally, the module for determining the page information to be displayed is further configured to determine the annotation information of the page to be displayed based on the page information to be displayed;

[0055] Determine whether the page to be displayed is a page to be obfuscated based on the annotation information;

[0056] When the page to be displayed is a page to be obfuscated, the page to be obfuscated is obfuscated according to a preset obfuscation strategy.

[0057] Optionally, the module for determining the page information to be displayed is further configured to delete the annotation information corresponding to the page to be displayed when the page to be displayed is not the page to be obfuscated;

[0058] Distribute the page to be displayed after removing the comments to the target browser.

[0059] Furthermore, to achieve the above objectives, the present invention also proposes a page information obfuscation device, the device comprising: a memory, a processor, and a page information obfuscation program stored in the memory and executable on the processor, the page information obfuscation program being configured to implement the steps of the page information obfuscation method as described above.

[0060] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a page information obfuscation program, wherein when the page information obfuscation program is executed by a processor, it implements the steps of the page information obfuscation method as described above.

[0061] This invention, upon receiving a page access request, determines the page information to be displayed corresponding to the request; obfuscates the page information according to a preset obfuscation strategy; and distributes the obfuscated page. Because this invention determines the page information to be displayed corresponding to the request upon receipt, obfuscates it according to a preset obfuscation strategy, and distributes the obfuscated page, compared to existing methods that directly distribute page information to display pages, this invention obfuscates the page information, preventing the loss of valuable data and raising the barrier to entry for machine data crawling. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of the structure of the page information obfuscation device in the hardware operating environment involved in the embodiments of the present invention;

[0063] Figure 2 This is a flowchart illustrating the first embodiment of the page information obfuscation method of the present invention;

[0064] Figure 3 This is a flowchart illustrating the second embodiment of the page information obfuscation method of the present invention;

[0065] Figure 4 This is a flowchart illustrating the third embodiment of the page information obfuscation method of the present invention;

[0066] Figure 5 This is a structural block diagram of the first embodiment of the page information obfuscation device of the present invention.

[0067] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0068] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0069] Reference Figure 1 , Figure 1 This is a schematic diagram of the page information obfuscation device structure in the hardware operating environment involved in the embodiments of the present invention.

[0070] like Figure 1 As shown, the page information obfuscation device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0071] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the page information obfuscation device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0072] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a page information obfuscation program.

[0073] exist Figure 1 In the page information obfuscation device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the page information obfuscation device of the present invention can be set in the page information obfuscation device, and the page information obfuscation device calls the page information obfuscation program stored in the memory 1005 through the processor 1001 and executes the page information obfuscation method provided in the embodiment of the present invention.

[0074] Based on the aforementioned page information obfuscation device, this embodiment of the invention provides a page information obfuscation method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the page information obfuscation method of the present invention.

[0075] In this embodiment, the page information obfuscation method includes the following steps:

[0076] Step S10: Upon receiving a page access request, determine the page information to be displayed corresponding to the page access request.

[0077] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a mobile phone, tablet computer, or personal computer, or an electronic device or server capable of performing the above functions. The following description uses the server as an example to illustrate this embodiment and the subsequent embodiments.

[0078] It should be noted that the page access request can be a request sent by a user to access a page or obtain data. For example, it can be a user accessing a target site or obtaining data by entering a link in a browser. The page information to be displayed can be the target data information corresponding to the page access request, such as the HTML file of the page to be displayed corresponding to the page access request.

[0079] In practice, the server can receive page access requests sent by users through various browsers or scripts, and determine the corresponding page information to be displayed based on the page access requests.

[0080] Furthermore, to improve obfuscation efficiency, after step S10, the method further includes: determining the annotation information of the page to be displayed based on the page information to be displayed; determining whether the page to be displayed is a page to be obfuscated based on the annotation information; and when the page to be displayed is a page to be obfuscated, obfuscating the page to be obfuscated according to a preset obfuscation strategy.

[0081] It should be noted that the annotation information can be a special annotation written by the user in a preset position in the HTML file corresponding to the page to be displayed. For example, a special HTML annotation can be added to the first line of the HTML file corresponding to the page to be displayed to mark whether the HTML file needs to be obfuscated. When it is determined that the page to be displayed needs to be obfuscated based on the annotation information, i.e., it is a page to be obfuscated, the page to be obfuscated is obfuscated according to a preset obfuscation strategy.

[0082] Furthermore, after the step of determining whether the page to be displayed is a page to be obfuscated based on the annotation information, the method further includes: when the page to be displayed is not a page to be obfuscated, deleting the annotation information corresponding to the page to be displayed; and distributing the page to be displayed after deleting the annotation information to the target browser.

[0083] It should be noted that when the page to be displayed is not the page to be obfuscated, that is, the user has set the page to be displayed to not need obfuscation. When distributing the page to be displayed to the target browser or other target address that sends the page access request, the comment information in the HTML file corresponding to the page to be displayed needs to be removed. The target browser can be the browser that sent the page access request.

[0084] It should be understood that when the page to be displayed is a page to be obfuscated, after obfuscating the page according to the preset obfuscation strategy, when distributing the obfuscated page to the target address such as the target browser that sends the page access request, it is also necessary to delete the comment information in the HTML file corresponding to the obfuscated page.

[0085] Step S20: Obfuscate the information of the page to be displayed according to the preset obfuscation strategy.

[0086] It should be noted that the preset obfuscation strategy can be a pre-set method for obfuscating the information on the page to be displayed. For example, it could involve replacing text with non-text, adding pre-set redundant data, adjusting the data format, referencing relationships, and order in the page information to achieve the purpose of obfuscating the information. This avoids the loss of valuable data after the page information is crawled, prevents the crawling program from obtaining directly usable data, increases crawling costs, and ensures the relative security of HTML data.

[0087] Furthermore, to prevent the crawling program from obtaining directly usable data, thereby increasing crawling costs and achieving relative data security, step S20 may include: when the preset obfuscation strategy is a dirty data obfuscation strategy, obtaining the language information corresponding to the page information to be displayed; determining redundant dirty data based on the language information; and obfuscating the page information to be displayed based on the redundant dirty data.

[0088] It should be noted that the preset obfuscation strategy can include multiple obfuscation methods, such as adding dirty data obfuscation, text replacement of non-text, CSS pseudo-element obfuscation, and part-of-speech tagging simulation obfuscation. When obfuscating the information on the page to be displayed, different obfuscation methods can be used for different types of information. The language information can be the language type of the information on the page to be displayed, such as whether the information is in Chinese or English. The redundant dirty data can be redundant and meaningless data. Determining redundant dirty data based on the language information can be done by first determining the language of the redundant dirty data based on the language information, and then determining the redundant dirty data based on the language of the redundant dirty data. That is, when the information on the page to be displayed is in Chinese, the dirty data added during the obfuscation process is also in Chinese. When the information on the page to be displayed is in English, the redundant dirty data is also in English, greatly increasing the difficulty of data cleaning and thus increasing the cost of crawling.

[0089] Furthermore, in order to control the obfuscation time and avoid occupying server resources for a long time, after step S20, the process may include: starting a preset timer to begin timing; when the timing ends, terminating the obfuscation process of the page information to be displayed according to the preset obfuscation strategy, and obtaining the obfuscated page to be displayed; and distributing the obfuscated page to be displayed.

[0090] It should be noted that the preset timer can be a pre-set timer used to record the obfuscation time. The timing duration can be adjusted according to the actual situation. In this embodiment, in order to control the obfuscation time even when obfuscating complex pages and avoid occupying server resources for a long time, the obfuscation time is basically controlled within 10ms to 20ms, that is, the timer duration is controlled within 10ms to 20ms. When the timer ends, even if the page is not completely obfuscated, the obfuscation is terminated, and the obfuscated page to be displayed is obtained; the obfuscated page to be displayed is then distributed.

[0091] Step S30: Distribute the obfuscated page to be displayed.

[0092] It should be noted that the distribution of the obfuscated page to be displayed may be to distribute the obfuscated page to multiple browsers that have obtained the page information or other target addresses that send page access requests.

[0093] It should be understood that, to increase obfuscation efficiency and avoid consuming server resources by performing the same obfuscation process multiple times on the same page to be displayed, the obfuscated page can be saved after obfuscation. When a page access request is received, it can be determined whether the page to be displayed corresponding to the page access request has been obfuscated. If it has been obfuscated according to the previous page access request, the obfuscated page to be displayed can be returned directly. To reduce server response time, the server can also obtain the page information corresponding to each page to be displayed in advance, perform obfuscation in advance, and then distribute the page directly in a push form when a page access request is received. For example, the path of the page associated with the server can be used as the key to obtain the associated page to the server in advance for obfuscation.

[0094] This embodiment, upon receiving a page access request, determines the page information to be displayed corresponding to the request; obfuscates the page information according to a preset obfuscation strategy; and distributes the obfuscated page. Because this embodiment determines the page information to be displayed corresponding to the request upon receipt, obfuscates the page information according to a preset obfuscation strategy, and distributes the obfuscated page, compared to existing methods that directly distribute page information to display pages, this embodiment obfuscates the page information, preventing the loss of valuable data and raising the barrier to entry for machine data crawling.

[0095] refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the page information obfuscation method of the present invention.

[0096] Based on the first embodiment described above, in this embodiment, step S20 includes:

[0097] Step S201: Obtain node information in the page to be displayed based on the page information to be displayed.

[0098] It should be noted that the page to be displayed can be the HTML page to be displayed corresponding to the page information. The node information can be DOM nodes in the page to be displayed, such as div tags, p tags, and H1-H6 heading tags in the page to be displayed.

[0099] Step S202: Find the target obfuscation strategy corresponding to the node information from the preset obfuscation strategies.

[0100] It should be noted that the target obfuscation strategy can be an obfuscation strategy corresponding to different node information. When setting the preset obfuscation strategy, different obfuscation strategies can be set according to different DOM nodes. For example, when the DOM node is a p tag, the obfuscation strategy can be to replace the text in the p tag with non-text, or to display the text content in the p tag as an image. When the DOM node is a div tag, the text content can be replaced with the content in CSS through pseudo-elements. When the DOM node is an a tag, a monitoring script can be injected to monitor user clicks and other interactive events.

[0101] Step S203: Obfuscate the information of the page to be displayed according to the target obfuscation strategy.

[0102] It should be noted that obfuscating the page information to be displayed according to the target obfuscation strategy can mean obfuscating the corresponding nodes according to the target obfuscation strategy. For example, if the node information is a DOM node of a p tag, and the target obfuscation strategy is to replace the text in the p tag with non-text, then obfuscating the page information to be displayed according to the target obfuscation strategy can mean replacing the content in the node corresponding to the p tag in the page information to be displayed with non-text. For example, converting the text in the p tag into an image and displaying the text content in the p tag in the image.

[0103] Furthermore, to increase the difficulty of data cleaning, step S203 may include: when the target obfuscation strategy is pseudo-element obfuscation, obtaining the text content to be obfuscated based on the page information to be displayed; and adding the text content to be obfuscated to the Cascading Style Sheet corresponding to the text content to be obfuscated.

[0104] It's important to note that pseudo-elements generally refer to pseudo-object languages. Elements created using pseudo-object languages ​​do not exist in the DOM document; they are virtual elements, representing child elements of a given element. While these child elements logically exist, they don't actually exist in the document tree. Pseudo-elements can be used to obfuscate content that would otherwise be in the DOM document by adding pseudo-elements to the CSS file. The original text content can be replaced by the CSS's `content` property. Without parsing the CSS, this would result in missing text. Obfuscation through pseudo-elements can improve rendering efficiency. For example, consider the following code: `h1:after{content:url(smiley.gif);}`. This code can be used to modify each element in the DOM document. <h1>Inserting an image using a pseudo-element after an element (i.e., writing the image link in the CSS file) will result in the image being missing if the CSS is not parsed.

[0105] This embodiment obtains node information from the page to be displayed based on the page information to be displayed; searches for a target obfuscation strategy corresponding to the node information from a preset obfuscation strategy; and obfuscates the page information to be displayed according to the target obfuscation strategy. By obtaining node information from the page to be displayed, searching for a target obfuscation strategy corresponding to the node information from a preset obfuscation strategy, and obfuscating the page information to be displayed according to the target obfuscation strategy, this embodiment maximizes the prevention of crawling programs from obtaining directly usable data, increases crawling costs, and achieves relative security of HTML data.

[0106] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the page information obfuscation method of the present invention.

[0107] Based on the above embodiments, in this embodiment, step S20 may include:

[0108] Step S204: Obtain the monitoring script from the preset obfuscation strategy.

[0109] It should be noted that the monitoring script can be pre-written monitoring code used to monitor user interaction information with the server or user account and behavior information. For example, it can monitor whether the browser used by the user to send page access requests is a headless browser. A headless browser is a browser without a user graphical interface, currently widely used in web crawlers and automated testing. With the upgrading of anti-crawler and anti-anti-crawler technologies, more and more crawlers are beginning to use headless browsers to disguise themselves as normal users to bypass anti-crawler strategies.

[0110] Step S205: Add the monitoring script to the information of the page to be displayed for obfuscation processing.

[0111] It should be noted that adding the monitoring script to the page information to be displayed for obfuscation can be an injection of the monitoring script into the page information to monitor the interaction between the server and the user, as well as the user's account and behavior information.

[0112] Furthermore, in order to increase obfuscation efficiency and improve server response speed, step S205 may include: obtaining monitoring information fed back by the monitoring script; determining whether the current browser is a headless browser based on the monitoring information; if the current browser is the headless browser, obtaining interaction information with the headless browser; and updating the preset obfuscation strategy based on the interaction information.

[0113] It should be noted that the monitoring information can be information on the interaction between the server and the user, as well as the user's account and behavior information, obtained through callback functions in the monitoring script. The current browser can be the browser that initiated the page access request. The interaction information can be information such as the request information initiated by the current browser, the number of requests, the frequency of requests within a certain time period, and the duration of stay on the page. Updating the preset obfuscation strategy based on the interaction information can be done by adjusting the preset obfuscation strategy according to the frequency of requests in the interaction information. For example, if the frequency of requests is high within a certain time period, some obfuscation strategies can be appropriately reduced to increase response speed and thus reduce obfuscation time. Alternatively, when the frequency of requests exceeds a preset frequency threshold, the preset obfuscation strategy can be retrieved, and pseudo-element obfuscation strategies or dirty data obfuscation strategies can be deleted to reduce obfuscation time. When the frequency of requests is less than or equal to the preset frequency threshold, the preset obfuscation strategy can be retrieved, and other obfuscation strategies can be added to the preset obfuscation strategy, such as adding strategies like monitoring user behavior through a monitoring script or adding redundant data after part-of-speech tagging simulation.

[0114] Furthermore, in order to improve the server's response speed, the step of updating the preset obfuscation strategy based on the interaction information includes: determining the interaction frequency and page dwell time based on the interaction information; determining whether the current user is an abnormal user based on the interaction frequency and the dwell time; and disabling the preset obfuscation strategy when the current user is not an abnormal user.

[0115] It should be noted that the page dwell time can be the length of time the user stays on the page to be displayed. The interaction frequency can be the number of page access requests initiated by the user within a certain time period. Determining whether the current user is an abnormal user based on the interaction frequency and dwell time can involve obtaining a preset dwell time and a preset interaction frequency, determining whether the interaction frequency is greater than the preset interaction frequency, and whether the dwell time is greater than the preset dwell time. If the interaction frequency is greater than the preset interaction frequency and the dwell time is greater than the preset dwell time, the user initiating the page access request is determined to be an abnormal user. Both the preset dwell time and preset interaction frequency can be pre-set parameters and can be adaptively modified according to actual conditions. An abnormal user can be a user who crawls the information of the page to be displayed. When the current user is not an abnormal user, to reduce server resource consumption, the preset obfuscation strategy can be disabled. That is, when the current user subsequently initiates another page access request, the page information to be displayed corresponding to the page access request is directly returned to the target browser without obfuscation. When the preset obfuscation strategy is disabled, a duration can be set. After the duration is exceeded, the information on the page to be displayed still needs to be obfuscated. Alternatively, the preset obfuscation strategy needs to be enabled to obfuscate the information on the page to be displayed after a user is changed.

[0116] This embodiment obtains a monitoring script from a preset obfuscation strategy; the monitoring script is added to the page information to be displayed for obfuscation. After the step of adding the monitoring script to the page information to be displayed for obfuscation, the embodiment further includes: obtaining monitoring information fed back by the monitoring script; determining whether the current browser is a headless browser based on the monitoring information; if the current browser is a headless browser, obtaining interaction information with the headless browser; and updating the preset obfuscation strategy based on the interaction information. This embodiment enables the monitoring of user behavior by adding a preset monitoring script to the page information to be displayed for obfuscation.

[0117] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the page information obfuscation device of the present invention.

[0118] like Figure 5 As shown, the page information obfuscation device proposed in this embodiment of the invention includes:

[0119] The module 10 for determining page information to be displayed is used to determine the page information to be displayed corresponding to the page access request when a page access request is received.

[0120] Obfuscation processing module 20 is used to obfuscate the information of the page to be displayed according to a preset obfuscation strategy;

[0121] The distribution module 30 is used to distribute the obfuscated pages to be displayed.

[0122] This embodiment, upon receiving a page access request, determines the page information to be displayed corresponding to the request; obfuscates the page information according to a preset obfuscation strategy; and distributes the obfuscated page. Because this embodiment determines the page information to be displayed corresponding to the request upon receipt, obfuscates the page information according to a preset obfuscation strategy, and distributes the obfuscated page, compared to existing methods that directly distribute page information to display pages, this embodiment obfuscates the page information, preventing the loss of valuable data and raising the barrier to entry for machine data crawling.

[0123] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0124] In addition, for technical details not described in detail in this embodiment, please refer to the parameter operation method provided in any embodiment of the present invention, which will not be repeated here.

[0125] Based on the first embodiment of the page information obfuscation device of the present invention, a second embodiment of the page information obfuscation device of the present invention is proposed.

[0126] In this embodiment, the obfuscation processing module 20 is further configured to obtain node information in the page to be displayed based on the page information to be displayed; search for the target obfuscation strategy corresponding to the node information from the preset obfuscation strategies; and perform obfuscation processing on the page information to be displayed according to the target obfuscation strategy.

[0127] Furthermore, the obfuscation processing module 20 is also used to obtain the text content to be obfuscated based on the page information to be displayed when the target obfuscation strategy is pseudo-element obfuscation; and to add the text content to be obfuscated to the Cascading Style Sheet corresponding to the text content to be obfuscated.

[0128] Furthermore, the obfuscation processing module 20 is also used to obtain the monitoring script in the preset obfuscation strategy; and add the monitoring script to the page information to be displayed for obfuscation processing.

[0129] Furthermore, the obfuscation processing module 20 is also used to obtain monitoring information fed back by the monitoring script; determine whether the current browser is a headless browser based on the monitoring information; when the current browser is the headless browser, obtain interaction information with the headless browser; and update the preset obfuscation strategy based on the interaction information.

[0130] Furthermore, the obfuscation processing module 20 is also used to determine the interaction frequency and page dwell time based on the interaction information; determine whether the current user is an abnormal user based on the interaction frequency and the dwell time; and disable the preset obfuscation strategy when the current user is not an abnormal user.

[0131] Furthermore, the obfuscation processing module 20 is also used to, when the preset obfuscation strategy is a dirty data obfuscation strategy, obtain the language information corresponding to the page information to be displayed; determine redundant dirty data according to the language information; and perform obfuscation processing on the page information to be displayed according to the redundant dirty data.

[0132] Furthermore, the obfuscation processing module 20 is also used to start a preset timer to begin timing; when the timing ends, terminate the process of obfuscating the information of the page to be displayed according to the preset obfuscation strategy, and obtain the obfuscated page to be displayed; and distribute the obfuscated page to be displayed.

[0133] Furthermore, the module 10 for determining the page information to be displayed is also used to determine the annotation information of the page to be displayed based on the page information to be displayed; determine whether the page to be displayed is a page to be obfuscated based on the annotation information; and when the page to be displayed is a page to be obfuscated, perform obfuscation processing on the page to be obfuscated according to a preset obfuscation strategy.

[0134] Furthermore, the module 10 for determining the page information to be displayed is also used to delete the annotation information corresponding to the page to be displayed when the page to be displayed is not the page to be obfuscated; and to distribute the page to be displayed after deleting the annotation information to the target browser.

[0135] Other embodiments or specific implementations of the page information obfuscation device of the present invention can be found in the above-described method embodiments, and will not be repeated here.

[0136] Furthermore, this embodiment of the invention also proposes a storage medium storing a page information obfuscation program, which, when executed by a processor, implements the steps of the page information obfuscation method described above.

[0137] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0138] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0139] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0140] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.< / h1>

Claims

1. A method for obfuscating page information, characterized in that, The page information obfuscation method includes the following steps: Upon receiving a page access request, determine the page information to be displayed corresponding to the page access request; The information of the page to be displayed is obfuscated according to a preset obfuscation strategy; Distribute the obfuscated pages to be displayed; The step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy includes: Obtain monitoring information from the monitoring scripts in the preset obfuscation strategy; Based on the monitoring information, determine whether the current browser is a headless browser; When the current browser is the headless browser, obtain the interaction information with the headless browser; The interaction frequency and page dwell time are determined based on the interaction information. Determine whether the current user is an abnormal user based on the interaction frequency and the dwell time. When the current user is not an abnormal user, the preset obfuscation strategy is disabled.

2. The page information obfuscation method as described in claim 1, characterized in that, The step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy includes: Obtain node information from the page to be displayed based on the page information to be displayed; Find the target obfuscation strategy corresponding to the node information from the preset obfuscation strategy; The page information to be displayed is obfuscated according to the target obfuscation strategy.

3. The page information obfuscation method as described in claim 2, characterized in that, The step of obfuscating the information of the page to be displayed according to the target obfuscation strategy includes: When the target obfuscation strategy is pseudo-element obfuscation, the text content to be obfuscated is obtained according to the information of the page to be displayed; Add the text content to be obfuscated to the Cascading Style Sheet corresponding to the text content to be obfuscated.

4. The page information obfuscation method as described in any one of claims 1-3, characterized in that, The step of obfuscating the information of the page to be displayed according to a preset obfuscation strategy includes: When the preset obfuscation strategy is to add a dirty data obfuscation strategy, the language information corresponding to the page information to be displayed is obtained; Redundant dirty data is identified based on the language information; The information of the page to be displayed is obfuscated based on the redundant dirty data.

5. The page information obfuscation method as described in any one of claims 1-3, characterized in that, After the step of obfuscating the information of the page to be displayed according to the preset obfuscation strategy, the method further includes: Start the preset timer to begin timing; When the timer ends, the process of obfuscating the page information to be displayed according to the preset obfuscation strategy is terminated, and the obfuscated page to be displayed is obtained. The obfuscated page to be displayed is then distributed.

6. The page information obfuscation method as described in any one of claims 1-3, characterized in that, After the step of determining the page information to be displayed corresponding to the page access request upon receiving the page access request, the method further includes: The annotation information of the page to be displayed is determined based on the page information to be displayed; Determine whether the page to be displayed is a page to be obfuscated based on the annotation information; When the page to be displayed is a page to be obfuscated, the page to be obfuscated is obfuscated according to a preset obfuscation strategy.

7. The page information obfuscation method as described in claim 6, characterized in that, After the step of determining whether the page to be displayed is a page to be obfuscated based on the annotation information, the method further includes: If the page to be displayed is not the page to be obfuscated, delete the annotation information corresponding to the page to be displayed; Distribute the page to be displayed after removing the comments to the target browser.

8. A page information obfuscation device, characterized in that, The page information obfuscation device includes: The module for determining page information to be displayed is used to determine the page information to be displayed corresponding to the page access request when a page access request is received. The obfuscation processing module is used to obfuscate the information of the page to be displayed according to a preset obfuscation strategy; The distribution module is used to distribute the obfuscated pages to be displayed. The obfuscation processing module is also used to obtain monitoring information fed back by the monitoring script in the preset obfuscation strategy; Based on the monitoring information, determine whether the current browser is a headless browser; When the current browser is the headless browser, obtain the interaction information with the headless browser; The interaction frequency and page dwell time are determined based on the interaction information; the current user is judged to be an abnormal user based on the interaction frequency and the dwell time; if the current user is not an abnormal user, the preset obfuscation strategy is disabled.

9. The page information obfuscation device as described in claim 8, characterized in that, The obfuscation processing module is further configured to obtain node information in the page to be displayed based on the page information to be displayed; search for the target obfuscation strategy corresponding to the node information from the preset obfuscation strategies; and perform obfuscation processing on the page information to be displayed according to the target obfuscation strategy.

10. The page information obfuscation device as described in claim 9, characterized in that, The obfuscation processing module is further configured to, when the target obfuscation strategy is pseudo-element obfuscation, obtain the text content to be obfuscated based on the page information to be displayed; and add the text content to be obfuscated to the Cascading Style Sheet corresponding to the text content to be obfuscated.

11. The page information obfuscation device as described in claim 8, characterized in that, The obfuscation processing module is further configured to, when the preset obfuscation strategy is a dirty data obfuscation strategy, obtain the language information corresponding to the page information to be displayed; determine redundant dirty data based on the language information; and perform obfuscation processing on the page information to be displayed based on the redundant dirty data.

12. The page information obfuscation device as described in claim 8, characterized in that, The obfuscation processing module is further configured to start a preset timer to begin timing; when the timing ends, terminate the process of obfuscating the information of the page to be displayed according to the preset obfuscation strategy, and obtain the obfuscated page to be displayed; and distribute the obfuscated page to be displayed.

13. A page information obfuscation device, characterized in that, The device includes: a memory, a processor, and a page information obfuscation program stored on the memory and executable on the processor, the page information obfuscation program being configured to implement the steps of the page information obfuscation method as described in any one of claims 1 to 7.

14. A storage medium, characterized in that, The storage medium stores a page information obfuscation program, which, when executed by a processor, implements the steps of the page information obfuscation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Inhibiting automated extraction of data from network pages

    US8904279B1