Data acquisition method and device, medium and electronic equipment

By marking data and marking web page elements and saving them in the target format, the problem of poor user preference display in the existing technology is solved, precise data crawling and personalized display are realized, and user experience is improved.

CN120561391APending Publication Date: 2025-08-29BEIJING CHUANGYING ORIENTAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510437943.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

The existing data acquisition methods cannot be personalized according to user preferences, and the acquisition size is coarse, resulting in poor user experience.

Method used

By obtaining page elements and tagged data of web pages, marking page elements with tagged data, and saving and responding to collection events in the target format, including exposure and interaction events, realizing accurate data capture and customized display.

Benefits of technology

It realizes data tracking and statistics in different placements, refines the granularity of data collection, and optimizes the user's experience on the web page.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561391A_ABST
    Figure CN120561391A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing, and relates to a data acquisition method and device, a medium and electronic equipment. The method comprises the following steps: acquiring page elements of a currently opened web page and mark data corresponding to the web page, and marking the corresponding page elements by utilizing the mark data; storing the page elements according to a target format, wherein the target format comprises a page identifier and an element format of the webpage; and in response to a collection event acting on the webpage, sending collection data of the page element according to a target format or the marked data. Even if the same data is in different display positions, due to the fact that the marked data are consistent, the data can be conveniently displayed and counted, and the purpose of data tracking is achieved. And meanwhile, accurate data capture can be performed according to the marked data during data acquisition, more client data can be carried, the granularity of data acquisition is refined, customized display can be performed according to user preferences, and the use experience of a user on a webpage is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular, to a data acquisition method, a data acquisition device, a non-transitory computer-readable storage medium, and an electronic device. Background Art

[0002] At present, the website pages displayed to users all make relevant recommendations and layout displays based on user preferences. The displayed content will have certain deviations based on user characteristics. In addition, collecting user data on website pages is a common practice for many websites and services, which helps to provide personalized user experience and improve services.

[0003] In the past, data collection methods relied on all users seeing the same page and the same data content, so only behavioral data collection was required. However, with users now seeing different content, this approach is clearly no longer applicable. Furthermore, the granularity of data collection in the past was very coarse, requiring a completely fixed page position, and preventing user preferences from being displayed, resulting in a poor user experience. Summary of the Invention

[0004] To overcome the problems existing in the related art, the present disclosure provides a data acquisition method, a data acquisition device, a non-transitory computer-readable storage medium, and an electronic device.

[0005] According to a first aspect of an embodiment of the present disclosure, a data collection method is provided, the method comprising: Obtaining page elements of a currently opened web page and tag data corresponding to the web page, and marking the corresponding page elements using the tag data; Saving the page elements in a target format, wherein the target format includes a page identifier and an element format of the web page; In response to a collection event acting on the web page, the collected data of the page element is sent according to the target format or the markup data.

[0006] Optionally, before obtaining the page elements of the currently opened web page and the markup data corresponding to the web page, the method further includes: Sending a target request to a server, so that the server generates downlink data according to the target request, wherein the downlink data includes the marking data; Obtain the data sent by the server and render the currently opened web page according to the data sent.

[0007] Optionally, the element format includes one or more of: page, module, element, behavior and result, and the element formats are connected by preset symbols.

[0008] Optionally, the acquisition event includes an exposure event, and the acquisition data includes exposure data; The step of responding to a collection event acting on the webpage and sending the collected data of the page element according to the target format or the markup data includes: In response to the exposure event acting on the webpage, exposure data of the page element is generated according to the target format, and the exposure data is sent.

[0009] Optionally, the collected events include interaction events, and the collected data include interaction data; The step of responding to a collection event acting on the webpage and sending the collected data of the page element according to the target format or the markup data includes: In response to the interaction event acting on the webpage, capturing the page element affected by the interaction event; When it is detected that the page element is marked by the marking data and is not empty, the interaction data of the page element is generated and sent.

[0010] Optionally, after capturing the page element affected by the interaction event, the method further includes: When it is detected that the page element is not marked by the marking data, generating interaction data of the page element and sending the interaction data by using a buffer queue; or When it is detected that the page element is marked by the marking data but is empty, interactive data of the page element is generated and the interactive data is sent using a buffer queue.

