CN112069033A - Page monitoring method and device, electronic equipment and storage medium - Google Patents

Page monitoring method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112069033A
CN112069033A CN202010962177.5A CN202010962177A CN112069033A CN 112069033 A CN112069033 A CN 112069033A CN 202010962177 A CN202010962177 A CN 202010962177A CN 112069033 A CN112069033 A CN 112069033A
Authority
CN
China
Prior art keywords
page
target
target sub
information
resource consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010962177.5A
Other languages
Chinese (zh)
Other versions
CN112069033B (en
Inventor
梁佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Knownsec Information Technology Co ltd
Original Assignee
Chengdu Knownsec Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Knownsec Information Technology Co ltd filed Critical Chengdu Knownsec Information Technology Co ltd
Priority to CN202010962177.5A priority Critical patent/CN112069033B/en
Publication of CN112069033A publication Critical patent/CN112069033A/en
Application granted granted Critical
Publication of CN112069033B publication Critical patent/CN112069033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a page monitoring method and device, electronic equipment and a storage medium, and relates to the technical field of page processing. In the application, firstly, in a target page rendered by a target browser, a target sub-page is determined through an application program interface of the target browser, wherein the target sub-page is embedded in the target page based on an inline frame; secondly, acquiring resource consumption information of a target sub-page, and judging whether the target sub-page needs to be intercepted or not based on the resource consumption information, wherein the resource consumption information is used for representing the consumption condition of the target sub-page on equipment resources of the electronic equipment; and then, if the target sub-page needs to be intercepted, informing the target browser to remove the target sub-page from the target page through an application program interface. Based on the method, the problem of poor monitoring effect in the existing page monitoring technology can be solved.

Description

Page monitoring method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of page processing technologies, and in particular, to a page monitoring method and apparatus, an electronic device, and a storage medium.
Background
In page processing technology, some other sub-pages may need to be embedded in the displayed main page based on certain requirements. However, the inventor researches and finds that in the prior art, effective monitoring on the embedded other sub-pages is difficult.
Disclosure of Invention
In view of the above, an object of the present application is to provide a page monitoring method and apparatus, an electronic device, and a storage medium, so as to solve the problem of poor monitoring effect in the existing page monitoring technology.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
a page monitoring method is applied to electronic equipment, the electronic equipment is provided with a target browser, and the page monitoring method comprises the following steps:
determining a target sub-page through an application program interface of the target browser in a target page rendered by the target browser, wherein the target sub-page is embedded in the target page based on an inline frame;
acquiring resource consumption information of the target sub-page, and judging whether the target sub-page needs to be intercepted or not based on the resource consumption information, wherein the resource consumption information is used for representing the consumption condition of the target sub-page on the equipment resources of the electronic equipment;
and if the target sub-page needs to be intercepted, notifying the target browser to remove the target sub-page from the target page through the application program interface.
In a preferred option of the embodiment of the present application, in the page monitoring method, the step of obtaining the resource consumption information of the target sub-page and determining whether to intercept the target sub-page based on the resource consumption information includes:
acquiring target page identification information of the target sub-page, wherein the target page identification information is used as first resource consumption information of the target sub-page;
judging whether the target page identification information belongs to an identification information set, wherein when the identification information set comprises at least one piece of page identification information, each piece of page identification information represents that the corresponding sub-page consumes more equipment resources than preset resources to the electronic equipment;
and if the identification information of the target page belongs to the identification information set, judging that the target sub-page needs to be intercepted.
In a preferred option of the embodiment of the present application, in the page monitoring method, the step of obtaining the resource consumption information of the target sub-page and determining whether to intercept the target sub-page based on the resource consumption information further includes:
if the identification information of the target page does not belong to the identification information set, acquiring second resource consumption information of the target sub-page, wherein the second resource consumption information is consumption information of the target sub-page on equipment resources of the electronic equipment;
and if the second resource consumption information is larger than the preset resource consumption information, judging that the target sub-page needs to be intercepted.
In a preferred option of the embodiment of the present application, in the page monitoring method, the step of obtaining the resource consumption information of the target sub-page and determining whether to intercept the target sub-page based on the resource consumption information includes:
acquiring second resource consumption information of the target sub-page, wherein the second resource consumption information is consumption information of the target sub-page on equipment resources of the electronic equipment;
and if the second resource consumption information is larger than the preset resource consumption information, judging that the target sub-page needs to be intercepted.
In a preferred option of the embodiment of the present application, in the page monitoring method, the step of obtaining the second resource consumption information of the target sub-page includes:
acquiring a processor utilization rate index, a memory occupation index and a static resource volume index of the target sub-page to the electronic equipment;
and performing weighted calculation to obtain second resource consumption information of the target sub-page based on the processor utilization index, the memory occupation index and the static resource volume index.
In a preferred option of the embodiment of the present application, in the page monitoring method, the step of obtaining a processor utilization index of the target sub-page to the electronic device includes:
acquiring a plurality of pieces of timestamp information, wherein each piece of timestamp information is formed based on time information when a processor of the electronic equipment finishes executing a task code of the target browser each time;
for every two adjacent pieces of the timestamp information, performing difference calculation on the two pieces of the timestamp information to obtain a plurality of pieces of first difference information of the two pieces of the timestamp information;
for each piece of first difference information, performing difference calculation on the first difference information and preset time information to obtain a plurality of pieces of second difference information;
and calculating the processor utilization rate index of the target sub-page to the electronic equipment based on the obtained plurality of second difference information.
In a preferred option of the embodiment of the present application, in the page monitoring method, the method further includes:
generating target indication information after determining that the target sub-page needs to be intercepted;
and informing the target browser through the application program interface, and after the target sub-page is removed from the target page, displaying the target indication information on the target page, wherein the display position of the target indication information is determined based on the display position of the target sub-page.
The embodiment of the present application further provides a page monitoring device, which is applied to an electronic device, where the electronic device is installed with a target browser, and the page monitoring device includes:
the target sub-page determining module is used for determining a target sub-page through an application program interface of the target browser in a target page rendered by the target browser, wherein the target sub-page is embedded in the target page based on an inline frame;
the information acquisition module is used for acquiring resource consumption information of the target sub-page and judging whether the target sub-page needs to be intercepted or not based on the resource consumption information, wherein the resource consumption information is used for representing the consumption condition of the target sub-page on the equipment resources of the electronic equipment;
and the target sub-page removing module is used for informing the target browser to remove the target sub-page from the target page through the application program interface when the target sub-page needs to be intercepted.
On the basis, an embodiment of the present application further provides an electronic device, including:
a memory for storing a computer program;
and the processor is connected with the memory and is used for executing the computer program stored in the memory so as to realize the page monitoring method.
On the basis, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed, the method for monitoring a page is implemented.
According to the page monitoring method and device, the electronic device and the storage medium, the target sub-page can be determined through the application program interface of the target browser, and then when the target sub-page needs to be intercepted based on the resource consumption information of the target sub-page, the target browser is informed through the application program interface to remove the target sub-page from the target page. Therefore, the situation that the target sub-page consumes excessive equipment resources can be avoided, the problem of poor monitoring effect in the existing page monitoring technology is solved, and the practical value is high.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Fig. 2 is a schematic flowchart of a page monitoring method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating sub-steps included in step S120 in fig. 2.
Fig. 4 is a schematic block diagram of a page monitoring apparatus according to an embodiment of the present application.
Icon: 10-an electronic device; 12-a memory; 14-a processor; 100-a page monitoring device; 110-target sub-page determination module; 120-an information obtaining module; 130-target sub-page removal module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, an embodiment of the present application provides an electronic device 10, which may include a memory 12, a processor 14, and a page monitoring apparatus 100.
Wherein the memory 12 and the processor 14 are electrically connected directly or indirectly to realize data transmission or interaction. For example, they may be electrically connected to each other via one or more communication buses or signal lines. The page monitoring apparatus 100 includes at least one software function module that can be stored in the memory 12 in the form of software or firmware (firmware). The processor 14 is configured to execute an executable computer program stored in the memory 12, such as a software functional module and a computer program included in the document page monitoring apparatus 100, so as to implement the page monitoring method provided by the embodiment of the present application.
Alternatively, the Memory 12 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The Processor 14 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), a System on Chip (SoC), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
It will be appreciated that the configuration shown in fig. 1 is merely illustrative, and that the electronic device 10 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1, and may also include a communication unit for exchanging information with other devices, for example.
With reference to fig. 2, an embodiment of the present application further provides a page monitoring method applicable to the electronic device 10. Wherein. The method steps defined by the flow associated with the page monitoring method may be implemented by the electronic device 10. The specific process shown in FIG. 2 will be described in detail below.
Step S110, in the target page rendered by the target browser, determining a target sub-page through an application program interface of the target browser.
In this embodiment, the electronic device 10 is pre-installed with a target browser, and therefore, when rendering a target page based on the target browser, a target sub-page in the target page may be determined first by (calling) an Application Programming Interface (API) of the target browser.
Wherein the target sub-page may be embedded in the target page based on an inline frame.
Step S120, obtaining the resource consumption information of the target sub-page, and judging whether the target sub-page needs to be intercepted or not based on the resource consumption information.
In this embodiment, after determining the target sub-page based on step S110, the electronic device 10 may first obtain the resource consumption information of the target sub-page, and then determine whether the interception processing needs to be performed on the target sub-page based on the resource consumption information.
Wherein the resource consumption information can be used to characterize the consumption of the device resource of the electronic device 10 by the target sub-page. In this way, it is possible to determine whether the interception processing is required based on the consumption of the device resource of the electronic device 10 by the target sub-page.
And, when it is determined that the interception processing of the target sub page is required based on the resource consumption information, step S130 may be performed.
Step S130, notifying the target browser to remove the target sub-page from the target page through the application program interface.
In this embodiment, when it is determined that the target sub-page needs to be intercepted based on step S130, the electronic device 10 may notify the target browser to remove the target sub-page from the target page through an application program interface of the target browser.
Therefore, the target sub-page can be intercepted, and the target sub-page is prevented from causing consumption of device resources on the electronic device 10.
By the method, the target sub-page embedded in the target page can be effectively monitored, so that the situation that the target sub-page consumes excessive equipment resources can be avoided, and the problem of poor monitoring effect in the conventional page monitoring technology is solved.
In the first aspect, it should be noted that, in step S110, a specific manner for determining the target sub-page is not limited, and may be configured according to an actual application requirement.
For example, in an alternative example, the target sub-page may be embedded in the target page based on iframe technology. Thus, the target sub-page can be determined in the target page through the document.
In the second aspect, it should be noted that, in step S120, the specific manner of determining whether the target sub-page needs to be intercepted is also not limited, and the configuration may be performed according to actual requirements.
For example, in an alternative example, in order to ensure that the determination of whether the target sub-page is subjected to the interception processing has high accuracy, the step S120 may include the following sub-steps:
first, second resource consumption information of the target sub-page may be obtained, where the second resource consumption information may be consumption information of the target sub-page on device resources of the electronic device 10; secondly, if the second resource consumption information is larger than the preset resource consumption information, it can be judged that the target sub-page needs to be intercepted.
For another example, in another alternative example, in order to reduce the consumption of the computing resources on the electronic device 10 caused by executing step S120 as a whole, with reference to fig. 3, step S120 may include step S121, step S122, and step S123, which are described below.
Step S121, obtaining the target page identification information of the target sub-page.
In this embodiment, after determining the target sub page based on step S110, the target page identification information of the target sub page may be obtained first.
Wherein the target page identification information (e.g., in one example, a network resource address, i.e., a URL address) can be used as the first resource consumption information of the target sub-page.
Step S122, determining whether the target page identification information belongs to an identification information set.
In this embodiment, after the target page identification information is obtained based on step S121, it may be determined whether the target page identification information belongs to an identification information set, and then, when the target page identification information belongs to the identification information set, step S123 may be performed.
The identification information set may include at least one piece of page identification information, or may not include page identification information (which may mean that one identification information set exists but no page identification information exists in the identification information set, or that no identification information set exists).
And when the identification information set includes at least one piece of page identification information, each piece of page identification information may represent that the device resource consumed by the corresponding sub-page for the electronic device 10 is greater than a preset resource. In this way, as long as the target page identification information belongs to the identification information set, it can be stated that the target sub-page is larger than the preset resource for the device resource consumed by the electronic device 10, so that the identification information set may also be referred to as an interception blacklist, that is, all sub-pages corresponding to the page identification information in the identification information set need to be intercepted.
Step S123, determining that the target sub-page needs to be intercepted.
In this embodiment, after determining that the target page identification information belongs to the identification information set based on step S122, it may be determined that the target sub-page needs to be intercepted.
Therefore, the interception of the target sub-page can be realized only by acquiring the target page identification information of the target sub-page, so that the second resource consumption information of the target sub-page does not need to be acquired, and the interception efficiency of the target sub-page is improved.
It should be further explained for step S120 that, after determining that the target page identification information does not belong to the identification information set based on step S122, the specific processing manner of the target sub-page is not limited, and may be configured according to actual application requirements.
For example, in an alternative example, after determining that the target page identification information does not belong to the identification information set based on step S122, it may be determined not to perform the interception processing on the target sub-page (for example, when the page identification information included in the identification information set is relatively complete, the processing efficiency may be ensured, and a certain processing accuracy may also be ensured).
For another example, in another alternative example, in order to enable accurate interception of the target sub-page that needs to be intercepted, step S120 may further include the following sub-steps:
first, if the identification information of the target page does not belong to the identification information set, second resource consumption information of the target sub-page may be obtained, where the second resource consumption information may be consumption information of the target sub-page on device resources of the electronic device 10; secondly, if the second resource consumption information is larger than the preset resource consumption information, it can be judged that the target sub-page needs to be intercepted.
That is, after determining that the target page identification information does not belong to the identification information set based on step S122, it is further required to obtain actual consumption information of the target sub-page on the device resource of the electronic device 10, and then determine whether to perform the intercepting process on the target sub-page based on the actual consumption information.
Optionally, in the two examples, a specific manner of obtaining the second resource consumption information of the target sub-page is also not limited, and may be configured according to an actual application requirement.
For example, in an alternative example, a processor usage index, a memory usage index, or a static resource volume index of the target sub-page to the electronic device 10 may be obtained, and then the processor usage index, the memory usage index, or the static resource volume index may be used as the second resource consumption information of the target sub-page.
For another example, in another alternative example, the second resource consumption information of the target sub-page may be obtained based on the following sub-steps:
firstly, a processor utilization rate index, a memory occupation index and a static resource volume index of the target sub-page to the electronic device 10 can be obtained;
and secondly, weighting and calculating to obtain second resource consumption information of the target sub-page based on the processor utilization index, the memory occupation index and the static resource volume index.
It can be understood that, in the above example, the specific manner for obtaining the processor utilization index, the memory usage index, and the static resource volume index based on the first step is not limited, and may be configured according to actual application requirements.
For example, for the processor usage index, it may be obtained by the following sub-steps:
first, a plurality of time stamp information may be obtained, where each time stamp information is formed based on time information of each time the processor of the electronic device 10 completes executing the task code of the target browser (for example, the time stamp information may be obtained by a configured timer callback function after each time the processor of the electronic device 10 completes executing the task code of the target browser);
secondly, for every two adjacent pieces of the timestamp information, performing difference calculation on the two pieces of the timestamp information to obtain a plurality of pieces of first difference information of the two pieces of the timestamp information;
then, for each of the first difference information, performing a difference calculation between the first difference information and preset time information (for example, in an alternative example, under a normal condition, the time of each time that the processor executes the task code of the target browser may be 1000 milliseconds, and if the task code includes malicious mining code, the time may be 1300 milliseconds, and thus, the preset time information may be 100) to obtain second difference information, where the second difference information is multiple (for example, the time stamp information is 11, where the first time stamp information may be 0, and the second difference information may be 10);
finally, a processor utilization index of the target sub-page to the electronic device 10 may be calculated based on the obtained plurality of second difference information (e.g., the processor utilization index may be calculated by performing an average calculation).
For another example, for the memory usage index, the memory usage index may be obtained through the following sub-steps:
and acquiring the memory use condition of the target sub-page through a performance.memory.user JSHeapSize interface (an application program interface) of the target browser, thereby obtaining the memory occupation index.
As another example, for the static resource volume index, the static resource volume index may be obtained by the following sub-steps:
first, through a performance of the target browser, get into static resource information groups (which may refer to multimedia resources referred by the target sub-page, such as pictures, videos, audios, JavaScript script files, style files, etc.) of the target sub-page, and then, traverse the static resource information groups, and summarize decoded body size field information of each group, thereby obtaining the static resource volume index.
It is understood that, in the above example, the specific manner of obtaining the second resource consumption information of the target sub-page based on the second-step weighting calculation is also not limited, and may also be configured according to the actual application requirement.
For example, in an alternative example, the second resource consumption information of the target sub-page may be calculated based on the following formula:
Figure BDA0002680932300000111
wherein, R may be the second resource consumption information, U may be the processor utilization index, C may be the memory footprint index, and S may be the static resource volume index.
Further, in order to avoid a problem that it is difficult for a user to accurately acquire an occurring condition after the target sub-page is removed from the target page, in this embodiment, the page monitoring method may further include the following steps:
firstly, target indication information can be generated after the target sub-page is determined to need to be intercepted; secondly, the target browser can be notified through the application program interface, and after the target sub-page is removed from the target page, the target indication information is displayed on the target page, wherein the display position of the target indication information can be determined based on the display position of the target sub-page (for example, the target indication information can be displayed at the position where the target sub-page is originally displayed on the target page).
It is to be understood that the specific contents of the target indication information are not limited. For example, in an alternative example, the target indication information may be "malicious web page has been intercepted" or the like.
Further, for the above example, if it is determined that the target sub-page does not need to be intercepted based on the target page identification information, but it is determined that the target sub-page needs to be intercepted based on the second resource consumption information, the target page identification information may be added to the identification information set, so that when the target sub-page is loaded next time, interception can be implemented without acquiring the second resource consumption information again.
In an alternative example, the identification information set may be stored in a cache (localSession) of the target browser, so that the target page identification information may be saved to the identification information set by calling a localSession.
Further, for the above example, if it is determined that the target sub-page needs to be intercepted, a mail service interface may be invoked to send an alarm mail to an administrator of the target browser, so that the administrator may handle the problem existing in the target sub-page.
With reference to fig. 4, an embodiment of the present application further provides a page monitoring apparatus 100 applicable to the electronic device 10. The page monitoring apparatus 100 may include a target sub-page determining module 110, an information obtaining module 120, and a target sub-page removing module 130.
The target sub-page determining module 110 may be configured to determine, in a target page rendered by the target browser, a target sub-page through an application program interface of the target browser, where the target sub-page is embedded in the target page based on an inline frame. In this embodiment, the target sub-page determining module 110 may be configured to execute step S110 shown in fig. 2, and reference may be made to the foregoing description of step S110 regarding relevant contents of the target sub-page determining module 110.
The information obtaining module 120 may be configured to obtain resource consumption information of the target sub-page, and determine whether to perform the intercepting process on the target sub-page based on the resource consumption information, where the resource consumption information is used to represent a consumption situation of the target sub-page on the device resource of the electronic device 10. In this embodiment, the information obtaining module 120 may be configured to perform step S120 shown in fig. 2, and reference may be made to the foregoing description of step S120 for relevant contents of the information obtaining module 120.
The target sub-page removing module 130 may be configured to notify the target browser to remove the target sub-page from the target page through the application program interface when the target sub-page needs to be intercepted. In this embodiment, the target sub-page removing module 130 may be configured to execute step S130 shown in fig. 2, and reference may be made to the description of step S130 for relevant contents of the target sub-page removing module 130.
In an embodiment of the present application, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and the computer program executes the steps of the page monitoring method when running.
The steps executed when the computer program runs are not described in detail herein, and reference may be made to the above explanation of the page monitoring method.
To sum up, the page monitoring method and apparatus, the electronic device, and the storage medium provided by the present application may determine the target sub-page through an application program interface of the target browser, and then notify the target browser to remove the target sub-page from the target page through the application program interface when it is determined that the target sub-page needs to be intercepted based on the resource consumption information of the target sub-page. Therefore, the situation that the target sub-page consumes excessive equipment resources can be avoided, the problem of poor monitoring effect in the existing page monitoring technology is solved, and the practical value is high.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A page monitoring method is applied to electronic equipment, the electronic equipment is provided with a target browser, and the page monitoring method comprises the following steps:
determining a target sub-page through an application program interface of the target browser in a target page rendered by the target browser, wherein the target sub-page is embedded in the target page based on an inline frame;
acquiring resource consumption information of the target sub-page, and judging whether the target sub-page needs to be intercepted or not based on the resource consumption information, wherein the resource consumption information is used for representing the consumption condition of the target sub-page on the equipment resources of the electronic equipment;
and if the target sub-page needs to be intercepted, notifying the target browser to remove the target sub-page from the target page through the application program interface.
2. The page monitoring method according to claim 1, wherein the step of obtaining the resource consumption information of the target sub-page and determining whether the target sub-page needs to be intercepted based on the resource consumption information comprises:
acquiring target page identification information of the target sub-page, wherein the target page identification information is used as first resource consumption information of the target sub-page;
judging whether the target page identification information belongs to an identification information set, wherein when the identification information set comprises at least one piece of page identification information, each piece of page identification information represents that the corresponding sub-page consumes more equipment resources than preset resources to the electronic equipment;
and if the identification information of the target page belongs to the identification information set, judging that the target sub-page needs to be intercepted.
3. The page monitoring method according to claim 2, wherein the step of obtaining the resource consumption information of the target sub-page and determining whether the target sub-page needs to be intercepted based on the resource consumption information further comprises:
if the identification information of the target page does not belong to the identification information set, acquiring second resource consumption information of the target sub-page, wherein the second resource consumption information is consumption information of the target sub-page on equipment resources of the electronic equipment;
and if the second resource consumption information is larger than the preset resource consumption information, judging that the target sub-page needs to be intercepted.
4. The page monitoring method according to claim 1, wherein the step of obtaining the resource consumption information of the target sub-page and determining whether the target sub-page needs to be intercepted based on the resource consumption information comprises:
acquiring second resource consumption information of the target sub-page, wherein the second resource consumption information is consumption information of the target sub-page on equipment resources of the electronic equipment;
and if the second resource consumption information is larger than the preset resource consumption information, judging that the target sub-page needs to be intercepted.
5. The page monitoring method according to claim 3 or 4, wherein the step of obtaining the second resource consumption information of the target sub-page comprises:
acquiring a processor utilization rate index, a memory occupation index and a static resource volume index of the target sub-page to the electronic equipment;
and performing weighted calculation to obtain second resource consumption information of the target sub-page based on the processor utilization index, the memory occupation index and the static resource volume index.
6. The page monitoring method according to claim 5, wherein the step of obtaining the processor utilization index of the target sub-page to the electronic device comprises:
acquiring a plurality of pieces of timestamp information, wherein each piece of timestamp information is formed based on time information when a processor of the electronic equipment finishes executing a task code of the target browser each time;
for every two adjacent pieces of the timestamp information, performing difference calculation on the two pieces of the timestamp information to obtain a plurality of pieces of first difference information of the two pieces of the timestamp information;
for each piece of first difference information, performing difference calculation on the first difference information and preset time information to obtain a plurality of pieces of second difference information;
and calculating the processor utilization rate index of the target sub-page to the electronic equipment based on the obtained plurality of second difference information.
7. The page monitoring method according to claim 1, further comprising:
generating target indication information after determining that the target sub-page needs to be intercepted;
and informing the target browser through the application program interface, and after the target sub-page is removed from the target page, displaying the target indication information on the target page, wherein the display position of the target indication information is determined based on the display position of the target sub-page.
8. A page monitoring device is applied to an electronic device, the electronic device is provided with a target browser, and the page monitoring device comprises:
the target sub-page determining module is used for determining a target sub-page through an application program interface of the target browser in a target page rendered by the target browser, wherein the target sub-page is embedded in the target page based on an inline frame;
the information acquisition module is used for acquiring resource consumption information of the target sub-page and judging whether the target sub-page needs to be intercepted or not based on the resource consumption information, wherein the resource consumption information is used for representing the consumption condition of the target sub-page on the equipment resources of the electronic equipment;
and the target sub-page removing module is used for informing the target browser to remove the target sub-page from the target page through the application program interface when the target sub-page needs to be intercepted.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor coupled to the memory for executing a computer program stored by the memory to implement the page monitoring method of any of claims 1-7.
10. A computer-readable storage medium storing a computer program, wherein the computer program is configured to implement the page monitoring method according to any one of claims 1 to 7 when executed.
CN202010962177.5A 2020-09-14 2020-09-14 Page monitoring method and device, electronic equipment and storage medium Active CN112069033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010962177.5A CN112069033B (en) 2020-09-14 2020-09-14 Page monitoring method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010962177.5A CN112069033B (en) 2020-09-14 2020-09-14 Page monitoring method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112069033A true CN112069033A (en) 2020-12-11
CN112069033B CN112069033B (en) 2023-11-28

Family

ID=73695584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010962177.5A Active CN112069033B (en) 2020-09-14 2020-09-14 Page monitoring method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112069033B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559294A (en) * 2020-12-22 2021-03-26 郑州阿帕斯科技有限公司 Method and device for determining resource consumption of application page
CN113312572A (en) * 2021-05-17 2021-08-27 深圳市中科明望通信软件有限公司 Resource processing method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035984A (en) * 2014-05-29 2014-09-10 北京奇虎科技有限公司 Method for blocking popup windows in browser and device for blocking popup windows
CN106462635A (en) * 2014-06-20 2017-02-22 微软技术许可有限责任公司 Intelligent web page content blocking
CN108038134A (en) * 2017-11-20 2018-05-15 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of page presentation
CN109582900A (en) * 2018-11-14 2019-04-05 百度在线网络技术(北京)有限公司 The page loads filter method and its device
CN110020346A (en) * 2017-09-12 2019-07-16 北京搜狗科技发展有限公司 A kind of page accommodation method and device
US20200084284A1 (en) * 2018-09-12 2020-03-12 Citrix Systems, Inc. Systems and methods for integrated service discovery for network applications
CN111143007A (en) * 2019-12-26 2020-05-12 珠海格力电器股份有限公司 Page control method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035984A (en) * 2014-05-29 2014-09-10 北京奇虎科技有限公司 Method for blocking popup windows in browser and device for blocking popup windows
CN106462635A (en) * 2014-06-20 2017-02-22 微软技术许可有限责任公司 Intelligent web page content blocking
CN110020346A (en) * 2017-09-12 2019-07-16 北京搜狗科技发展有限公司 A kind of page accommodation method and device
CN108038134A (en) * 2017-11-20 2018-05-15 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of page presentation
US20200084284A1 (en) * 2018-09-12 2020-03-12 Citrix Systems, Inc. Systems and methods for integrated service discovery for network applications
CN109582900A (en) * 2018-11-14 2019-04-05 百度在线网络技术(北京)有限公司 The page loads filter method and its device
CN111143007A (en) * 2019-12-26 2020-05-12 珠海格力电器股份有限公司 Page control method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韦俊琳 等: ""使用网页元素随机化方法的广告反屏蔽系统"", 《小型微型计算机系统》, vol. 41, no. 5, pages 1013 - 1018 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559294A (en) * 2020-12-22 2021-03-26 郑州阿帕斯科技有限公司 Method and device for determining resource consumption of application page
CN113312572A (en) * 2021-05-17 2021-08-27 深圳市中科明望通信软件有限公司 Resource processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112069033B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
US11671434B2 (en) Abnormal user identification
CN110381151B (en) Abnormal equipment detection method and device
EP3171274B1 (en) Resource leak detecting method and apparatus
US11089024B2 (en) System and method for restricting access to web resources
CN112069033A (en) Page monitoring method and device, electronic equipment and storage medium
CN111258847B (en) File handle monitoring and analyzing method, device, medium and equipment
US20200193021A1 (en) Malware collusion detection
CN107579864B (en) Request monitoring method and device and server
CN110708212A (en) Method and device for tracking call link in distributed system
CN111142851A (en) Abnormal request processing method and device, electronic equipment and storage medium
CN111984896A (en) Buried point data acquisition method and device, computer equipment and readable storage medium
CN108470126B (en) Data processing method, device and storage medium
CN112769612A (en) Alarm event false alarm removing method and device
CN111371633A (en) Method, device, equipment and medium for detecting abnormal use of Internet of things card
CN109561045B (en) Data interception method and device, storage medium and electronic equipment
CN114297630A (en) Malicious data detection method and device, storage medium and processor
CN113569965A (en) User behavior analysis method and system based on Internet of things
CN112559050A (en) Method and device for processing concurrency number of client asynchronous request information
CN106708706B (en) Alarm information processing method and device for task program abnormity
CN112115175B (en) Cloud service product processing method and device, electronic equipment and storage medium
CN114253825B (en) Memory leak detection method, device, computer equipment and storage medium
CN110955547B (en) Management method, system, equipment and readable storage medium for interface abnormal information
CN107295088B (en) Dotting information monitoring method and device and client
CN109214212B (en) Information leakage prevention method and device
CN113138960A (en) Data storage method and system based on cloud storage space adjustment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant