Exposure detection method and device, computer equipment and storage medium

Exposure detection is performed by monitoring the sliding stop event, which solves the problem in the existing technology that the exposure buried point data is unreal when the view slides, and achieves more realistic and accurate exposure data collection.

CN119357004APending Publication Date: 2025-01-24SHANGHAI SHUHE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411616685.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing exposure buried point technology cannot truly reflect the exposure behavior of the view, especially when the view is sliding. Although the view is displayed on the screen, the user does not browse, resulting in the exposure buried point data being unreal.

Method used

By listening to the sliding state of the page element, the monitoring of the sliding stop incident, and exposing detection at this time to generate real exposure buried data.

Benefits of technology

Make sure that the exposure of the buried data is more real and accurate, and the data caused by the sliding of the view is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357004A_ABST
    Figure CN119357004A_ABST
Patent Text Reader

Abstract

The invention relates to an exposure detection method and device, computer equipment and a storage medium. The method comprises the steps that in the page element exposure process, the sliding state of an element is monitored, when it is monitored that a target element is in sliding, a sliding stop event of the target element is monitored, when the sliding stop event of the target element is monitored, exposure detection is carried out on the target element, and when it is detected that the target element meets the exposure condition, the target element is exposed. And performing exposure treatment on the target element, and generating an exposure buried point number. By adopting the method, the exposure buried point data can reflect the exposure behavior of the element more truly and more accurately.
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 an exposure detection method, apparatus, computer equipment and storage medium. Background Art

[0002] In order to analyze user behavior and understand user operation habits, tracking points on APP (Application) is an indispensable part. There are many types of tracking points, such as exposure tracking points (exposure of buttons, pictures, text, etc.), click tracking points (buttons, pictures, bottom tab clicks, etc.), and full-process tracking points (backstage, foreground, user screenshot events, etc.). Exposure tracking points are a data collection technology. In Internet products (such as websites, APPs), exposure tracking points are used to record the exposure of users' browsing content. When an element (such as an advertisement, a specific article, a functional module, etc.) appears in the visible range of the user's screen and reaches a certain time, the event will be recorded through exposure tracking points. This helps product operators understand the user's attention to different content. For example, advertisers can use this to know the number of times an advertisement is exposed, and then evaluate the effectiveness of advertising; product managers can use this data to analyze the user's use of different functional modules, thereby optimizing product layout and content display strategies.

[0003] Most of the page layouts on the APP are in list display style, and some views can only be displayed by sliding. The existing exposure tracking points are sent as long as there is view data returned, which cannot truly reflect the exposure behavior of the view. Summary of the invention

[0004] Based on this, it is necessary to provide an exposure detection method, device, computer equipment and storage medium that can obtain real exposure data in response to the above technical problems.

[0005] In a first aspect, an exposure detection method is provided, comprising:

[0006] During the exposure of page elements, the sliding status of the elements is monitored;

[0007] When the target element is detected to be sliding, the sliding stop event of the target element is monitored;

[0008] When the sliding stop event of the target element is monitored, the target element is exposed.

[0009] When it is detected that the target element meets the exposure conditions, the target element is exposed and exposure point data is generated.

[0010] In one embodiment, before monitoring the sliding state of the element, the exposure detection method further includes:

[0011] Listen for events when elements are added to the window;

[0012] When the target element is added to the window, the exposure detection step of the target element is executed;

[0013] When the sliding stop event of the target element is listened, the target element is exposed to detection, including:

[0014] When the sliding stop event of the target element is listened to and the target element is not exposed, the exposure detection is performed on the target element.

[0015] In one embodiment, the exposure detection method further includes:

[0016] When it is detected that the target element is not sliding, determine whether the target element is a picture;

[0017] When the target element is a picture, listen for the loading completion event of the target element;

[0018] When the target element is loaded, an exposure detection is performed on the target element.

[0019] In one embodiment, monitoring the sliding state of an element includes:

[0020] The scroll monitor is called to listen to the tracking run loop mode of the run loop object when elements are added to the window and when the element is registered for exposure;

[0021] When the run loop object is monitored to enter the tracking run loop mode, the current view is obtained. The current view is the parent view of the target element;

[0022] Determine whether the current view is a scroll view;

[0023] If the current view is a scroll view and is in a sliding state, determine whether the target element is sliding;

[0024] If the current view is a scroll view and is not in a sliding state, get the parent view of the current view as the current view, and return to the step of determining whether the current view is a scroll view until the top-level view is traversed.

[0025] In one of the embodiments, monitoring the sliding stop event of the target element includes:

[0026] Listen for notification messages sent by the scroll monitor;

[0027] When the notification information of sliding stop sent by the scroll monitor is listened, it is determined that the sliding stop event of the target element is listened.

[0028] In one embodiment, the exposure detection method further includes:

[0029] When the page is initialized, the exposure tracking parameters are obtained. The exposure tracking parameters include the exposure tracking parameters of the target element, the exposure tracking parameters of the component to which the target element belongs, the exposure tracking parameters of the resource position to which the component belongs, and the exposure tracking parameters of the page to which the resource position belongs.

[0030] Create an exposure manager object;

[0031] Register the page exposure object according to the exposure tracking parameters of the page through the exposure manager object, and mount the page exposure object on the exposure manager object;

[0032] Register the resource position exposure object according to the exposure tracking parameters of the resource position through the exposure manager object, and mount the resource position exposure object on the page exposure object;

[0033] Register the component exposure object according to the component exposure tracking parameters through the exposure manager object, and mount the component exposure object on the resource position exposure object;

[0034] Register the element exposure object according to the exposure tracking parameters of the target element through the exposure manager object, and mount the element exposure object on the component exposure object to build an exposure object tree;

[0035] Each object in the exposure object tree has a callback function to generate corresponding exposure tracking data, including:

[0036] Call the callback function associated with the target element in the exposure object tree, and generate exposure tracking data through the callback function.

[0037] In one embodiment, generating corresponding exposure tracking data includes:

[0038] Generate an element exposure event corresponding to the target element;

[0039] According to the exposure object tree, determine whether there is an exposure record in the component exposure object associated with the target element. If not, generate a component exposure event;

[0040] Determine whether there is an exposure record in the resource position exposure object associated with the component. If not, generate a resource position exposure event;

[0041] Determine whether there is an exposure record in the page exposure object associated with the resource position, and if not, generate a page exposure event;

[0042] Establish the association relationship between the element exposure event, component exposure event, resource exposure event and page exposure event corresponding to the target element, and generate the corresponding exposure tracking point data according to the association relationship.

[0043] In a second aspect, an exposure detection device is provided, comprising:

[0044] The first monitoring module is used to monitor the sliding state of the element during the exposure process of the page element;

[0045] The second monitoring module is used to monitor the sliding stop event of the target element when it is detected that the target element is sliding;

[0046] The detection module is used to perform exposure detection on the target element when a sliding stop event of the target element is monitored;

[0047] The exposure module is used to expose the target element and generate exposure point data when it is detected that the target element meets the exposure conditions.

[0048] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0049] During the exposure of page elements, the sliding status of the elements is monitored;

[0050] When the target element is detected to be sliding, the sliding stop event of the target element is monitored;

[0051] When the sliding stop event of the target element is monitored, the target element is exposed.

[0052] When it is detected that the target element meets the exposure conditions, the target element is exposed and exposure point data is generated.

[0053] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0054] During the exposure of page elements, the sliding status of the elements is monitored;

[0055] When the target element is detected to be sliding, the sliding stop event of the target element is monitored;

[0056] When the sliding stop event of the target element is monitored, the target element is exposed.

[0057] When it is detected that the target element meets the exposure conditions, the target element is exposed and exposure point data is generated.

[0058] The above-mentioned exposure detection method, device, computer equipment and storage medium monitor the exposure detection timing of the element during the exposure process of the page element. The exposure detection timing includes when the element stops sliding. When the exposure detection timing of the target element is monitored, the exposure detection function is called to perform exposure detection on the target element. When it is detected that the target element meets the exposure condition, the target element is exposed and exposure buried point data is generated. The present application can monitor the exposure detection timing of the element, specifically by monitoring the sliding stop event of the element to monitor the exposure detection timing. When the exposure detection timing is monitored, the exposure detection is performed, so that the exposure buried point data more truly reflects the exposure behavior of the view and is more accurate, which solves the problem in the traditional technology that if the video is sliding, although the view is displayed on the screen, the user does not stop to browse, and the exposure buried point does not ignore this part of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A diagram showing an application environment of an exposure detection method in an embodiment;

[0060] Figure 2 A schematic diagram of a flow chart of an exposure detection method in an embodiment

[0061] Figure 3 It is a schematic diagram of a process of monitoring an element sliding event in one embodiment;

[0062] Figure 4 is a schematic flow chart of an exposure detection method in another embodiment;

[0063] Figure 5 A schematic diagram of a process for generating exposure point data in one embodiment;

[0064] Figure 6 is a structural block diagram of an exposure detection device in one embodiment;

[0065] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0067] Please refer to Figure 1 , Figure 1 A schematic diagram of an application environment of an exposure detection method provided by an exemplary embodiment of the present application. Figure 1As shown, the application environment includes a first server 100 and a second server 101. The first server 100 and the second server 101 can be communicatively connected via a network 102 to implement the exposure detection method of the present application.

[0068] The first server 100 is used to monitor the sliding state of the element during the exposure process of the page element. When it is monitored that the target element is sliding, it monitors the sliding stop event of the target element. When the sliding stop event of the target element is monitored, the target element is exposed. When it is detected that the target element meets the exposure condition, the target element is exposed, and exposure point data is generated and reported to the second server 101.

[0069] The first server 100 may be implemented as an independent server or a server cluster composed of multiple servers. The first server 100 may be a data collection server.

