CN108089856B - Page element monitoring method and device - Google Patents

Page element monitoring method and device Download PDF

Info

Publication number
CN108089856B
CN108089856B CN201611045913.0A CN201611045913A CN108089856B CN 108089856 B CN108089856 B CN 108089856B CN 201611045913 A CN201611045913 A CN 201611045913A CN 108089856 B CN108089856 B CN 108089856B
Authority
CN
China
Prior art keywords
target element
attribute information
monitoring
page
function
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.)
Active
Application number
CN201611045913.0A
Other languages
Chinese (zh)
Other versions
CN108089856A (en
Inventor
娄文康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201611045913.0A priority Critical patent/CN108089856B/en
Publication of CN108089856A publication Critical patent/CN108089856A/en
Application granted granted Critical
Publication of CN108089856B publication Critical patent/CN108089856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • 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)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for monitoring page elements, relates to the technical field of computers, and mainly aims to save CUP (compute unified device architecture) resource occupation. The method comprises the following steps: acquiring attribute information of a target element, wherein a monitoring event trigger function is bound to the target element, judging whether the attribute information of the target element changes or not according to a timing trigger function, the timing trigger function is used for calling a detection function after page buffering corresponding to the target element is finished, and if the attribute information of the target element changes, triggering a monitoring event according to the monitoring event trigger function to monitor the attribute information of the target element. The invention is mainly used for monitoring the page elements.

Description

Page element monitoring method and device
Technical Field
The invention relates to the technical field of computers, in particular to a page element monitoring method and device.
Background
In the process of web front-end development, attributes such as length, width or position of a page element are often modified, and a child element inside the page element does not know that the attribute of a parent element is changed, so that an event needs to be bound to the parent element to monitor the attribute change of the parent element and timely notify the child element of making a corresponding change.
The browser monitors the attribute change of the target element through a local resize event, and triggers the resize event when the browser page changes, so as to further modify the changed attribute value of the target element. However, the resize event can only monitor the attribute change of the browser window object, and when the attribute size of the internal element of the window object is changed and the attribute of the browser window object is not changed, the resize event is not triggered, and the attribute change of the internal element of the window cannot be monitored at this time.
In the prior art, whether attribute information of a target element changes or not can be detected by setting a timer at intervals, and a resize event is triggered if the attribute information of the target element changes, however, in the process of detecting the attribute information of the target element by the timer, because actual requirements usually set the interval time of the timer to be short, the timer can continuously detect the target element, and occupies CPU resources, so that a browser page cannot normally operate, and the animation effect of the browser page is not smooth.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a page element snooping method and apparatus that overcome the above problems or at least partially solve the above problems, and can save cpu resource occupation.
In one aspect, the present invention provides a method for monitoring page elements, including:
acquiring attribute information of a target element, wherein a monitoring event trigger function is bound to the target element;
judging whether the attribute information of the target element changes or not according to a timing trigger function, wherein the timing trigger function is used for calling a detection function after the page corresponding to the target element is buffered;
if the attribute information of the target element changes, triggering a monitoring event according to the monitoring event trigger function, and monitoring the attribute information of the target element.
In another aspect, the present invention provides a device for monitoring page elements, including:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the attribute information of a target element, and a monitoring event trigger function is bound to the target element;
the judging unit is used for judging whether the attribute information of the target element changes or not according to a timing trigger function, and the timing trigger function is used for calling a detection function after the page corresponding to the target element is buffered;
and the monitoring unit is used for triggering a monitoring event according to the monitoring event trigger function if the attribute information of the target element changes, and monitoring the attribute information of the target element.
By means of the technical scheme, the method and the device for monitoring the page elements provided by the invention comprise the steps of firstly obtaining attribute information of a target element, wherein the attribute information of the target element is size information of an internal element of a browser window object, then judging whether the attribute information of the target element changes or not according to a timing trigger function, calling a detection function after page buffering corresponding to the target element is finished, and further triggering a monitoring event for monitoring attribute change of the target element according to the monitoring event trigger function to monitor the attribute information of the target element. The invention ensures that the page can not execute the timing trigger function under the condition of no activated state or no change by using the timing trigger function, compared with the existing method for monitoring the internal elements of the browser window object by a timer, the invention can not continuously detect the target elements, can save the occupation of CPU resources, and realizes the monitoring of the internal elements of the browser window object while ensuring the normal operation of the browser page.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flowchart illustrating a method for monitoring a page element according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating another page element listening method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating a listening apparatus for a page element according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another listening device for page elements according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method for monitoring page elements, which is mainly used for monitoring elements in a browser window object and comprises the following specific steps of:
101. and acquiring attribute information of the target element.
The target element may be an internal element of the browser window object, such as an element of a picture or a text box on a browser page, and the attribute information of the target element is size information of the internal element of the browser window object, such as length, width, and position information of the element.
The embodiment of the invention binds a monitoring event trigger function in the resize event of the target element, and further triggers the resize event to monitor the property change of the target element when the property information of the target element changes, such as the size, alignment and the like of an adaptive window.
The embodiment of the invention does not limit the acquisition of the attribute information of the target element, generally, after the page target element is initialized, the script is deployed on the page corresponding to the target element, and the attribute information of the target element is acquired according to the deployed script.
102. And judging whether the attribute information of the target element changes or not according to the timing trigger function.
The timing trigger function is used for calling the detection function after the page buffer corresponding to the target element is completed, and the timing trigger function may be a window.
The window.requestanimation frame function is an Application Programming Interface (API) of a browser window object, and the function notifies the browser to call a specified function before redrawing a page each time to implement a function corresponding to the specified function.
103. If the attribute information of the target element changes, triggering a monitoring event according to the monitoring event trigger function, and monitoring the attribute information of the target element.
The size of the target element is continuously adjusted in the operation process of the user, so that the attribute information of the target element is changed, new attribute information is generated, and if the change of the attribute information of the target element is detected, a monitoring event needs to be further triggered to monitor the attribute information of the target element, so that the changed attribute information is obtained and stored.
In the prior art, a timer is set to detect whether attribute information of a target element changes at intervals, and then a resize event is triggered, however, the time for detecting the target element is fixed by the timer, whether detection is performed cannot be determined according to the current state of a browser, and when the browser is in a busy state, the target element is still detected ceaselessly, so that a browser page cannot operate normally. The embodiment of the invention executes the timing trigger function in real time when the browser is relatively idle by using the timing trigger function carried by the browser window object, and further calls the detection function to detect whether the attribute information of the target element is changed.
It can be seen from the foregoing implementation manner that, in the method for monitoring a page element provided in the embodiment of the present invention, first, attribute information of a target element is obtained, where the attribute information of the target element is size information of an internal element of a browser window object, and then, whether the attribute information of the target element changes is determined according to a timing trigger function, where the timing trigger function is configured to call a detection function after page buffering corresponding to the target element is completed, and further, trigger a monitoring event for monitoring attribute changes of the target element according to the monitoring event trigger function, so as to monitor the attribute information of the target element. The invention ensures that the page can not execute the timing trigger function under the condition of no activated state or no change by using the timing trigger function, compared with the existing method for monitoring the internal elements of the browser window object by a timer, the invention can not continuously detect the target elements, can save the occupation of CPU resources, and realizes the monitoring of the internal elements of the browser window object while ensuring the normal operation of the browser page.
An embodiment of the present invention further provides another method for monitoring a page element, as shown in fig. 2, the method includes the following specific steps:
201. and acquiring the attribute information of the target element by deploying the script on the page corresponding to the target element.
The script is used to obtain attribute information of a target element, the target element is an internal element of a browser window object, the attribute information may specifically include attributes such as width, height, and pixel of the element, and it should be noted that the target element is bound with a monitoring event trigger function, so that when the browser is idle, the browser triggers a resize event through the monitoring event trigger function, and then monitors the attribute information of the target element.
The default resize event in the function library can only monitor the change of the attribute information of the browser window object, and each window object internal element needing to be monitored cannot be directly monitored by using the resize, so that the change of the attribute information of the window object internal element cannot be timely processed. For the embodiment of the invention, the script is deployed on the browser page, and the attribute information of the target element is further acquired through the script.
202. And calling a detection function according to the timing trigger function after the page corresponding to the target element is buffered.
The detection function is embedded in HTML to achieve obtaining of attribute information of the target element, so that an attribute value corresponding to the current target element is obtained, and the detection function can be further called through a timing trigger function when rendering of a browser is completed or the browser is idle.
For the embodiment of the invention, after the rendering of the browser page is finished, the browser calls the detection function through the timing trigger function, and because the trigger time of the timing trigger function is not set through the preset interval but is automatically started in the idle time of the browser, the CPU resource is not occupied, and the normal operation of the browser is not influenced.
203. And detecting whether the attribute information of the target element changes or not according to the detection function.
For the embodiment of the invention, the coordinate information of the target element in the browser window object can be detected through the detection function, the attribute information of the target element is obtained according to the coordinate information, and whether the attribute information of the target element changes is further detected by comparing whether the coordinate information changes.
For example, for a scroll bar element inside a browser, coordinate values of vertices of the scroll bar element in a window object are obtained through a detection function, position information of the scroll bar element is obtained according to the coordinate values corresponding to the vertices, and whether the position information of the scroll bar element and the position information obtained last time are changed is further detected.
204. If the attribute information of the target element changes, triggering a monitoring event according to the monitoring event triggering function, and acquiring the changed attribute information of the target element according to the monitoring event.
It should be noted that, if the attribute information of the target element changes, corresponding monitoring time needs to be triggered to monitor the attribute information of the target element, and then the changed attribute information of the target element is monitored.
205. And replacing the attribute information of the target element with the changed attribute information of the target element.
In the prior art, resize monitoring time cannot be triggered when the attribute information of an element inside a browser window object changes, and the attribute information of a changed target element cannot be monitored. In the embodiment of the invention, the monitoring of the internal elements of the browser window object is realized through the timing trigger function carried by the browser, so that the changed attribute value of the target element is obtained, and the attribute value of the target element is replaced and stored until the attribute information of the target element is changed again.
The specific steps of the embodiment of the present invention may include, but are not limited to, the following implementation manners: firstly, the script is deployed in a browser page to obtain the size information of the picture in the browser page, the height of the picture is 29cm, the width of the picture is 15cm, and the picture is bound with a resize monitoring event trigger function, then when the user adjusts the size of the picture in the browser page, the page can be rendered again due to the change of the size of the picture, when the page rendering is finished, the self-contained timing trigger function window of the browser is executed, detecting the size information of the picture in the page according to the function call detection function, detecting that the current size information of the picture and the size information at the previous moment are changed, further triggering the resize monitoring time according to the resize monitoring event bound with the picture, monitoring the size information of the picture after the size of the picture is adjusted, obtaining the picture with the height of 40cm and the width of 22cm, and finally replacing the picture size information with the changed size information.
According to the other page element monitoring method provided by the embodiment of the invention, the timing trigger function cannot be executed in the state that the browser page is not activated or the page is not changed, if the target element is changed for multiple times before the browser page is rendered, the timing trigger function is executed after the browser page is rendered, and then the monitoring event is executed to monitor the target element, so that the CPU resource occupation is saved, and the phenomenon of browser jamming cannot occur under the condition that the resource allows.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present invention provides a device for monitoring a page element, where the embodiment of the device corresponds to the foregoing method embodiment, and for convenience of reading, the device does not describe details in the foregoing method embodiment one by one, but it should be clear that the device in this embodiment can correspondingly implement all the contents in the foregoing method embodiment, and as shown in fig. 3, the device includes:
the first obtaining unit 31 may be configured to obtain attribute information of a target element, where the target element is bound with a monitoring event trigger function, and the first obtaining unit 31 is a main function module in the apparatus that obtains the attribute information of the target element, and specifically may obtain the attribute information of the target element by deploying a script on a page corresponding to the target element;
the determining unit 32 may be configured to determine whether the attribute information of the target element changes according to a timing trigger function, where the timing trigger function is used to call a detection function after page buffering corresponding to the target element is completed, and the determining unit 32 is a main function module in the present apparatus that determines whether the attribute information of the target element obtained by the first obtaining unit 31 changes, specifically, detects whether the attribute information of the current target element and the attribute information of the previous target element change by calling the timing trigger function, and further determines whether the attribute information of the target element changes;
the monitoring unit 33 may be configured to trigger a monitoring event according to the monitoring event trigger function if the attribute information of the target element changes, and monitor the attribute information of the target element, where the monitoring unit is a main function module of the apparatus for monitoring the attribute information of the target element, and specifically triggers the monitoring event through a monitoring time trigger function, so as to further implement monitoring of the attribute information of the target element.
The monitoring device for the page element provided by the embodiment of the invention firstly obtains the attribute information of the target element, wherein the attribute information of the target element is the size information of the internal element of the browser window object, then judges whether the attribute information of the target element changes or not according to the timing trigger function, the timing trigger function is used for calling the detection function after the page buffer corresponding to the target element is finished, and further triggers the monitoring event for monitoring the attribute change of the target element according to the monitoring event trigger function to monitor the attribute information of the target element. The invention ensures that the page can not execute the timing trigger function under the condition of no activated state or no change by using the timing trigger function, compared with the existing method for monitoring the internal elements of the browser window object by a timer, the invention can not continuously detect the target elements, can save the occupation of CPU resources, and realizes the monitoring of the internal elements of the browser window object while ensuring the normal operation of the browser page.
Further, as a specific implementation of the method shown in fig. 2, an embodiment of the present invention provides another monitoring apparatus for page elements, where the embodiment of the apparatus corresponds to the embodiment of the method described above, and for convenience of reading, the apparatus does not describe details in the foregoing embodiment of the method one by one, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing embodiment of the method, as shown in fig. 4,
the first obtaining unit 41 may be configured to obtain attribute information of a target element, where the target element is bound with a monitoring event trigger function, and the first obtaining unit 41 is a main function module in the present apparatus that obtains the attribute information of the target element, and specifically may obtain the attribute information of the target element by deploying a script on a page corresponding to the target element;
a determining unit 42, configured to determine whether the attribute information of the target element changes according to a timing trigger function, where the timing trigger function is used to call a detection function after the page buffer corresponding to the target element is completed, where the determining unit 42 is a main function module in the apparatus that determines whether the attribute information of the target element obtained by the first obtaining unit 41 changes, specifically, detects whether the attribute information of the current target element and the attribute information of the previous target element change by calling the timing trigger function, and further determines whether the attribute information of the target element changes;
the monitoring unit 43 may be configured to trigger a monitoring event according to the monitoring event trigger function if the attribute information of the target element changes, and monitor the attribute information of the target element, where the monitoring unit is a main function module in the apparatus for monitoring the attribute information of the target element, and specifically triggers the monitoring event through a monitoring time trigger function, so as to monitor the attribute information of the target element;
a second obtaining unit 44, configured to obtain attribute information of the changed target element according to the monitoring event;
the replacing unit 45 may be configured to replace the attribute information of the target element with the changed attribute information of the target element.
Further, the first obtaining unit 41 may be specifically configured to obtain the attribute information of the target element by deploying a script on a page corresponding to the target element.
Further, the judgment unit 42 includes:
a calling module 421, configured to call a detection function according to the timing trigger function after the page buffer corresponding to the target element is completed;
the detecting module 422 is configured to detect whether the attribute information of the target element changes according to the detection function.
According to the other monitoring device for the page elements, provided by the embodiment of the invention, the timing trigger function cannot be executed in the state that the browser page is not activated or the page is not changed, if the target elements are changed for multiple times before the browser page is rendered, the timing trigger function is executed after the browser page is rendered, and then the monitoring event is executed to monitor the target elements, so that the CPU resource occupation is saved, and the phenomenon of browser jamming cannot occur under the condition that the resources are allowed.
The statement detection device comprises a processor and a memory, wherein the first acquisition unit 31, the judgment unit 32, the monitoring unit 33 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, labor is saved by adjusting kernel parameters, and CUP resource occupation can be saved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device: acquiring attribute information of a target element, wherein a monitoring event trigger function is bound to the target element, judging whether the attribute information of the target element changes or not according to a timing trigger function, the timing trigger function is used for calling a detection function after page buffering corresponding to the target element is finished, and if the attribute information of the target element changes, triggering a monitoring event according to the monitoring event trigger function to monitor the attribute information of the target element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for monitoring page elements is characterized by comprising the following steps:
acquiring attribute information of a target element, wherein the target element is bound with a monitoring event trigger function, and the attribute information of the target element is size information of an internal element of a browser window object;
judging whether the attribute information of the target element changes or not according to a timing trigger function, wherein the timing trigger function is used for calling a detection function after the page corresponding to the target element is buffered, and the detection function is used for detecting whether the attribute information of the target element changes or not;
if the attribute information of the target element changes, triggering a resize monitoring event according to the monitoring event triggering function, and monitoring the attribute information of the target element.
2. The method of claim 1, wherein the obtaining attribute information of the target element comprises:
and acquiring the attribute information of the target element by deploying the script on the page corresponding to the target element.
3. The method of claim 1, wherein the determining whether the attribute information of the target element changes according to the timing trigger function comprises:
after the page corresponding to the target element is buffered, calling a detection function according to the timing trigger function;
and detecting whether the attribute information of the target element changes or not according to the detection function.
4. The method of claim 1, further comprising:
acquiring attribute information of the changed target element according to the resize monitoring event;
and replacing the attribute information of the target element with the changed attribute information of the target element.
5. An apparatus for listening to page elements, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the attribute information of a target element, the target element is bound with a monitoring event trigger function, and the attribute information of the target element is the size information of an internal element of a browser window object;
the judging unit is used for judging whether the attribute information of the target element changes according to a timing trigger function, the timing trigger function is used for calling a detection function after the page buffer corresponding to the target element is finished, and the detection function is used for detecting whether the attribute information of the target element changes;
and the monitoring unit is used for triggering a resize monitoring event according to the monitoring event trigger function if the attribute information of the target element changes, and monitoring the attribute information of the target element.
6. The apparatus of claim 5,
the first obtaining unit is specifically configured to obtain attribute information of a target element by deploying a script on a page corresponding to the target element.
7. The apparatus according to claim 5, wherein the judging unit includes:
the calling module is used for calling a detection function according to the timing trigger function after the page corresponding to the target element is buffered;
and the detection module is used for detecting whether the attribute information of the target element changes according to the detection function.
8. The apparatus of claim 5, further comprising:
a second obtaining unit, configured to obtain attribute information of the changed target element according to the resize monitoring event;
and the replacing unit is used for replacing the attribute information of the target element with the changed attribute information of the target element.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the page element listening method according to any one of claims 1 to 4.
10. A processor, configured to run a program, wherein the program runs to perform the method for listening to a page element according to any one of claims 1 to 4.
CN201611045913.0A 2016-11-22 2016-11-22 Page element monitoring method and device Active CN108089856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611045913.0A CN108089856B (en) 2016-11-22 2016-11-22 Page element monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611045913.0A CN108089856B (en) 2016-11-22 2016-11-22 Page element monitoring method and device

Publications (2)

Publication Number Publication Date
CN108089856A CN108089856A (en) 2018-05-29
CN108089856B true CN108089856B (en) 2021-06-08

Family

ID=62170996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611045913.0A Active CN108089856B (en) 2016-11-22 2016-11-22 Page element monitoring method and device

Country Status (1)

Country Link
CN (1) CN108089856B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032729B (en) * 2018-07-04 2022-08-02 Oppo(重庆)智能科技有限公司 Mobile terminal, method for preventing automatic page refreshing of mobile terminal and storage medium
CN110944231B (en) * 2018-09-21 2022-01-14 北京国双科技有限公司 Monitoring method and device of video player
CN111221697B (en) * 2018-11-23 2024-02-27 阿里巴巴集团控股有限公司 Call monitoring method, operation detection method, device and computing equipment
CN110262948B (en) * 2019-04-26 2023-01-31 创新先进技术有限公司 Page data monitoring method, device and equipment
CN110619102B (en) * 2019-07-08 2022-12-30 苏宁云计算有限公司 Method and device for monitoring page elements
CN110659435A (en) * 2019-08-14 2020-01-07 平安普惠企业管理有限公司 Page data acquisition processing method and device, computer equipment and storage medium
CN110674022B (en) * 2019-09-27 2021-04-27 北京三快在线科技有限公司 Behavior data acquisition method and device and storage medium
CN111159600B (en) * 2019-12-27 2023-07-04 北京达佳互联信息技术有限公司 Information reporting method and device for elements on page, electronic equipment and storage medium
CN111897532A (en) * 2020-07-27 2020-11-06 上海宏路数据技术股份有限公司 Page element monitoring method, electronic device and medium
CN113377634A (en) * 2021-05-25 2021-09-10 北京猿力教育科技有限公司 Monitoring method for backtracking user operation, user operation backtracking method and device
CN113886188A (en) * 2021-10-20 2022-01-04 北京达佳互联信息技术有限公司 Webpage element monitoring method and device, electronic equipment and storage medium
CN114090165A (en) * 2021-11-24 2022-02-25 北京字节跳动网络技术有限公司 Page component display position adjusting method and device, computer equipment and medium
CN117270855B (en) * 2023-11-22 2024-01-30 杭州比智科技有限公司 Method for realizing table height self-adaption based on vue

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9495471B2 (en) * 2008-12-04 2016-11-15 International Business Machines Corporation Optimize view elements sizes to maximize most data viewed in a multiple view elements GUI
CN102096690A (en) * 2009-12-11 2011-06-15 谷歌公司 Utilization of browser space
US9754043B2 (en) * 2010-07-09 2017-09-05 Facebook, Inc. Rendering structured documents with place-markers
CN103095762B (en) * 2011-11-02 2017-05-31 腾讯科技(深圳)有限公司 Web page cross-domain communication method and apparatus
CN102637194B (en) * 2012-02-27 2013-10-02 长春吉大正元信息技术股份有限公司 Trigger method for late binding event of Web page element in BHO (browser helper object)
CN102981844B (en) * 2012-11-13 2016-07-13 北京奇虎科技有限公司 The browser that webpage main body element is processed and method
US9953008B2 (en) * 2013-01-18 2018-04-24 Microsoft Technology Licensing, Llc Grouping fixed format document elements to preserve graphical data semantics after reflow by manipulating a bounding box vertically and horizontally
KR101712592B1 (en) * 2014-02-28 2017-03-06 popIn가부시키가이샤 Program
CN104156488B (en) * 2014-08-29 2017-05-03 小米科技有限责任公司 Webpage change detection method and device

Also Published As

Publication number Publication date
CN108089856A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
CN108089856B (en) Page element monitoring method and device
CN110389842B (en) Dynamic resource allocation method, device, storage medium and equipment
US10783066B2 (en) Application content display at target screen resolutions
CN106919620B (en) Single page processing method and device
CN112579948A (en) Webpage screenshot method and device, storage medium and electronic equipment
CN111277659B (en) Method and device for detecting display state of transverse screen and vertical screen of mobile phone
CN111125575A (en) Webpage data processing method and device
CN106611005B (en) Method and device for setting crawling time interval of crawler
CN109857964B (en) Thermodynamic diagram drawing method and device for page operation, storage medium and processor
CN109284101B (en) Method and device for changing association of object attributes
CN110968385A (en) Proportion display method and device
CN111427637A (en) Page rendering method and device
CN110968377B (en) Interface display processing method and device
CN110968811B (en) Display control method and device
CN106843819B (en) Object serialization method and device
CN112559050A (en) Method and device for processing concurrency number of client asynchronous request information
CN110147183B (en) Data screening method and device
CN108712676B (en) Method and device for automatically playing video based on React framework
CN112527424A (en) Control method and device for popup window
CN104598008A (en) Power consumption control method of Android device
CN106610833B (en) Method and device for triggering overlapped HTML element mouse event
CN110769017A (en) Data request processing method and device, storage medium and processor
CN110968810A (en) Webpage data processing method and device
CN110968373A (en) Page switching implementation method and device, storage medium and processor
CN106610830B (en) Page element drag-and-drop method and device

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: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant