Method, device and equipment for calculating page element click exposure rate

By obtaining user operation data and scroll bar position change information, counting the exposure amount of page elements and calculating click exposure rate, the problems of large amount of data and high computing resource consumption in the prior art are solved, and computing efficiency is improved.

CN119598040APending Publication Date: 2025-03-11ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411122703.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, when calculating the click exposure rate of page elements, a large amount of buried point data is required to report, resulting in large amount of data, high consumption of computing resources and network resources, and low efficiency.

Method used

By obtaining user operation data, determining the clicks and position information of page elements, combining the position change information of scroll bars, counting the exposure of page elements, and calculating the click exposure rate based on the exposure and clicks.

Benefits of technology

It reduces the amount of data that needs to be counted, reduces the consumption of computing resources and network resources, and improves the computing efficiency of click exposure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598040A_ABST
    Figure CN119598040A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method, a device and equipment for calculating the click exposure rate of a page element. According to the scheme, the method comprises the steps that page elements needing to be counted and the click rate of the page elements are determined according to operation data obtained from a to-be-counted page; determining the exposure of the page element in a first page based on the position information of the page element in the first page of the to-be-counted pages and the position change information of a scroll bar of the first page in the first page; and calculating the quotient of the click rate of the page element and the exposure of the page element to obtain the click exposure rate of the page element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and apparatus for calculating the click exposure rate of page elements. Background Art

[0002] In the prior art, in order to count the click-through rate (CTR) of each page element in a page, it is usually necessary to set up points for obtaining exposure status of page elements and points for obtaining click status of page elements in advance for all page elements in the page, and report the point data to the server when the user operates on the page. Then, the server calculates the CTR of each page element in the page based on the reported point data.

[0003] It can be seen that in the prior art, in order to calculate the CTR of each page element in a page, it is necessary to use embedded points to report exposure data and click data for all page elements in the page, so that the server can timely obtain the exposure and click status of all page elements. The amount of data that needs to be counted is large, and more computing resources and network resources need to be consumed. Summary of the invention

[0004] The embodiments of this specification provide a method, device and equipment for calculating the click exposure rate of page elements, which can reduce the amount of data required for statistics and reduce the consumption of computing resources and network resources in the process of calculating the CTR of page elements.

[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0006] A method for calculating the click exposure rate of a page element provided in an embodiment of the present specification includes: obtaining operation data of a user for a page to be counted; determining, based on the operation data, the page elements that need to be counted in the page to be counted and the number of clicks on the page elements; determining first position information of the page element in a first page where the page element is located; based on the operation data, obtaining position change information of a scroll bar in the first page in the first page; based on the first position information and the position change information, counting the exposure amount for the page element; and calculating the click exposure rate of the page element based on the exposure amount and the number of clicks.

[0007] An embodiment of the present specification provides a device for calculating a click exposure rate of a page element, comprising:

[0008] The first acquisition module is used to obtain the user's operation data on the page to be counted; the first determination module is used to determine the page elements that need to be counted in the page to be counted and the number of clicks on the page elements based on the operation data; the second determination module is used to determine the first position information of the page element in the first page where the page element is located; the second acquisition module is used to obtain the position change information of the scroll bar in the first page in the first page based on the operation data; the statistics module is used to count the exposure of the page element based on the first position information and the position change information; the calculation module is used to calculate the click exposure rate of the page element based on the exposure and the click volume.

[0009] An embodiment of the present specification provides a device for calculating a click exposure rate of a page element, including:

[0010] at least one processor; and,

[0011] a memory communicatively connected to the at least one processor; wherein,

[0012] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: obtain user operation data for the page to be counted; determine the page elements that need to be counted in the page to be counted and the number of clicks on the page elements based on the operation data; determine the first position information of the page element in the first page where the page element is located; based on the operation data, obtain the position change information of the scroll bar in the first page in the first page; based on the first position information and the position change information, count the exposure of the page element; and calculate the click exposure rate of the page element based on the exposure and the clicks.

[0013] At least one embodiment provided in this specification can achieve the following beneficial effects:

[0014] In the process of determining the CTR of each page element in a page, firstly, for the clicked page element, according to the position information of the clicked page element in the page and the position change information of the scroll bar in the page, the exposure of the clicked page element is counted, and then based on the click volume of the clicked page element and the counted exposure volume, the CTR of the clicked page element is calculated. As for the unclicked page element, since the click volume of the unclicked page element is zero, it is possible to directly determine that the CTR of the unclicked page element is zero without counting the exposure data of the unclicked page element. Therefore, it is possible to determine the CTR of each page element in the page without counting the exposure data of the unclicked page element, so that in the process of determining the CTR of each page element in the page, the statistical workload of the exposure data is reduced, the consumption of computer resources and network resources is reduced, and the calculation efficiency of the CTR is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0016] Figure 1 A schematic diagram of an application scenario of a method for calculating click exposure rate of page elements provided in an embodiment of this specification;

[0017] Figure 2 A flowchart of a method for calculating the click exposure rate of a page element provided in an embodiment of this specification;

[0018] Figure 3 A schematic diagram of a page element provided in an embodiment of this specification;

[0019] Figure 4 A schematic diagram of a position of a page element in a first page and a position of a scroll bar in the first page provided in an embodiment of the present specification;

[0020] Figure 5 A flowchart of a method for determining that a single-page application switches from a second page to a third page provided in an embodiment of this specification;

[0021] Figure 6 A flowchart of another method for determining that a single-page application switches from a second page to a third page provided in an embodiment of this specification;

[0022] Figure 7 The embodiments of this specification provide corresponding to Figure 2 A structural diagram of a device for calculating click exposure rate of page elements;

[0023] Figure 8 The embodiments of this specification provide corresponding to Figure 2 A structural diagram of a device for calculating the click exposure rate of page elements. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.

[0025] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0026] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0027] In the prior art, when determining the click exposure rate of each page element in a page, it is necessary to obtain the exposure of each page element in a timely manner when the page element is exposed by manually embedding points. Only when the click volume of the page element is obtained, the click exposure rate of the page element can be calculated based on the pre-acquired exposure volume. It can be seen that in the prior art, on the one hand, corresponding embedding data needs to be implanted for each page element in the page, which requires a lot of manpower and material resources. On the other hand, for each page element that is exposed, exposure data needs to be collected and reported, which also requires a lot of server resources. If the amount of exposure data to be reported is large, it is also very easy to cause system performance problems such as freezing of the current page.

[0028] Figure 1 A schematic diagram of an application scenario of a method for calculating click exposure rate of page elements in an embodiment of this specification.

[0029] like Figure 1 As shown, the application scenario diagram includes a terminal device 101, a server 102 and a display device 103.

[0030] In the embodiments of this specification, the terminal device may include but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, vehicle-mounted terminals and other devices with display functions. The terminal device 101 may be any one of the terminal devices. An application may be installed on the terminal device 101, and the application may be client software, browser software, or a small program. Furthermore, the page of the application on the terminal device 101 may include page elements and scroll bars. In actual application, when the user triggers an operation on the page element and the scroll bar, the terminal device 101 may generate corresponding operation data and provide it directly or indirectly to the server 102.

[0031] The server 102 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The server 102 may be installed with a background service program corresponding to the application installed on the terminal device 101. The server 102 may perform statistical calculation processing on the generated operation data to obtain the processed calculation result data.

[0032] The display device may include but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, vehicle terminals and other devices with display functions. The display device 103 may be any one of the display devices, and the display device 103 may visualize the calculation result data generated by the server 102 to the staff.

[0033] The terminal device 101 and the server 102 as well as the server 102 and the display device 103 can communicate via a communication network, which may include a wired network or a wireless network.

[0034] In an embodiment of the present specification, the method for calculating the click exposure rate of a page element may be executed by an electronic device, which may be a terminal device 101 and / or a server 102, that is, the method may be executed by the terminal device 101 or the server 102 alone, or may be executed jointly by the terminal device 101 and the server 102.

[0035] It should be noted that Figure 1 The figures are only examples. In fact, the number of terminal devices, servers and display devices is not limited and is not specifically limited in the embodiments of the present application.

[0036] Next, a method for calculating the click exposure rate of a page element provided in an embodiment of the specification will be specifically described with reference to the accompanying drawings.

[0037] Figure 2The flowchart of a method for calculating the click exposure rate of a page element provided in an embodiment of the present specification is shown in FIG. From the perspective of a device, the execution subject of the flowchart may be a server for calculating the click exposure rate of a page element. From the perspective of a program, the execution subject of the flowchart may be an application for calculating the click exposure rate of a page element installed on the server. Figure 2 As shown, the process may include the following steps.

[0038] Step 202: Obtain the user's operation data on the page to be counted.

[0039] In the embodiments of this specification, the operation data may include data obtained through a software development kit (SDK). The SDK may be linked to the application code corresponding to the preset page in the form of a resource address, so that the application code corresponding to the preset page can load the SDK during the loading process. The SDK may include logic code for monitoring preset events associated with the preset page, thereby eliminating the need to manually implant logic code for monitoring preset events in the application code corresponding to the preset page.

[0040] In actual application, when there are new statistical requirements, such as the need to count the click exposure rate of newly added or changed page elements in a preset page, a new SDK can be sent to the terminal device. The new SDK carries the logic code for monitoring the target preset event associated with the preset page. The target preset event is used to obtain the operation data required to calculate the click exposure rate of the newly added or changed page elements. Therefore, when the application is loaded on the user terminal, the new SDK can be loaded to execute the logic code in the new SDK, so that the user's operation data for the preset page can be obtained to calculate the click exposure rate of the newly added or changed page elements. Based on this solution, it is possible to respond to new statistical requirements in a timely manner by sending SDK without changing the application code, which is more timely and does not pose a risk of damaging the application code.