[0070] The second server 101 is used to receive the exposure point data reported by the first server and analyze the data. The second server 101 can be implemented as an independent server or a server cluster composed of multiple servers. The second server 101 can be a point server.

[0071] The network 102 is used to realize the network connection between the first server 100 and the second server 101. Specifically, the network 102 may include various types of wired or wireless networks.

[0072] In the first aspect, Figure 2 As shown, an exposure detection method is provided, which is applied to Figure 1 Taking the first server in the example as an example, the following steps are included:

[0073] Step S11, during the exposure process of the page element, the sliding state of the element is monitored.

[0074] The elements in a page are the various components that make up a web page or software interface. In terms of web pages, elements include text (such as titles, body paragraphs), images (such as product images, advertising images, etc.), links (navigation links, external links), forms (login boxes, registration boxes, search boxes), and buttons.

[0075] The element exposure process refers to a series of stages from when an element is loaded in a page or application to when it can be seen by the user and the system records exposure-related data.

[0076] The state of an element refers to the state of the element during the exposure process, such as the sliding state of the element and the state of the element entering the window.

[0077] Specifically, when an element is loaded and located within the visible range of the screen, such as when a webpage or APP is just opened, the content and pop-up ads in the middle of the screen can be exposed without sliding. When an element is loaded and located outside the visible range of the screen, such as at the bottom of a long page or deep in the sidebar, it may be necessary to slide the screen to bring it into the visible range for exposure, and its sliding status needs to be monitored.

[0078] Step S12: When it is detected that the target element is sliding, a sliding stop event of the target element is monitored.

[0079] Specifically, the present application pre-creates a scroll monitor, and monitors the sliding state and sliding stop events of the target element through the scroll monitor.

[0080] Step S13: when a sliding stop event of a target element is monitored, an exposure detection is performed on the target element.

[0081] Exposure detection refers to detecting whether an element meets the exposure condition. Specifically, the present application performs exposure detection on the target element by calling the exposure detection function. When a sliding stop event of the target element is detected, it is considered that this is the exposure detection opportunity, and the exposure detection can be performed.

[0082] The exposure detection for the target element may call an exposure detection function to detect the hidden state and transparency of the target element and whether the view controller associated with the target element is located at the top layer of the view, so as to perform the exposure detection.

[0083] Specifically, calling the exposure detection function to perform exposure detection on the target element may include the following steps:

[0084] Determine whether the element is hidden;

[0085] If the element is not hidden, further determine whether the transparency of the element is greater than 0;

[0086] If the transparency of the element is greater than 0, it is further determined whether the element has been exposed;

[0087] If the element has not been exposed, it is further determined whether the view controller corresponding to the element is at the topmost level of the view;

[0088] If the view controller corresponding to the element is at the top level of the view, it is further determined whether the element is sliding;

[0089] If the element is not sliding, further determine whether it is a picture that needs to process the exposure logic;

[0090] If the image needs to process the exposure logic, further determine whether the image has been loaded;

[0091] If the image is loaded, it is further determined whether the coordinates of the element mapped to the window are within the visible range;

[0092] If so, it is determined that the element meets the exposure condition.

[0093] Step S14: when it is detected that the target element meets the exposure condition, the target element is exposed and exposure point data is generated.

[0094] The exposure conditions may include the following conditions:

[0095] 1. The element has not been exposed.

[0096] 2. The element is not hidden.

[0097] 3. The element's transparency is greater than 0.

[0098] 4. The element is on the top-level page.

[0099] 5. The element is not sliding.

[0100] 6. If it is a picture element, the picture needs to be loaded.

[0101] 7. The element's coordinates are mapped to the window within the visible range.

[0102] Generating exposure embedding data may include: generating corresponding exposure embedding data according to preset exposure embedding parameters. The exposure embedding data may specifically include information such as exposure time, user identification, and exposure content.

[0103] In one of the embodiments, before monitoring the sliding state of an element, the exposure detection method further includes: monitoring an event of adding an element to a window, and when it is monitored that the target element is added to the window, executing the step of performing exposure detection on the target element; when the sliding stop event of the target element is monitored, performing exposure detection on the target element, including: when the sliding stop event of the target element is monitored and the target element is not exposed, performing exposure detection on the target element.

[0104] Adding an element to a window generally refers to placing an element (such as a button, a text box, a label, etc.) into the container of the window.

[0105] Specifically, the present application first monitors the event of adding an element to the window. If it is detected that the target element is added to the window, it can be considered that one of the exposure detection opportunities is monitored, and the exposure detection is performed on the target element. If it is found that the target element meets the exposure conditions, the target element will be exposed and the exposure point data will be reported to the point server, and the data record of the target element being exposed will be recorded.

[0106] Furthermore, the first server will continue to monitor the sliding state. When it is detected that the target element is sliding, it will continue to monitor the sliding stop event of the target element. When the sliding stop event of the target element is detected, it is considered that the second exposure detection opportunity of the target element has been detected, and then the exposure detection will be performed. Before performing the exposure detection, it will first determine whether the target element has been exposed. If it has been exposed, the exposure will not be repeated. If it has not been exposed, the exposure detection will continue to be performed.