[0011] Optionally, the interaction event includes: a scrolling event, a hovering event, a click event, a switching event, a login event, a crawler event, an authentication event, and a terminal location event.

[0012] According to a second aspect of an embodiment of the present disclosure, there is provided a data acquisition device, comprising: An element marking module is configured to obtain page elements of a currently opened web page and marking data corresponding to the web page, and mark the corresponding page elements using the marking data; An element saving module is configured to save the page element in a target format, wherein the target format includes a page identifier and an element format of the web page; The data collection module is configured to respond to a collection event acting on the web page and send the collected data of the page elements according to the target format or the markup data.

[0013] Optionally, the data acquisition device is further configured to: Sending a target request to a server, so that the server generates downlink data according to the target request, wherein the downlink data includes the marking data; Obtain the data sent by the server and render the currently opened web page according to the data sent.

[0014] Optionally, the element format includes: page, module, element, behavior and result.

[0015] Optionally, the acquisition event includes an exposure event, and the acquisition data includes exposure data; The data acquisition module is configured as follows: In response to the exposure event acting on the webpage, exposure data of the page element is generated according to the target format, and the exposure data is sent.

[0016] Optionally, the collected events include interaction events, and the collected data include interaction data; The data acquisition module is configured as follows: In response to the interaction event acting on the webpage, capturing the page element affected by the interaction event; When it is detected that the page element is marked by the marking data and is not empty, the interaction data of the page element is generated and sent.

[0017] Optionally, the data acquisition device is further configured to: When it is detected that the page element is not marked by the marking data, generating interaction data of the page element and sending the interaction data by using a buffer queue; or When it is detected that the page element is marked by the marking data but is empty, interactive data of the page element is generated and the interactive data is sent using a buffer queue.

[0018] Optionally, the interaction event includes: a scroll event, a hover event, a click event and a switch event.

[0019] According to a third aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of any one of the methods described in the first aspect of the present disclosure are implemented.

[0020] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the executable instructions to implement the steps of any one of the methods described in the first aspect of the present disclosure.

[0021] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects: In the methods and devices provided by the exemplary embodiments of the present disclosure, page elements are tagged with tag data. Even if the same data is displayed in different locations, the consistent tag data facilitates display and statistics, achieving the purpose of data tracking. Furthermore, saving page elements in the target format not only allows for accurate data capture based on the tag data during data collection, but also enables the inclusion of more client data, refining the granularity of data collection. It also enables customized display based on user preferences, optimizing the user experience on web pages.

[0022] Other features and advantages of the present disclosure will be described in detail in the following detailed description.

[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings: Figure 1 The following schematically shows a flow chart of a data collection method in an exemplary embodiment of the present disclosure; Figure 2 The following schematically shows a flow chart of a method for rendering a web page in an exemplary embodiment of the present disclosure; Figure 3 The following schematically shows a flow chart of a method for data collection in an exemplary embodiment of the present disclosure; Figure 4 The following schematically shows a flow chart of another data collection method in an exemplary embodiment of the present disclosure; Figure 5 The following schematically shows a structural diagram of a data acquisition device in an exemplary embodiment of the present disclosure; Figure 6 Schematically illustrates an electronic device for implementing a data collection method in an exemplary embodiment of the present disclosure; Figure 7 Another electronic device for implementing a data collection method in an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0026] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0027] At present, the website pages displayed to users all make relevant recommendations and layout displays based on user preferences. The displayed content will have certain deviations based on user characteristics. In addition, collecting user data on website pages is a common practice for many websites and services, which helps to provide personalized user experience and improve services.

[0028] In the past, data collection methods relied on all users seeing the same page and the same data content, so only behavioral data collection was sufficient. However, now that users see different content, it is necessary to collect not only the content they see, but also the elements they interact with. This is because even the same elements and the same data can appear in different locations, and the old approach is clearly no longer applicable.

[0029] Specifically, the current collection granularity is almost reaching the smallest visible elements of different types, such as links, pictures, icons, etc., especially when repeated advertising pictures appear in different locations, so it is necessary to collect the interactive behaviors of the same elements in different locations.

