CN110795670A - Webpage image monitoring method and device, electronic equipment and readable storage medium - Google Patents

Webpage image monitoring method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110795670A
CN110795670A CN201911032112.4A CN201911032112A CN110795670A CN 110795670 A CN110795670 A CN 110795670A CN 201911032112 A CN201911032112 A CN 201911032112A CN 110795670 A CN110795670 A CN 110795670A
Authority
CN
China
Prior art keywords
image
webpage
query
loaded
query request
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
CN201911032112.4A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911032112.4A priority Critical patent/CN110795670A/en
Publication of CN110795670A publication Critical patent/CN110795670A/en
Priority to PCT/CN2020/107714 priority patent/WO2021082599A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The embodiment of the disclosure provides a method and a device for monitoring a webpage image, electronic equipment and a readable storage medium. The method comprises the following steps: when the completion of the loading of all page resources of a webpage is detected, sending a query request of an image in the webpage; and acquiring a query result of the query request, and determining whether the image is loaded successfully or not based on the query result. According to the scheme, when all page resources of the webpage are loaded, the query request of the image in the webpage is sent, the query result of the query request is obtained, and whether the image is loaded successfully or not is determined based on the query result. Based on the scheme of the embodiment of the disclosure, whether the image is loaded successfully or not is monitored, and data support is provided for analyzing the webpage service quality and improving the webpage service quality based on whether the image is loaded successfully or not.

Description