[0107] Specifically, the present application monitors whether an element is added to a window, and the specific steps may include:

[0108] Hook (intercept) the didMoveToWindow method of UIView (view or element), and determine whether the element is added to the window by intercepting the didMoveToWindow method. Furthermore, for the UIView that needs to process element exposure, call the checkViewVisible method of its associated ExposureManager object to detect whether it is exposed and process the exposure logic. Among them, the ExposureManager object is a pre-created exposure manager object, the didMoveToWindow method refers to the method by which the element is added to the window, and the checkViewVisible method is the exposure detection function in this application. This application intercepts the didMoveToWindow method. When it is found that the target element is added to the window after the interception, it further detects whether the exposure conditions are met through the checkViewVisible method. If met, the exposure logic is processed.

[0109] In another embodiment, when the registered element is exposed, the present application will also call the checkViewVisible method of the associated ExposureManager object to detect whether it is exposed and process the exposure logic. When the registered element is exposed, it can be considered as another exposure detection opportunity. The exposure detection opportunities of the present application can include multiple ones. Each time the exposure detection opportunity is monitored, it will first determine whether the target element has been exposed. Only when it is determined that the target element has not been exposed, the target element will be exposed. When it is detected that the target element meets the exposure conditions, the target element is exposed and exposure point data is generated. Among them, the detection of whether the target element has been exposed can be executed in the checkViewVisible method. If it is determined that the element has been exposed, repeated exposure is not performed.

[0110] In this application, when an element is detected to be added to the window, the exposure detection function will be called to detect whether the element meets the exposure conditions. The exposure detection function will first determine whether the element has been exposed. If it has not been exposed, it will perform exposure and report exposure point data. Furthermore, the sliding state of the element will be monitored. When the element is sliding, the sliding stop event of the element will be further monitored until the sliding stop event of the element is monitored. Then, it will further determine whether the element meets the exposure conditions. If it does, it will perform exposure and report exposure point data.

[0111] It can be seen that the present application sets multiple exposure detection opportunities, such as when an element is added to the window, when a registered element is exposed, and when the element stops sliding. By setting multiple exposure detection opportunities, exposure detection is performed at each exposure detection opportunity, so that the exposure point data is more real, which solves the problem of unrealistic data caused by exposure point embedding as long as there is view data returned in traditional technology.

[0112] In one of the embodiments, the exposure detection method may further include: when it is detected that the target element is not sliding, determining whether the target element is a picture; when the target element is a picture, monitoring the loading completion event of the target element; when the target element is loaded, performing exposure detection on the target element.

[0113] When the exposure detection function detects that the target element is not sliding, it will further detect whether the target element is a picture. If the target element is a picture, it will further monitor whether the picture has been loaded. When the picture has been loaded, the exposure detection function will be called to further determine whether the target element meets the remaining exposure conditions, such as whether it is within the visible range. If it does, exposure is performed and exposure point data is generated.

[0114] This application sets different exposure detection logic according to different types of elements, making the exposure point data more realistic.

[0115] In one of the embodiments, before performing exposure detection on the target element, the exposure detection method may further include: determining whether the target element is an element that needs to process image loading completion exposure, and if so, updating the configuration item of content loading time in the element exposure object associated with the target element to the image loading time, and updating the configuration item of whether loading is completed in the element exposure object to loading completion.

[0116] Among them, some pictures do not need to process the exposure logic. When the pictures are loaded, they need to be screened. When it is determined that the pictures need to process the exposure logic, the two configuration items in the element exposure object (content loading time and whether the loading is completed) are updated. Specifically, the content loading time is updated to the picture loading time, and whether the loading is completed is updated to loading completion.

[0117] In traditional technical solutions, exposure tracking points are sent as soon as an element is added to the window, without judging whether the element is sliding or whether the image has been loaded, resulting in the exposure tracking point data not being realistic enough.

[0118] In this application, not only is it monitored whether an element is added to the window, but also the sliding stop event of the element is monitored. When the element is a picture, it is further monitored whether the picture is loaded. Different exposure detection times are monitored according to different element types, so that the acquired exposure point data is more realistic.

[0119] In one of the embodiments, the sliding state of an element is monitored, including: monitoring the tracking run loop mode of a run loop object through a scroll monitor, obtaining a current view when the run loop object is monitored to enter the tracking run loop mode, the current view being the parent view of the target element, determining whether the current view is a scroll view, if the current view is a scroll view and is in a sliding state, determining that the target element is sliding, if the current view is a scroll view and is not in a sliding state, obtaining the parent view of the current view as the current view, returning to the step of determining whether the current view is a scroll view, until the top-level view is traversed.