[0030] At the same time, the data collection methods in the past had a very coarse granularity, requiring the page to be completely fixed in position, and unable to display user preferences, resulting in a poor user experience.

[0031] The present disclosure provides a data collection method. Figure 1 is a flow chart of a data collection method according to an exemplary embodiment. Figure 1 As shown, the method may include at least the following steps: Step S110 . Obtain page elements of the currently opened web page and tag data corresponding to the web page, and use the tag data to tag the corresponding page elements.

[0032] Step S120. Save the page elements according to the target format, where the target format includes the page identifier and element format of the web page.

[0033] Step S130: In response to a collection event acting on a web page, the collected data of the page elements is sent according to the target format or markup data.

[0034] In the exemplary embodiments of the present disclosure, page elements are tagged with tag data. Even if the same data is displayed in different locations, the consistent tag data facilitates display and statistics, achieving data tracking. Furthermore, saving page elements in the target format not only allows for accurate data capture based on the tag data during data collection, but also allows for the inclusion of more client data, refining the granularity of data collection. It also enables customized display based on user preferences, optimizing the user experience on the web page.

[0035] The following is a detailed description of each step of the data collection method.

[0036] In step S110 , the page elements of the currently opened web page and the markup data corresponding to the web page are obtained, and the corresponding page elements are marked with the markup data.

[0037] In an exemplary embodiment of the present disclosure, before obtaining the page elements and corresponding markup data of the currently opened web page, the web page may be rendered first.

[0038] In an alternative embodiment, Figure 2 A flow chart of a method for rendering a web page is shown, Figure 2 As shown, the method may at least include the following steps: in step S210, a target request is sent to the server, so that the server generates and sends data according to the target request, and the sent data includes mark data.

[0039] When the server receives a target request from a client, it can generate data to be rendered based on the client's tag features. This data is visible to the client. This data can be in JSON (JavaScript Object Notation) format or other formats, which are not specifically limited in this exemplary embodiment.

[0040] JSON is stored and sent using a DOMStringMap (a key-value pair collection), which uses the dataset (custom attributes) model in the HTML5 (HyperText Markup Language) format. This differs from simply sending strings. Strings have no specified format, while datasets are tagged with specialized tessar-info keywords.

[0041] The target request may include a request to load a page for the first time or to open a page again, and this exemplary embodiment does not specifically limit this. The client tag feature may include features such as the client's registered location, IP (Internet Protocol) address, or a page that jumps to the previous page of the current page.

[0042] The method of generating the data to be rendered based on the tag features existing in the client can be calculated by the server according to the recommendation algorithm, or obtained in other ways, and this exemplary embodiment does not make any special limitation on this.

[0043] In step S220, the data sent by the server is obtained, and the currently opened web page is rendered according to the sent data.

[0044] After receiving the data sent back by the server, the client can render the user features according to the data sent to obtain the currently opened web page.

[0045] After connecting to the SDK (Software Development Kit), it is initialized, allowing the SDK to traverse the HTML DOM (Document Object Model) structure to identify page elements. It then uses key data from the server's data as markers to identify the corresponding page elements. This key data indicates that it must be sent immediately, while other non-key data can be buffered and sent. This key data can be pre-defined and business-related, such as a configured ID (identity document) with a form.

[0046] In step S120 , the page elements are saved according to the target format, where the target format includes the page identifier and element format of the web page.

[0047] In an exemplary embodiment of the present disclosure, after the rendering of the currently opened webpage is completed, all page elements are saved with a unique page identifier (ID) and a specified element format.

[0048] In an optional embodiment, the element format includes one or more of: page, module, element, behavior and result, and the element formats are connected by preset symbols.

[0049] When organizing the five types of information (page, module, element, action, and result) into a specially structured string, they can be connected using the pre-defined symbol "|" to form a structure suitable for parsing. Some elements may not exist; for example, the format "page | | element | action |" can be used.

[0050] However, it is worth noting that the preset symbol "|" cannot be missing. By splitting and identifying the "|", it can be found that the "element" does not reflect the "module" and "result" parts, and it will be recorded as the default when the data is classified.

[0051] The module may be specified by data sent from the server, or may be a dynamically generated DOM sub-traversal structure, that is, a binary tree or multi-tree structure, which is not specifically limited in this exemplary embodiment.