[0041] In the embodiments of this specification, after the SDK is loaded in the application corresponding to the preset page, the SDK can call the preset API in the application to register an event listener for the preset event based on the logic code corresponding to the preset event carried by the SDK. When the event listener listens to the preset event, the SDK will report the operation data generated based on the preset event. The preset event may include an access event for the preset page, a click event for a page element in the preset page, and a scroll event for a scroll bar in the preset page. The operation data may include access data corresponding to the access event, click data corresponding to the click event, and scroll data corresponding to the scroll event.

[0042] In the embodiments of the present specification, an access data table can be generated based on each access data obtained, and each access data in the access data table can include the Uniform Resource Locator (URL) of the page, the timestamp corresponding to the access data, and the access id of the page. The timestamp corresponding to the access data can include any one of the time point when the corresponding access event occurs, the time point when the access data is reported, the time point when the access data is received, and the time point when the access data is added to the access data table. The access id can include a user id or a session id. The URL can include protocol information, domain name information, port information, query parameter information, path information, hash information, etc.

[0043] In the embodiment of the present specification, a click data table can be generated based on each acquired click data, and each click data in the click data table can include the URL of the page where the page element is located, the distance value between the page element and the top edge line of the Hypertext Markup Language (HTML) document corresponding to the page where the page element is located, the distance value between the page element and the left edge line of the HTML document corresponding to the page where the page element is located, the height value of the page element, the width value of the page element, the id information of the page element, the class name information of the page element, the path information of the page element, the timestamp corresponding to the click data, and the access id information when the page element is clicked. The element class name information is className, and the element path information is xpath. ClassName is used to reflect the classification and style information of the element in the HTML document. Xpath is used to reflect the location information of the element in the page. The timestamp corresponding to the click data can include any one of the time point when the corresponding click event occurs, the time point when the click data is reported, the time point when the click data is received, and the time point when the click data is added to the click data table.

[0044] In the embodiment of the present specification, a scroll data table can be generated based on each scroll data obtained, and each scroll data in the scroll data table can include the URL of the page where the scroll bar is located, the position information of the scroll bar on the page where the scroll bar is located, the timestamp corresponding to the scroll data, and the access ID information when the scroll bar is scrolled. The timestamp corresponding to the scroll data can include any one of the time point when the corresponding scroll event occurs, the time point when the scroll data is reported, the time point when the scroll data is received, and the time point when the scroll data is added to the scroll data table.

[0045] Step 204: Determine the page elements that need to be counted in the page to be counted and the number of clicks on the page elements according to the operation data.

[0046] In the embodiments of this specification, page elements refer to the various components that constitute the web page or application interface, which together determine the user's interaction mode and overall experience with the web page or application. Common page elements may include text content elements, multimedia elements, interactive elements, layout elements, and decorative elements.

[0047] In the embodiment of the present specification, each click data matching the page to be counted can be obtained from the generated click data table according to the URL of the page to be counted, and a click data set can be obtained. Then, the page element corresponding to the click data in the click data set can be determined as the page element to be counted. After that, the number of clicks on the page element to be counted can be determined according to the click data contained in the click data set.

[0048] Step 206: Determine first position information of the page element in the first page where the page element is located.

[0049] In the embodiments of this specification, for one of the page elements, the first page may be a page that includes the page element, and the first page is one of the pages to be counted. The first position information of the page element in the first page may be directly determined based on the click data collected for the page element. The first position information of the page element in the first page may also be parsed from the program code corresponding to the first page. This specification does not specifically limit the method for determining the first position information of the page element in the first page.

[0050] Step 208: Based on the operation data, obtain position change information of the scroll bar in the first page.

[0051] In the embodiment of the present specification, each scroll data matching the URL of the first page can be obtained from the generated scroll data table according to the URL of the first page to obtain a scroll data set. Then, the position information of the scroll bar corresponding to each scroll data in the scroll data set in the first page can be obtained, that is, the position change information of the scroll bar in the first page can be obtained.

[0052] Step 210: Based on the first position information and the position change information, count the exposure amount of the page element.

[0053] In the embodiments of this specification, when a page element is displayed once in the visible area of ​​an electronic device such as a mobile phone, computer, or tablet, it can be said that the page element is exposed once. The visible area generally refers to the area within the screen range of an electronic device such as a mobile phone, computer, or tablet.

[0054] In the embodiment of the present specification, for a target page element in a first page, first position information of the target page element in the first page can be obtained. For a scroll bar in the first page, any two position change information of the scroll bar in the first page can be obtained, wherein the any two position change information belong to the same access id.

[0055] Assume that any two position change information obtained are position change information a and position change information b, and the timestamp corresponding to position change information a is earlier than the timestamp corresponding to position change information b. The first position relationship between the target page element and the scroll bar can be determined based on the first position information and the position change information a, and the second position relationship between the target page element and the scroll bar can be determined based on the first position information and the position change information b. If, during the process of the position relationship between the target page element and the scroll bar being transformed from the first position relationship to the second position relationship, it can reflect that the target page element is transformed from a first state displayed in the visible area of ​​the first page to a second state disappeared in the visible area, then it can be indicated that the target page element is exposed once, and specifically, the statistical number of exposures of the target page element can be increased by one.

[0056] It should be noted that the difference between the timestamp corresponding to the location change information a and the timestamp corresponding to the location change information b may be greater than a preset threshold.

[0057] Step 212: Calculate the click exposure rate of the page element according to the exposure amount and the click amount.

[0058] In the embodiment of the present specification, the number of clicks on the target page element and the exposure of the target page element can be obtained, and then the click exposure rate of the target page element can be obtained by calculating the quotient between the number of clicks on the target page element and the exposure of the target page element.

[0059] Figure 2 In the method, on the one hand, the user's operation data on the page to be counted can be obtained through the SDK, so as to obtain the position information of the page element in the target page and the position change information of the scroll bar in the target page according to the operation data statistics, and then determine the exposure amount of the page element. Therefore, there is no need to manually implant the buried point data in the program code corresponding to the target page to obtain the exposure amount of the page element, so as to avoid the risk of damaging the program code corresponding to the target page, and at the same time, it can also reduce the human resource cost.

[0060] On the other hand, when determining the click exposure rate of each page element in the page, the exposure of the clicked page element can be determined based on the position information of the page element and the position change information of the scroll bar, and then the click exposure rate of the clicked page element can be determined. As for the page elements that have not been clicked in the page, since the click volume of the unclicked page elements is zero, there is no need to determine the exposure of the unclicked page elements, and the click exposure rate of the unclicked page elements can be directly determined as zero. Therefore, without the need to count the exposure data for the unclicked page elements, the click exposure rate of each page element in the page can be determined, so that in the process of determining the CTR of each page element in the page, the statistical workload of the exposure data is reduced, the consumption of computer resources and network resources is reduced, and the calculation efficiency of the CTR is improved.

[0061] based on Figure 2 In addition to the method in the embodiment of the specification, some improved implementation schemes of the method for calculating the click exposure rate of page elements are provided, which are described below.

[0062] Usually, an application may include multiple pages, and the operation data obtained for the application may include the operation data for each page. Therefore, in order to obtain the operation data for a certain page, the obtained operation data needs to be classified and summarized.

[0063] In actual application, the page to be counted may include multiple pages. The operation data may include click data for page elements in the page to be counted; the click data may include the page element id of the clicked page element and the uniform resource locator of the page where the page element is located.

[0064] In an embodiment of the present specification, based on the operation data, the page elements that need to be counted in the page to be counted and the number of clicks on the page elements are determined (step 204), which may specifically include: determining the page element corresponding to the page element id as the page element that needs to be counted in the page to be counted; based on the uniform resource locator, classifying and aggregating the click data to obtain a click data set corresponding to each page in the page to be counted; based on the click data set corresponding to each page, counting the number of clicks on the page element corresponding to the page element id.

[0065] In an embodiment of the present specification, each click data collected for the page to be counted is obtained, and based on the page element id information carried in the click data, each page element id corresponding to the each click data is determined, and the page element corresponding to the each page element id is determined as the page element that needs to be counted in the page to be counted.

[0066] In the embodiments of this specification, the pages to be counted may include multiple pages belonging to the same application, or may include multiple pages belonging to different applications. According to the URL of the page where the page element carried in the click data is located, the various click data collected from the pages to be counted are classified and aggregated to obtain a click data set corresponding to each page.

[0067] In the embodiment of the present specification, the specific method of classifying and aggregating the various click data collected from the pages to be counted according to the URL to obtain the click data set corresponding to each page in the pages to be counted can be as follows.

[0068] First, for each click data collected by the page to be counted, the URL carried by each click data can be obtained. Then, the query parameter information in each URL can be deleted, and the protocol information, domain name information, port information, path information and hash information can be retained. After that, it can be determined whether there is user-related parameter information in the path information and / or hash information of each URL after deleting the query parameter information. If there is user-related parameter information, the parameter information can be deleted or converted into fixed characters to obtain each processed URL. For example, if the user-related parameter information is a set of numbers 2512412352, the number 2512412352 can be deleted or converted into xxx. If the user-related parameter information is a string of irregular characters abcd123, the characters abcd123 can be deleted or converted into xxx. Then, for any different first URL and second URL in each processed URL, if the protocol information, domain name information, port information, path information and hash information between the first URL and the second URL are consistent, the click data corresponding to the first URL and the click data corresponding to the second URL can be divided into the click data set corresponding to the same page. Finally, the click data corresponding to each processed URL can be divided into the click data set of the corresponding page to achieve page-level data aggregation for each click data.

