CN114461485A - Resource loading monitoring method, device, equipment and storage medium - Google Patents

Resource loading monitoring method, device, equipment and storage medium Download PDF

Info

Publication number
CN114461485A
CN114461485A CN202111582032.3A CN202111582032A CN114461485A CN 114461485 A CN114461485 A CN 114461485A CN 202111582032 A CN202111582032 A CN 202111582032A CN 114461485 A CN114461485 A CN 114461485A
Authority
CN
China
Prior art keywords
resource loading
resource
monitoring
webpage
information
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.)
Pending
Application number
CN202111582032.3A
Other languages
Chinese (zh)
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.)
You Peninsula Beijing Information Technology Co ltd
Original Assignee
You Peninsula Beijing 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 You Peninsula Beijing Information Technology Co ltd filed Critical You Peninsula Beijing Information Technology Co ltd
Priority to CN202111582032.3A priority Critical patent/CN114461485A/en
Publication of CN114461485A publication Critical patent/CN114461485A/en
Pending legal-status Critical Current

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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a resource loading monitoring method, a device, equipment and a storage medium. The technical scheme provided by the embodiment of the application subscribes a webpage resource loading event under a specified monitoring domain name in the extension plug-in installed on the browser, monitoring a webpage resource loading event of a browser through an extension plug-in, generating resource loading information when monitoring the webpage resource loading event of a specified monitoring domain name, after the resource loading information provided by the extension plug-in is acquired, the resource loading information can be sent to the server and stored by the server, and a worker can analyze and process the loading performance of the webpage resource according to the stored resource loading information, the webpage resources are optimized in a targeted mode, the loading performance of the webpage resources is improved, excessive source code invasion to a content security auditing system is not needed, the maintenance workload of the content security auditing system is reduced, and the loading monitoring quality of the webpage resources is improved.

Description

Resource loading monitoring method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a resource loading monitoring method, device, equipment and storage medium.
Background
With the continuous development of web page and browser technology, more and more applications select the form of web pages to realize product functions. For example, for a content security auditing system, a worker needs to audit a large amount of network resources such as pictures and videos through the content security auditing system, and at present, web resources are all distributed through a CDN (content delivery network), but since the worker of the content security auditing system is distributed at different positions and network conditions are different, the loading performance of the web resources needs to be monitored to perform targeted optimization.
At present, the monitoring of the network resource loading performance generally inserts a monitoring function of a loading completion/failure event into a front-end code of a content security auditing system, but the mode has greater invasiveness to the source code content security auditing system, and increases the maintenance difficulty of the content security auditing system.
Disclosure of Invention
The embodiment of the application provides a resource loading monitoring method, a device, equipment and a storage medium, which are used for solving the technical problem that the maintenance difficulty of a content security auditing system is increased due to invasive modification of a source code of the content security auditing system in the prior art, reducing the invasion of the source code of the content security auditing system, reducing the maintenance workload of the content security auditing system and improving the webpage resource loading monitoring quality.
In a first aspect, an embodiment of the present application provides a resource loading monitoring method, including:
subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in of a browser;
monitoring a webpage resource loading event of a browser through the extension plug-in, wherein the extension plug-in generates resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name by the browser;
and acquiring resource loading information generated by the extension plug-in, sending the resource loading information to a server, and storing the resource loading information by the server.
In a second aspect, an embodiment of the present application provides a resource loading monitoring apparatus, including a domain name subscription module, a loading monitoring module, and an information storage module, where:
the domain name subscription module is used for subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in of the browser;
the loading monitoring module is used for monitoring a webpage resource loading event of the browser through the extension plug-in, and the extension plug-in generates resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name by the browser;
the information storage module is used for acquiring the resource loading information generated by the extension plug-in, sending the resource loading information to a server, and storing the resource loading information by the server.
In a third aspect, an embodiment of the present application provides a resource loading monitoring device, including: a memory and one or more processors;
the memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the resource load monitoring method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the resource load monitoring method according to the first aspect when executed by a computer processor.
The embodiment of the application subscribes a webpage resource loading event under a specified monitoring domain name in an extension plug-in installed on a browser, monitors the webpage resource loading event of the browser through the extension plug-in, generates resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name, can transmit the resource loading information to a server after acquiring the resource loading information provided by the extension plug-in, and stores the resource loading information by the server, so that a worker can analyze and process the loading performance of the webpage resource according to the stored resource loading information to perform targeted optimization on the webpage resource and improve the webpage resource loading performance, monitors the webpage resource loading event under the specified monitoring domain name through the extension plug-in, reduces the condition that the maintenance difficulty of a content security auditing system is increased due to invasive modification on a source code of the content security auditing system, excessive source code intrusion on the content security auditing system is not needed, the maintenance workload of the content security auditing system is reduced, and the webpage resource loading monitoring quality is improved.
Drawings
Fig. 1 is a flowchart of a resource loading monitoring method according to an embodiment of the present application;
fig. 2 is a flowchart of another resource loading monitoring method provided in an embodiment of the present application;
fig. 3 is a schematic flowchart of a web resource provider according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a communication timing sequence between a browser and an extension plug-in according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a resource loading monitoring apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a resource loading monitoring device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The above process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes described above may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of a resource loading monitoring method according to an embodiment of the present application, where the resource loading monitoring method according to the embodiment of the present application may be executed by a resource loading monitoring device, and the resource loading monitoring device may be implemented in a hardware and/or software manner and integrated in a resource loading monitoring device.
The following description will be given by taking the resource loading monitoring method executed by the resource loading monitoring device as an example. Referring to fig. 1, the resource loading monitoring method includes:
s101: and subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in of the browser.
The browser provided by the embodiment is installed in the resource loading monitoring device, and can be used for requesting the web resource from the web resource providing terminal based on the configured domain name. The web resource providing end may be a Content Delivery Network (CDN), the Content Delivery Network allocates a corresponding resource server according to a domain name corresponding to a web resource request after receiving the web resource request sent by the browser, and the browser accesses the allocated resource server and provides a web resource (different resource servers correspond to different IP addresses) to the browser by the allocated resource server. The web page resources are HTTP resources loaded through the web page, such as videos, pictures, audio, JavaScript scripts, and the like.
The browser provided by this embodiment may be a Chrome browser, a Firefox browser, a Microsoft Edge browser, or the like, and the specific type of the browser may be selected according to actual situations. The browser is configured with a browser Extension interface (Extension API), an Extension program can be written by using the Extension interface to realize Extension of functions of the browser, non-invasive monitoring of webpage resource requests of the browser is realized by using a hook of the browser Extension interface, and the resource monitoring function of the browser can be activated only by embedding a small amount of SDK codes into the browser. Specifically, according to the scheme, an extension interface of the browser is utilized, an extension plug-in is installed and configured in the browser and is connected to the extension interface of the browser, the extension plug-in has a function of monitoring the webpage resource loading condition of the browser, and communicates with the resource loading monitoring device based on a set network protocol. The extension plug-in can be fixedly installed in the browser, and can also be an extension interface which is started and connected to the browser when resource loading monitoring is needed. The method comprises the steps that a plurality of webpage resource loading events under different specified monitoring domain names can be subscribed in an extension plug-in, namely, the resource loading performance of the specified monitoring domain names is monitored at the same time.
Illustratively, a corresponding specified monitoring domain name is loaded according to a resource to be monitored, a webpage resource loading event under the specified monitoring domain name is subscribed on an extension plug-in installed on a browser, and when the extension plug-in detects that the browser loads the webpage resource loading event of the specified monitoring domain name, resource loading information is generated.
S102: monitoring a webpage resource loading event of the browser through the extension plug-in, and generating resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name of the browser by the extension plug-in.
Illustratively, after a webpage resource loading event under a specified monitoring domain name is subscribed in an extension plug-in of the browser, the extension plug-in monitors the webpage resource loading event of the browser. The method comprises the steps that an extension plug-in acquires all resource loading requests initiated by a browser on a bypass, when a webpage resource loading event is triggered by loading webpage resources corresponding to a specified domain name through the browser requests, the extension plug-in captures the domain name corresponding to the browser resource loading requests, and if the domain name is not the specified monitoring domain name, the webpage resource loading event is ignored. And when the captured domain name is the specified monitoring domain name, the extension plug-in confirms that the loading event of the browser for the webpage resource of the specified monitoring domain name is monitored, monitors the loading event of the browser for the webpage resource of the specified monitoring domain name, sends the loading condition of the webpage resource to the extension plug-in, and generates resource loading information according to the loading condition of the webpage resource.
In one embodiment, the resource loading information includes a combination of one or more of a response status code (HTTP status code) corresponding to when the browser loads a web resource specifying a monitored domain name, a response status Header (e.g., HTTP Header request/response Header information sent and received by the web resource), a web address (IP address) responding to a web resource loading event, a size of the web resource, a resource loading time (e.g., a time interval from the start of loading to the completion of loading of the web resource), a loading result (e.g., loading success or loading failure), and a loading failure reason, where the loading failure reason includes one or more of a network timeout, a status code error, a failure to establish a connection, and a domain name query failure, and a specific loading failure reason can be obtained through an extended interface of the browser.
S103: and acquiring resource loading information generated by the extension plug-in, sending the resource loading information to a server, and storing the resource loading information by the server.
Illustratively, the resource loading information generated by the extension plug-in is acquired, the resource loading information is sent to the server through a set communication protocol, and the server stores the received resource loading information in a persistent manner, so that a worker can analyze and process the loading performance of the webpage resource according to the resource loading information stored in the server.
Taking the content auditing device used by the content auditing personnel as the resource loading monitoring device provided by the embodiment as an example, because the users of the content auditing backgrounds are located all over the world, and the network conditions of different content auditing backgrounds are different, the provider of the content distribution network needs to perform network line optimization according to the webpage resource loading condition (resource loading information). The content auditor needs to run a content auditing background on the monitoring equipment, the content auditing background uses a browser to request a webpage resource corresponding to a specified domain name from a content distribution network, and downloads the webpage resource according to a webpage address specified by the content distribution network, and the content auditor conducts content auditing according to the downloaded webpage resource. Meanwhile, an extension plug-in is installed on a browser of the monitoring equipment, a webpage resource loading event under the specified monitoring domain name is subscribed on the extension plug-in, when the extension plug-in monitors the webpage resource loading event of the specified monitoring domain name, resource loading information is generated and sent to a server, and the resource loading information is stored by the server.
The method comprises the steps of subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in installed on a browser, monitoring the webpage resource loading event of the browser through the extension plug-in, generating resource loading information when the extension plug-in monitors the webpage resource loading event of the specified monitoring domain name, sending the resource loading information to a server after acquiring the resource loading information provided by the extension plug-in, storing the resource loading information by the server, analyzing and processing the loading performance of the webpage resource by a worker according to the stored resource loading information to perform targeted optimization on the webpage resource and improve the webpage resource loading performance, monitoring the webpage resource loading event under the specified monitoring domain name through the extension plug-in, and reducing the condition that the maintenance difficulty of a content security auditing system is increased due to invasive modification on a source code of the content security auditing system, excessive source code intrusion on the content security auditing system is not needed, the maintenance workload of the content security auditing system is reduced, and the webpage resource loading monitoring quality is improved.
On the basis of the foregoing embodiment, fig. 2 shows a flowchart of another resource loading monitoring method provided in the embodiment of the present application, where the resource loading monitoring method is an embodiment of the resource loading monitoring method. Referring to fig. 2, the resource loading monitoring method includes:
s201: and responding to the opening of the monitored webpage, and registering the monitored webpage with the extension plug-in.
S202: and subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in of the browser.
Specifically, a content auditing background in the resource loading monitoring device utilizes a preset web page (e.g., a web page based on JavaScript or CSS) to load a web page resource corresponding to the specified domain name for content auditing, where the preset web page is the monitored web page requiring resource loading performance monitoring in the present scheme. After an extension plug-in is installed in a browser, a monitored webpage is designated in the browser, the browser monitors the opening condition of the monitored webpage, and after the monitored webpage is opened by the browser, the browser initiates a registration event to the extension plug-in so as to register the monitored webpage in the extension plug-in and subscribe a webpage resource loading event (webpage resource loading event stream) under the designated monitoring domain name in the extension plug-in of the browser.
S203: monitoring a webpage resource loading event of the browser through the extension plug-in, and generating resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name of the browser by the extension plug-in.
Specifically, after the monitored webpage is registered in the extension plug-in and a webpage resource loading event under the specified monitoring domain name is subscribed, the extension plug-in monitors the webpage resource loading event carried out on the registered monitored webpage, and generates resource loading information according to the webpage resource loading condition provided by the monitored webpage when the webpage resource loading event of the specified monitoring domain name by the monitored webpage is monitored. The resource loading information may be generated for the fragments of the corresponding web page resource, for example, for videos sent in the form of fragments, a plurality of resource loading information may be generated according to each video fragment, respectively.
In one embodiment, when monitoring a webpage resource loading event of a specified monitoring domain name by a browser, the extension plug-in generates resource loading information according to resource loading time corresponding to the webpage resource loading event. Further, the extension plug-in may determine to directly upload the resource loading information or partially upload the resource loading information according to the webpage resource loading time, and based on this, when the extension plug-in provided in this scheme generates the resource loading information according to the resource loading time corresponding to the webpage resource loading event, the extension plug-in includes at least one of the following:
s2031: and reporting the resource loading information when the resource loading time corresponding to the webpage resource loading event reaches a set time threshold.
S2032: and when the resource loading time consumption corresponding to the webpage resource loading event does not reach a set time threshold, reporting the resource loading information according to a set proportion.
Specifically, when receiving a resource loading condition provided by an extension interface of a browser (monitored webpage), the extension plug-in determines resource loading consumed time corresponding to a webpage resource loading event according to the resource loading condition, and compares the resource loading consumed time with a set time threshold.
Further, when the resource loading consumed time reaches a set time threshold, if the resource loading consumed time of the current webpage loading resource is considered to be too long, and the corresponding network line is possibly abnormal, the resource loading information is directly generated according to the resource loading condition provided by the browser, and the resource loading information is sent to the resource loading monitoring device.
When the resource loading time consumption does not reach the set time threshold, the resource loading time consumption of the current webpage loading resource is considered to be normal, the corresponding resource loading information is not required to be uploaded completely, and the resource loading information can be reported according to the set proportion (the resource loading information is generated according to the resource loading condition provided by the browser, and the reported resource loading information is selected according to the set proportion, or the resource loading information required to be uploaded is generated according to the resource loading condition provided by the browser. In one embodiment, different web resource sizes correspond to different set time thresholds, and the corresponding set time thresholds may be determined according to the web resource sizes of the web resources.
In one embodiment, when the extension plug-in generates the resource loading information, the data source is marked on the resource loading information, so that the extension plug-in facilitates resource loading monitoring and rapidly identifies the resource loading information.
S204: and acquiring resource loading information generated by the extension plug-in, sending the resource loading information to a server, and storing the resource loading information by the server.
In an embodiment, after receiving the resource loading information sent by the extension plug-in, the web page side performs aggregation processing on the resource loading information according to a set time interval (for example, performs packing processing on the resource loading information received between the set time intervals), and stores the resource loading information after the aggregation processing in a server. In one embodiment, after receiving the resource loading information, the resource loading information apparatus adds sender information (e.g., a user name, a user ID, etc.) to the resource loading information, so as to facilitate subsequent targeted network optimization analysis according to the sender information.
The server provided by the scheme is used for sending the received resource loading information to a preset data queue, taking out the resource loading information from the data queue and sending the taken-out resource loading information to the preset database. The scheme utilizes the data queue to display peak clipping and valley filling of a large amount of resource loading information, level off short flow peak of the resource loading information and buffer short-time burst high concurrency. Wherein, the data queue can be Kafka queue, RabbitMQ queue, etc., and the database can be ClickHouse database, MySQL database, etc.
Further, the visual display can be performed according to the resource loading information stored in the database, and the webpage resource loading performance is monitored, so that more detailed webpage resource loading information is obtained. The data visualization end is used for visually displaying the acquired resource loading information, the data visualization end can be built based on Grafana, Grafana serves as a cross-platform and open-source data visualization network application program platform, and after a user configures a connected data source (database), Grafana can display a corresponding data chart and warning information in a network browser. When the resource loading information is checked, the resource loading time consumption and the resource loading success rate corresponding to the resource loading information can be displayed in real time in the Grafana monitoring display system, and the loading time consumption and the loading success rate under different dimensions (such as time dimension and space dimension) are displayed.
Fig. 3 is a schematic flowchart of a process of a web resource providing terminal according to an embodiment of the present application, and as shown in fig. 3, for example, a content auditing device used by a content auditor is used as a resource loading monitoring device provided in this embodiment, an extension plug-in (Chrome extension in the drawing) is installed on a browser (Chrome browser) of the monitoring device, and meanwhile, a monitored web page is specified in a resource loading monitoring device, and the resource loading monitoring device monitors an opening condition of the monitored web page on the browser.
As shown in the communication timing diagram of the browser and the Extension plug-in provided in fig. 4, after the browser opens the monitored web page, the browser initiates a registration event to the Extension plug-in (Chrome Extension in the drawing) to register the monitored web page in the Extension plug-in, and subscribes a web page resource loading event under a specified monitoring domain name in the Extension plug-in of the browser. When the monitored webpage requests webpage resources from a content delivery network (CDN in the figure) based on the specified monitoring domain name, the extension plug-in detects the triggering of a webpage resource loading event, monitors the webpage resource loading event triggered by the monitored webpage and generates resource loading information. And when the content distribution network receives the network resource request of the monitored webpage, returning a resource response to the monitored webpage and issuing corresponding webpage resources to the monitored webpage. After the loading of the webpage resources is completed, the extension plug-in performs loading event completion callback on the monitored webpage and returns resource loading information to the resource loading monitoring device.
Further, after receiving the resource loading information, the resource loading monitoring device sends the resource loading information to a data queue (Kafka queue in fig. 3) of the server, and the data queue is responsible for taking out the resource loading information and inserting the resource loading information into a database (clickwouse database in the figure) for storage. Further, when the resource loading information in the database needs to be visually displayed, the data visualization terminal (Grafana monitoring in the figure) can be used for inquiring the corresponding resource loading information from the database and visually displaying the resource loading information.
The method comprises the steps of subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in installed on a browser, monitoring the webpage resource loading event of the browser through the extension plug-in, generating resource loading information when the extension plug-in monitors the webpage resource loading event of the specified monitoring domain name, sending the resource loading information to a server after acquiring the resource loading information provided by the extension plug-in, storing the resource loading information by the server, analyzing and processing the loading performance of the webpage resource by a worker according to the stored resource loading information to perform targeted optimization on the webpage resource and improve the webpage resource loading performance, monitoring the webpage resource loading event under the specified monitoring domain name through the extension plug-in, and reducing the condition that the maintenance difficulty of a content security auditing system is increased due to invasive modification on a source code of the content security auditing system, excessive source code intrusion on the content security auditing system is not needed, the maintenance workload of the content security auditing system is reduced, and the webpage resource loading monitoring quality is improved. And when the monitored webpage is started, registering the monitored webpage with the extension plug-in, accurately activating monitoring on resource loading conditions, reporting resource loading information according to a set proportion when resource loading time does not reach a set time threshold value, reducing occupation of data on storage space, displaying peak clipping and valley filling of a large amount of resource loading information by using a data queue, clipping short flow peak of the resource loading information, and buffering short-time sudden high concurrency. Meanwhile, the expansion plug-ins can be installed on all auditor browsers using the content security audit background, monitoring of the webpage resource loading performance and the loading success rate of all auditor browsers using the content security audit background is achieved, abnormal conditions are found in time, specific reasons of loading failure can be obtained for resources which are failed to be loaded, the resources which are failed to be loaded are reported to a monitoring system and displayed in real time by a data visualization end, the resource loading conditions are seen by the data visualization end, partial abnormal or slower-loading webpage resources can be analyzed and optimized through webpage addresses, the loading failure reasons and the like in resource loading information.
Fig. 5 is a schematic structural diagram of a resource loading monitoring apparatus according to an embodiment of the present application. Referring to fig. 5, the resource loading monitoring apparatus includes a domain name subscribing module 51, a loading monitoring module 52, and an information saving module 53.
The domain name subscription module 51 is configured to subscribe, in an extension plug-in of a browser, a webpage resource loading event under a specified monitoring domain name; the loading monitoring module 52 is configured to monitor a web resource loading event of the browser through the extension plug-in, and the extension plug-in generates resource loading information when monitoring the web resource loading event of the specified monitoring domain name by the browser; and the information storage module 53 is configured to obtain the resource loading information generated by the extension plug-in, send the resource loading information to the server, and store the resource loading information by the server.
The method comprises the steps of subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in installed on a browser, monitoring the webpage resource loading event of the browser through the extension plug-in, generating resource loading information when the extension plug-in monitors the webpage resource loading event of the specified monitoring domain name, sending the resource loading information to a server after acquiring the resource loading information provided by the extension plug-in, storing the resource loading information by the server, analyzing and processing the loading performance of the webpage resource by a worker according to the stored resource loading information to perform targeted optimization on the webpage resource and improve the webpage resource loading performance, monitoring the webpage resource loading event under the specified monitoring domain name through the extension plug-in, and reducing the condition that the maintenance difficulty of a content security auditing system is increased due to invasive modification on a source code of the content security auditing system, excessive source code intrusion on the content security auditing system is not needed, the maintenance workload of the content security auditing system is reduced, and the webpage resource loading monitoring quality is improved.
The embodiment of the application also provides a resource loading monitoring device, which can integrate the resource loading monitoring device provided by the embodiment of the application. Fig. 6 is a schematic structural diagram of a resource loading monitoring device according to an embodiment of the present application. Referring to fig. 6, the resource load monitoring apparatus includes: an input device 63, an output device 64, a memory 62, and one or more processors 61; a memory 62 for storing one or more programs; when the one or more programs are executed by the one or more processors 61, the one or more processors 61 are caused to implement the resource load monitoring method as provided in the above embodiments. The resource loading monitoring device, the equipment and the computer provided by the above can be used for executing the resource loading monitoring method provided by any of the above embodiments, and have corresponding functions and beneficial effects.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the resource load monitoring method provided in the above embodiments. Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the resource loading monitoring method provided above, and may also perform related operations in the resource loading monitoring method provided in any embodiment of the present application. The resource loading monitoring device, the equipment and the storage medium provided in the above embodiments may execute the resource loading monitoring method provided in any embodiment of the present application, and reference may be made to the resource loading monitoring method provided in any embodiment of the present application without detailed technical details described in the above embodiments.
The foregoing is considered as illustrative only of the preferred embodiments of the invention and the principles of the technology employed. The present application is not limited to the particular embodiments provided herein, and various obvious changes, adaptations and substitutions will now occur to those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (10)

1. A resource loading monitoring method is characterized by comprising the following steps:
subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in of a browser;
monitoring a webpage resource loading event of a browser through the extension plug-in, wherein the extension plug-in generates resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name by the browser;
and acquiring resource loading information generated by the extension plug-in, sending the resource loading information to a server, and storing the resource loading information by the server.
2. The method for monitoring resource loading according to claim 1, wherein before subscribing to the web resource loading event under the specified monitoring domain name in the extension plug-in of the browser, the method further comprises:
in response to the opening of the monitored web page, registering the monitored web page with an extension plug-in.
3. The method for monitoring resource loading according to claim 1, wherein when monitoring a webpage resource loading event of the specified monitoring domain name by the browser, the extension plug-in generates resource loading information according to resource loading time corresponding to the webpage resource loading event.
4. The method for monitoring resource loading according to claim 3, wherein the generating of the resource loading information according to the resource loading time corresponding to the webpage resource loading event includes at least one of:
when the resource loading time corresponding to the webpage resource loading event reaches a set time threshold, reporting resource loading information;
and when the resource loading time consumption corresponding to the webpage resource loading event does not reach a set time threshold, reporting the resource loading information according to a set proportion.
5. The method according to claim 1, wherein the server sends the resource loading information to a preset data queue after receiving the resource loading information, takes out the resource loading information from the data queue, and sends the taken out resource loading information to a preset database.
6. The method of resource load monitoring according to claim 5, further comprising:
the database responds to a resource loading information query request of a data visualization end, and sends resource loading information corresponding to the resource loading information query request to the data visualization end, so that the data visualization end can visually display the acquired resource loading information.
7. The method for monitoring resource loading according to any one of claims 1 to 6, wherein the resource loading information includes one or more combinations of a response status code, a response status header, a web page address responding to a web page resource loading event, a web page resource size, resource loading time consumption, loading result and loading failure reason corresponding to when the browser loads the web page resource of the specified monitoring domain name.
8. The utility model provides a resource loading monitoring devices, its characterized in that includes domain name subscription module, load and monitor module and information storage module, wherein:
the domain name subscription module is used for subscribing a webpage resource loading event under a specified monitoring domain name in an extension plug-in of the browser;
the loading monitoring module is used for monitoring a webpage resource loading event of the browser through the extension plug-in, and the extension plug-in generates resource loading information when monitoring the webpage resource loading event of the specified monitoring domain name by the browser;
the information storage module is used for acquiring the resource loading information generated by the extension plug-in, sending the resource loading information to a server, and storing the resource loading information by the server.
9. A resource loading monitoring device, comprising: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the resource load monitoring method of any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the resource load monitoring method of any one of claims 1-7 when executed by a computer processor.
CN202111582032.3A 2021-12-22 2021-12-22 Resource loading monitoring method, device, equipment and storage medium Pending CN114461485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111582032.3A CN114461485A (en) 2021-12-22 2021-12-22 Resource loading monitoring method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111582032.3A CN114461485A (en) 2021-12-22 2021-12-22 Resource loading monitoring method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114461485A true CN114461485A (en) 2022-05-10

Family

ID=81405453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111582032.3A Pending CN114461485A (en) 2021-12-22 2021-12-22 Resource loading monitoring method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114461485A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168690A (en) * 2022-09-06 2022-10-11 深圳市明源云科技有限公司 Data query method and device based on browser plug-in, electronic equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168690A (en) * 2022-09-06 2022-10-11 深圳市明源云科技有限公司 Data query method and device based on browser plug-in, electronic equipment and medium
CN115168690B (en) * 2022-09-06 2022-12-27 深圳市明源云科技有限公司 Data query method and device based on browser plug-in, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US10410085B2 (en) Monitoring web site content
US20210373936A1 (en) Asynchronous Transactions Reported as Critical Path
CN109739711B (en) Interface test method, device, equipment and storage medium
US9112825B2 (en) Performance monitoring of a media player launched by a web browser
CN107766509B (en) Method and device for static backup of webpage
CN108804445B (en) Thermodynamic diagram generation method and device
CN104426985A (en) Method, device and system for displaying webpage
CN111147310A (en) Log tracking processing method, device, server and medium
WO2020198384A1 (en) Methods and apparatus for census and panel matching using http headers
US9507655B2 (en) Tracking asynchronous entry points for an application
CN114461485A (en) Resource loading monitoring method, device, equipment and storage medium
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN112653736B (en) Parallel source returning method and device and electronic equipment
CN110825603A (en) Page first loading time determining method and device, electronic equipment and storage medium
CN107547502B (en) Information monitoring system, method and device, electronic equipment and storage medium
CN111338928A (en) Chrome-based browser testing method and device
CN114598622A (en) Data monitoring method and device, storage medium and computer equipment
CN115202973A (en) Application running state determining method and device, electronic equipment and medium
CN106533819B (en) Error monitoring method, device and system for online service
CN111756744B (en) H5 user identification method, device, equipment and storage medium
CN114553944A (en) Early warning message pushing method and system
CN114500484A (en) Page rendering method and device, electronic equipment and readable medium
US9858549B2 (en) Business transaction resource usage tracking
US9935856B2 (en) System and method for determining end user timing
CN110955579A (en) Ambari-based large data platform monitoring method

Legal Events

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