[0052] For example, when saving the page element in the target format, it can be / zhuanti / bd-search / bd-color / index.html|BODY#26-DIV#27-UL#29-LI#109-IMG#110|IMG#110|click. The action result can be unmarked or marked as success or failure, which is not specifically limited in this exemplary embodiment.

[0053] In special cases, for the sequential combination of "page | module | element | behavior | result", the module, element and result can be empty. For example, "xxx page | | | logout |" is also a legal data structure.

[0054] In step S130 , in response to a collection event acting on a web page, the collected data of the page elements are sent according to the target format or markup data.

[0055] In an exemplary embodiment of the present disclosure, when a user performs a corresponding action on a currently opened web page, data collection may be performed in response to a collection event acting on the web page.

[0056] In an optional embodiment, the collection event includes an exposure event, and the collection data includes exposure data; in response to the exposure event acting on the web page, the exposure data of the page element is generated according to the target format, and the exposure data is sent.

[0057] Specifically, when a user sees an element on the currently open webpage, exposure data for that element can be generated and sent immediately. Generally, exposure data for that element can be generated using the "view" command. Generally, exposure is triggered when 3 / 4 or the full height of an element or module exceeds the bottom of the screen.

[0058] In an optional embodiment, the collected events include interaction events, and the collected data include interaction data; Figure 3 A flow chart of a method for data collection is shown, as shown in FIG. Figure 3As shown, the method may include at least the following steps: in step S310, responding to an interaction event acting on a web page, capturing the page element affected by the interaction event.

[0059] In an optional embodiment, the interactive events include: scrolling events, hovering events, click events, switching events, login events, crawler events, authentication events and terminal location events.

[0060] When the user is scrolling, hovering, clicking, or switching windows on the currently opened web page, the corresponding page elements can be captured using the hook function.

[0061] Among them, the authentication event is the event in which the server determines the unique access; the terminal location event is the event in which the client's device uniquely identifies and obtains geographic information.

[0062] In step S320, when it is detected that the page element is marked with marking data and is not empty, interactive data of the page element is generated and sent.

[0063] Furthermore, after capturing a page element, a hook function can be used to detect whether the page element carries the tag data sent by the server. The data sent by the server is stored in the element.dataset exchange data format. The dataset data exchange format must be JSON, which is different from other tag data, such as element.id (id) or element.tag (element.tag), which can use strings.

[0064] When it is detected that the page element carries the tag data sent by the server and is not empty, the interaction data of the page element can be generated and sent immediately to realize data collection. Generally, the interaction data of the page element can be generated by clicking, etc.

[0065] It is worth noting that when there is an ID but no dataset is collected, it is sent immediately; when there is no ID but a dataset is available, the value of the dataset can be collected first and then sent.

[0066] That is, for those with ID tags, the tags here are usually non-digital, that is, they can be automatically added with numbers. Non-digital ID elements are sent immediately; but for those with digital IDs, it is necessary to interpret the h5 dataset carried to determine whether it needs to be sent immediately or stored in the cache queue.

[0067] In an alternative embodiment, Figure 4 A flow chart of another data collection method is shown in FIG. Figure 4As shown, the method may at least include the following steps: in step S410, when it is detected that the page element is not marked by the marking data, generating interaction data of the page element, and sending the interaction data using the buffer queue.

[0068] After capturing a page element, a hook function can be used to detect whether the page element carries the markup data sent by the server. If it is detected that the page element does not carry the markup data sent by the server, the interaction data of the page element can be generated. If the exchanged JSON data does not have the send information mark, it is pushed into the buffer queue and waits for transmission. Generally, click and other methods can be used to generate the interaction data of the page element.

[0069] In step S420 , when it is detected that the page element is marked by the marking data but is empty, the interaction data of the page element is generated and sent using the buffer queue.

[0070] After capturing a page element, a hook function can be used to detect whether the page element carries the markup data sent by the server. If the markup data sent by the server is detected but is empty, the interactive data of the page element can be generated and pushed into the buffer queue for transmission. Generally, the interactive data of the page element can be generated by using click and other methods.

[0071] Furthermore, all collected business data can be sent regularly to reduce data backlogs.

[0072] It is worth noting that all unsent and sent data will enter the buffer queue, that is, the data to be sent immediately will enter the buffer queue after it is sent. The buffer queue will process all queue data when the page is closed or when the timing cycle is reached, and send them together after sorting and calculation.

[0073] To sum up, since the content displayed on the website page will have certain deviations according to the characteristics of the user, in order to better feedback whether the content seen by the user is suitable for the user, a set of point-of-sale structures has been designed and implemented, which can automatically collect data based on the data sent by the server and automatically send rules based on the collected data.

[0074] To determine whether the data the server displays to the client matches the user's profile, we need to collect data about how the client displays the data. For users with similar profiles, we need to collect information about layout and exposure to ensure consistent content. We also collect information about user interactions, such as scrolling, hovering, switching windows, and click events. This data is then sent based on the binding rules for specific element data generated by the server.

[0075] This data collection method is that the server sends data based on h5 when rendering, and the collection system will dynamically collect data according to the data sent. The server can dynamically configure the upgrade based on the rendering rules combined with the collection.

[0076] It can be seen that this method can completely adapt to the characteristics of the dynamic display page to achieve different data for different people; the same data is displayed in different positions, but the data sent by the server remains consistent, which is convenient for display statistics and data tracking; interactive data can be accurately captured based on the data sent by the server, and more client data can be carried during interactive behavior; based on the importance of the data, hierarchical sending can be achieved to reduce pressure.

[0077] In the exemplary embodiments of the present disclosure, page elements are tagged with tag data. Even if the same data is displayed in different locations, the consistent tag data facilitates display and statistics, achieving data tracking. Furthermore, saving page elements in the target format not only allows for accurate data capture based on the tag data during data collection, but also allows for the inclusion of more client data, refining the granularity of data collection. It also enables customized display based on user preferences, optimizing the user experience on the web page.

[0078] In addition, in an exemplary embodiment of the present disclosure, a data collection device is also provided. Figure 5 The structural diagram of the data acquisition device is shown in FIG. Figure 5 As shown, the data collection device 500 may include: an element marking module 510, an element storage module 520 and a data collection module 530. Among them: The element marking module 510 is configured to obtain the page elements of the currently opened web page and the marking data corresponding to the web page, and mark the corresponding page elements using the marking data; The element saving module 520 is configured to save the page element in a target format, wherein the target format includes the page identifier and element format of the web page; The data collection module 530 is configured to respond to a collection event acting on the web page and send the collected data of the page elements according to the target format or the markup data.

[0079] In an exemplary embodiment of the present invention, the data acquisition device 500 is further configured to: Sending a target request to a server, so that the server generates downlink data according to the target request, wherein the downlink data includes the marking data; Obtain the data sent by the server and render the currently opened web page according to the data sent.

[0080] In an exemplary embodiment of the present invention, the element format includes: page, module, element, behavior and result.

[0081] In an exemplary embodiment of the present invention, the acquisition event includes an exposure event, and the acquisition data includes exposure data; The data acquisition module 530 is configured to: In response to the exposure event acting on the webpage, exposure data of the page element is generated according to the target format, and the exposure data is sent.

[0082] In an exemplary embodiment of the present invention, the collected event includes an interaction event, and the collected data includes interaction data; The data acquisition module 530 is configured to: In response to the interaction event acting on the webpage, capturing the page element affected by the interaction event; When it is detected that the page element is marked by the marking data and is not empty, the interaction data of the page element is generated and sent.

[0083] In an exemplary embodiment of the present invention, the data acquisition device 500 is further configured to: When it is detected that the page element is not marked by the marking data, generating interaction data of the page element and sending the interaction data by using a buffer queue; or When it is detected that the page element is marked by the marking data but is empty, interactive data of the page element is generated and the interactive data is sent using a buffer queue.

[0084] In an exemplary embodiment of the present invention, the interaction event includes: a scroll event, a hover event, a click event, and a switch event.

[0085] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0086] Figure 6 FIG. 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. Figure 6 As shown, the electronic device 600 may include: a processor 601 , a memory 602 , and may further include one or more of a multimedia component 603 , an input / output (I / O) interface 604 , and a communication component 605 .