[0069] It should be noted that if the pages to be counted are multiple pages belonging to different applications, the click data belonging to the same domain name information can be divided into a set according to the domain name information in the URL to obtain a click data set corresponding to each application, so as to achieve application-level data aggregation for each click data.

[0070] Optionally, counting the number of clicks on the page element corresponding to the page element id based on the click data sets corresponding to the various pages may include: for a target page element id, determining the target click data set corresponding to the target page element id; and then counting the number of clicks on the target page element corresponding to the target page element id in the target click data set.

[0071] In the embodiments of the present specification, for each click data obtained for the page to be counted, each page element id can be determined from each click data obtained. For a first page element id among each page element id, a click data set containing the first page element id can be queried based on the page element id corresponding to the click data set corresponding to each page; then, the queried click data set containing the first page element id can be determined as the target click data set corresponding to the first page element id; further, the click volume of the target page element corresponding to the first page element id can be counted based on the determined target click data set. Similar to the aforementioned method of counting the click volume of the target page element corresponding to the first page element id, the click volume of the page element corresponding to each page element id among each page element id can be counted.

[0072] In order to facilitate those skilled in the art to understand the present solution, this specification also provides the following specific example.

[0073] In the embodiments of this specification, it is assumed that the known conditions are as follows: the pages to be counted include three pages, namely page a, page b and page c. And the click data obtained for the pages to be counted include click data 1 to click data 10, click data 1 and click data 2 both correspond to page element 1, click data 3 to click data 5 both correspond to page element 2, click data 6 corresponds to page element 3, click data 7 and click data 8 both correspond to page element 4, and click data 9 and click data 10 both correspond to page element 5. The click data set determined for page a is click data set a, and click data set a includes click data 3 to click data 6; the click data set determined for page b is click data set b, and click data set b includes click data 1 and click data 2; the click data set determined for page c is click data set c, and click data set c includes click data 7 and click data 10. Based on the above known conditions, for page element 1, the click data set containing page element 1 is found to be click data set b, then click data set b is determined as the target click data set corresponding to page element 1, and then the click volume of the page element corresponding to page element 1 can be counted according to click data set b. Referring to the method of counting the click volume of the page element corresponding to page element 1, the click volume of the page element corresponding to page element 2, the click volume of the page element corresponding to page element 3, the click volume of the page element corresponding to page element 4, and the click volume of the page element corresponding to page element 5 can also be counted.

[0074] Based on the above embodiments, the embodiments of this specification also propose a specific embodiment of counting the click volume of the page element corresponding to the target page element id based on the target click data set corresponding to the target page element id.

[0075] The counting of clicks on the target page element corresponding to the target page element id in the target click data set may include: for a target click data in the target click data set, judging whether the target click data contains the target page element id, and obtaining a first judgment result; if the first judgment result indicates that the target click data contains the target page element id, the statistical number of clicks on the target page element may be increased by one.

[0076] In an embodiment of the present specification, for a target click data set corresponding to a target page element id, first, a first click data can be selected from the target click data set, and the first click data is click data that has not been selected; then, the page element id carried by the first click data is obtained, and it is determined whether the page element id carried by the first click data is consistent with the target page element id. If the page element id carried by the first click data is consistent with the target page element id, the statistical number of clicks on the page element corresponding to the target page element id can be increased by one. If the page element id carried by the first click data is inconsistent with the target page element id, there is no need to increase the statistical number of clicks on the page element corresponding to the target page element id by one. Next, a second click data that has not been selected can be selected from the target click data set; then, it can be determined whether the page element id carried by the second click data is consistent with the target page element id. If the page element id carried by the second click data is consistent with the target page element id, the statistical number of clicks on the page element corresponding to the target page element id can be increased by one. If the page element id carried by the second click data is inconsistent with the target page element id, there is no need to increase the statistical number of clicks on the page element corresponding to the target page element id by one. In this way, each click data in the target click data set can be traversed, and according to the traversal results, the number of clicks on the target page element corresponding to the target page element id in the target click data set can be counted.

[0077] In the embodiments of the present specification, each click data obtained for the page to be counted is decomposed into a click data set corresponding to each page, so that when counting the click volume of the page element corresponding to the target page element id, it is only necessary to traverse each click data in the target click data set corresponding to the target page element id, without traversing all click data obtained for the page to be counted, thereby reducing the amount of calculation for counting the click volume of the page element corresponding to the target page element id.

[0078] On the basis of the above-mentioned embodiments, the embodiments of this specification also propose a specific embodiment of obtaining the number of clicks on the parent page element corresponding to the target page element.

[0079] In the embodiment of the present specification, the corresponding relationship between the pre-generated page elements and the parent page elements can be used to determine the page elements corresponding to the parent page elements, and then the click volume of the parent page elements can be counted based on the click volume of the page elements corresponding to the parent page elements. Figure 3 As shown, the parent page element 1 "□ User Experience ∨" corresponds to page element 2 Page element 3 "User Experience" and page element 4 "∨". If page element 2 The number of clicks on the page element 1 “□ User Experience ∨” is 35. It should be noted that Figure 3 The number, arrangement and expression of the page elements contained in the parent page element 1 shown in the figure are only examples. In actual application, the expression of each page element corresponding to the parent page element can be set according to actual business needs.

[0080] Each user corresponding to the access ID can access the first page. For each user who accesses the first page, scrolling data corresponding to the scroll bar in the first page can be generated in the process of scrolling the scroll bar of the first page. Therefore, the scroll data obtained for the scroll bar in the first page is the scroll data corresponding to multiple access IDs. In order to facilitate the determination of the exposure of the page element, the scroll data obtained for the scroll bar in the first page can be classified and aggregated.

[0081] In actual application, the operation data may include scroll data for a scroll bar in the first page and an access ID for the first page.

[0082] In the embodiment of the present specification, the exposure of the page element is counted based on the first position information and the position change information (step 210), which may specifically include: classifying the scrolling data according to the access ID to obtain multiple scrolling data sets corresponding to the first page, the scrolling data in one scrolling data set corresponds to the same access ID, and the scrolling data in different scrolling data sets correspond to different access IDs; then, based on the position change information included in the scrolling data in each of the scrolling data sets, the exposure of the page element in the first page corresponding to each of the scrolling data sets is counted; then, the exposure of the page element in the first page corresponding to each of the scrolling data sets is summarized to obtain the total exposure of the page element.

[0083] In the embodiment of the present specification, according to the access ID information carried in the scrolling data, the scrolling data corresponding to the same access ID can be divided into the same scrolling data set, and the scrolling data corresponding to different access IDs can be divided into different scrolling data sets, so as to obtain multiple scrolling data sets corresponding to the first page. The scrolling data in each scrolling data set corresponds to the same access ID, and the scrolling data in different scrolling data sets correspond to different access IDs.

[0084] In an embodiment of the present specification, for a plurality of scrolling data sets corresponding to a first page, a first scrolling data set is selected from the plurality of scrolling data sets corresponding to the first page, the first scrolling data set being a scrolling data set that has not been selected, and the first exposure amount of the first page element in the first page in the first page corresponding to the first scrolling data set is counted according to the position change information included in the scrolling data in the first scrolling data set. Each scrolling data set in the plurality of scrolling data sets corresponding to the first page can be traversed, and the first exposure amount of the first page element in the first page corresponding to the first scrolling data set can be counted in a manner of counting the first exposure amount of the first page element in the first page corresponding to the first scrolling data set. Afterwards, the exposure amounts of the first page element in the first page counted according to each scrolling data set can be summarized to obtain the total exposure amount of the first page element in the first page.

[0085] In order to facilitate those skilled in the art to understand the present solution, this specification also provides the following specific example.

[0086] In the embodiment of the present specification, it is assumed that the multiple scrolling data sets corresponding to the first page include scrolling data set a, scrolling data set b, and scrolling data set c. When selecting a scrolling data set for the first time, any scrolling data set can be selected. If the scrolling data set selected for the first time is scrolling data set b, then the exposure amount b of the first page element in the first page in the first page can be counted according to the position change information included in the scrolling data in scrolling data set b. When selecting a scrolling data set for the second time, a scrolling data set can be randomly selected from scrolling data set a and scrolling data set c. If the scrolling data set selected for the second time is scrolling data set a, then the exposure amount a of the first page element in the first page can be counted according to the position change information included in the scrolling data in scrolling data set a. When selecting a scrolling data set for the third time, scrolling data set c can be selected, and the exposure amount c of the first page element in the first page can be counted according to the position change information included in the scrolling data in scrolling data set c. Until each scrolling data set in the multiple scrolling data sets corresponding to the first page is selected once, the selection of scrolling data sets from the multiple scrolling data sets corresponding to the first page is stopped. Exposure a, exposure b, and exposure c are summed up to obtain a total exposure counted for the first page element.

[0087] In the embodiments of the present specification, the page where the page element is located may be a page including a vertical scroll bar and a horizontal scroll bar; or, the page where the page element is located may be a page including a vertical scroll bar but not a horizontal scroll bar; or, the page where the page element is located may be a page including a horizontal scroll bar but not a vertical scroll bar.

[0088] In the embodiments of this specification, for a scenario where a page where a page element is located is a page including a vertical scroll bar and a horizontal scroll bar, a specific embodiment of counting the exposure amount of a page element based on position change information included in scroll data in a scroll data set is proposed.

[0089] In an embodiment of the present specification, the position change information includes at least a first distance value between the scroll bar and the top edge of the first page, a second distance value between the scroll bar and the left edge of the first page, and a timestamp used to indicate the occurrence time of the scroll data; the first position information includes at least a third distance value between the page element and the top edge of the first page, a fourth distance value between the page element and the left edge of the first page, an element height value of the page element, and an element width value of the page element.

[0090] The counting of the exposure of the page element in the first page corresponding to each of the scrolling data sets may specifically include: for one of the scrolling data sets, according to the timestamp, performing ascending processing on each of the position change information to obtain a target sequence. Position change information pairs that meet preset conditions are selected from the target sequence; each of the position change information pairs includes a first position change information and a second position change information, and the preset condition is that the first distance value included in the first position change information is less than or equal to the third distance value and the second distance value included in the first position change information is less than or equal to the fourth distance value, the first distance value included in the second position change information is greater than the sum of the third distance value and the element height value, and the second distance value included in the second position change information is greater than the sum of the fourth distance value and the element width value. Counting the number of the position change information pairs to obtain the exposure of the page element in the one of the scrolling data sets.

[0091] In the embodiment of the present specification, the scroll bar in the first page may include a vertical scroll bar and a horizontal scroll bar in the first page. The top edge of the first page may be the top edge of the HTML document corresponding to the first page displayed on the screen, rather than the top edge of the screen. The left edge of the first page may be the left edge of the HTML document corresponding to the first page displayed on the screen, rather than the left edge of the screen. The first distance value, the second distance value, the third distance value, the fourth distance value, the element width value, and the element height value may all be pixel values. The first distance value may be the distance value between the vertical scroll bar and the top edge of the first page. The second distance value may be the distance value between the horizontal scroll bar and the left edge of the first page. The timestamp used to represent the occurrence time of a scroll data may include any one of the time point when the scroll event corresponding to the scroll data is triggered, the time point when the scroll data is reported, and the time point when the system receives the scroll data.

[0092] In the embodiment of the present specification, the size of the document corresponding to the first page can be 3508 pixels long and 2480 pixels wide, and the size of the visible area of ​​the display device screen can be 1920 pixels long and 1080 pixels wide. The first size of the document corresponding to the first page is larger than the second size of the visible area of ​​the display device screen. When the document corresponding to the first page is displayed in the visible area of ​​the display device screen, the document corresponding to the first page cannot be fully displayed. In order to facilitate those skilled in the art to understand this solution, Figure 4 As shown, according to the size range, 400 represents the document corresponding to the first page, 406 represents the visible area of ​​the display device screen, the content in the document corresponding to the first page that is located in the visible area of ​​the display device screen is visible, and the content in the document corresponding to the first page that is located outside the visible area of ​​the display device screen is invisible. Figure 4 In the figure, both the vertical scroll bar 403 and the horizontal scroll bar 404 are set in the document 400 corresponding to the first page, and both the vertical scroll bar 403 and the horizontal scroll bar 404 are visible in the visible area 406 of the display device screen. The distance value between the vertical scroll bar 403 and the top edge 401 of the document 400 corresponding to the first page is a first distance value L1, the distance value between the horizontal scroll bar 404 and the left edge 402 of the document 400 corresponding to the first page is a second distance value L2, the distance value between the first edge 4051 of the page element 405 and the top edge 401 is a third distance value L3, the distance value between the third edge 4053 of the page element 405 and the left edge 402 is a fourth distance value L4, the distance value between the first edge 4051 and the second edge 4052 of the page element 405 is an element height value, and the distance value between the third edge 4053 and the fourth edge 4054 of the page element 405 is an element width value.

[0093] It should be noted that the third distance value L3 may also be the distance value between the second edge 4052 in the page element 405 and the top edge 401, or may also be the distance value from a specified point in the page element 405 to the top edge 401. The third distance value L4 may also be the distance value between the fourth edge 4054 in the page element 405 and the left edge 402, or may also be the distance value from a specified point in the page element 405 to the left edge 402.

[0094] In the embodiment of the present specification, the position change information pair may include first position change information that satisfies a first preset condition and second position change information that satisfies a second preset condition. The preset condition may include a first preset condition and a second preset condition. The first preset condition may be: a first distance value between the scroll bar in the first page and the top edge of the first page is less than or equal to a third distance value between the target page element in the first page and the top edge of the first page, and a second distance value between the scroll bar in the first page and the left edge of the first page is less than or equal to a fourth distance value between the target page element in the first page and the left edge of the first page. The second preset condition may be: a first distance value between the scroll bar in the first page and the top edge of the first page is greater than the sum of the third distance value and the element height value, the third distance value is the distance value between the target page element in the first page and the top edge of the first page, and a second distance value between the scroll bar in the first page and the left edge of the first page is greater than the sum of the fourth distance value and the element width value, and the fourth distance value is the distance value between the target page element in the first page and the left edge of the first page.

[0095] In an embodiment of the present specification, for a target rolling data set, the position change information included in each rolling data is arranged in ascending order according to the order from early to late timestamps carried by each rolling data in the target rolling data set, to obtain a target sequence after ascending order. Assume that the obtained target sequence contains a total of 10 position change information, and the 10 position change information are arranged from position change information No. 1 to position change information No. 10 in order from front to back. The process of determining each position change information pair that meets the preset conditions in order from front to back for the target sequence can be referred to steps 1 to 3.

[0096] Step 1: For all the position change information in the target sequence, in order from front to back, starting from position change information No. 1, query the first position change information that meets the first preset condition to obtain a first query result. If the first query result indicates that position change information No. 1 and position change information No. 2 do not meet the first preset condition, and position change information No. 3 meets the first preset condition, then for position change information No. 4 to position change information No. 10 in the target sequence, in order from front to back, starting from position change information No. 4, query the first position change information that meets the second preset condition to obtain a second query result. If the second query result indicates that position change information No. 5 is the position change information that meets the second preset condition, then the first position change information pair can be generated based on position change information No. 3 and position change information No. 5.

[0097] It should be noted that the conversion process of the scroll bar position from the first position change information that meets the first preset condition to the second position change information that meets the second preset condition can reflect a conversion process of the target page element in the visible area of ​​the first page from the first state displayed in the visible area to the second state disappeared in the visible area, that is, it can reflect a single exposure of the target page element in the first page. Since the page element needs to be first displayed in the visible area of ​​the page and then disappeared in the visible area of ​​the page when it is exposed, the exposure of the page element can be realized, and since the target sequence is obtained by sorting the timestamps of the position change information from early to late, therefore, after finding the position change information No. 3 that meets the first preset condition, it is necessary to start from the position change information No. 4 after the position change information No. 3 to search for the position change information that meets the second preset condition, without judging whether the position change information No. 1 and the position change information No. 2 that are located before the position change information No. 3 meet the second preset condition.

[0098] Step 2: After determining the first position change information pair, for position change information No. 4, position change information No. 6 to position change information No. 10 in the target sequence, in order from front to back, you can start from position change information No. 4 to query the second position change information that meets the first preset condition, and obtain a third query result. If the third query result indicates that position change information No. 4 meets the first preset condition, then for position change information No. 6 to position change information No. 10 in the target sequence, in order from front to back, you can start from position change information No. 6 to query the second position change information that meets the second preset condition, and obtain a fourth query result. If the fourth query result indicates that position change information No. 6 does not meet the second preset condition, and position change information No. 7 meets the second preset condition, then the second position change information pair can be generated based on position change information No. 4 and position change information No. 7.

[0099] It should be noted that the position change information that has been used to generate the position change information pair in the early stage cannot be used to generate other subsequent position change information pairs. Therefore, in the process of determining the second position change information pair, the position change information No. 3 and the position change information No. 5 that have been used to generate the first position change information pair cannot be used to generate the second position change information pair, that is, when determining the second position change information pair, the position change information No. 3 and the position change information No. 5 are not considered. Since when determining the first position change information pair, it has been found that the position change information No. 1 and the position change information No. 2 do not meet the first preset condition, therefore, when determining the second position change information pair, there is no need to consider the position change information No. 1 and the position change information No. 2. In the process of determining the first position change information pair, it is found that the position change information No. 4 does not meet the second preset condition, but it is not queried whether the position change information No. 4 meets the first preset condition, therefore, when determining the second position change information pair, it can be queried whether the position change information No. 4 meets the first preset condition.

[0100] Step 3: After determining the second position change information pair, combine the method of determining the first position change information pair with the second position change information pair to determine other position change information pairs in the target sequence.

[0101] It should be noted that a position change information pair can reflect an exposure of the target page element. In order to improve the effectiveness of the exposure of the target page element, the difference between the timestamp corresponding to the first position change information and the timestamp corresponding to the second position change information in each position change information pair can be greater than or equal to the preset threshold A, and the timestamp corresponding to the first position change information can be earlier than the timestamp corresponding to the second position change information. As an example, the preset threshold A can be set to 500 milliseconds or other values, and the specific value of the preset threshold A is not specifically limited.

[0102] In the embodiment of the present specification, for the target sequence, all position change information pairs that meet the preset conditions are determined, and the number of the determined position change information pairs is used as the exposure amount of the target page element in the first page corresponding to the target scrolling data set.

[0103] In the embodiments of this specification, for the scenario where the page where the page element is located is a page that includes a vertical scroll bar but not a horizontal scroll bar, a specific embodiment of counting the exposure amount of the page element based on the position change information included in the scrolling data in a scrolling data set is also proposed.

[0104] In an embodiment of the present specification, the position change information includes at least a first distance value between the scroll bar and the top edge of the first page and a timestamp used to indicate the occurrence time of the scroll data; the first position information includes at least a third distance value between the page element and the top edge of the first page and an element height value of the page element.

[0105] The counting of the exposure of the page element in the first page corresponding to each of the scrolling data sets may specifically include: for one of the scrolling data sets, each of the position change information is processed in ascending order according to the timestamp to obtain a target sequence. Position change information pairs that meet preset conditions are selected from the target sequence; each of the position change information pairs includes a first position change information and a second position change information, and the preset condition is that the first distance value included in the first position change information is less than or equal to the third distance value, and the first distance value included in the second position change information is greater than the sum of the third distance value and the element height value. Count the number of the position change information pairs to obtain the exposure of the page element in the one of the scrolling data sets.

[0106] It should be noted that a position change information pair can reflect an exposure of the target page element. In order to improve the effectiveness of the exposure of the target page element, the difference between the timestamp corresponding to the first position change information and the timestamp corresponding to the second position change information in each position change information pair can be greater than or equal to the preset threshold A, and the timestamp corresponding to the first position change information can be earlier than the timestamp corresponding to the second position change information. As an example, the preset threshold A can be set to 500 milliseconds or other values, and the specific value of the preset threshold A is not specifically limited.

[0107] In the embodiments of this specification, for the scenario where the page where the page element is located is a page that includes a horizontal scroll bar but not a vertical scroll bar, a specific embodiment of counting the exposure amount of the page element based on the position change information included in the scrolling data in a scrolling data set is also proposed.

[0108] In an embodiment of the present specification, the position change information includes at least a second distance value between the scroll bar and the left side line of the first page and a timestamp used to indicate the occurrence time of the scroll data; the first position information includes at least a fourth distance value between the page element and the left side line of the first page and an element width value of the page element.

[0109] The counting of the exposure of the page element in the first page corresponding to each of the scrolling data sets may specifically include: for one of the scrolling data sets, each of the position change information is processed in ascending order according to the timestamp to obtain a target sequence. Position change information pairs that meet preset conditions are selected from the target sequence; each of the position change information pairs includes a first position change information and a second position change information, and the preset condition is that the second distance value included in the first position change information is less than or equal to the fourth distance value, and the second distance value included in the second position change information is greater than the sum of the fourth distance value and the element width value. Count the number of the position change information pairs to obtain the exposure of the page element in the one of the scrolling data sets.

[0110] It should be noted that a position change information pair can reflect an exposure of the target page element. In order to improve the effectiveness of the exposure of the target page element, the difference between the timestamp corresponding to the first position change information and the timestamp corresponding to the second position change information in each position change information pair should be greater than or equal to the preset threshold A, and the timestamp corresponding to the first position change information can be earlier than the timestamp corresponding to the second position change information. As an example, the preset threshold A can be set to 500 milliseconds or other values, and the specific value of the preset threshold A is not specifically limited.

[0111] In the embodiments of the present specification, the exposure amount of the page element in the first page can be determined based on the position information of the page element in the first page and the position change information of the scroll bar in the first page in the first page, and the position information and the position change information are both obtained based on the logic code carried by the SDK, and there is no need to manually implant the buried data for obtaining the position information and the position change information in the program code corresponding to the first page, so that the acquisition of the exposure data of the page element does not need to rely on the manual implantation of the corresponding buried data in the program code corresponding to the first page, thereby avoiding the risk of damaging the program code corresponding to the first page in the process of manually implanting the buried data, and also reducing human resource costs.

[0112] The page to be counted can be a multi-page application (MPA) or a single-page application (SPA). MPA is a traditional web application architecture. When a user interacts with MPA, the server will reload a new page for each page switch to achieve refresh switching of the new page. However, frequent page refreshes will make users feel that the page switching process is not smooth enough and the user experience is poor. Therefore, in order to reduce the page refresh frequency during the interaction between the user and the page and improve the user experience, a new web application architecture proposed in the prior art is SPA. When SPA is opened for the first time, the server will load a complete page once. In the subsequent page switching process, the server will not load the new page, but the client will perform local dynamic updates on the different areas between the original page before the switch and the new page after the switch, and there is no need to refresh the same area between the original page and the new page. Therefore, SPA avoids loading the entire new page, thereby reducing the delay of page switching, improving the smoothness of the page switching process, and improving the user experience.

[0113] However, during the page switching process of SPA, since the server does not load the new page, the server does not know that the page of SPA has been switched. For example, when SPA is opened for the first time, the page loaded by the server is page A. After SPA switches page A to page B, since the server does not load page B, the server will not know that the user has visited page B, nor will it record the access data corresponding to page B, which ultimately leads to inaccurate visits counted for single-page applications. In addition, the server will record the operation data generated for page B as the operation data corresponding to page A. In view of this, in order to obtain accurate operation data, this specification also proposes a specific embodiment of performing operation data statistics while monitoring whether the page corresponding to SPA is switched.

[0114] The operation data may include access data for the page to be counted; the preset event may be an access event for the page to be counted; and the page to be counted may be a single-page application.

[0115] In the embodiment of the present specification, the step of obtaining the user's operation data for the page to be counted (step 202) may specifically include: if the uniform resource locator corresponding to the single-page application changes, determining whether the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page, and obtaining a second determination result. If the second determination result indicates that the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page, the access data for the third page may be reported so as to count the access data for the third page.

[0116] In the embodiment of the present specification, during the process of loading a single-page application, after the SDK is loaded, the SDK can call the preset API in the single-page application based on the logic code it carries to generate an event listener for monitoring whether the URL corresponding to the single-page application has changed. If the event listener monitors that the URL corresponding to the single-page application has changed, it can be determined whether the change in the URL is to locate the local page element in the second page currently being browsed, or to trigger the page corresponding to the single-page application to switch from the second page currently being browsed to the third page. If the change in the URL is to locate the local page element in the second page currently being browsed, the operation data generated by the change in the URL can be recorded as the operation data corresponding to the second page. If the change in the URL is to trigger the page corresponding to the single-page application to switch from the second page currently being browsed to the third page, the access data corresponding to the third page can be reported, and the reported access data corresponding to the third page can be used to count the number of visits to the single-page application. Subsequently, if corresponding operation data is generated for the third page, the generated operation data can be counted as the operation data corresponding to the third page.

[0117] In the embodiments of the present specification, for a single-page application, when the single-page application is the second page, the click data of the page element in the single-page application and the scrolling data of the scroll bar can be recorded as the operation data corresponding to the second page; when the single-page application switches from the second page to the third page, the click data of the page element in the single-page application and the scrolling data of the scroll bar can be recorded as the operation data corresponding to the third page. Thus, when calculating the click exposure rate of the page element in the second page, the interference of the click data or scrolling data related to the third page can be avoided, and when calculating the click exposure rate of the page element in the third page, the interference of the click data or scrolling data related to the second page can also be avoided, thereby improving the accuracy of calculating the click exposure rate of the page element in the corresponding page.

[0118] Based on the above embodiments, the embodiments of this specification also propose two specific embodiments for determining whether a single-page application switches from the second page to the third page.

[0119] Single-page applications can switch pages by changing the hash information in the URL. Specifically, the hash information in the URL can be changed by calling the hash change API in the single-page application. For example, the hash change API is hashChange. When the hash information in the URL is changed based on the hash change API, a hashChange event is triggered. Therefore, the judgment process of whether a page switch occurs in the single-page application can be started based on the monitored hashChange event.

[0120] Specifically, the change of the uniform resource locator may include a change of hash information in the uniform resource locator, and the determination of whether the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page may specifically include: determining whether there is no page element id in the hash information and whether the document object model corresponding to the single-page application has changed.

[0121] In the embodiments of this specification, the Document Object Model (DOM) is a form for representing and operating HTML documents and XML documents. DOM represents a document as a tree structure composed of nodes, where each node represents a part of the document, such as an element, attribute, text, etc. Through DOM, users can easily operate and modify the content and structure of a document. Figure 5 A specific judgment process for switching from the second page to the third page of a single-page application is shown. Figure 5 As shown, the specific judgment process may include steps 501 to 505.

[0122] Step 501: Listen to the hashChange event.

[0123] In the embodiment of this specification, the event listener registered by calling hashChange in the single-page application can monitor the hashChange event triggered by the change of the hash information in the URL corresponding to the single-page application at a preset time interval. If the event listener monitors the hashChange event, jump to step 502.

[0124] Step 502: Determine whether there is a page element id in the hash information.

[0125] In the embodiment of the present specification, each page element ID in the pre-generated page element ID information library is traversed. If the ID information existing in the hash information can be found, it is determined that the page element ID exists in the hash information; if the ID information existing in the hash information cannot be found, it is determined that the page element ID does not exist in the hash information. If the target page element ID exists in the hash information, it means that the triggered hashChange event is used to locate the target page element corresponding to the target page element ID in the second page currently browsed, and jump to step 505; if the target page element ID does not exist in the hash information, jump to step 503.

[0126] Step 503: Determine whether the DOM corresponding to the single-page application has changed.

