CN111046317A - Page data acquisition method, device, equipment and computer readable storage medium - Google Patents

Page data acquisition method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111046317A
CN111046317A CN201911380775.5A CN201911380775A CN111046317A CN 111046317 A CN111046317 A CN 111046317A CN 201911380775 A CN201911380775 A CN 201911380775A CN 111046317 A CN111046317 A CN 111046317A
Authority
CN
China
Prior art keywords
target element
reporting
dom
data
xpath
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
CN201911380775.5A
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911380775.5A priority Critical patent/CN111046317A/en
Publication of CN111046317A publication Critical patent/CN111046317A/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
    • G06F16/986Document structures and storage, e.g. HTML extensions

Landscapes

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

Abstract

The embodiment of the invention provides a page data acquisition method, a page data acquisition device, page data acquisition equipment and a computer readable storage medium. The method comprises the following steps: acquiring a page configuration file; inquiring XPath of a target element in the page configuration file by an XPath analyzing method of an extensible markup language path language, and positioning the target element in a Document Object Model (DOM) according to the XPath of the target element; and when the target element is monitored to have a preset event through the global monitoring task, reporting preset reporting data to a data acquisition server. The invention locates the target element through XPath, monitors the preset event of the target element through the global monitoring task, and can realize traceless point burying without modifying the service code, thereby solving the problem of invasion of the point burying code to the service code, having small development workload and high maintainability of the service code.

Description

Page data acquisition method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for acquiring page data.
Background
Data embedding is a common data collection method for website analysis. A data sink is a code embedded in a service code for monitoring a target event. The data embedding point is a good privatized data acquisition mode for deployment, the data acquisition is accurate, and the requirement for rapidly optimizing iterative service codes is met.
The current data embedding mode is to embed data in service codes manually. For example: if it is desired to analyze the data related to the page (e.g., page path, page dwell time, browser used, etc.), it is necessary to embed the embedded point code in the service code corresponding to the page.
However, at present, a point-embedding code needs to be added into a service code for data point embedding by manpower, so that the logic of the service code is invaded by the point-embedding code, which causes a great amount of work for data point embedding, and is very easy to make mistakes, and the later service code has high maintenance cost and is time-consuming and labor-consuming to reconstruct.
Disclosure of Invention
The embodiment of the invention aims to provide a page data acquisition method, a page data acquisition device, page data acquisition equipment and a computer-readable storage medium, so as to solve the problem that the logic of a service code is invaded by a buried point code because the buried point code needs to be added into the service code when data is buried by manpower.
The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a page data collecting method, including: acquiring a page configuration file; inquiring XPath of a target element in the page configuration file by an XPath analyzing method of an extensible markup language path language, and positioning the target element in a Document Object Model (DOM) according to the XPath of the target element; and when the target element is monitored to have a preset event through the global monitoring task, reporting preset reporting data to a data acquisition server.
When the target element is monitored to have a preset event through the global monitoring task, reporting preset reporting data to the data acquisition server, wherein the reporting data comprises: and monitoring the preset event at the root node of the DOM in an event proxy mode, and reporting the reported data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored to occur at the root node of the DOM.
Before reporting preset reporting data to the data acquisition server, the method comprises the following steps: acquiring reported data corresponding to the target element in the page configuration file; setting the reported data corresponding to the target element into the attribute of the target element; the reporting of the preset reporting data to the data acquisition server includes: and extracting the reporting data corresponding to the target element from the attribute of the target element, and reporting the reporting data corresponding to the target element to the data acquisition server.
Wherein the method further comprises: monitoring the change of the DOM; and if the DOM is monitored to be changed, the target element is positioned in the changed DOM again according to the XPath of the target element, and the reported data corresponding to the target element is set to the attribute of the target element again.
In a second aspect of the present invention, there is also provided a page data collecting apparatus, including: the acquisition module is used for acquiring the page configuration file; the query module is used for querying the XPath of the target element in the page configuration file by an XPath analyzing method of an extensible markup language path language; the positioning module is used for positioning the target element in a Document Object Model (DOM) according to the XPath of the target element; and the monitoring module is used for reporting preset reporting data to the data acquisition server when the target element is monitored to have a preset event through the global monitoring task.
Wherein, the monitoring module is configured to: and monitoring the preset event at the root node of the DOM in an event proxy mode, and reporting the reported data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored to occur at the root node of the DOM.
Wherein the device further comprises a setting module; the setting module is used for acquiring the reported data corresponding to the target element in the page configuration file; setting the reported data corresponding to the target element into the attribute of the target element; the monitoring module is used for extracting the reporting data corresponding to the target element from the attribute of the target element and reporting the reporting data corresponding to the target element to the data acquisition server.
The monitoring module is further configured to monitor a change of the DOM; the positioning module is further configured to, when the monitoring module monitors that the DOM changes, re-position the target element in the changed DOM according to the XPath of the target element; the setting module is further configured to re-set the report data set corresponding to the target element into the attribute of the target element.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; a memory for storing a computer program; and the processor is used for realizing any one of the page data acquisition methods when executing the program stored in the memory.
In another aspect of the present invention, there is also provided a computer-readable storage medium, having stored therein instructions, which when run on a computer, cause the computer to execute any one of the above-mentioned page data collection methods.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-mentioned page data collection methods.
According to the page data acquisition method, the device, the equipment and the computer readable storage medium provided by the embodiment of the invention, the target element is positioned through XPath, the preset event of the target element is monitored through the global monitoring task, and the traceless embedding can be realized without modifying the service code (the source code of the page), so that the problem of intrusion of the embedding point code to the service code can be solved, the development workload is small, and the maintainability of the service code is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a method for page data collection according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an event bubbling mechanism according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a page data collection method according to an embodiment of the invention;
FIG. 4 is a block diagram of a page data collection apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
The embodiment of the invention provides a page data acquisition method. The execution subject of the present embodiment may be a client. Fig. 1 is a flowchart of a page data collection method according to an embodiment of the invention.
Step S110, acquiring a page configuration file.
After opening a page, a page profile is obtained.
In the page configuration file, the following are included: a plurality of pieces of configuration information. Each piece of configuration information, including but not limited to the following: XPath (Extensible Markup Language Path Language) of an element, reported data corresponding to the element, and annotation of the reported data corresponding to the element.
Elements, including but not limited to: buttons, pictures, links.
XPath of an element refers to an access path of the element in a DOM (Document Object Model). The XPath of an element has uniqueness, that is, the XPath can uniquely represent one element in a page.
And the reporting data corresponding to the elements is used for representing the information of the elements. The reporting data may be a string of characters. The elements correspond to the reported data one by one. After the data acquisition server acquires the reported data reported by the client, the data acquisition server can analyze the elements according to the reported data.
The annotation of the reported data refers to the description information of the reported data. The description information can enable developers to correctly understand the data content of the reported data.
For example: and using rseat to express the reported data corresponding to the element, using tip to express the annotation of the reported data corresponding to the element, and using XPath to express the XPath of the element. The configuration information includes the following information:
{ rseat: "leftmenu _ zmtzy", xpath: "///[ @ id ═ appertry" ]/div [2]/aside/div/ul/li/ul/li [ @ data-route-name ═ wemedediindex "]", tip: "left side menu-from media homepage" };
in the configuration information, rseat: "leftmenu _ zmtzy" is rseat of the piece of configuration information. XPath: "// [ @ id ═ appEntry" ]/div [2]/aside/div/ul/li/ul/li [ @ data-route-name $ webediaIndex "]" is XPath of the piece of configuration information. tip, left menu-from media homepage is the tip of the piece of configuration information.
In this embodiment, the page configuration file may be preset on the page configuration server side or the client side. The page configuration file can be obtained from the page configuration server or the client in an AJAX (Asynchronous JavaScript And Extensible Markup Language or hypertext Markup Language) mode. The obtained page configuration file can be cached locally at the client so as to be convenient for the next use.
Step S120, inquiring the XPath of the target element in the page configuration file through an XPath analyzing method, and positioning the target element in the DOM according to the XPath of the target element.
And the target element refers to an element needing to be monitored in the page.
In this embodiment, the XPath of the target element is queried in the page configuration file, and the target element is located in the DOM corresponding to the opened page according to the XPath of the target element.
Document. Further, after a browser in the client loads a page, the page configuration file is analyzed through a document. The user input information may be the content of the reported data, the comment of the reported data, and/or the XPath input by the user. After finding the XPath of the target element, inquiring whether the target element exists in a DOM (document object model) corresponding to a page according to the XPath of the target element; determining, if the target element exists, that the target element is located in the DOM; and if the target element does not exist, monitoring the change of the DOM, and if the change of the DOM is monitored, positioning the target element in the changed DOM again according to the XPath of the target element.
If the target element does not exist in the DOM corresponding to the current page, the target element does not appear in the DOM (for example, the target element is hidden in a pull-down menu of the page), or the target element does not exist in the current page. Since the DOM is changed when the user operates the page, the change of the DOM is monitored in the process of executing the embodiment; and if the DOM is monitored to be changed, the target element is positioned in the changed DOM again according to the XPath of the target element, and the reported data corresponding to the target element is set to the attribute of the target element again.
Monitoring the change of the DOM, comprising: monitoring the change of the DOM through a native mutationOver method; alternatively, the change to the DOM is monitored by setting Vue the updated hook function in the source code of the page. The mutationobserver method is also called a change observer, and is an interface for monitoring DOM changes. Vue is based on MVVM (Model-View-View-Model) framework. When the page is updated with data, the updated hook function of Vue is triggered so that the updated hook function of Vue can be used to listen for DOM changes. After a native mutationoverlay method or an updated hook function of Vue monitors that a DOM has changed, a DOM change notification is sent out, after the DOM change notification is received, the target element is positioned in the changed DOM again according to the XPath of the target element, and reported data corresponding to the target element is set into the attribute of the target element again.
Step S130, reporting preset reporting data to a data acquisition server when the target element is monitored to have a preset event by the global monitoring task.
And setting a global monitoring task for the DOM, and reporting preset reported data to a data acquisition server if the occurrence of a preset event of the target element is monitored through the global monitoring task.
Preset events, including but not limited to: click events (Click events). For example: after clicking a button (target element) in a page, a user reports the report data corresponding to the button to a data acquisition server.
In the embodiment of the present invention, the preset event may be monitored at the root node of the DOM in an event proxy manner, and if the preset event occurs in the target element, the report data corresponding to the target element is reported to a data acquisition server.
Specifically, in the DOM, the preset event is bound for a root node, and the reported data is set for the target element under the root node; monitoring the preset event in an event agent mode, and reporting the report data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored to occur at the root node.
Setting the reported data for the target element under the root node, including: acquiring reported data corresponding to the target element from the page configuration file; and setting the reported data corresponding to the target element into the attribute of the target element. The reporting data may be set for the target element under the root node by a setattenbute method. The reported data is used as a parameter of the setAttribute method, the reported data is set to the attribute of the target element, and the reported data is used as the attribute value of the attribute. An attribute for setting the reporting data may be specified among the plurality of attributes of the target element. For example: and appointing the rseat attribute of the target element as an attribute for setting the reported data, namely setting the reported data into the rseat attribute of the target element.
Reporting the reported data to a data acquisition server, comprising: and extracting reporting data correspondingly set for the target element from the attribute of the target element, and reporting the reporting data correspondingly set for the target element to the data acquisition server. Further, the report data set for the target element is acquired by a getAttribute method, and the report data is reported to the data acquisition server by an AJAX method. And extracting the report data set for the target element from the attribute of the target element by a getAttribute method. And taking the attribute of the target element as a parameter of the getAttribute method, and acquiring an attribute value from the attribute of the target element, wherein the attribute value is the report data corresponding to the target element.
The event agent is to bind a preset event to be bound to a child element (target element) to a parent element (root node) by using an event bubble mechanism of a browser, and monitor the preset event generated by the child element on the parent element.
Fig. 2 is a schematic diagram of the mechanism of event bubbling. After the target element generates the preset event, the preset event is transmitted layer by layer in the direction of the root node from a → p → li → ul → body → html → document (root node), and the root node can monitor that the target element generates the preset event. Here, document is a file object, which is not shown in fig. 2.
In this embodiment, reporting data may be set for each of the plurality of target elements, and a preset event may be bound to the root node; monitoring a preset event at a root node through an event agent, and acquiring a target attribute of the preset event when the occurrence of the preset event is monitored at the root node; and determining the target element of the preset event according to the target attribute. Since the target attribute contains information of the target element where the preset event occurs, the target element reporting the preset event can be determined according to the target attribute.
After reporting the reported data to the data collection server, the data collection server may analyze the page and/or the target element according to the reported data.
The embodiment of the invention locates the target element through XPath, monitors the preset event of the target element through the global monitoring task, and can realize traceless point burying without modifying the service code (the source code of the page), thereby solving the problem of invasion of the point burying code to the service code, having small development workload and high maintainability of the service code. Furthermore, the embodiment of the invention can uniquely express the property of one element in the page based on XPath, can dynamically configure the target element needing to be embedded and the reported data needing to be reported, and can take effect in real time, and does not need to change the service code through an event proxy mode, thereby achieving the effect of embedding the point without trace.
For example: fig. 3 is a schematic diagram of a page data acquisition method according to an embodiment of the invention. After a page is opened in a browser of a client, fig. 3 includes two parts of processing, a first part is buried point configuration processing, and a second part is buried point reporting processing. The buried point configuration processing comprises the following steps: acquiring a page configuration file from a page configuration server, and analyzing the page configuration file; configure the DOM of the page, namely: inquiring XPath of the target element in the page configuration file; and positioning the target element in the DOM according to the XPath of the target element, binding a Click event for a root node in the DOM, and setting report data for the target element. The buried point reporting processing comprises the following steps: and the user clicks in the opened page, if the clicked target element is detected, the event agent monitors that the Click event occurs to the target element in the root node, and reports the reported data corresponding to the target element to the data acquisition server.
In the embodiment of the invention, the page data acquisition method of the embodiment of the invention is executed once each page is opened. Because different pages can share one page configuration file, the acquired page configuration file can be stored in one execution process, and the page configuration file is prevented from being acquired every time one page is opened.
The embodiment of the invention also provides a page data acquisition device. Fig. 4 is a structural diagram of a page data acquisition device according to an embodiment of the invention.
This page data acquisition device includes: an acquisition module 410, a query module 420, a location module 430, and a listening module 440.
An obtaining module 410, configured to obtain the page configuration file.
And the query module 420 is configured to query an XPath of the target element in the page configuration file through an XPath parsing method of an extensible markup language path language.
And the positioning module 430 is configured to position the target element in the document object model DOM according to the XPath of the target element.
The monitoring module 440 is configured to report preset report data to the data acquisition server when the target element is monitored to have a preset event through the global monitoring task.
The monitoring module 440 is configured to monitor the preset event at the root node of the DOM in an event agent manner, and report the report data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored at the root node of the DOM.
Wherein the device further comprises a setting module (not shown in the figures). The setting module is used for acquiring the reported data corresponding to the target element in the page configuration file; setting the reported data corresponding to the target element into the attribute of the target element; the monitoring module 440 is configured to extract the reporting data corresponding to the target element from the attribute of the target element, and report the reporting data corresponding to the target element to the data collection server.
The monitoring module 440 is further configured to monitor a change of the DOM; the positioning module 430 is further configured to, when the monitoring module monitors that the DOM changes, re-position the target element in the changed DOM according to an XPath of the target element; the setting module is further configured to re-set the report data set corresponding to the target element into the attribute of the target element.
The functions of the apparatus according to the embodiments of the present invention have been described in the above method embodiments, so that reference may be made to the related descriptions in the foregoing embodiments for details which are not described in the present embodiment, and further details are not described herein.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 510, a communication interface 520, a memory 530 and a communication bus 540, where the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540.
A memory 530 for storing a computer program.
The processor 510, when executing the program stored in the memory 530, implements the following steps: acquiring a page configuration file; inquiring XPath of a target element in the page configuration file by an XPath analyzing method of an extensible markup language path language, and positioning the target element in a Document Object Model (DOM) according to the XPath of the target element; and when the target element is monitored to have a preset event through the global monitoring task, reporting preset reporting data to a data acquisition server.
When the target element is monitored to have a preset event through the global monitoring task, reporting preset reporting data to the data acquisition server, wherein the reporting data comprises: and monitoring the preset event at the root node of the DOM in an event proxy mode, and reporting the reported data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored to occur at the root node of the DOM.
Before reporting preset reporting data to the data acquisition server, the method comprises the following steps: acquiring reported data corresponding to the target element in the page configuration file; setting the reported data corresponding to the target element into the attribute of the target element; the reporting of the preset reporting data to the data acquisition server includes: and extracting the reporting data corresponding to the target element from the attribute of the target element, and reporting the reporting data corresponding to the target element to the data acquisition server.
Wherein the method further comprises: monitoring the change of the DOM; and if the DOM is monitored to be changed, the target element is positioned in the changed DOM again according to the XPath of the target element, and the reported data corresponding to the target element is set to the attribute of the target element again.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the computer is enabled to execute the page data collection method in any one of the above embodiments.
In another embodiment of the present invention, a computer program product containing instructions is provided, which when run on a computer, causes the computer to execute the page data collection method of any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A page data acquisition method is characterized by comprising the following steps:
acquiring a page configuration file;
inquiring XPath of a target element in the page configuration file by an XPath analyzing method of an extensible markup language path language, and positioning the target element in a Document Object Model (DOM) according to the XPath of the target element;
and when the target element is monitored to have a preset event through the global monitoring task, reporting preset reporting data to a data acquisition server.
2. The method of claim 1, wherein reporting preset reporting data to a data collection server when a preset event occurs to the target element is monitored by a global monitoring task, the method comprising:
and monitoring the preset event at the root node of the DOM in an event proxy mode, and reporting the reported data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored to occur at the root node of the DOM.
3. The method according to claim 1 or 2,
before reporting the preset report data to the data acquisition server, the method comprises the following steps:
acquiring reported data corresponding to the target element from the page configuration file;
setting the reported data corresponding to the target element into the attribute of the target element;
the reporting of the preset reporting data to the data acquisition server includes:
and extracting the reporting data corresponding to the target element from the attribute of the target element, and reporting the reporting data corresponding to the target element to the data acquisition server.
4. The method of claim 3, further comprising:
monitoring the change of the DOM;
and if the DOM is monitored to be changed, the target element is positioned in the changed DOM again according to the XPath of the target element, and the reported data corresponding to the target element is set to the attribute of the target element again.
5. A page data acquisition device, comprising:
the acquisition module is used for acquiring the page configuration file;
the query module is used for querying the XPath of the target element in the page configuration file by an XPath analyzing method of an extensible markup language path language;
the positioning module is used for positioning the target element in a Document Object Model (DOM) according to the XPath of the target element;
and the monitoring module is used for reporting preset reporting data to the data acquisition server when the target element is monitored to have a preset event through the global monitoring task.
6. The apparatus of claim 5, wherein the listening module is configured to:
and monitoring the preset event at the root node of the DOM in an event proxy mode, and reporting the reported data corresponding to the target element to a data acquisition server if the preset event of the target element is monitored to occur at the root node of the DOM.
7. The apparatus of claim 5 or 6, further comprising a setup module;
the setting module is used for acquiring the reported data corresponding to the target element in the page configuration file; setting the reported data corresponding to the target element into the attribute of the target element;
the monitoring module is used for extracting the reporting data corresponding to the target element from the attribute of the target element and reporting the reporting data corresponding to the target element to the data acquisition server.
8. The apparatus of claim 7,
the monitoring module is also used for monitoring the change of the DOM;
the positioning module is further configured to, when the monitoring module monitors that the DOM changes, re-position the target element in the changed DOM according to the XPath of the target element;
the setting module is further configured to re-set the report data set corresponding to the target element into the attribute of the target element.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN201911380775.5A 2019-12-27 2019-12-27 Page data acquisition method, device, equipment and computer readable storage medium Pending CN111046317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911380775.5A CN111046317A (en) 2019-12-27 2019-12-27 Page data acquisition method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911380775.5A CN111046317A (en) 2019-12-27 2019-12-27 Page data acquisition method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111046317A true CN111046317A (en) 2020-04-21

Family

ID=70240809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911380775.5A Pending CN111046317A (en) 2019-12-27 2019-12-27 Page data acquisition method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111046317A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523074A (en) * 2020-04-26 2020-08-11 成都思维世纪科技有限责任公司 Acquisition system for dynamic page sensitive data of front-end rendering website
CN111767111A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Page data processing method and device, electronic equipment and storage medium
CN112051985A (en) * 2020-07-23 2020-12-08 北京奇艺世纪科技有限公司 Event triggering method and device, electronic equipment and readable storage medium
CN112199024A (en) * 2020-09-15 2021-01-08 汉海信息技术(上海)有限公司 Method and device for responding to user operation, electronic equipment and readable storage medium
CN112463519A (en) * 2020-11-05 2021-03-09 广州博恒信息科技有限责任公司 Flatter-based page use behavior data non-buried point statistical method, equipment and storage medium
CN112905922A (en) * 2021-01-26 2021-06-04 北京达佳互联信息技术有限公司 Page loading method and device, electronic equipment, storage medium and program product
CN112905388A (en) * 2021-03-15 2021-06-04 杭州迪普科技股份有限公司 Page configuration information processing method and device
CN113177168A (en) * 2021-04-29 2021-07-27 上海云扩信息科技有限公司 Positioning method based on Web element attribute characteristics
CN113568621A (en) * 2021-07-30 2021-10-29 北京达佳互联信息技术有限公司 Data processing method and device for page embedded point
CN113626028A (en) * 2020-05-07 2021-11-09 腾讯科技(深圳)有限公司 Page element mapping method and device
CN113626158A (en) * 2021-08-13 2021-11-09 中国工商银行股份有限公司 Event agent-based embedded point execution method and device
CN113741776A (en) * 2021-08-30 2021-12-03 深圳壹账通智能科技有限公司 Display control method, device, medium and equipment for functional component
CN113742161A (en) * 2020-09-07 2021-12-03 北京沃东天骏信息技术有限公司 Buried point reporting method and device
CN113761310A (en) * 2020-07-07 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for collecting click data
CN115033825A (en) * 2022-06-21 2022-09-09 北京达佳互联信息技术有限公司 Page data processing method, device, equipment and medium
CN115242799A (en) * 2022-07-21 2022-10-25 中国建设银行股份有限公司 Data reporting method, device, equipment, storage medium and program product
CN116931897A (en) * 2023-09-15 2023-10-24 北京市大数据中心 Data reporting method, device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300056A1 (en) * 2008-05-29 2009-12-03 Rong Yao Fu System and method for adaptively locating dynamic web page elements
CN103365859A (en) * 2012-03-28 2013-10-23 上海商派网络科技有限公司 Method for processing network mouse clicking events
CN104050266A (en) * 2014-06-20 2014-09-17 小米科技有限责任公司 Recording method and device for user behaviors and webpage browser
CN106897347A (en) * 2016-08-15 2017-06-27 阿里巴巴集团控股有限公司 A kind of web page display method, Action Events recording method and device
CN107633019A (en) * 2017-08-24 2018-01-26 阿里巴巴集团控股有限公司 A kind of page events acquisition method and device
CN108846116A (en) * 2018-06-26 2018-11-20 北京京东金融科技控股有限公司 Page Impression collecting method, system, electronic equipment and storage medium
CN110059282A (en) * 2019-04-23 2019-07-26 北京奇艺世纪科技有限公司 A kind of acquisition methods and system of interactive class data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300056A1 (en) * 2008-05-29 2009-12-03 Rong Yao Fu System and method for adaptively locating dynamic web page elements
CN103365859A (en) * 2012-03-28 2013-10-23 上海商派网络科技有限公司 Method for processing network mouse clicking events
CN104050266A (en) * 2014-06-20 2014-09-17 小米科技有限责任公司 Recording method and device for user behaviors and webpage browser
CN106897347A (en) * 2016-08-15 2017-06-27 阿里巴巴集团控股有限公司 A kind of web page display method, Action Events recording method and device
CN107633019A (en) * 2017-08-24 2018-01-26 阿里巴巴集团控股有限公司 A kind of page events acquisition method and device
CN108846116A (en) * 2018-06-26 2018-11-20 北京京东金融科技控股有限公司 Page Impression collecting method, system, electronic equipment and storage medium
CN110059282A (en) * 2019-04-23 2019-07-26 北京奇艺世纪科技有限公司 A kind of acquisition methods and system of interactive class data

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523074A (en) * 2020-04-26 2020-08-11 成都思维世纪科技有限责任公司 Acquisition system for dynamic page sensitive data of front-end rendering website
CN113626028A (en) * 2020-05-07 2021-11-09 腾讯科技(深圳)有限公司 Page element mapping method and device
CN111767111A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Page data processing method and device, electronic equipment and storage medium
CN113761310A (en) * 2020-07-07 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for collecting click data
CN112051985A (en) * 2020-07-23 2020-12-08 北京奇艺世纪科技有限公司 Event triggering method and device, electronic equipment and readable storage medium
CN112051985B (en) * 2020-07-23 2023-07-25 北京奇艺世纪科技有限公司 Event triggering method, device, electronic equipment and readable storage medium
CN113742161A (en) * 2020-09-07 2021-12-03 北京沃东天骏信息技术有限公司 Buried point reporting method and device
CN112199024A (en) * 2020-09-15 2021-01-08 汉海信息技术(上海)有限公司 Method and device for responding to user operation, electronic equipment and readable storage medium
CN112463519A (en) * 2020-11-05 2021-03-09 广州博恒信息科技有限责任公司 Flatter-based page use behavior data non-buried point statistical method, equipment and storage medium
CN112905922A (en) * 2021-01-26 2021-06-04 北京达佳互联信息技术有限公司 Page loading method and device, electronic equipment, storage medium and program product
CN112905388A (en) * 2021-03-15 2021-06-04 杭州迪普科技股份有限公司 Page configuration information processing method and device
CN112905388B (en) * 2021-03-15 2023-12-15 杭州迪普科技股份有限公司 Page configuration information processing method and device
CN113177168A (en) * 2021-04-29 2021-07-27 上海云扩信息科技有限公司 Positioning method based on Web element attribute characteristics
CN113177168B (en) * 2021-04-29 2023-12-01 上海云扩信息科技有限公司 Positioning method based on Web element attribute characteristics
CN113568621A (en) * 2021-07-30 2021-10-29 北京达佳互联信息技术有限公司 Data processing method and device for page embedded point
CN113626158A (en) * 2021-08-13 2021-11-09 中国工商银行股份有限公司 Event agent-based embedded point execution method and device
CN113741776A (en) * 2021-08-30 2021-12-03 深圳壹账通智能科技有限公司 Display control method, device, medium and equipment for functional component
CN115033825A (en) * 2022-06-21 2022-09-09 北京达佳互联信息技术有限公司 Page data processing method, device, equipment and medium
CN115242799A (en) * 2022-07-21 2022-10-25 中国建设银行股份有限公司 Data reporting method, device, equipment, storage medium and program product
CN115242799B (en) * 2022-07-21 2024-04-26 中国建设银行股份有限公司 Data reporting method, device, equipment, storage medium and program product
CN116931897A (en) * 2023-09-15 2023-10-24 北京市大数据中心 Data reporting method, device and storage medium

Similar Documents

Publication Publication Date Title
CN111046317A (en) Page data acquisition method, device, equipment and computer readable storage medium
CN107562620B (en) Automatic buried point setting method and device
CN108304498B (en) Webpage data acquisition method and device, computer equipment and storage medium
US8196048B2 (en) Associating website clicks with links on a web page
CN109739717B (en) Page data acquisition method and device and server
CN107515865B (en) Page data click rate statistical method and device
US8640037B2 (en) Graphical overlay related to data mining and analytics
CN110263070B (en) Event reporting method and device
US8909765B2 (en) Analyzing webpage users' web access actions by using a defined focal region
CN109829121B (en) Method and device for reporting click behavior data
WO2004079551A2 (en) Associating website clicks with links on a web page
CN112486708B (en) Page operation data processing method and processing system
US12079298B2 (en) Methods and systems for browser extension used to generate relative XPath, absolute XPath and/or CSS selectors
US20200225927A1 (en) Methods and systems for automating computer application tasks using application guides, markups and computer vision
CN109522191A (en) A kind of method and device of the attribute information of acquisition interbehavior instruction
CN113535587A (en) Target application detection method and device and computer equipment
CN109240664A (en) A kind of method and terminal acquiring user behavior information
US20160034378A1 (en) Method and system for testing page link addresses
US20150066965A1 (en) Data processing, data collection
CN109862074B (en) Data acquisition method and device, readable medium and electronic equipment
JP6763433B2 (en) Information gathering system, information gathering method, and program
CN113722191B (en) Page monitoring method, device, equipment and computer readable storage medium
KR100503776B1 (en) Method for analyzing and tuning web application performance
CN113515715B (en) Buried point event code generation method, buried point event code processing method and related equipment
CN112559278B (en) Method and device for acquiring operation data

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