[0087] The processor 601 is used to control the overall operation of the electronic device 600 to complete all or part of the steps in the above-mentioned data collection method. The memory 602 is used to store various types of data to support the operation of the electronic device 600. This data may include, for example, instructions for any application or method operating on the electronic device 600, as well as application-related data such as contact information, sent and received messages, images, audio, video, etc. The memory 602 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 603 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 602 or transmitted via the communication component 605. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 604 provides an interface between the processor 601 and other interface modules, which may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more thereof, is not limited here. Therefore, the corresponding communication component 605 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0088] In an exemplary embodiment, the electronic device 600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned data acquisition method.

[0089] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the above-described data collection method. For example, the computer-readable storage medium may be the aforementioned memory 602 including the program instructions. The program instructions may be executed by the processor 601 of the electronic device 600 to perform the above-described data collection method.

[0090] Figure 7 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 can be provided as a server. Figure 7 The electronic device 700 includes a processor 722, which may be one or more, and a memory 732 for storing a computer program executable by the processor 722. The computer program stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 722 may be configured to execute the computer program to perform the above-mentioned data collection method.

[0091] In addition, the electronic device 700 may further include a power supply component 726 and a communication component 750. The power supply component 726 may be configured to perform power management of the electronic device 700, and the communication component 750 may be configured to implement communication, such as wired or wireless communication, of the electronic device 700. In addition, the electronic device 700 may further include an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the memory 732.

[0092] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When the program instructions are executed by a processor, the steps of the above-described data collection method are implemented. For example, the non-transitory computer-readable storage medium may be the memory 732 including the program instructions. The program instructions may be executed by the processor 722 of the electronic device 700 to perform the above-described data collection method.

[0093] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and has a code portion for performing the above-mentioned data collection method when executed by the programmable device.

[0094] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the scope of protection of the present disclosure.

[0095] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0096] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A data collection method, characterized in that: The method comprises: Obtaining page elements of a currently opened web page and tag data corresponding to the web page, and marking the corresponding page elements using the tag data; Saving the page elements in a target format, wherein the target format includes a page identifier and an element format of the web page; In response to a collection event acting on the web page, the collected data of the page element is sent according to the target format or the markup data.

2. The data collection method according to claim 1, characterized in that: Before acquiring the page elements of the currently opened web page and the markup data corresponding to the web page, the method further includes: Sending a target request to a server, so that the server generates downlink data according to the target request, wherein the downlink data includes the marking data; Obtain the data sent by the server and render the currently opened web page according to the data sent.

3. The data collection method according to claim 1, wherein: The element format includes one or more of: page, module, element, behavior and result, and the element formats are connected by preset symbols.

4. The data collection method according to claim 1, wherein: The acquisition event includes an exposure event, and the acquisition data includes exposure data; The step of responding to a collection event acting on the webpage and sending the collected data of the page element according to the target format or the markup data includes: In response to the exposure event acting on the webpage, exposure data of the page element is generated according to the target format, and the exposure data is sent.

5. The data collection method according to claim 1, wherein: The collected events include interaction events, and the collected data include interaction data; The step of responding to a collection event acting on the webpage and sending the collected data of the page element according to the target format or the markup data includes: In response to the interaction event acting on the webpage, capturing the page element affected by the interaction event; When it is detected that the page element is marked by the marking data and is not empty, the interaction data of the page element is generated and sent.

6. The data collection method according to claim 5, characterized in that: After capturing the page element affected by the interaction event, the method further includes: When it is detected that the page element is not marked by the marking data, generating interaction data of the page element and sending the interaction data by using a buffer queue; or When it is detected that the page element is marked by the marking data but is empty, interactive data of the page element is generated and the interactive data is sent using a buffer queue.

7. The data collection method according to claim 5, characterized in that: The interactive events include: scrolling events, hovering events, click events, switching events, login events, crawler events, authentication events and terminal location events.

8. A data acquisition device, characterized in that: include: An element marking module is configured to obtain page elements of a currently opened web page and marking data corresponding to the web page, and mark the corresponding page elements using the marking data; An element saving module is configured to save the page element in a target format, wherein the target format includes a page identifier and an element format of the web page; The data collection module is configured to respond to a collection event acting on the web page and send the collected data of the page elements according to the target format or the markup data.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.