[0127] In the embodiments of this specification, changes in the DOM corresponding to the single-page application can be represented as changes in the page structure and / or page content of the page corresponding to the single-page application. Changes in the page structure can include updating the element types contained in the page by adding and / or deleting. Changes in the page content can include changing the text content contained in the element.

[0128] If the DOM corresponding to the single-page application has not changed, it means that the monitored hashChange event is an invalid event, and jump to step 505; if the DOM corresponding to the single-page application has changed, it means that the monitored hashChange event is a valid event, and jump to step 504.

[0129] Step 504: Determine that the single-page application switches from the second page to the third page.

[0130] Step 505: Determine that the single-page application has not switched from the second page to the third page.

[0131] The single-page application can also switch pages by changing the path information in the URL. Specifically, the path information in the URL can be changed by calling the push state API in the single-page application or calling the replace state API in the single-page application. For example, the push state API can be pushState, and the replace state API can be replaceState. When the page is navigated from the original page before the switch to the new page after the switch based on the method of calling the push state API, the system can add the navigation operation data of this time to the history record data of the browser, so that when the user clicks the "back" button in the browser of the new page, the new page can be rolled back to the original page based on the added navigation operation data. When the page is navigated from the original page before the switch to the new page after the switch based on the method of calling the replace state API, the system will not add the navigation operation data of this time to the history record data of the browser, thereby reducing the data volume of the browser history record data. At the same time, since the navigation operation data of this time is not added to the history record data of the browser, when the user clicks the "back" button in the browser of the new page, the new page cannot be rolled back to the original page.

[0132] When the path information in the URL is changed based on the push state API, the pushState event is triggered; when the path information in the URL is changed based on the replace state API, the replaceState event is triggered; therefore, the process of determining whether a page switch occurs in a single-page application can be initiated based on the monitored pushState event or replaceState event.

[0133] Specifically, the change of the uniform resource locator may be a change of path information in the uniform resource locator, and determining whether the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page specifically includes: determining whether the document object model corresponding to the single-page application changes.

[0134] In the embodiments of this specification, Figure 6 Another specific judgment process for switching from the second page to the third page of a single-page application is shown. Figure 6 As shown, the specific judgment process includes steps 601 to 604.

[0135] Step 601: monitor the pushState event or the replaceState event.

[0136] In the embodiment of this specification, the event listener registered by the pushState in the single-page application can be called to listen to the pushState event triggered by the change of the path information in the URL corresponding to the single-page application at a preset time interval. If the event listener listens to the pushState event, jump to step 602.

[0137] Alternatively, the replaceState event triggered by the change of the path information in the URL corresponding to the single-page application can be monitored based on the event listener registered by calling replaceState in the single-page application at a preset time interval. If the event listener monitors the replaceState event, jump to step 602.

[0138] Step 602: Determine whether the DOM corresponding to the single-page application has changed.

[0139] In the embodiments of this specification, changes in the DOM corresponding to the single-page application can be represented as changes in the page structure and / or page content of the page corresponding to the single-page application. Changes in the page structure can include updating the element types contained in the page by adding and / or deleting. Changes in the page content can include changing the text content contained in the element.

[0140] If the DOM corresponding to the single-page application has not changed, it means that the corresponding pushState event or replaceState event monitored is an invalid event, and jump to step 604; if the DOM corresponding to the single-page application has changed, it means that the corresponding pushState event or replaceState event monitored is a valid event, and jump to step 603.

[0141] Step 603: Determine that the single-page application switches from the second page to the third page.

[0142] Step 604: Determine that the single-page application has not switched from the second page to the third page.

[0143] In the embodiments of this specification, a specific embodiment of obtaining scroll data for a scroll bar in a page is also proposed.

[0144] The operation data may include scroll data for a scroll bar in the page to be counted; and the preset event may be a scroll event for the scroll bar.

[0145] In an embodiment of the present specification, the obtaining of the user's operation data for the page to be counted (step 202) may specifically include: determining whether the position information of the scroll bar has changed, and obtaining a third judgment result; if the third judgment result indicates that the position information of the scroll bar has changed, determining whether the time interval between a first time point of a scrolling event corresponding to the most recently collected scrolling data and a second time point when the position information of the scroll bar has changed is greater than a preset threshold, and obtaining a fourth judgment result; if the fourth judgment result indicates that the time interval is greater than the preset threshold, reporting the scrolling data of the scroll bar.

[0146] In the embodiment of the present specification, the change in the position information of the scroll bar may include the change in the position information of the vertical scroll bar and / or the change in the position information of the horizontal scroll bar. The change in the position information of the vertical scroll bar and / or the change in the position information of the horizontal scroll bar will trigger a scroll event.

[0147] In the embodiment of the present specification, during the process of loading a page, after the SDK is loaded, the SDK will call the preset API in the page browser based on the logic code it carries to generate an event listener for monitoring the scrolling event of the scroll bar. If the event listener monitors the scrolling event of the scroll bar, it can be determined whether the time interval between the time point of the currently monitored scrolling event and the time point of the scrolling event corresponding to the most recently reported scrolling data is greater than the preset threshold value B; if the time interval between the time point of the currently monitored scrolling event and the time point of the scrolling event corresponding to the most recently reported scrolling data is less than the preset threshold value B, the scrolling data of the currently monitored scrolling event may not be reported; if the time interval between the time point of the currently monitored scrolling event and the time point of the scrolling event corresponding to the most recently reported scrolling data is greater than or equal to the preset threshold value B, the scrolling data of the currently monitored scrolling event may be reported.

[0148] It should be noted that if a closing instruction for a page is obtained, then for the scroll bar within the page, scroll data of the scroll bar can be generated based on the current position of the scroll bar and the time point when the closing instruction is obtained, and the generated scroll data can be reported. Thus, when the effective exposure data for the page elements is counted based on the scroll data of the scroll bar, missing of effective exposure data can be avoided.

[0149] In an embodiment of the present specification, when collecting corresponding scrolling data for a scroll bar, if the time interval between the time point of a currently monitored scrolling event and the time point of a scrolling event corresponding to the most recently reported scrolling data is less than a preset threshold value B, then the scrolling data of the currently monitored scrolling event may not be reported, so as to reduce the amount of reported scrolling data, thereby avoiding the risk of performance issues such as page freezes due to a large amount of reported scrolling data when the scroll bar is frequently scrolled.

[0150] Based on the above embodiments, the embodiments of this specification also propose a specific embodiment for calculating the click exposure rate of page elements.

[0151] In the embodiment of the present specification, the click exposure rate of the page element is calculated based on the exposure amount and the click amount (step 212), which may specifically include: obtaining the element click amount for the page element within a preset time period; obtaining the element exposure amount for the page element within the preset time period; calculating the quotient of the element click amount and the element exposure amount to obtain the click exposure rate of the page element within the preset time period.

[0152] In an embodiment of the present specification, the first element click volume for a target page element within a preset time period can be obtained, and the first element click volume is used to indicate the number of clicks on the target page element by a user corresponding to a target access id within the preset time period; and the first element exposure volume for the target page element within the preset time period can be obtained, and the first element exposure volume is used to indicate the exposure volume of the target page element to the user corresponding to the target access id within the preset time period; then, the quotient of the first element click volume and the first element exposure volume is calculated to obtain the first quotient, and the first quotient is determined as the click exposure rate of the target page element corresponding to the target access id within the preset time period.

[0153] In an embodiment of the present specification, the second element click volume for the target page element within a preset time period can be obtained, and the second element click volume is used to represent the total number of clicks on the target page element within the preset time period; and the second element exposure volume for the target page element within the preset time period can be obtained, and the second element exposure volume is used to represent the total exposure volume of the target page element within the preset time period; then, the quotient of the second element click volume and the second element exposure volume is calculated to obtain the second quotient, and the second quotient is determined as the total click exposure rate of the target page element within the preset time period.

[0154] Optionally, after obtaining the page elements to be counted and the number of clicks on the page elements, the number of clicks on each page element can be displayed to the operator. If the number of clicks on each page element is displayed to the operator in the form of a data list such as a table, it is not convenient for the operator to quickly match the number of clicks on the page element at a specific position in the page.

[0155] In the embodiment of the present specification, after determining the page elements that need to be counted in the page to be counted and the number of clicks on the page elements (step 204) based on the operation data, it can also include: determining the display information corresponding to the page element based on the number of clicks on the page element; obtaining the display position of the page element in the target page; and displaying the display information at the display position.

[0156] In the embodiments of the present specification, the display information may be information for displaying the click volume of the page element in the target page. The display information may include character information, and a preset character may be used to represent a preset click volume range, such as using the letter A to represent a click volume range of 0 to 5, using the letter B to represent a click volume range of 6 to 10, using the letter C to represent a click volume range of 11 to 15, and so on, and different English letters represent different click volume ranges. The display information may also include a color corresponding to the RGB information, and a preset click volume range may be represented by a color corresponding to the preset RGB information, such as light yellow to represent a click volume range of 0 to 5, dark yellow to represent a click volume range of 6 to 10, light green to represent a click volume range of 11 to 15, and so on, and different colors represent different click volume ranges. The display information may also be in other forms, and the specific form of the display information is not limited.

[0157] In the embodiment of this specification, the target page may be a page for visually displaying the number of clicks on the page elements to the operator. Visually displaying the number of clicks on the page elements allows the operator to quickly and intuitively know which page elements on the page have a large number of clicks and which page elements have a small number of clicks.

[0158] During a preset time period, the first page where the page element is located is usually updated and upgraded multiple times in different versions. If the first version of the first page used to visually display the number of clicks on the page element is different from the second version of the first page where the page element is located when it is clicked, it is necessary to determine the display position for displaying the number of clicks on the page element in the first page of the first version. Based on this, the present specification also proposes a specific embodiment for obtaining the display position of the page element in the target page.

[0159] In an embodiment of the present specification, each first page element in the first page of the first version is traversed, and if a target first page element that matches the second page element whose click volume is to be visualized can be matched, the position of the target first page element in the first page of the first version is determined as the display position of the second page element in the first page of the first version; if no target first page element that matches the second page element whose click volume is to be visualized is matched, displaying the click volume of the second page element in the first page of the first version is prohibited.

[0160] Specifically, for a first page element, the process of determining whether the first page element is a target first page element that matches the second page element may include steps one to five.

[0161] Step 1: Get the id information of the first page element, the className information of the first page element, the xpath information of the first page element, the distance value a between the first page element and the top edge of the first page, and the distance value b between the first page element and the left edge of the first page. Get the id information of the second page element, the className information of the second page element, the xpath information of the second page element, the distance value c between the second page element and the top edge of the first page, and the distance value d between the second page element and the left edge of the first page.

[0162] Step 2: If the id information of the first page element is consistent with the id information of the second page element, the first page element is determined as the target first page element that matches the second page element; if the id information of the first page element is inconsistent with the id information of the second page element, jump to step 3.

[0163] Step three: If the className information of the first page element is consistent with the className information of the second page element and the xpath information of the first page element is consistent with the xpath information of the second page element, the first page element is determined as the target first page element that matches the second page element; if the className information of the first page element is inconsistent with the className information of the second page element, jump to step four; if the element xpath information of the first page element is inconsistent with the element xpath information of the second page element, jump to step five.

[0164] Step 4: If the xpath information of the first page element is consistent with the xpath information of the second page element and the difference between the distance value a corresponding to the first page element and the distance value c corresponding to the second page element is less than or equal to the preset threshold C, and the difference between the distance value b corresponding to the first page element and the distance value d corresponding to the second page element is less than or equal to the preset threshold C, then the first page element is determined as the target first page element that matches the second page element.

[0165] Step 5: If the difference between the distance value a corresponding to the first page element and the distance value c corresponding to the second page element is less than or equal to the preset threshold C, and the difference between the distance value b corresponding to the first page element and the distance value d corresponding to the second page element is less than or equal to the preset threshold C, then the first page element is determined as the target first page element that matches the second page element; if the difference between the distance value a corresponding to the first page element and the distance value c corresponding to the second page element is greater than the preset threshold C, and / or the difference between the distance value b corresponding to the first page element and the distance value d corresponding to the second page element is greater than the preset threshold C, then the display of the click volume of the second page element in the first page of the first version is prohibited.

[0166] A pop-up box is a page element. Usually, a pop-up box will not always be displayed in the visible area of ​​the page. Only after being triggered to pop up, it will be exposed at a fixed position in the visible area of ​​the page, and the display position of the pop-up box in the visible area will not change with the scrolling of the page scroll bar. In other words, the first distance value between the pop-up box and the top edge of the page document and the second distance value between the pop-up box and the left edge of the page document will continue to change with the scrolling of the page scroll bar, that is, the first distance value and the second distance value corresponding to the pop-up box are not fixed. Therefore, the method of determining the exposure of the page element based on the position change information of the scroll bar is not suitable for determining the exposure of the pop-up box. Based on this, this specification also proposes a specific embodiment for determining the exposure of the pop-up box type page element in the visible area of ​​the page to be counted.

[0167] The page element is a target pop-up box, and the method may further include: determining whether a target node corresponding to the target pop-up box is added to the document object model corresponding to the page to be counted and whether an overlapping area between the target pop-up box and the visible area of ​​the page to be counted is greater than or equal to a preset threshold value D, and obtaining a fifth judgment result; if the fifth judgment result indicates that an overlapping area between the target pop-up box and the visible area of ​​the page to be counted is greater than or equal to the preset threshold value D, then adding one to the number of exposure statistics of the target pop-up box.

[0168] In the embodiment of the present specification, during the process of loading a page, after the SDK is loaded, the SDK will call the change observer API in the page browser to register the first event listener based on the logic code it carries, and call the intersection observer API in the page browser to register the second event listener. The change observer API can be MutationObserver, and the first event listener can be used to monitor whether the target node corresponding to the target pop-up box is added to the document object model corresponding to the page to be counted. The intersection observer API can be IntersectionObserver, and the second event listener can be used to monitor the overlapping area of ​​the target pop-up box and the visible area of ​​the page to be counted. If the first event listener detects that the target node corresponding to the target pop-up box is added to the document object model corresponding to the page to be counted, the second event listener will continue to monitor the overlapping area of ​​the target pop-up box and the visible area of ​​the page to be counted; if the second event listener detects that the overlapping area of ​​the target pop-up box and the visible area of ​​the page to be counted is greater than or equal to the preset threshold D, it can be confirmed that the target pop-up box is exposed once, and the number of exposure statistics of the target pop-up box is increased by one.

[0169] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 7 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of a device for calculating the click exposure rate of a page element. Figure 7 As shown, the device may include:

[0170] The first acquisition module 702 is used to acquire the user's operation data on the page to be counted.

[0171] The first determination module 704 is used to determine the page elements that need to be counted in the page to be counted and the number of clicks on the page elements according to the operation data.

[0172] The second determination module 706 is configured to determine first position information of the page element in the first page where the page element is located.

[0173] The second acquisition module 708 is used to acquire position change information of the scroll bar in the first page based on the operation data.

[0174] The statistics module 710 is used to count the exposure of the page element based on the first position information and the position change information.

[0175] The calculation module 712 is used to calculate the click exposure rate of the page element according to the exposure amount and the click amount.

[0176] based on Figure 7 The present specification also provides some specific implementation schemes of the device, which are described below.

[0177] Optionally, the operation data includes click data for page elements in the page to be counted; the click data includes the page element id of the clicked page element and the uniform resource locator of the page where the page element is located; the page to be counted is multiple pages.

[0178] The first determining module 704 may specifically include:

[0179] The determining unit is used to determine the page element corresponding to the page element id as the page element that needs to be counted in the page to be counted.

[0180] The processing unit is used to classify and aggregate the click data according to the uniform resource locator to obtain a click data set corresponding to each page in the pages to be counted.

[0181] The first statistical unit is used to count the click volume of the page element corresponding to the page element id according to the click data set corresponding to each page.

[0182] Optionally, the first statistical unit may specifically include:

[0183] The determination subunit is used to determine, for a target page element id, a target click data set corresponding to the target page element id.

[0184] The first statistical subunit is used to count the number of clicks on the target page element corresponding to the target page element id in the target click data set.

[0185] Optionally, the first statistical subunit may be specifically used for:

[0186] For a target click data in the target click data set, it is determined whether the target click data contains the target page element id to obtain a first determination result.

[0187] If the first judgment result indicates that the target click data contains the target page element id, the statistical number of clicks on the target page element is increased by one.

[0188] Optionally, the operation data includes scroll data for a scroll bar in the first page and an access ID for the first page.

[0189] The statistics module 710 may specifically include:

[0190] a classification unit, configured to classify the scrolling data according to the access ID to obtain a plurality of scrolling data sets corresponding to the first page; the scrolling data in one scrolling data set corresponds to the same access ID, and the scrolling data in different scrolling data sets correspond to different access IDs;

[0191] The second statistical unit is used to count the exposure amount of the page element in the first page corresponding to each of the scrolling data sets according to the position change information included in the scrolling data in each of the scrolling data sets.

[0192] The summarizing unit is used to summarize the exposure of the page element in the first page corresponding to each of the scrolling data sets to obtain the total exposure for the page element.

[0193] Optionally, the position change information includes at least a first distance value between the scroll bar and the top edge of the first page, a second distance value between the scroll bar and the left edge of the first page, and a timestamp used to indicate the occurrence time of the scroll data; the first position information includes at least a third distance value between the page element and the top edge of the first page, a fourth distance value between the page element and the left edge of the first page, the element height value of the page element, and the element width value of the page element.

[0194] The second statistical unit may specifically include:

[0195] The ascending processing subunit is used to perform ascending processing on each piece of the position change information according to the timestamp for one of the rolling data sets to obtain a target sequence.

[0196] A selection subunit is used to select a position change information pair that meets a preset condition from the target sequence; each of the position change information pairs includes a first position change information and a second position change information, and the preset condition is that the first distance value included in the first position change information is less than or equal to the third distance value and the second distance value included in the first position change information is less than or equal to the fourth distance value, the first distance value included in the second position change information is greater than the sum of the third distance value and the element height value, and the second distance value included in the second position change information is greater than the sum of the fourth distance value and the element width value.

[0197] The second statistical subunit is used to count the number of the position change information pairs to obtain the exposure amount of the page element in the one of the scrolling data sets.

[0198] Optionally, the operation data includes access data for the page to be counted; the preset event is an access event for the page to be counted; and the page to be counted is a single-page application.

[0199] The first acquisition module 702 may specifically include:

[0200] The first judgment unit is used to judge whether the change of the uniform resource locator corresponding to the single-page application triggers the single-page application to switch from the second page to the third page if the uniform resource locator corresponding to the single-page application changes, so as to obtain a second judgment result.

[0201] The first reporting unit is used to report access data for the third page if the second judgment result indicates that the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page, so as to collect statistics on the access data of the third page.

[0202] Optionally, the first judging unit may specifically include:

[0203] The first judgment subunit is used to judge whether the page element id does not exist in the hash information and whether the document object model corresponding to the single-page application changes.

[0204] Optionally, the first judging unit may specifically include:

[0205] The second determination subunit is used to determine whether the document object model corresponding to the single-page application changes.

[0206] Optionally, the operation data includes scrolling data of a scroll bar in the page to be counted; and the preset event is a scrolling event for the scroll bar.

[0207] The first acquisition module 702 may specifically include:

[0208] The second judgment unit is used to judge whether the position information of the scroll bar changes, and obtain a third judgment result.

[0209] The third judgment unit is used to judge whether the time interval between the first time point of the scrolling event corresponding to the most recently collected scrolling data and the second time point when the position information of the scrolling bar changes is greater than a preset threshold if the third judgment result indicates that the position information of the scroll bar has changed, so as to obtain a fourth judgment result.

[0210] The second reporting unit is configured to report the scrolling data of the scroll bar if the fourth judgment result indicates that the time interval is greater than the preset threshold.

[0211] Optionally, the calculation module 712 may specifically include:

[0212] A first acquisition unit, used to acquire the element click volume for the page element within a preset time period;

[0213] A second acquisition unit, configured to acquire an element exposure amount for the page element within the preset time period;

[0214] The calculation unit is used to calculate the quotient of the element click volume and the element exposure volume to obtain the click exposure rate of the page element within the preset time period.

[0215] Optional, Figure 7 The device may also include:

[0216] The third determination module is used to determine the display information corresponding to the page element according to the click volume of the page element.

[0217] The third acquisition module is used to acquire the display position of the page element in the target page.

[0218] A display module is used to display the display information at the display position.

[0219] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0220] Figure 8 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a device for calculating the click exposure rate of page elements. Figure 8 As shown, the device 800 may include:

[0221] at least one processor 810; and,

[0222] A memory 830 in communication with the at least one processor; wherein,

[0223] The memory 830 stores instructions 820 that can be executed by the at least one processor 810. The instructions are executed by the at least one processor 810 to enable the at least one processor 810 to:

[0224] Get the user's operation data on the page to be counted.

[0225] According to the operation data, the page elements that need to be counted in the page to be counted and the number of clicks on the page elements are determined.

[0226] Determine first position information of the page element in a first page where the page element is located.

[0227] Based on the operation data, position change information of a scroll bar in the first page is acquired.

[0228] Based on the first position information and the position change information, statistics are collected on the exposure of the page element.

[0229] The click exposure rate of the page element is calculated according to the exposure amount and the click amount.

[0230] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0231] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 8 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0232] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many improvements to method flows today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0233] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0234] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0235] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0236] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0237] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0238] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0239] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0240] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0241] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0242] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0243] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0244] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0245] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0246] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for calculating a click exposure rate of a page element, comprising: Obtain the user's operation data on the page to be counted; Determining, according to the operation data, page elements that need to be counted in the page to be counted and the number of clicks on the page elements; Determine first position information of the page element in a first page where the page element is located; Based on the operation data, obtaining position change information of a scroll bar in the first page in the first page; Based on the first position information and the position change information, counting the exposure amount of the page element; The click exposure rate of the page element is calculated according to the exposure amount and the click amount.

2. The method according to claim 1, wherein the operation data comprises click data on a page element in the page to be counted; the click data comprises a page element ID of the clicked page element and a uniform resource locator of the page where the page element is located; The pages to be counted are multiple pages; Determining the page elements to be counted and the number of clicks on the page elements in the page to be counted according to the operation data specifically includes: Determine the page element corresponding to the page element id as the page element that needs to be counted in the page to be counted; According to the uniform resource locator, the click data is classified and aggregated to obtain a click data set corresponding to each page in the pages to be counted; According to the click data sets corresponding to the various pages, the click counts of the page elements corresponding to the page element ids are counted.

3. The method according to claim 2, wherein the number of clicks on the page element corresponding to the page element id is counted according to the click data set corresponding to each page, specifically comprising: For a target page element id, determine a target click data set corresponding to the target page element id; The number of clicks on the target page element corresponding to the target page element id in the target click data set is counted.

4. The method according to claim 3, wherein counting the number of clicks on the target page element corresponding to the target page element id in the target click data set specifically comprises: For a target click data in the target click data set, determining whether the target click data contains the target page element id, and obtaining a first determination result; If the first judgment result indicates that the target click data contains the target page element id, the statistical number of clicks on the target page element is increased by one.

5. The method of claim 1, wherein the operation data comprises scroll data for a scroll bar in the first page and an access ID for the first page; The counting of exposure amounts for the page element based on the first position information and the position change information specifically includes: classifying the scrolling data according to the access ID to obtain a plurality of scrolling data sets corresponding to the first page; The rolling data in a rolling data set correspond to the same access ID, and the rolling data in different rolling data sets correspond to different access IDs; According to the position change information included in the scrolling data in each of the scrolling data sets, counting the exposure amount of the page element in the first page corresponding to each of the scrolling data sets; The exposure amounts of the page elements in the first pages corresponding to the respective scrolling data sets are summarized to obtain the total exposure amount for the page elements.

6. The method according to claim 5, wherein the position change information comprises at least a first distance value between the scroll bar and the top edge of the first page, a second distance value between the scroll bar and the left edge of the first page, and a timestamp indicating a time when the scroll data occurs; The first position information includes at least a third distance value between the page element and the top edge of the first page, a fourth distance value between the page element and the left edge of the first page, an element height value of the page element, and an element width value of the page element; The counting of exposure amounts of the page elements in the first pages corresponding to the respective scrolling data sets specifically includes: For one of the rolling data sets, the position change information is processed in ascending order according to the timestamp to obtain a target sequence; Selecting position change information pairs that meet preset conditions from the target sequence; each of the position change information pairs includes a first position change information and a second position change information, and the preset condition is that the first distance value included in the first position change information is less than or equal to the third distance value and the second distance value included in the first position change information is less than or equal to the fourth distance value, the first distance value included in the second position change information is greater than the sum of the third distance value and the element height value, and the second distance value included in the second position change information is greater than the sum of the fourth distance value and the element width value; The number of the position change information pairs is counted to obtain the exposure amount of the page element in the scrolling data set.

7. The method according to claim 1, wherein the operation data comprises access data for the page to be counted; the preset event is an access event for the page to be counted; and the page to be counted is a single-page application; The obtaining of the user's operation data on the page to be counted specifically includes: If the uniform resource locator corresponding to the single-page application changes, determine whether the change in the uniform resource locator triggers the single-page application to switch from the second page to the third page, and obtain a second determination result; If the second judgment result indicates that the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page, the access data for the third page is reported so as to collect statistics on the access data of the third page.

8. The method according to claim 7, wherein the change of the uniform resource locator is a change of hash information in the uniform resource locator, and the determining whether the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page specifically comprises: It is determined whether the page element id does not exist in the hash information and whether the document object model corresponding to the single-page application changes.

9. The method according to claim 7, wherein the change of the uniform resource locator is a change of path information in the uniform resource locator, and the determining whether the change of the uniform resource locator triggers the single-page application to switch from the second page to the third page specifically comprises: Determine whether a document object model corresponding to the single-page application has changed.

10. The method according to claim 1, wherein the operation data comprises scrolling data of a scroll bar in the page to be counted; The preset event is a scrolling event for the scroll bar; The obtaining of the user's operation data on the page to be counted specifically includes: Determine whether the position information of the scroll bar changes, and obtain a third determination result; If the third judgment result indicates that the position information of the scroll bar has changed, then determine whether the time interval between the first time point of the scroll event corresponding to the scroll data collected most recently and the second time point when the position information of the scroll bar has changed is greater than a preset threshold, to obtain a fourth judgment result; If the fourth judgment result indicates that the time interval is greater than the preset threshold, the scrolling data of the scroll bar is reported.

11. The method according to claim 1, wherein the step of calculating the click exposure rate of the page element according to the exposure amount and the click amount comprises: Obtaining the number of element clicks on the page element within a preset time period; Obtaining the element exposure amount for the page element within the preset time period; The quotient of the element click volume and the element exposure volume is calculated to obtain the click exposure rate of the page element within the preset time period.

12. The method according to claim 1, after determining the page elements to be counted in the page to be counted and the number of clicks on the page elements according to the operation data, further comprising: Determining display information corresponding to the page element according to the number of clicks on the page element; Obtaining the display position of the page element in the target page; The display information is displayed at the display position.

13. A device for calculating the click exposure rate of a page element, comprising: The first acquisition module is used to acquire the user's operation data on the page to be counted; A first determination module is used to determine the page elements that need to be counted in the page to be counted and the number of clicks on the page elements according to the operation data; A second determination module is used to determine first position information of the page element in a first page where the page element is located; A second acquisition module, configured to acquire position change information of a scroll bar in the first page based on the operation data; A statistics module, configured to count the exposure of the page element based on the first position information and the position change information; A calculation module is used to calculate the click exposure rate of the page element according to the exposure amount and the click amount.

14. A device for calculating the click exposure rate of a page element, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtain the user's operation data on the page to be counted; Determining, according to the operation data, page elements that need to be counted in the page to be counted and the number of clicks on the page elements; Determine first position information of the page element in a first page where the page element is located; Based on the operation data, obtaining position change information of a scroll bar in the first page in the first page; Based on the first position information and the position change information, counting the exposure amount of the page element; The click exposure rate of the page element is calculated according to the exposure amount and the click amount.