Exposure data processing method, device, electronic device and storage medium
By combining cross-observers with image stabilization and throttling functions, the performance issues caused by frequent exposure data uploads were resolved, enabling accurate and efficient statistics of exposure data and improving user experience and exposure rate accuracy.
Patent Information
- Application Number
- CN202011321632.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-23
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-11-23
AI Technical Summary
In existing technologies, frequent uploading of exposure data leads to page backflow, slow response, excessive consumption of computing resources, high memory consumption, and choppy animation effects, which affects the user browsing experience and causes user churn and incorrect exposure rate statistics.
Using a cross-observer and stabilization/throttling functions, the target element is monitored uniformly through the cross-observer, and exposure data is uploaded with a delay period. Under preset conditions, the exposure data in the local cache is also uploaded uniformly.
It enables timely and unified uploading of exposure data, avoiding high concurrency and resource waste, improving user browsing experience and the accuracy of exposure rates, and providing a precise data foundation for subsequent big data analysis.
Smart Images

Figure CN113783918B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to an exposure data processing method, device, electronic device and storage medium. Background Art
[0002] Exposure tracking is a technology that tracks certain elements (such as products, advertisements, etc.) on a page and counts the exposure data of these elements when they appear in a specified view. Based on the statistical exposure data, user behavior habits can be obtained through big data analysis, thereby achieving the effect of improving user browsing experience and increasing user purchasing power.
[0003] The existing exposure tracking technology uses the method of uploading exposure data when the element appears in the view. The exposure data is uploaded after the element is loaded, and the exposure data is also uploaded in real time when the page triggers operations such as sliding. This method has at least two problems:
[0004] First, due to the frequent uploading of exposure data, it is easy to cause performance problems such as page reflow, slow response, large amount of computing resources and memory usage, page browsing freezes, and unsmooth animation effects, which seriously affect the user browsing experience and even lead to user loss and reduced user retention rate;
[0005] Second, it causes a large amount of duplicate exposure data to be uploaded, resulting in incorrect statistics of exposure rate, affecting the subsequent analysis of user behavior habits and delaying the precise delivery of product data.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In view of this, the present disclosure provides an exposure data processing method, device, electronic device and storage medium, which realize timely and unified uploading of exposure data through technologies such as cross observer, anti-shake function, throttling function, etc., and overcome problems such as high concurrency, waste of resources, and repeated uploading.
[0008] One aspect of the present disclosure provides an exposure data processing method, including: creating a cross observer when a target page is initialized; encapsulating target elements of the target page and adding them to the cross observer; in response to a scrolling event of the target page, determining a visible target element displayed in a visible window through the cross observer, and collecting exposure data of the visible target element; based on an anti-shake function, uploading the exposure data in the cross observer to a local cache at the end of a delay period of the scrolling event; and based on a throttling function, uploading the exposure data in the local cache when a preset condition is triggered.
[0009] In some embodiments, after collecting the exposure data of the visible target element, it also includes: continuously monitoring the visible target element displayed in the visible window; if a visible target element moves out of the visible window, stopping monitoring the visible target element and moving the visible target element out of the cross viewer.
[0010] In some embodiments, after uploading the exposure data in the local cache, the method further includes: clearing the cross observer.
[0011] In some embodiments, uploading the exposure data in the cross-viewer to the local cache includes: timing a delay period each time the scrolling event is triggered; if the scrolling event is triggered again during the delay period, re-timing the delay period; and at the end of the delay period, uploading the exposure data of all visible target elements collected by the cross-viewer to the local cache.
[0012] In some embodiments, the preset condition includes that the target page slides to the bottom of the page, and / or that the target page stops sliding for more than a preset time.
[0013] In some embodiments, determining the visible target element displayed in the visible window through the cross-viewer includes: obtaining the size of the visible window and the size of each of the target elements and their positions relative to the visible window; determining the visible target element displayed in the visible window according to the size of the visible window, the size of each of the target elements and their positions relative to the visible window.
[0014] In some embodiments, the target element of the target page is encapsulated based on a high-order function.
[0015] Yet another aspect of the present disclosure provides an exposure data processing device, comprising: an initialization module, configured to create a cross-observer when a target page is initialized; an element encapsulation module, configured to encapsulate target elements of the target page and add them to the cross-observer; a data acquisition module, configured to respond to a scrolling event of the target page, determine the visible target elements displayed in a visible window through the cross-observer, and acquire exposure data of the visible target elements; an anti-shake upload module, configured to upload the exposure data in the cross-observer to a local cache at the end of a delay period of the scrolling event based on an anti-shake function; and a throttling upload module, configured to upload the exposure data in the local cache when a preset condition is triggered based on a throttling function.
[0016] Another aspect of the present disclosure provides an electronic device, including: a processor; a memory, wherein the memory stores executable instructions; wherein when the executable instructions are executed by the processor, the exposure data processing method described in any of the above embodiments is implemented.
[0017] Yet another aspect of the present disclosure provides a computer-readable storage medium for storing a program, wherein the program, when executed, implements the exposure data processing method described in any of the above embodiments.
[0018] Compared with the prior art, the present invention has at least the following beneficial effects:
[0019] By using a cross observer and encapsulating and adding the target element to the cross observer, the cross observer uniformly monitors the target element, records the exposure data of the visible target element displayed in the visible window, and uniformly uploads the exposure data when the upload time is ripe;
[0020] By using the anti-shake function, the scrolling event is delayed and the exposure data is uploaded only once when the delay period ends, to prevent high concurrency and resource waste caused by repeated uploading of exposure data when scrolling events occur continuously.
[0021] By using the throttling function, the local exposure data is uploaded uniformly when the preset conditions are triggered, to prevent the application from consuming a large amount of memory due to the continuous uploading of exposure data when the page is scrolling, or even overflow and crash;
[0022] Therefore, the present disclosure can timely and uniformly upload exposure data, overcome problems such as high concurrency, waste of resources, and repeated uploading, and achieve accurate and efficient statistics of exposure data, providing an accurate data basis for subsequent big data analysis of product exposure rate, improving user browsing experience, accurately delivering products according to user preferences, and increasing product purchase rate.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0025] Figure 1 A schematic diagram showing the steps of the exposure data processing method in an embodiment of the present disclosure;
[0026] Figure 2A schematic diagram of a scene for determining a visible target element in an embodiment of the present disclosure is shown;
[0027] Figure 3 A schematic diagram showing a flow chart of an exposure data processing method in an embodiment of the present disclosure;
[0028] Figure 4 A schematic diagram of a module of an exposure data processing device in an embodiment of the present disclosure is shown;
[0029] Figure 5 A schematic diagram showing the structure of an electronic device in an embodiment of the present disclosure; and
[0030] Figure 6 A schematic diagram showing the structure of a computer-readable storage medium in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to make this disclosure comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art.
[0032] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0033] The step numbers in the following embodiments are only used to indicate different execution contents and do not strictly limit the execution order between the steps. The words "first", "second" and similar words used in the specific description do not indicate any order, quantity or importance, but are only used to distinguish different components. It should be noted that the embodiments of the present disclosure and the features in different embodiments can be combined with each other without conflict.
[0034] Figure 1 The main steps of the exposure data processing method in the embodiment are shown, referring to Figure 1As shown, the exposure data processing method in this embodiment includes: in step S110, creating a cross observer when the target page is initialized; in step S120, encapsulating the target element of the target page and adding it to the cross observer; in step S130, in response to the scrolling event of the target page, determining the visible target element displayed in the visible window through the cross observer, and collecting exposure data of the visible target element; in step S140, based on the anti-shake function, uploading the exposure data in the cross observer to the local cache at the end of the delay period of the scrolling event; and in step S150, based on the throttling function, uploading the exposure data in the local cache when the preset condition is triggered.
[0035] The exposure data processing method of the above embodiment uses a cross observer and adds the target element package to the cross observer, so that the cross observer uniformly monitors the target element, records the exposure data of the visible target element displayed in the visible window, and uniformly uploads the exposure data when the upload time is ripe; by using an anti-shake function, the scrolling event is timed for a delay period, and the exposure data is uploaded only once when the delay period ends, so as to prevent high concurrency and resource waste caused by repeated uploading of exposure data when the scrolling event occurs continuously; by using a throttling function, the exposure data in the local is uniformly uploaded when the preset condition is triggered, so as to prevent a large amount of application memory consumption and even overflow and crash due to continuous uploading of exposure data when the page keeps sliding; thus, the exposure data processing method of the above embodiment can uniformly upload the exposure data in a timely manner, realize accurate and efficient statistics of the exposure data, and provide an accurate data basis for subsequent big data analysis of product exposure rate, improving user browsing experience, accurately delivering according to user preferences, and increasing product purchase rate.
[0036] The exposure data processing method is described in detail below with reference to specific examples.
[0037] In step S110, the target page initialization refers to the initial loading process of the target page. The target page can be any page that needs to be monitored and the exposure data collected, such as a product list page.
[0038] The intersection observer is implemented using the observer design pattern, and the creation and destruction of the intersection observer are achieved through registration and deregistration. The overall idea of the intersection observer is to be notified when the child element enters the bounding box of the parent element. In this embodiment, the observed child element is the target element, and the parent element is the visible window. Through the intersection observer, it is possible to monitor whether the target element enters the visible window.
[0039] In step S120, a high-order function (React HOC) can be used to encapsulate the target element and add the target element to the observation list of the cross observer. The target element specifically refers to the page element in the target page that needs to collect exposure data. The target page may contain multiple page elements (DOM), among which the target element that needs to be monitored for exposure through the embedding point is the target element. After adding the target element to the cross observer, the embedding point parameters can also be set through the DOM data attribute, such as setting the exposure threshold time, so that its exposure data is collected when the exposure time of the target element exceeds the exposure threshold time.
[0040] By encapsulating the target function using the principle of high-order functions, the cross observer can monitor the target elements uniformly and uniformly record the exposure data of the visible target elements displayed in the visible window.
[0041] In step S130, when the target page slides, the cross observer searches whether there is a target element entering the visible view. The specific implementation principle of the cross observer to determine the visible target element is to monitor the scroll event of the target page and execute Element.getBoundingClientRect() for each target element. The getBoundingClientRect method can return the size of the target element and its position relative to the visible window. The cross observer can further obtain the size of the visible window through parameters such as the window height (innerHeight) and the window width (innerwidth), and then determine the visible target element displayed in the visible window according to the size of the visible window, the size of each target element and its position relative to the visible window.
[0042] Figure 2 The scene of determining the visible target element in the embodiment is shown, referring to Figure 2 As shown, in this embodiment, the intersection observer first obtains the upper left corner position (0,0) of the target page 210, and determines the positioning information of the areas where the four observed target elements 211-214 are located and the positioning information of the area where the visible window 220 is located based on this; then determines the distance between the four observed target elements 211-214 and the top of the visible window 220; and then determines the intersection area ( Figure 2 ) in the area where the target element is located, so as to determine whether the target element is displayed in the visible window 220. Figure 2For example, the intersection area between the first target element 211 and the visible window 220 accounts for 10% of the area where the first target element 211 is located, and the first target element 211 is actually not effectively exposed, so it is determined that the first target element 211 is not displayed in the visible window 220; the second target element 212 and the third target element 213 are both completely displayed in the visible window 220; the intersection area between the fourth target element 214 and the visible window 220 accounts for 75% of the area where the fourth target element 214 is located, and it is inferred that the fourth target element 214 can be effectively seen by the user to achieve effective exposure, so it is determined that the fourth target element 214 is displayed in the visible window 220.
[0043] Furthermore, after determining the visible target element, the cross observer collects the exposure data of the visible target element and stores it in its observation list. The data structure of the observation list is specifically an array, and the exposure data of the target element is maintained by adding and deleting array elements. The exposure data uploaded subsequently is actually also an array.
[0044] After collecting exposure data of visible target elements, the cross viewer continuously monitors the visible target elements displayed in the visible window. When a visible target element moves out of the visible window, the monitoring of the visible target element is stopped and the visible target element is moved out of the cross viewer. Therefore, when the visible target element enters the visible window again, the exposure data of the visible target element will not be collected and stored in the observation list again, so as to avoid repeated collection of exposure data.
[0045] In step S140, the process of uploading exposure data based on the debounce function specifically includes: whenever a scrolling event is triggered, the delay period is timed; within the delay period, if the scrolling event is triggered again, the delay period is timed again; at the end of the delay period, the exposure data of all visible target elements collected by the cross observer is uploaded to the local cache. By using the debounce function principle, the exposure data is uploaded once every delay period. If a scrolling event occurs again within the delay period, causing the exposure data to change, the time is reset to prevent high concurrency and resource waste caused by repeated uploading of exposure data when scrolling events occur continuously.
[0046] The delay period can be set as needed. For example, if it is set to one second, data can be uploaded every second. If the scroll is triggered again within one second, the timer will be reset to avoid performance problems caused by high concurrency, and the exposure data uploaded twice will not be repeated.
[0047] In step S150, the preset conditions of the throttling function include the target page sliding to the bottom of the page, and / or the target page stops sliding for more than a preset time. By using the principle of the throttling function, it can be achieved that when the target page slides to the bottom and stops sliding, it is determined that the upload time is ripe, and the exposure data collected by the cross observer is uploaded uniformly, avoiding memory consumption caused by continuous page sliding and data uploading, and even memory overflow, crash, etc.
[0048] Furthermore, after uploading the exposure data in the local cache, the cross observer is cleared, so that there will be no duplicate exposure data when uploading data next time, which plays a role in deduplication of the exposure data.
[0049] Figure 3 The specific process of the exposure data processing method in the embodiment is shown. Combined with the description of the above examples, in a specific implementation, the product list page is used as the target page, and the products in the product list page are used as the target elements. The process of exposure data processing specifically includes:
[0050] S310, registering a cross observer when the product list page is initialized; after registration, it also includes using a high-order function to encapsulate the DOM element corresponding to the product, adding it to the cross observer's observation list to achieve unified monitoring of the products, etc., which is not specifically shown in the figure.
[0051] S320, when sliding on the product list page, searching whether there is a product entering the visible window, and determining the visible products displayed in the visible window.
[0052] S330, collecting exposure data of visible commodities, and storing the exposure data of visible commodities in a watch list; wherein, when it is monitored that a visible commodity moves out of the visible window, the monitoring of the visible commodity will be stopped, and the visible commodity with the stored exposure data will be removed from the watch list.
[0053] S340, by using the debounce function anti-shake principle, uploads exposure data every one second. If exposure is required within one second, that is, the previously collected exposure data changes, the timing is reset to avoid performance problems caused by high concurrency.
[0054] S350 uses the throttling principle of the Throttle function. When the product list page slides to the bottom and stops sliding, the product exposure data set collected by the cross observer (stored in the local cache) is uniformly retrieved and uploaded to the data server to avoid memory consumption caused by continuous sliding of the product list and continuous uploading of exposure data.
[0055] S360, after the product exposure data is uploaded, the exposure data in the cross viewer is cleared, so that there will be no duplicate exposure data when uploading data next time, avoiding duplicate upload of exposure data.
[0056] The above exposure data processing method uses cross observer, Debounce and Throttle functions, ReactHOC and other technologies to efficiently and accurately upload product exposure data, improve the accurate statistics of product exposure rate by background big data, and further improve user browsing experience, accurately deliver products according to user preferences, and increase product purchase rate.
[0057] The embodiments of the present disclosure also provide an exposure data processing device, which can be used to implement the exposure data processing method described in any of the above embodiments.
[0058] Figure 4 The main modules of the exposure data processing device in the embodiment are shown. Figure 4 As shown, the exposure data processing device 400 in this embodiment includes: an initialization module 410, configured to create a cross observer when the target page is initialized; an element encapsulation module 420, configured to encapsulate the target element of the target page and add it to the cross observer; a data acquisition module 430, configured to respond to the scrolling event of the target page, determine the visible target element displayed in the visible window through the cross observer, and collect exposure data of the visible target element; an anti-shake upload module 440, configured to upload the exposure data in the cross observer to the local cache based on the anti-shake function when the delay period of the scrolling event ends; and a throttling upload module 450, configured to upload the exposure data in the local cache based on the throttling function when the preset condition is triggered. The specific principles of each module can be referred to any of the above-mentioned embodiments of the exposure data processing method, and will not be repeated here.
[0059] The exposure data processing device of the present embodiment uses a cross observer and adds the target element package to the cross observer, so that the cross observer uniformly monitors the target element, records the exposure data of the visible target element displayed in the visible window, and uniformly uploads the exposure data when the upload time is ripe; uses an anti-shake function to time the delay period of the scrolling event, and uploads the exposure data only once when the delay period ends, so as to prevent high concurrency and resource waste caused by repeated uploading of exposure data when the scrolling event occurs continuously; uses a throttling function to uniformly upload the exposure data in the local when the preset condition is triggered, so as to prevent the application memory from being consumed in large quantities due to the continuous uploading of exposure data when the page is continuously sliding, and even overflow and crash; thus, the exposure data processing device of the present embodiment can uniformly upload the exposure data in a timely manner, realize accurate and efficient statistics of the exposure data, and provide an accurate data basis for subsequent big data analysis of product exposure rate, improving user browsing experience, accurately delivering according to user preferences, and increasing product purchase rate.
[0060] An embodiment of the present disclosure further provides an electronic device, including a processor and a memory, wherein executable instructions are stored in the memory, and when the executable instructions are executed by the processor, the exposure data processing method described in any of the above embodiments is implemented.
[0061] The electronic device disclosed in the present invention uses a cross observer and adds the target element package to the cross observer, so that the cross observer uniformly monitors the target element, records the exposure data of the visible target element displayed in the visible window, and uniformly uploads the exposure data when the upload time is ripe; uses an anti-shake function to time the delay period of the scrolling event, and uploads the exposure data only once when the delay period ends, thereby preventing high concurrency and resource waste caused by repeated uploading of exposure data when the scrolling event occurs continuously; uses a throttling function to uniformly upload the exposure data locally when the preset condition is triggered, thereby preventing the application memory from being consumed in large quantities due to the continuous uploading of exposure data when the page is continuously sliding, and even overflow and crash; thus, the electronic device disclosed in the present invention can uniformly upload the exposure data in a timely manner, realize accurate and efficient statistics of the exposure data, and provide an accurate data basis for subsequent big data analysis of product exposure rate, improving user browsing experience, accurately delivering according to user preferences, and increasing product purchase rate.
[0062] Figure 5 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. It should be understood that: Figure 5 The modules are only schematically shown, and these modules may be virtual software modules or actual hardware modules. The merging, splitting and adding of other modules of these modules are all within the protection scope of the present disclosure.
[0063] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 include but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different platform components (including the storage unit 520 and the processing unit 510), a display unit 540, etc.
[0064] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps of the exposure data processing method described in any of the above embodiments. For example, the processing unit 510 can perform the following steps: Figure 1 and Figure 3 Steps shown.
[0065] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .
[0066] The storage unit 520 may also include a program / utility 5204 having one or more program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0067] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0068] The electronic device 500 can also communicate with one or more external devices 600, which can be one or more of a keyboard, a pointing device, a Bluetooth device, etc. These external devices 600 enable the user to communicate interactively with the electronic device 500. The electronic device 500 can also communicate with one or more other computing devices, and the computer device shown includes a router and a modem. This communication can be performed through an input / output (I / O) interface 550. In addition, the electronic device 500 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 560. The network adapter 560 can communicate with other modules of the electronic device 500 through a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0069] The embodiment of the present disclosure also provides a computer-readable storage medium for storing a program, and when the program is executed, the exposure data processing method described in any of the above embodiments is implemented. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the exposure data processing method described in any of the above embodiments.
[0070] The computer-readable storage medium disclosed in the present invention uses a cross observer and adds the target element package to the cross observer, so that the cross observer uniformly monitors the target element, records the exposure data of the visible target element displayed in the visible window, and uniformly uploads the exposure data when the upload time is ripe; by using an anti-shake function, the scrolling event is timed for a delay period, and the exposure data is uploaded only once when the delay period ends, so as to prevent high concurrency and resource waste caused by repeated uploading of exposure data when the scrolling event occurs continuously; by using a throttling function, the exposure data in the local is uniformly uploaded when the preset condition is triggered, so as to prevent a large amount of application memory from being consumed, or even overflowing and crashing, due to the continuous uploading of exposure data when the page keeps sliding; thus, the computer-readable storage medium disclosed in the present invention can uniformly upload the exposure data in a timely manner, realize accurate and efficient statistics of the exposure data, and provide an accurate data basis for subsequent big data analysis of product exposure rate, improving user browsing experience, accurately delivering according to user preferences, and increasing product purchase rate.
[0071] Figure 6 is a schematic diagram of the structure of a computer-readable storage medium disclosed in the present invention. Figure 6 As shown, a program product 700 for implementing the above method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0072] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media include, but are not limited to: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0073] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0074] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as through the Internet using an Internet service provider.
[0075] The above content is a further detailed description of the present disclosure in combination with specific preferred implementation modes, and it cannot be determined that the specific implementation of the present disclosure is limited to these descriptions. For ordinary technicians in the technical field to which the present disclosure belongs, several simple deductions or substitutions can be made without departing from the concept of the present disclosure, which should be regarded as falling within the scope of protection of the present disclosure.
Claims
1. An exposure data processing method, characterized in that: include: Create a cross observer when the target page is initialized; Encapsulating the target element of the target page and adding it to the cross viewer; The target element refers to the page element in the target page for which exposure data needs to be collected; In response to a scrolling event of the target page, determining a visible target element displayed in a visible window through the cross viewer, and collecting exposure data of the visible target element; Based on the anti-shake function, uploading the exposure data in the cross viewer to the local cache at the end of the delay period of the scrolling event; as well as Based on the throttling function, when a preset condition is triggered, the exposure data in the local cache is uploaded.
2. The exposure data processing method according to claim 1, characterized in that: After collecting the exposure data of the visible target element, the method further includes: Continuously monitoring the visible target element displayed in the visible window; If a visible target element moves out of the visible window, monitoring of the visible target element is stopped, and the visible target element is moved out of the intersection observer.
3. The exposure data processing method according to claim 1, characterized in that: After uploading the exposure data in the local cache, the method further includes: Clear the intersection viewer.
4. The exposure data processing method according to claim 1, characterized in that: The uploading of the exposure data in the cross observer to the local cache includes: Whenever the scrolling event is triggered, the delay period is timed; If the scrolling event is triggered again within the delay period, the delay period is re-timed; At the end of the delay period, the exposure data of all visible target elements collected by the cross observer are uploaded to the local cache.
5. The exposure data processing method according to claim 1, characterized in that: The preset conditions include that the target page slides to the bottom of the page, and / or that the target page stops sliding for more than a preset time.
6. The exposure data processing method according to claim 1, characterized in that: The determining of the visible target element displayed in the visible window by the intersection observer includes: Obtain the size of the visible window and the size of each target element and its position relative to the visible window; The visible target element displayed in the visible window is determined according to the size of the visible window, the size of each target element and the position of each target element relative to the visible window.
7. The exposure data processing method according to claim 1, characterized in that: Based on the high-order function, the target element of the target page is encapsulated.
8. An exposure data processing device, characterized in that: include: An initialization module configured to create a cross observer when the target page is initialized; An element encapsulation module, configured to encapsulate the target element of the target page and add it to the cross viewer; The target element refers to the page element in the target page for which exposure data needs to be collected; a data collection module, configured to respond to a scrolling event of the target page, determine a visible target element displayed in a visible window through the cross viewer, and collect exposure data of the visible target element; an anti-shake uploading module, configured to upload the exposure data in the cross observer to a local cache at the end of the delay period of the scrolling event based on an anti-shake function; as well as The throttling upload module is configured to upload the exposure data in the local cache based on the throttling function when a preset condition is triggered.
9. An electronic device, characterized in that: include: A processor; a memory storing executable instructions; Wherein, when the executable instruction is executed by the processor, the exposure data processing method as described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed, the exposure data processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Exposure management system and method
US20070094118A1
Detecting digital content visibility
US20170242931A1