Data collection method, device, computer system and computer readable storage medium
By analyzing the pseudo-class style of web page elements, the request information is obtained and sent to the server, which solves the problems of poor compatibility of low-level browsers in the existing technology and the disable data collection scripts, and realizes the collection of user behavior data in any browser environment Effect.
Patent Information
- Application Number
- CN202011044858.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-09-28
AI Technical Summary
The existing website information collection methods are poor in low-level browsers and are easily disabled by users, resulting in the inability to effectively collect user behavior data on web pages.
By obtaining the user's trigger operation on the target element of the web page, determining the pseudo-class style of the target element in response to the trigger operation, analyzing the pseudo-class style to obtain the request information, and sending the information to the server to collect the trigger operation.
It realizes the effective collection of user behavior data in any browser environment, avoiding the compatibility issues and the risk of being disabled in low-level browsers.
Smart Images

Figure CN113779350B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computers and Internet technology, and more specifically, to a data collection method, device, computer system and computer-readable storage medium. Background Art
[0002] With the development of Internet technology, websites have become an important channel for information exchange and acquisition. Websites such as corporate information websites, entertainment news websites, and life service websites have provided great convenience for daily life. In order to adapt to the development of the times and user needs, it is inevitable that the same type of websites are developed and put into use by different companies. Therefore, collecting website information that is closer to user preferences to enhance the core competitiveness of their own websites is a goal that every company plans to achieve.
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: the existing website information collection method uses JavaScript scripts that have poor compatibility with low-level browsers and are easily disabled by users, resulting in the inability to effectively collect user behavior data on web pages. Summary of the invention
[0004] In view of this, the present disclosure provides a data collection method, device, computer system and computer-readable storage medium.
[0005] One aspect of the present disclosure provides a data collection method, including: obtaining a trigger operation of a user on a target web page element in a web page; in response to the trigger operation, determining a pseudo-class style for the target web page element according to the target web page element; obtaining request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation; and sending the request information to a server, so that the server collects the trigger operation according to the parameter information in the request information.
[0006] According to an embodiment of the present disclosure, the request information also includes address information corresponding to the resource information used to render the target web page element, and the method also includes: after sending the request information to the server, the server also returns the resource information to the web page according to the address information in the request information.
[0007] According to an embodiment of the present disclosure, the pseudo-class style includes: a web page element field, representing the target web page element; a pseudo-class field, representing the type of trigger operation for the target web page element; and a pseudo-element field, used to carry the request information in the pseudo-class style.
[0008] According to an embodiment of the present disclosure, in response to the trigger operation, determining a pseudo-class style for the target web page element according to the target web page element also includes: determining the web page element field according to the target web page element; determining the pseudo-class field according to the type of the trigger operation; and determining the pseudo-class style according to the web page element field and the pseudo-class field.
[0009] Another aspect of the present disclosure provides yet another data collection method, comprising: obtaining request information from a client, wherein the request information includes parameter information related to a trigger operation of a user, the request information is obtained by the client by parsing a pseudo-class style of a target web page element targeted by the trigger operation, the pseudo-class style being determined in response to the trigger operation and based on the target web page element; and collecting the trigger operation based on the parameter information in the request information.
[0010] According to an embodiment of the present disclosure, the request information also includes address information corresponding to resource information used to render the target web page element, and the method further includes: returning the resource information to the web page according to the address information in the request information.
[0011] According to an embodiment of the present disclosure, collecting the trigger operation according to the parameter information in the request information includes: obtaining at least one information collection parameter in the parameter information, wherein the information collection parameter includes a parameter name and a parameter value; for each of the information collection parameters, storing the parameter name and the parameter value in the information collection parameter in a database respectively to obtain at least one information log; and using at least one of the information logs as the collection result for the trigger operation.
[0012] Another aspect of the present disclosure provides a data collection device, including: a first acquisition module, used to obtain a user's trigger operation on a target web page element in a web page; a determination module, used to determine a pseudo-class style for the target web page element according to the target web page element in response to the trigger operation; a parsing module, used to obtain request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation; and a sending module, used to send the request information to a server, so that the server collects the trigger operation according to the parameter information in the request information.
[0013] Another aspect of the present disclosure provides yet another data collection device, comprising: a second acquisition module, used to obtain request information from a client, wherein the request information includes parameter information related to a user's trigger operation, the request information is obtained by the client by parsing a pseudo-class style of a target web page element targeted by the trigger operation, and the pseudo-class style is determined in response to the trigger operation and based on the target web page element; and a collection module, used to collect the trigger operation based on the parameter information in the request information.
[0014] Another aspect of the present disclosure provides a computer system, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described above.
[0015] Another aspect of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, wherein the instructions are used to implement any of the above methods when executed.
[0016] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement any of the above methods when executed.
[0017] According to the embodiments of the present disclosure, a technical means is adopted to obtain a trigger operation of a user on a target web page element in a web page; in response to the trigger operation, determine a pseudo-class style for the target web page element according to the target web page element; obtain request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation; and send the request information to a server so that the server collects the trigger operation according to the parameter information in the request information. Since the information display of the web page element in response to the trigger operation is usually accompanied by a pseudo-class style, and the parameter information related to the trigger operation can be directly obtained by parsing the pseudo-class style, the trigger operation of the user on the web page element can be directly collected by parsing the pseudo-class style without the need for an additional data collection script, thereby at least partially overcoming the technical problem that the traditional data collection script is incompatible with and may be disabled in low-level browsers, thereby achieving the technical effect of being able to collect user operation behaviors in web pages in any browser environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0019] Figure 1An exemplary system architecture to which the data collection method according to an embodiment of the present disclosure can be applied is schematically shown;
[0020] Figure 2 A flowchart of a client data collection method according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of a server-side data collection method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 4 A flowchart schematically shows a data collection method when a client and a server work together according to an embodiment of the present disclosure;
[0023] Figure 5 A block diagram of a client data acquisition device according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 6 A block diagram schematically shows a server data acquisition device according to an embodiment of the present disclosure; and
[0025] Figure 7 A block diagram of a computer system suitable for implementing the data collection method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0029] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] The web page opened in the browser includes three development languages, Html (Hypertext Markup Language), Css (Cascading Style Sheets), and JavaScript (a Java scripting language). Html is the entire page skeleton, which includes Html elements such as paragraph tags and title tags. Css is used to beautify the style of the entire Html, including text color, size, text spacing, and setting background images for Html elements.
[0031] Collecting user behaviors on web page elements and then judging user preferences based on the collected results in order to provide users with targeted web page services is a necessary measure for every enterprise to improve the competitiveness of its own website. The existing website information collection method is based on the embedding script written in JavaScript language, which is introduced into the website and the data reporting method in the script is triggered by the user's behavior (such as clicking, browsing, etc.).
[0032] However, in the process of implementing the concept of the present disclosure, the inventors found that JavaScript scripts have poor compatibility in some low-level browsers (such as the fifth-generation IE browser IE5, the sixth-generation IE browser IE6, etc.), and JavaScript scripts can be actively disabled by browser users, resulting in the inability to run the scripts and thus the inability to collect data.
[0033] The embodiments of the present disclosure provide a data collection method, device, computer system and computer-readable storage medium. The method includes obtaining a trigger operation of a user on a target web page element in a web page; in response to the trigger operation, determining a pseudo-class style for the target web page element according to the target web page element; obtaining request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation; and sending the request information to a server, so that the server collects the trigger operation according to the parameter information in the request information.
[0034] Figure 1 The exemplary system architecture 100 to which the data collection method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0035] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0036] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various client applications can be installed on the terminal devices 101, 102, 103, such as shopping applications based on H5 (Html5, the fifth generation of hypertext markup language), search applications, instant messaging tools, email clients, social platform software and / or other web browser applications.
[0037] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0038] The server 105 may be a server that provides various services, such as a background management server that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as web page requests or user requests, store some analysis results (such as the analysis results of parameter information related to the user's triggering operation on the web page), and feed back the processing results (such as the web page, information, or data obtained or generated according to the user request) to the terminal device.
[0039] It should be noted that the data collection method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data collection device provided in the embodiment of the present disclosure can generally be set in the server 105. The data collection method provided in the embodiment of the present disclosure can also be executed by other servers or server clusters that are different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the data collection device provided in the embodiment of the present disclosure can also be set in other servers or server clusters that are different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0040] Alternatively, the data collection method provided in the embodiment of the present disclosure may also be executed by the terminal device 101, 102 or 103, or may also be executed by other terminal devices different from the terminal device 101, 102 or 103. Accordingly, the data collection device provided in the embodiment of the present disclosure may also be provided in the terminal device 101, 102 or 103, or may be provided in other terminal devices different from the terminal device 101, 102 or 103.
[0041] For example, the pseudo-class style may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored in an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the data collection method provided by the embodiment of the present disclosure, or connect to other terminal devices, servers, or server clusters according to the URL (Uniform Resource Locator) instruction in the above pseudo-class style, and the other terminal devices, servers, or server clusters that receive the URL instruction may execute the data collection method provided by the embodiment of the present disclosure.
[0042] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0043] Figure 2 The flowchart of the client data collection method according to the embodiment of the present disclosure is schematically shown.
[0044] like Figure 2 As shown, the method includes operations S201 to S204.
[0045] In operation S201, a trigger operation of a user on a target webpage element in a webpage is obtained.
[0046] According to an embodiment of the present disclosure, a web page may include, for example, website content of various information, life service, and enterprise organizations. A target web page element may be, for example, text, an image, an input box, or other identification web page elements. A trigger operation may be, for example, an operation formed by the interaction between a mouse controlled by a user and a web page element, such as hovering, clicking, selecting, inputting, or loading a web page caused by some of the operations of the mouse relative to the web page element.
[0047] In operation S202, in response to the trigger operation, a pseudo-class style for the target web page element is determined according to the target web page element.
[0048] According to the embodiments of the present disclosure, each web page element has its corresponding CSS style when displayed in the web page, which is completed at the beginning of web page design. The above pseudo-class style is obtained by adding pseudo-classes and parameters related to trigger operations to the CSS style at the beginning of web page design.
[0049] In operation S203, request information is obtained by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation.
[0050] According to an embodiment of the present disclosure, the request information may be, for example, URL information in a pseudo-class style, and the URL information in the pseudo-class style includes parameters related to the triggering operation.
[0051] In operation S204, the request information is sent to the server, so that the server collects the trigger operation according to the parameter information in the request information.
[0052] According to an embodiment of the present disclosure, the server that the above-mentioned request information needs to access is determined based on the above-mentioned URL information. While implementing the access request based on the URL information, the parameters related to the trigger operation in the URL information are also sent to the server, and the server implements the collection of the trigger operation based on the parameters.
[0053] Through the above-mentioned embodiments of the present disclosure, since the display of web page information is usually accompanied by Css design styles, the method of directly setting the information related to the user's triggering operation in the Css style to generate a pseudo-class style can directly collect user behavior data based on the interactive relationship between the pseudo-class style that causes the display information to change and the server, regardless of whether it is caused by the user or other reasons. This solves the problem of JavaScript incompatibility in low-level browsers and the problem of being easily disabled by users when performing data collection based on JavaScript scripts, thereby realizing the collection of user behavior data in any browser environment without worrying about the collection script being blocked by the user.
[0054] According to an embodiment of the present disclosure, the above-mentioned request information also includes address information corresponding to the resource information used to render the above-mentioned target web page elements. The above-mentioned data collection method also includes that after sending the request information to the server, the server also returns the resource information to the web page according to the address information in the request information.
[0055] According to the above-mentioned embodiment of the present disclosure, because the Css style can load resources as display content for related web page elements, the parameters that need to be reported are directly assembled in the URL of the Css style for requesting resources. At this time, the URL includes resource information and parameter information, wherein the resource information can be, for example, in the form of a link address, which is the server address corresponding to the resource, and the parameter information can be, for example, record information related to the triggering operation. When the user triggers the pseudo-class style of a web page element in a website page, that is, connects to the server according to the link address of the resource in the pseudo-class style, triggering the loading of the resource. Because the URL also includes parameter information that records the triggering operation, the server can collect user behavior data by directly parsing the parameter information in the URL.
[0056] It should be noted that the above resource information may be, for example, pictures, audio, etc., and is not limited here.
[0057] Through the above-mentioned embodiments of the present disclosure, the user behavior related parameters are directly assembled after the resource request instruction of the pseudo-class style, and the collection of user behavior data can be realized at the same time as the resource request is realized, which saves program running instructions, reduces a large part of the program overhead, eliminates unnecessary running loads, and avoids the possibility of some programs being disabled in the web page.
[0058] According to an embodiment of the present disclosure, the above-mentioned pseudo-class style includes: a web page element field, representing the target web page element; a pseudo-class field, representing the type of trigger operation for the target web page element; and a pseudo-element field, used to carry the request information in the pseudo-class style.
[0059] According to an embodiment of the present disclosure, an identifier is set for the above-mentioned target web page element, and the web page element field is represented by the identifier to determine the web page element targeted by the pseudo-class style. Different trigger operations correspond to different pseudo-class fields, and the pseudo-class style display method for the web page element is designed through the pseudo-element.
[0060] According to an embodiment of the present disclosure, based on the pseudo-class style determined above, the operation S202 also includes: determining the web page element field according to the target web page element; determining the pseudo-class field according to the type of triggering operation; and determining the pseudo-class style according to the web page element field and the pseudo-class field.
[0061] Figure 3The flowchart of the server data collection method according to the embodiment of the present disclosure is schematically shown.
[0062] like Figure 3 As shown, the collection method of the server corresponds to that of the client, and the method includes operations S301 to S302.
[0063] In operation S301, request information is obtained from the client, wherein the request information includes parameter information related to the user's trigger operation. The request information is obtained by the client by parsing the pseudo-class style of the target web page element targeted by the trigger operation. The pseudo-class style is determined in response to the trigger operation and based on the target web page element.
[0064] In operation S302, trigger operations are collected according to parameter information in the request information.
[0065] According to the above embodiments of the present disclosure, since the request information sent by the client directly includes parameters related to the user's triggering operation, data information related to the user's triggering operation can be directly collected by parsing the parameters, thereby solving the compatibility problem and possible disabling problem of traditional data collection methods.
[0066] According to an embodiment of the present disclosure, the above request information also includes address information corresponding to resource information used to render target web page elements, and the above data collection method also includes returning resource information to the web page according to the address information in the request information.
[0067] Through the above-mentioned embodiments of the present disclosure, since the resource information and parameter information are located in the same request information, when the server receives an information request instruction, it can simultaneously realize the return of resource information and the collection and recording of user behavior information, which saves program running instructions and reduces a large part of program overhead.
[0068] According to an embodiment of the present disclosure, after the server receives the request information from the client, collecting the trigger operation according to the parameter information in the request information also includes: obtaining at least one information collection parameter in the parameter information, wherein the information collection parameter includes a parameter name and a parameter value; for each information collection parameter, storing the parameter name and parameter value in the information collection parameter in a database respectively to obtain at least one information log; and using at least one information log as the collection result for the trigger operation.
[0069] Reference below Figure 4 , combined with specific embodiments Figure 2 and Figure 3 The method shown is further explained.
[0070] Figure 4A flowchart of a data collection method when a client and a server work together according to an embodiment of the present disclosure is schematically shown.
[0071] like Figure 4 As shown, the method includes operations S401 to S406.
[0072] In operation S401, a web page is opened.
[0073] In operation S402, user behavior is obtained.
[0074] According to an embodiment of the present disclosure, user behavior may be, for example, a mouse hovering operation when the user has no operation, such as hovering the mouse over an area such as a link or image with a pseudo-class style, clicking a jump link, selecting an input box and entering information in the input box, and the like.
[0075] In operation S403, the Html pseudo-class style is triggered, thereby triggering the loading of pseudo-element content.
[0076] According to an embodiment of the present disclosure, the pseudo-element content is loaded from the server, and it is also at this time that the client establishes a connection with the server.
[0077] In operation S404, the pseudo-element content loads a 1-pixel gif image through the URL link address.
[0078] According to an embodiment of the present disclosure, an exemplary URL link is, for example:
[0079] https: / / xxx.xx.com / log.gif?action=browser_chrome.
[0080] Among them, https: / / xxx.xx.com / log.gif represents the server address of the 1-pixel gif image to be loaded, action=browser_chrome represents parameter information, the parameter name action indicates that the parameter is used to record the parameters related to the user's triggering operation, and browser_chrome indicates that the behavior object is Google Chrome.
[0081] In operation S405, the server collects information through parameters on the URL link.
[0082] In operation S406, the data is processed and cleaned to obtain corresponding data.
[0083] According to an embodiment of the present disclosure, action and browser_chrome are stored as an information log as a record in a database, or action, browser and chrome are stored as an information log as a record in a database to obtain user behavior information about accessing Google Chrome.
[0084] The data collection method disclosed herein is further described in detail below in conjunction with another embodiment.
[0085] According to an embodiment of the present disclosure, there is an element div in the visited website page, and a CSS pseudo-class style is set for this element as follows:
[0086]
[0087] With respect to the above embodiment, when collecting data, the following steps are included:
[0088] ①On the client side.
[0089] When the user opens this web page and hovers the mouse over this div element, this element will trigger the rendering of the pseudo-class style.
[0090] ②The client establishes a connection with the server.
[0091] Because the content of this style is to load an image, the image request content is added to the Css pseudo-class style through the pseudo-element ::after and the content instruction, and the request is sent to the server through the URL. Among them, https: / / mercury.jd.com / log.gif is the gif image requested by the div element to the server when it is triggered, and action=s4_hovered is the defined information collection parameter, indicating that the s4 element triggers the hover style, that is, the mouse is hovering over the div element.
[0092] ③On the server side.
[0093] After receiving the request, the server parses the parameter action=s4_hovered into two fields, action and s4_hovered, or three fields, action, s4 and hovered, and stores them into relevant information logs.
[0094] According to an embodiment of the present disclosure, in the above data collection process, the identifier of the div element is obtained as s4 in Html, and the pseudo-class type is determined as hover according to the user's triggering behavior of mouse hovering, and the Css pseudo-class style to be executed is determined according to s4 and hover.
[0095] It should be noted that the above embodiment only lists one behavior state related to the user's trigger operation. In a specific implementation plan, the user's trigger operation can also be, for example, clicking on a certain label, the corresponding pseudo-class is represented by active, selecting the selection box, the corresponding pseudo-class is represented by checked, entering correct content in the input box, the corresponding pseudo-class is represented by valid, the web page is loaded to the minimum page width (for example, loading the web page), the corresponding pseudo-class is represented by @media (min-device-width), and the direction of the page, the corresponding pseudo-class is represented by @media (orientation: portrait), etc., which are not limited here.
[0096] The above pseudo-class styles trigger the collection of user behavior data based on CSS language, without any scripting language JavaScript content, so these collection behaviors cannot be disabled by the browser. However, if you use a scripting language to process these, users can disable the running of scripts in the browser.
[0097] Therefore, based on the above embodiments of the present disclosure, the method of loading images through Css pseudo-class styles and obtaining user behavior data in the website by directly parsing parameter information in the image URL shows obvious advantages of using Css pseudo-elements to collect data.
[0098] Figure 5 A block diagram of a client data collection device according to an embodiment of the present disclosure is schematically shown.
[0099] like Figure 5 As shown, the data acquisition device 500 includes a first acquisition module 510 , a determination module 520 , a parsing module 530 and a sending module 540 .
[0100] The first acquisition module 510 is used to acquire a trigger operation of a user on a target web page element in a web page.
[0101] The determination module 520 is used to determine a pseudo-class style for a target web page element according to the target web page element in response to a trigger operation.
[0102] The parsing module 530 is used to obtain request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the triggering operation.
[0103] The sending module 540 is used to send the request information to the server, so that the server collects the trigger operation according to the parameter information in the request information.
[0104] According to an embodiment of the present disclosure, the request information parsed by the parsing module 530 in the above-mentioned data acquisition device 500 also includes address information corresponding to the resource information used to render the target web page element. The sending module 540 is used to send the request information to the server, and the server also returns the resource information to the web page according to the address information in the request information.
[0105] According to an embodiment of the present disclosure, the pseudo-class style obtained based on the determination module 520 in the above-mentioned data acquisition device 500 includes a web page element field, which represents the target web page element; a pseudo-class field, which represents the type of trigger operation for the target web page element; and a pseudo-element field, which is used to carry the request information in the pseudo-class style.
[0106] According to an embodiment of the present disclosure, the determination module 520 in the above-mentioned data acquisition device 500 further includes a first determination submodule, a second determination submodule and a third determination submodule.
[0107] The first determination submodule is used to determine the web page element field according to the target web page element.
[0108] The second determination submodule is used to determine the pseudo-class field according to the type of the triggering operation.
[0109] The third determination submodule is used to determine the pseudo-class style according to the web page element field and the pseudo-class field.
[0110] Figure 6 A block diagram of a server-side data acquisition device according to an embodiment of the present disclosure is schematically shown.
[0111] like Figure 6 As shown, the data acquisition device 600 includes a second acquisition module 610 and a collection module 620 .
[0112] The second acquisition module 610 is used to obtain request information from the client, wherein the request information includes parameter information related to the user's trigger operation, and the request information is obtained by the client by parsing the pseudo-class style of the target web page element targeted by the trigger operation, and the pseudo-class style is determined in response to the trigger operation and based on the target web page element.
[0113] The collection module 620 is used to collect the trigger operation according to the parameter information in the request information.
[0114] According to an embodiment of the present disclosure, the request information acquired by the second acquisition module 610 in the above-mentioned data acquisition device 600 also includes address information corresponding to resource information used to render the target web page element, and the data acquisition device 600 also includes an acquisition submodule.
[0115] The acquisition submodule is used to return resource information to the web page according to the address information in the request information.
[0116] According to an embodiment of the present disclosure, the acquisition module 620 in the above-mentioned data acquisition device 600 further includes a first acquisition submodule, a storage submodule and a definition submodule.
[0117] The first acquisition submodule is used to acquire at least one information collection parameter in the parameter information, wherein the information collection parameter includes a parameter name and a parameter value.
[0118] The storage submodule is used to store the parameter name and parameter value in the information collection parameter into the database respectively for each information collection parameter, so as to obtain at least one information log.
[0119] A submodule is defined, which is used to use at least one information log as a collection result for the trigger operation.
[0120] According to the modules and submodules of the embodiments of the present disclosure, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules and submodules of the embodiments of the present disclosure, any one or more thereof can be split into multiple modules for implementation. According to the modules and submodules of the embodiments of the present disclosure, any one or more thereof can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, according to the modules and submodules of the embodiments of the present disclosure, one or more thereof can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0121] For example, any multiple of the first acquisition module 510, the determination module 520, the parsing module 530, and the sending module 540 can be combined in one module / submodule for implementation, or any one of the modules / submodules can be split into multiple modules / submodules. Alternatively, at least part of the functions of one or more of these modules / submodules can be combined with at least part of the functions of other modules / submodules and implemented in one module / submodule. According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the determination module 520, the parsing module 530, and the sending module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the first acquisition module 510 , the determination module 520 , the parsing module 530 and the sending module 540 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0122] For another example, any multiple of the second acquisition module 610 and the acquisition module 620 can be combined in one module / submodule for implementation, or any one of the modules / submodules can be split into multiple modules / submodules. Alternatively, at least part of the functions of one or more of these modules / submodules can be combined with at least part of the functions of other modules / submodules and implemented in one module / submodule. According to an embodiment of the present disclosure, at least one of the second acquisition module 610 and the acquisition module 620 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the second acquisition module 610 and the acquisition module 620 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0123] It should be noted that the data acquisition device part in the embodiment of the present disclosure corresponds to the data acquisition method part in the embodiment of the present disclosure. The description of the data acquisition device part specifically refers to the data acquisition method part, which will not be repeated here.
[0124] Figure 7 A block diagram of a computer system suitable for implementing the data collection method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0125] like Figure 7 As shown, the computer system 700 according to the embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0126] In RAM 703, various programs and data required for the operation of system 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other through bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0127] According to an embodiment of the present disclosure, the system 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The system 700 may further include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0128] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0129] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0130] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0131] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .
[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0133] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data collection method, comprising: Obtaining the user's triggering action on the target web page element in the web page; In response to the trigger operation, a pseudo-class style triggered for the target web page element is determined according to the target web page element, thereby triggering the loading of pseudo-element content, wherein the pseudo-element content is loaded from the server, and the pseudo-class style includes: a web page element field, representing the target web page element; a pseudo-class field, representing the type of the trigger operation for the target web page element; and a pseudo-element field, used to carry the request information in the pseudo-class style; Obtaining the request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation and address information corresponding to resource information for rendering the target web page element; and The request information is sent to the server, so that when the pseudo-element content is loaded from the server based on the address information, the server collects the trigger operation according to the parameter information in the request information.
2. The method according to claim 1, further comprising: After sending the request information to the server, the server also returns the resource information to the webpage according to the address information in the request information.
3. The method according to claim 1, wherein: In response to the trigger operation, determining a pseudo-class style for the target webpage element according to the target webpage element further includes: Determine the web page element field according to the target web page element; Determining the pseudo-class field according to the type of the trigger operation; and The pseudo-class style is determined according to the webpage element field and the pseudo-class field.
4. A data collection method, comprising: Obtaining request information from a client, wherein the request information includes parameter information related to a user's triggering operation and address information corresponding to resource information for rendering a target web page element, the request information is obtained by the client by parsing a pseudo-class style of the target web page element targeted by the triggering operation, the pseudo-class style is determined according to the target web page element in response to the triggering operation, and in response to triggering the pseudo-class style, the loading of pseudo-element content is triggered, and the pseudo-element content is loaded from a server, the pseudo-class style includes: a web page element field, representing the target web page element; a pseudo-class field, representing the type of the triggering operation for the target web page element; and a pseudo-element field, used to carry the request information in the pseudo-class style; and In the case of loading the pseudo-element content to the client based on the address information, the trigger operation is collected according to the parameter information in the request information.
5. The method according to claim 4, further comprising: The resource information is returned to the web page according to the address information in the request information.
6. The method according to claim 4, wherein: Collecting the trigger operation according to the parameter information in the request information includes: Acquire at least one information collection parameter in the parameter information, wherein the information collection parameter includes a parameter name and a parameter value; For each of the information collection parameters, the parameter name and the parameter value in the information collection parameter are stored in a database to obtain at least one information log; and At least one of the information logs is used as a collection result for the trigger operation.
7. A data acquisition device, comprising: A first acquisition module is used to acquire a trigger operation of a user on a target web page element in a web page; A determination module, configured to determine, in response to the trigger operation, a pseudo-class style triggered for the target web page element according to the target web page element, and then trigger the loading of pseudo-element content, wherein the pseudo-element content is loaded from the server, and the pseudo-class style includes: a web page element field, representing the target web page element; a pseudo-class field, representing the type of the trigger operation for the target web page element; and a pseudo-element field, used to carry the request information in the pseudo-class style; a parsing module, configured to obtain the request information by parsing the pseudo-class style, wherein the request information includes parameter information related to the trigger operation and address information corresponding to resource information for rendering the target web page element; and A sending module is used to send the request information to the server, so that when the pseudo-element content is loaded from the server based on the address information, the server collects the trigger operation according to the parameter information in the request information.
8. A data acquisition device, comprising: A second acquisition module is used to acquire request information from a client, wherein the request information includes parameter information related to a user's trigger operation and address information corresponding to resource information for rendering a target web page element, the request information is obtained by the client by parsing a pseudo-class style of the target web page element targeted by the trigger operation, the pseudo-class style is determined according to the target web page element in response to the trigger operation, and in response to triggering the pseudo-class style, the loading of the pseudo-element content is triggered, and the pseudo-element content is loaded from the server, the pseudo-class style includes: a web page element field, representing the target web page element; a pseudo-class field, representing the type of the trigger operation for the target web page element; and a pseudo-element field, used to carry the request information in the pseudo-class style; and A collection module is used to collect the trigger operation according to the parameter information in the request information when the pseudo-element content is loaded to the client based on the address information.
9. A computer system comprising: one or more processors; a memory for storing one or more programs, Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 3 or 4 to 6.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 3 or 4 to 6.
Citation Information
Patent Citations
Data acquisition statistical method, and system, terminal and service equipment thereof
CN105447139A
Webpage data acquisition method and device based on non-burying points
CN110020339A