[0120] In this application, a scroll monitor ScrollMonitor and a run loop object are created in advance, wherein the run loop object includes a main run loop mainRunloop, and the main run loop includes multiple run modes, including a tracking run loop mode UITrackingRunloopMode. This application specifically monitors the sliding status of an element by entering or exiting the tracking run loop mode through monitoring mainRunloop.

[0121] Specifically, when mainRunloop enters UITrackingRunloopMode, ScrollMonitor's isScroll (the property of whether it is scrolling) is set to yes, and when mainRunloop exits UITrackingRunloopMode, ScrollMonitor's isScroll property is set to no. When ScrollMonitor's isScroll property is set to yes, it is considered that an element on the page is sliding, and at this time it is necessary to further determine whether the target element is sliding.

[0122] Specifically, when isScroll is set to yes, the current view is set as the parent view of the target element, and it is determined whether the current view is empty. If the current view is not empty, it is determined whether the current view is a scroll view. If the current view is a scroll view and the current view is scrolling, it is determined that the target element is sliding. The reason for determining whether the current view is empty is that when traversing to the top layer of the layer, the current view may be empty.

[0123] Specifically, the present application can set a pointer or temporary view variable aview, assign aview to the parent view of the target element, and determine whether aview is a null value. When aview is not a null value, determine whether aview is a ScrollView (scrolling view). If aview is a ScrollView, further determine whether aview is sliding. If aview is a ScrollView and is sliding, it is determined that the target element is sliding.

[0124] When aview is not a ScrollView, or aview is a ScrollView but is not sliding, the value of aview is updated to aview.superView (the parent view of aview), and the process returns to the step of determining whether aview is a null value until the top-level view is traversed.

[0125] In this application, if the isScroll property is set to yes, it is necessary to traverse the element's superView (parent view) upwards until the corresponding ScrollView (scroll view) is found. If there is a corresponding ScrollView and it is sliding, the target element can be judged to be in the sliding state.

[0126] This application can ignore invalid data, which means that if the video is sliding, although the view is displayed on the screen, there is no actual exposure data, thereby making the exposure point data more realistic.

[0127] In one of the embodiments, the monitoring of the sliding stop event of the target element includes: monitoring the notification information sent by the scroll monitor, and when the sliding stop notification information sent by the scroll monitor is monitored, it is determined that the sliding stop event of the target element is monitored.

[0128] Among them, when mainRunloop enters UITrackingRunloopMode, the isScroll property of ScrollMonitor will be set to yes, and when mainRunloop exits UITrackingRunloopMode, the isScroll property of ScrollMonitor will be set to no. When the isScroll property of ScrollMonitor is set to no, ScrollMonitor will issue a notification message of sliding stop. When receiving the notification message, it can be considered that the sliding stop event of the target element is monitored.

[0129] Specifically, please refer to Figure 3 , Figure 3 1 is a schematic diagram of a specific process of monitoring mainRunloop entering or exiting the tracking run loop mode in an embodiment. Figure 3 In the , a scroll monitor is created in advance. The scroll monitor monitors the operating mode of the main run loop. When it monitors that the main run loop enters UITrackingRunloopMode, it sets isScroll (the property of whether it is scrolling) to yes. When it monitors that the main run loop exits UITrackingRunloopMode, it sets isScroll to no. When isScroll is set to no, the scroll monitor sends a notification message that the sliding has stopped.

[0130] This application monitors the notification information sent by the scroll monitor to monitor the sliding stop event of the target element.

[0131] In one of the embodiments, the exposure detection method may further include: when the page is initialized, obtaining exposure embedding parameters, the exposure embedding parameters include exposure embedding parameters of the target element, the exposure embedding parameters of the component to which the target element belongs, the exposure embedding parameters of the resource position to which the component belongs, and the exposure embedding parameters of the page to which the resource position belongs, creating an exposure manager object, registering a page exposure object according to the exposure embedding parameters of the page through the exposure manager object, and mounting the page exposure object on the exposure manager object, and registering a page exposure object according to the exposure embedding parameters of the resource position through the exposure manager object. Parameters are used to register resource position exposure objects, and the resource position exposure objects are mounted on the page exposure objects; component exposure objects are registered according to the exposure embedding parameters of the components through the exposure manager object, and the component exposure objects are mounted on the resource position exposure objects; element exposure objects are registered according to the exposure embedding parameters of the target elements through the exposure manager object, and the element exposure objects are mounted on the component exposure objects to build an exposure object tree; each object in the exposure object tree is provided with a callback function to generate corresponding exposure embedding data, including: calling the callback function associated with the target element in the exposure object tree, and generating exposure embedding data through the callback function.

[0132] Among them, this application divides the page into levels, including pages, resource positions, components and elements. Among them, resource positions are usually specific areas on the page used to display specific important content, such as advertising positions, key recommended content display areas, etc. It is a relatively macro division, the main purpose of which is to attract users' attention and guide users to pay attention to certain important information or perform certain key operations. For example, the area at the top of the e-commerce webpage that displays popular products in a carousel is a resource position.

[0133] Components are relatively independent functional modules or parts that make up a page, and may be more flexible than resource ranges. Components have their own independent functional logic, such as navigation bar components, search box components, product display card components, etc. These components can be reused on different pages or in different locations on the same page to build the basic architecture of the page.

[0134] Elements are the most basic building blocks of a page, such as text, icons, buttons, and pictures. Elements are mainly used to convey specific information details or trigger specific interactive behaviors. Many elements can be combined to form components, and multiple components can form resource locations to ultimately build a complete page.

[0135] Specifically, during the element exposure process, registered element exposure will be performed, and when registering element exposure, an element exposure object needs to be created. Among them, the present application pre-creates an exposure object tree, wherein the exposure object tree includes page exposure objects, resource position exposure objects, component exposure objects, and element exposure objects. Among them, a callback function is set in the exposure object, and the callback function includes exposure point parameters. When the callback function is executed, the corresponding exposure point data will be generated according to the exposure point parameters, and the report will be executed.

[0136] Furthermore, the present application pre-sets the exposure embedding parameters of the target element, the exposure embedding parameters of the component to which the target element belongs, the exposure embedding parameters of the resource position to which the component belongs, and the exposure embedding parameters of the page to which the resource position belongs.

[0137] Furthermore, the resource position exposure object is registered according to the exposure tracking parameters of the resource position through the exposure manager object, and the resource position exposure object is mounted on the page exposure object; the component exposure object is registered according to the exposure tracking parameters of the component through the exposure manager object, and the component exposure object is mounted on the resource position exposure object; the element exposure object is registered according to the exposure tracking parameters of the target element through the exposure manager object, and the element exposure object is mounted on the component exposure object, so as to construct an exposure object tree.

[0138] Mounting can be understood as adding an object to another object to make it a subsidiary part of the other object. For example, mounting a resource exposure object on a page exposure object means that the resource exposure object becomes a subsidiary object of the page exposure object, so that the resource exposure object can be accessed and managed through the page exposure object, establishing a hierarchical structure and association relationship, so that in the exposure logic processing, the upper-level object (such as the page exposure object) can find and operate the lower-level object (such as the resource exposure object) associated with it.

[0139] Specifically, in the present application, the element exposure object and the element are weakly referenced to each other. The exposure manager object and the element exposure object are weakly referenced to each other. Among them, when the element exposure object and the element are weakly referenced to each other, it means that there is a relatively "loose" association relationship between them. This association will not strongly prevent the object from being released. Similarly, the exposure manager object is used to manage the exposure logic. It is weakly referenced to the element object, which means that the association relationship between them is relatively flexible. For example, the exposure manager object may need to record the exposure status according to the state (whether it is displayed) of the element object (such as a text box in the page). This weak reference association ensures that when the element object may be destroyed (for example, the page is reloaded and the original element object is replaced by a new object), it will not cause memory leaks and other problems because the exposure manager object still references it, and the system can reclaim the memory occupied by the element object normally.

[0140] The beneficial effect of this embodiment is that by maintaining the exposure object tree, the buried point data are interconnected, which facilitates business analysis.

[0141] Among them, please refer to Figure 4 , Figure 4 FIG. 1 is a flow chart of an exposure detection method in an embodiment. Figure 4 In the embodiment, the exposure detection method may include: creating a scroll monitor, initializing a view controller, creating an exposure manager object associated with the view controller, obtaining page data, registering page exposure, obtaining resource bit data, registering resource bit exposure, obtaining component data, registering component exposure, obtaining element data, generating element view, refreshing element view using element data, and registering element exposure, monitoring and processing element exposure.

[0142] Among them, page data may include information related to page layout, which includes the overall structural information of the page, such as the position, size, and arrangement of each component or element in the page. Figure 1 In this way, it determines how different parts of the page are distributed, thereby guiding operations such as refreshing the page, generating components and elements, etc.

[0143] In one embodiment, please refer to Figure 5 , generating corresponding exposure buried point data may include: generating an element exposure event corresponding to the target element, judging whether there is an exposure record in the component exposure object associated with the target element according to the exposure object tree, if not, generating a component exposure event, judging whether there is an exposure record in the resource position exposure object associated with the component, if not, generating a resource position exposure event, judging whether there is an exposure record in the page exposure object associated with the resource position, if not, generating a page exposure event, establishing an association relationship among the element exposure event, component exposure event, resource position exposure event and page exposure event corresponding to the target element, and generating corresponding exposure buried point data according to the association relationship.

[0144] Among them, the exposure event refers to the event that records the exposure-related information. The exposure event may include event identifier (such as event ID), exposure time, number of times, content and other information. Whether it is a target element refers to whether it is a pre-set element that needs attention. Figure 5 In the above, page exposure eventid refers to the page exposure event id. Determining whether a component is exposed refers to determining whether a component exposure object records that the component has been exposed.

[0145] Specifically, according to the association relationship between each level in the exposure object tree, the component exposure object associated with the element exposure object, the resource position exposure object associated with the component exposure object and the page exposure object associated with the resource position exposure object can be determined.

[0146] Among them, judging whether there is an exposure record in the component exposure object associated with the target element refers to judging whether the value of the field in the component exposure object used to identify whether the component is exposed is exposed. It can be understood that there is a configuration item set in the component exposure object to record whether the component has been exposed. If the component has not been exposed, that is, the exposure tracking parameters have not been reported, then it is necessary to generate a corresponding component exposure event and execute the report.

[0147] Among them, generating corresponding exposure tracking data according to the association relationship may include:

[0148] The element exposure events and the component exposure events, resource exposure events and page exposure events associated with the element exposure events are integrated into the exposure tracking data and reported to the tracking server.

[0149] Alternatively, the corresponding exposure tracking data may be generated according to the association relationship, which may include:

[0150] When reporting an element exposure event, the event identifier of the exposure event of the component to which the element belongs is carried;

[0151] When reporting a component exposure event, the event identifier of the resource location exposure event to which the component belongs is carried;

[0152] When reporting a resource slot exposure event, the event identifier of the page exposure event to which the resource slot belongs is carried.

[0153] In this application, the page view hierarchy is divided according to the business hierarchy of pages, resource locations, components, and elements. The exposure of the lower layer triggers the exposure of the upper layer. The execution of exposure is a link from the upper layer to the lower layer. The exposure points of the lower layer will be associated with the exposure events of the upper layer, reflecting the hierarchical association of the exposure points. The exposure events of the lower layer will be associated with the time stamps of the exposure events of the upper layer, which are used to connect the exposure events in series, so that the exposure events of each level are related to each other. The exposure point data is reported based on such an association relationship, which is more convenient for the business to analyze the exposure point data.

[0154] In the second aspect, Figure 6 As shown, an exposure detection device is provided, comprising: a first monitoring module 61, a second monitoring module 62, a detection module 63 and an exposure module 64, wherein:

[0155] The first monitoring module 61 is used to monitor the sliding state of the element during the exposure process of the page element;

[0156] The second monitoring module 62 is used to monitor the sliding stop event of the target element when it is detected that the target element is sliding;

[0157] The detection module 63 is used to perform exposure detection on the target element when a sliding stop event of the target element is monitored;

[0158] The exposure module 64 is used to perform exposure processing on the target element and generate exposure point data when it is detected that the target element meets the exposure condition.

[0159] In one embodiment, the first monitoring module 61 can monitor the event of adding an element to the window, and when it monitors that the target element is added to the window, execute the step of performing exposure detection on the target element. The detection module 63 can perform exposure detection on the target element when it monitors the sliding stop event of the target element and the target element is not exposed.

[0160] In one of the embodiments, the first monitoring module 61 can also determine whether the target element is a picture when it is detected that the target element is not sliding. When the target element is a picture, it monitors the loading completion event of the target element, and when the target element is loaded, performs exposure detection on the target element.

[0161] In one of the embodiments, the first monitoring module 61 may call the scroll monitor to monitor the tracking run loop mode of the run loop object when an element is added to the window and when the registered element is exposed, and obtain the current view when the run loop object is monitored to enter the tracking run loop mode, the current view is the parent view of the target element, and it is determined whether the current view is a scroll view. If the current view is a scroll view and is in a sliding state, it is determined that the target element is sliding. If the current view is a scroll view and is not in a sliding state, the parent view of the current view is obtained as the current view, and the step of determining whether the current view is a scroll view is returned until the top-level view is traversed.

[0162] In one embodiment, the detection module 63 may monitor the notification information sent by the scroll monitor, and when the notification information of the sliding stop sent by the scroll monitor is monitored, it is determined that the sliding stop event of the target element is monitored.

[0163] In one embodiment, the second monitoring module 62 can obtain exposure embedding parameters when the page is initialized, and the exposure embedding parameters include exposure embedding parameters of the target element, exposure embedding parameters of the component to which the target element belongs, exposure embedding parameters of the resource position to which the component belongs, and exposure embedding parameters of the page to which the resource position belongs, create an exposure manager object, register the page exposure object according to the exposure embedding parameters of the page through the exposure manager object, and mount the page exposure object on the exposure manager object, register the resource position exposure object according to the exposure embedding parameters of the resource position through the exposure manager object, and mount the resource position exposure object on the page exposure object, register the component exposure object according to the exposure embedding parameters of the component through the exposure manager object, and mount the component exposure object on the resource position exposure object, register the element exposure object according to the exposure embedding parameters of the target element through the exposure manager object, and mount the element exposure object on the component exposure object, so as to construct an exposure object tree, and each object in the exposure object tree is provided with a callback function, and the exposure module 64 can call the callback function associated with the target element in the exposure object tree, and generate exposure embedding data through the callback function.

[0164] In one of the embodiments, the exposure module 64 generates an element exposure event corresponding to the target element, determines whether there is an exposure record in the component exposure object associated with the target element according to the exposure object tree, and if not, generates a component exposure event, determines whether there is an exposure record in the resource position exposure object associated with the component, and if not, generates a resource position exposure event, determines whether there is an exposure record in the page exposure object associated with the resource position, and if not, generates a page exposure event, establishes an association relationship between the element exposure event, component exposure event, resource position exposure event and page exposure event corresponding to the target element, and generates corresponding exposure point data according to the association relationship.

[0165] In a third aspect, an embodiment of the present disclosure provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the exposure detection method provided in any embodiment of the present disclosure in the first aspect when executing the computer program.

[0166] In one embodiment, the computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the exposure detection method is implemented.

[0167] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the exposure detection method provided in any embodiment of the present disclosure in the first aspect are implemented.

[0168] The computer readable storage medium may be Figure 7 A computer-readable storage medium in the computer device shown.

[0169] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0170] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0171] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An exposure detection method, characterized in that: The method comprises: During the exposure of page elements, the sliding status of the elements is monitored; When it is detected that the target element is sliding, the sliding stop event of the target element is monitored; When a sliding stop event of the target element is monitored, performing exposure detection on the target element; When it is detected that the target element meets the exposure condition, the target element is exposed and exposure point data is generated.

2. The method according to claim 1, characterized in that Before monitoring the sliding state of the element, the method further includes: Listen for events when elements are added to the window; When it is monitored that the target element is added to the window, executing the step of performing exposure detection on the target element; When the sliding stop event of the target element is monitored, performing exposure detection on the target element includes: When a sliding stop event of the target element is monitored and the target element is not exposed, an exposure detection is performed on the target element.

3. The method according to claim 1, characterized in that The method further comprises: When it is detected that the target element is not sliding, determining whether the target element is a picture; When the target element is a picture, monitoring the loading completion event of the target element; When the target element is loaded, an exposure detection is performed on the target element.

4. The method according to claim 1, characterized in that: Monitor the sliding state of the element, including: Monitoring the tracking run loop mode of the run loop object via the scroll monitor; When monitoring that the run loop object enters the tracking run loop mode, obtaining the current view, the current view being the parent view of the target element; Determine whether the current view is a scroll view; If the current view is a scroll view and is in a sliding state, determining that the target element is sliding; If the current view is a scroll view and is not in a sliding state, the parent view of the current view is obtained as the current view, and the process returns to the step of determining whether the current view is a scroll view until the top-level view is traversed.

5. The method according to claim 1, characterized in that: The monitoring of the sliding stop event of the target element includes: Listen for notification messages sent by the scroll monitor; When the notification information of sliding stop sent by the scroll monitor is monitored, it is determined that the sliding stop event of the target element is monitored.

6. The method according to claim 1, characterized in that The method further comprises: When the page is initialized, exposure embedding parameters are obtained, and the exposure embedding parameters include the exposure embedding parameters of the target element, the exposure embedding parameters of the component to which the target element belongs, the exposure embedding parameters of the resource position to which the component belongs, and the exposure embedding parameters of the page to which the resource position belongs; Create an exposure manager object; Registering a page exposure object according to the exposure embedding parameters of the page through the exposure manager object, and mounting the page exposure object on the exposure manager object; Registering a resource position exposure object according to the exposure embedding parameters of the resource position through the exposure manager object, and mounting the resource position exposure object on the page exposure object; Registering a component exposure object according to the exposure tracking parameters of the component through the exposure manager object, and mounting the component exposure object on the resource exposure object; Registering an element exposure object according to the exposure embedding parameters of the target element through the exposure manager object, and mounting the element exposure object on the component exposure object to construct an exposure object tree; Each object in the exposure object tree is provided with a callback function, and the generation of corresponding exposure embedding data includes: The callback function associated with the target element in the exposure object tree is called, and the exposure embedding data is generated through the callback function.

7. The method according to claim 6, characterized in that Generate corresponding exposure tracking data, including: Generate an element exposure event corresponding to the target element; According to the exposure object tree, determining whether there is an exposure record in the component exposure object associated with the target element, and if not, generating a component exposure event; Determine whether there is an exposure record in the resource position exposure object associated with the component, and if not, generate a resource position exposure event; Determine whether there is an exposure record in the page exposure object associated with the resource position, and if not, generate a page exposure event; Establish an association relationship between the element exposure event corresponding to the target element, the component exposure event, the resource exposure event and the page exposure event, and generate corresponding exposure buried point data according to the association relationship.

8. An exposure detection device, characterized in that: The device comprises: The first monitoring module is used to monitor the sliding state of the element during the exposure process of the page element; The second monitoring module is used to monitor the sliding stop event of the target element when it is detected that the target element is sliding; A detection module, configured to perform exposure detection on the target element when a sliding stop event of the target element is monitored; The exposure module is used to perform exposure processing on the target element and generate exposure point data when it is detected that the target element meets the exposure condition.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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