Webpage image monitoring method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for monitoring a web page image, an electronic device, and a readable storage medium.
Background
With the rapid development of internet technology, more and more information can be acquired by people, and the simple text form information cannot meet the information acquisition requirements of people. The information in the form of images has many advantages such as intuition and strong expressive force, and is more and more favored by people. At present, the proportion of images contained in web pages is higher and higher, which also puts higher requirements on the image service quality of browsers. In the prior art, whether images in a webpage are loaded successfully or not cannot be effectively monitored, and the analysis of the webpage service quality based on whether the images are loaded successfully or not cannot be realized.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides a method for monitoring a web page image, where the method includes:
when the completion of the loading of all page resources of a webpage is detected, sending a query request of an image in the webpage;
and acquiring a query result of the query request, and determining whether the image is loaded successfully or not based on the query result.
In a second aspect, an embodiment of the present disclosure provides a device for monitoring a web page image, where the device includes:
the query request sending module is used for sending a query request of the image in the webpage when detecting that all page resources of the webpage are loaded completely;
and the monitoring module is used for acquiring the query result of the query request and determining whether the image is loaded successfully or not based on the query result.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
a memory for storing a computer program;
a processor for performing the method as shown in the first aspect of the present disclosure by invoking a computer program.
In a fourth aspect, the embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the method shown in the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
according to the scheme provided by the embodiment of the disclosure, when all page resources of the webpage are loaded, the query request of the image in the webpage is sent, the query result of the query request is obtained, and whether the image is loaded successfully is determined based on the query result. Based on the scheme, the information of whether the image is loaded successfully can be acquired by adopting a mode of initiating the image query request, so that whether the image is loaded successfully is monitored, and data support is provided for analyzing the webpage service quality and improving the webpage service quality based on whether the image is loaded successfully.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments of the present disclosure will be briefly described below.
Fig. 1 is a schematic flowchart of a method for monitoring a web page image according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a monitoring apparatus for web page images according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In the prior art, Software Development Kit (SDK) is generally used to monitor whether images in a web page are loaded successfully. In practical use, in order to maintain an original operation mechanism of a service, a service party may put a code corresponding to an SDK for monitoring whether an image is successfully loaded on a body (body) of a HyperText Markup Language (HTML) file of a web page, and since the image is likely to be loaded faster, the SDK for monitoring whether the image is successfully loaded may not be operated when the image loading is completed, and at this time, it is impossible to acquire whether the image of the image which is successfully loaded before the SDK is operated is successfully loaded, which may cause omission of information monitoring, and effective monitoring on whether the image is successfully loaded in the web page cannot be realized.
The embodiment of the present disclosure provides a method and an apparatus for monitoring a web page image, an electronic device, and a computer-readable storage medium, which are intended to solve at least one of the above technical problems in the prior art.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Fig. 1 shows a schematic flowchart of a method for monitoring a web page image according to an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes:
step S110: when the completion of the loading of all page resources of a webpage is detected, sending a query request of an image in the webpage;
step S120: and acquiring a query result of the query request, and determining whether the image is loaded successfully or not based on the query result.
In the embodiment of the present disclosure, taking the browser as an example to load a web page, the page resource may include, but is not limited to, a character, an image resource, a video resource, and the like in the web page.
In the embodiment of the disclosure, the image resources corresponding to the images in the webpage page may be queried by generating a query request, and the query request may carry the identifier of the image, so as to distinguish the images in the webpage page.
In the embodiment of the disclosure, if the image resource of the web page is loaded successfully, the image resource of the web page is cached in the browser cache, and the query result is determined based on the cache content in the browser cache.
When the browser is loaded, when encountering a page resource (taking a picture resource as an example) needing to be acquired, the browser sends an acquisition request of the picture resource to acquire the picture resource, and when the request of the picture resource is successful, the acquired picture resource is cached into a browser cache; and when the picture resource request fails, the picture resource is not stored in the browser cache. Therefore, whether the image is loaded successfully can be determined by sending a query request and querying the image resource in the browser cache. When the image resource corresponding to the image is found in the browser cache, the image can be determined to be loaded successfully; if the image resource corresponding to the image is not found in the browser cache, it may be determined that the image loading fails.
Based on a browser cache mechanism, as the query is carried out in the local cache, the query result can be quickly obtained, a data request to a server through a network is not needed, and the waste of flow can be avoided.
In the embodiment of the disclosure, the query request of the image is sent when the completion of loading of all the images in the webpage is detected, and all the image resources are loaded at the moment, so that the query results of all the query requests can be ensured to be obtained, whether all the images in the webpage are loaded successfully is monitored, and monitoring omission is avoided. In addition, the browser loads each page resource respectively, the page resources take images as an example in the process of loading the page resources, when some images are loaded and other images are not loaded, the image resources corresponding to the images which are not loaded and are not stored in the local cache may occur, and at this time, if the corresponding images are queried in the local cache, the query result is inaccurate, and whether the images are loaded successfully or not cannot be determined effectively.
In the embodiment of the disclosure, if it is detected that some images in the web page fail to be loaded for multiple times, the images can be analyzed to determine the reason causing the loading failure, and corresponding processing is performed to ensure the use experience of the user.
According to the method provided by the embodiment of the disclosure, when all page resources of the webpage are loaded, the query request of the image in the webpage is sent, the query result of the query request is obtained, and whether the image is loaded successfully is determined based on the query result. Based on the scheme, the information of whether the image is loaded successfully can be acquired by adopting a mode of initiating the image query request, so that whether the image is loaded successfully is monitored, and data support is provided for analyzing the webpage service quality and improving the webpage service quality based on whether the image is loaded successfully.
In an alternative form of the disclosed embodiment, the query Request is an extensible markup language hypertext transfer protocol Request (XML HTTP Request).
In practical use, the query Request may be an XML HTTP Request, and the query Request may also carry Request parameters corresponding to attribute information of the image, where the attribute information may include an image type and/or an image size.
In this embodiment of the disclosure, when the query Request is an XML HTTP Request, if the image loading is successful, the method may further include: based on the query result, attribute information of the image is extracted.
Specifically, when the query Request is an XML HTTP Request, the query result is response information of the query instruction. The response header of the response information contains the attribute information of the image, and in actual use, the image attribute information of the image can be extracted from the response header of the response information through a regular expression.
In the embodiment of the disclosure, the image attribute information is monitored, the service quality of the webpage can be better analyzed through the monitored image attribute information, and better data support is provided for improving the service quality of the webpage.
In an optional manner of the embodiment of the present disclosure, the query request further carries file location indication information of the image.
In the embodiment of the present disclosure, a request parameter may also be set in the query request to specify a file location for performing query, for example, when an image imported by a Cascading Style Sheets (CSS) file is queried, the file location may be specified to perform query in a Style sheet (styles Sheets) cached by a browser.
In an optional manner of the embodiment of the present disclosure, the method further includes:
when a load completion (onload) event corresponding to an HTML file of a webpage is detected, determining that all page resources of the webpage are loaded completely.
In the embodiment of the disclosure, after all the page resources of the web page are loaded, the onload event corresponding to the HTML file of the web page is executed, and whether all the page resources of the web page are loaded is determined by detecting the onload event corresponding to the HTML file of the web page.
In an optional manner of the embodiment of the present disclosure, after determining a loading condition of an image, the method further includes:
and sending the information whether the image is loaded successfully to the server.
In the embodiment of the disclosure, after the loading condition of the image is determined, the information of whether the image is successfully loaded can be sent to the server, so that the server can monitor whether the image is successfully loaded in time.
Based on the same principle as the method shown in fig. 1, fig. 2 shows a schematic structural diagram of a monitoring apparatus for web page images provided by an embodiment of the present disclosure, as shown in fig. 2, the monitoring apparatus 20 may include:
a query request sending module 210, configured to send a query request for an image in a web page when it is detected that loading of all page resources of the web page is completed;
and the monitoring module 220 is configured to obtain a query result of the query request, and determine whether the image is successfully loaded based on the query result.
According to the device provided by the embodiment of the disclosure, when all page resources of the webpage are loaded, the query request of the image in the webpage is sent, the query result of the query request is obtained, and whether the image is loaded successfully is determined based on the query result. Based on the scheme, the information of whether the image is loaded successfully can be acquired by adopting a mode of initiating the image query request, so that whether the image is loaded successfully is monitored, and data support is provided for analyzing the webpage service quality and improving the webpage service quality based on whether the image is loaded successfully.
Optionally, the query Request is an XML HTTP Request.
Optionally, the query request further carries a request parameter corresponding to the attribute information of the image;
if the image loading is determined to be successful based on the query result, the monitoring device further comprises:
and the attribute information extraction module is used for extracting the attribute information of the image based on the query result.
Optionally, the query request further carries file location indication information of the image. .
Optionally, if the image resource of the web page is loaded successfully, the image resource of the web page is cached in the browser cache, and the query result is determined based on the cache content in the browser cache.
Optionally, the monitoring device further includes:
and the page loading condition determining module is used for determining that all page resources of the webpage are completely loaded when detecting the onload event corresponding to the HTML file of the webpage.
Optionally, the monitoring module is further configured to: and sending the information whether the image is loaded successfully to the server.
Referring now to fig. 3, shown is a schematic diagram of an electronic device (e.g., a terminal device that performs the method shown in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor herein may be referred to as a processing device 601 shown below, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603 and a storage device 608 shown below, specifically as follows:
as shown in fig. 3, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: when the completion of the loading of all page resources of a webpage is detected, sending a query request of an image in the webpage; and acquiring a query result of the query request, and determining whether the image is loaded successfully or not based on the query result.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. 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.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module or unit does not in some cases constitute a limitation on the unit itself, for example, the monitoring module may also be described as a "module that determines whether an image was successfully loaded based on the query results".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides a method for monitoring a web page image, including:
when the completion of the loading of all page resources of a webpage is detected, sending a query request of an image in the webpage;
and acquiring a query result of the query request, and determining whether the image is loaded successfully or not based on the query result.
According to the method for monitoring the webpage image, the query request is an XML HTTPRequest.
According to the monitoring method of the webpage image, the query request also carries the request parameters corresponding to the attribute information of the image;
if the image loading is determined to be successful based on the query result, the method for monitoring the webpage image further comprises the following steps:
based on the query result, attribute information of the image is extracted.
According to the method for monitoring the webpage image, the query request also carries file position indication information of the image.
According to the monitoring method for the webpage image, provided by the disclosure, if the image resource of the webpage is loaded successfully, the image resource of the webpage is cached in the browser cache, and the query result is determined based on the cache content in the browser cache.
According to the monitoring method of the web page image provided by the present disclosure, the monitoring method further includes:
and when detecting an onload event corresponding to the HTML file of the webpage, determining that all page resources of the webpage are completely loaded.
According to the monitoring method of the web page image provided by the present disclosure, the monitoring method further includes:
and sending the information whether the image is loaded successfully to the server.
According to one or more embodiments of the present disclosure, there is provided a web page image monitoring apparatus including:
the query request sending module is used for sending a query request of the image in the webpage when the fact that all page resources of the webpage are loaded completely is detected, and the query request carries an identifier of the image;
and the monitoring module is used for acquiring the query result of the query request and determining whether the image is loaded successfully or not based on the query result.
According to the monitoring device for the webpage image, the query Request is an extensible markup language hypertext transfer protocol Request XML HTTP Request.
According to the monitoring device for the webpage image, the query request also carries a request parameter corresponding to the attribute information of the image;
if the image loading is determined to be successful based on the query result, the monitoring device further comprises:
and the attribute information extraction module is used for extracting the attribute information of the image based on the query result.
According to the monitoring device for the webpage image, provided by the disclosure, the attribute information comprises an image type and/or an image size.
According to the monitoring device for the webpage image, provided by the disclosure, if the image resource of the webpage is loaded successfully, the image resource of the webpage is cached in the browser cache, and the query result is determined based on the cache content in the browser cache.
According to the monitoring device of the webpage image provided by the present disclosure, the monitoring device further includes:
and the page loading condition determining module is used for determining that all page resources of the webpage are completely loaded when detecting the onload event corresponding to the HTML file of the webpage.
According to the monitoring device of the web page image provided by the present disclosure, the monitoring module is further configured to: and sending the information whether the image is loaded successfully to the server.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for monitoring a web page image is characterized by comprising the following steps:
when the loading completion of all page resources of a webpage is detected, sending a query request of an image in the webpage;
and acquiring a query result of the query request, and determining whether the image is loaded successfully or not based on the query result.
2. The method of claim 1, wherein the query Request is an extensible markup language hypertext transfer protocol Request (XML HTTP Request).
3. The method according to claim 2, wherein the query request further carries a request parameter corresponding to the attribute information of the image;
if it is determined that the image loading is successful based on the query result, the method further comprises:
and extracting attribute information of the image based on the query result.
4. The method according to claim 2, wherein the query request further carries file location indication information of the image.
5. The method according to any one of claims 1 to 4, wherein if the loading of the image resource of the web page is successful, the image resource of the web page is cached in a browser cache, and the query result is determined based on cache contents in the browser cache.
6. The method of any of claims 1 to 4, further comprising:
and when detecting that onload event corresponding to the hypertext markup language (HTML) file of the webpage is loaded, determining that all page resources of the webpage are loaded completely.
7. The method of any of claims 1 to 4, further comprising:
and sending the information whether the image is loaded successfully to a server.
8. A web page image monitoring apparatus, comprising:
the query request sending module is used for sending a query request of an image in a webpage when the fact that all page resources of the webpage are loaded completely is detected, wherein the query request carries an identifier of the image;
and the monitoring module is used for acquiring the query result of the query request and determining whether the image is loaded successfully or not based on the query result.
9. An electronic device comprising a processor and a memory;
the memory for storing a computer program;
the processor configured to execute the method of any one of claims 1-7 by calling the computer program.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1-7.
CN201911032112.4A 2019-10-28 2019-10-28 Webpage image monitoring method and device, electronic equipment and readable storage medium Pending CN110795670A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911032112.4A CN110795670A (en) 2019-10-28 2019-10-28 Webpage image monitoring method and device, electronic equipment and readable storage medium
PCT/CN2020/107714 WO2021082599A1 (en) 2019-10-28 2020-08-07 Wed page image monitoring method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911032112.4A CN110795670A (en) 2019-10-28 2019-10-28 Webpage image monitoring method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN110795670A true CN110795670A (en) 2020-02-14

Family

ID=69441576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911032112.4A Pending CN110795670A (en) 2019-10-28 2019-10-28 Webpage image monitoring method and device, electronic equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN110795670A (en)
WO (1) WO2021082599A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021082599A1 (en) * 2019-10-28 2021-05-06 北京字节跳动网络技术有限公司 Wed page image monitoring method and device, electronic equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120066586A1 (en) * 2010-09-07 2012-03-15 Yaniv Shemesh Systems and methods for accelerating web page loading
CN103593466A (en) * 2013-11-26 2014-02-19 优视科技有限公司 Webpage loading method, client side and server
CN108108089A (en) * 2016-11-24 2018-06-01 中国移动通信有限公司研究院 A kind of picture loading method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951317A (en) * 2014-03-26 2015-09-30 北京奇虎科技有限公司 Image loading device and method
CN103914302B (en) * 2014-04-02 2017-02-15 北京京东尚科信息技术有限公司 Webpage loading progress monitoring method and webpage loading progress monitoring device
CN110795670A (en) * 2019-10-28 2020-02-14 北京字节跳动网络技术有限公司 Webpage image monitoring method and device, electronic equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120066586A1 (en) * 2010-09-07 2012-03-15 Yaniv Shemesh Systems and methods for accelerating web page loading
CN103593466A (en) * 2013-11-26 2014-02-19 优视科技有限公司 Webpage loading method, client side and server
CN108108089A (en) * 2016-11-24 2018-06-01 中国移动通信有限公司研究院 A kind of picture loading method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JACK_MENG: "js判断网页是否加载完毕----包括图片", 《HTTPS://WWW.CNBLOGS.COM/MQ0036/P/6278498.HTML》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021082599A1 (en) * 2019-10-28 2021-05-06 北京字节跳动网络技术有限公司 Wed page image monitoring method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
WO2021082599A1 (en) 2021-05-06

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
US11886798B2 (en) Method and apparatus for obtaining loading time length of image in webpage, and electronic device
CN110647702B (en) Picture preloading method and device, electronic equipment and readable medium
CN111459364B (en) Icon updating method and device and electronic equipment
US20230033164A1 (en) Webpage image monitoring method and apparatus, electronic device, and computer-readable storage medium
CN111597107B (en) Information output method and device and electronic equipment
CN113760536A (en) Data caching method and device, electronic equipment and computer readable medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN112558933A (en) Component rendering method and device, readable medium and electronic equipment
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN110795670A (en) Webpage image monitoring method and device, electronic equipment and readable storage medium
CN112084441A (en) Information retrieval method and device and electronic equipment
CN112732457B (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN111581556B (en) Page data processing method, device, electronic equipment and readable medium
CN111259287B (en) Page content display method and device, electronic equipment and storage medium
CN111444457B (en) Data release method and device, storage medium and electronic equipment
CN113542335A (en) Information sharing method and device, electronic equipment and storage medium
CN113391860A (en) Service request processing method and device, electronic equipment and computer storage medium
CN110730251A (en) Method, device, medium and electronic equipment for analyzing domain name
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN112948108B (en) Request processing method and device and electronic equipment
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.