Method and device for automatically capturing exposure information of page component, medium and equipment

By monitoring page scroll events and dynamically calculating component elements positions, marking the exposure status and recording the residence time, the accuracy of exposure data statistics in multi-platform environments is solved, and efficient and safe exposure data capture and reporting are achieved.

CN120492273APending Publication Date: 2025-08-15SHANGHAI JIEYIN E-COMMERCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510652923.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing technology has insufficient accuracy in the exposure data statistics of financial products in a multi-platform environment, high code coupling, high maintenance, and failure to effectively record the residence time, resulting in doubt about the authenticity of the data.

Method used

By listening to page scrolling events, dynamically calculate the position of component elements in the window, mark the exposure status and record the residence time, the cumulative total residence time, and only mark the effective exposure data when the total residence time exceeds the threshold, and report it through the buffer queue encrypted.

Benefits of technology

It improves the accuracy and authenticity of exposed data, reduces manual statistical errors, ensures the security and stable performance of the data, and prevents page lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492273A_ABST
    Figure CN120492273A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of internet information, can be applied to the fields of financial advertisement putting, user behavior analysis and the like, and provides a page component exposure information automatic capturing method and device, a medium and equipment. When rolling stops or the rolling speed is lower than a threshold value, the current position of each assembly in the window is calculated according to the rolling distance and direction; for the component element, marking the component element as an exposure state when the component element enters the visible range for the first time, and recording an entry timestamp; if the video is marked and is still in the visible range, updating the staying duration; if the user leaves the visual range, recording a leaving timestamp and calculating a single-time stay duration; the staying duration is accumulated as the total staying duration during multiple times of entering and exiting, and when the total duration exceeds the preset minimum effective duration, the data are marked as effective exposure data, and the effective exposure data are encrypted in batches through a buffer queue and then reported to a server. By automatically capturing and analyzing the component exposure information, manual statistical errors can be reduced, and the data accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet information technology, and in particular to a method, device, medium, and equipment for automatically capturing exposure information of page components. Background Art

[0002] As digital financial services continue to advance, the user interfaces and user experiences of financial products are becoming increasingly complex, with a growing number of products, such as investment platforms, online payment platforms, and insurance and wealth management products, emerging continuously. To boost user engagement and activity, financial institutions are increasingly relying on accurate user data analysis. Exposure data statistics play a key role in this process. They not only help financial products accurately understand user interests and needs, but also enable tailored financial services based on in-depth analysis.

[0003] In related technologies, front-end development based on HTML pages can use the IntersectionObserver method to obtain changes in the intersection of elements and windows to calculate exposure data. However, as the business expands to multiple platforms such as Android, iOS, browsers, and mini-programs, the introduced React-native framework solves the cross-platform problem, but there are many flaws in exposure data statistics. For example, the onlayout method can only determine the module drawing status but cannot determine whether it is actually displayed; manually obtaining the element position to determine exposure, although the result is accurate, will lead to a deep coupling of business logic and exposure function, increasing the difficulty of maintenance and upgrades; each component develops exposure information separately, resulting in poor code standardization, and frequent interface calls in frequent sliding and clicking scenarios can easily cause page freezes; at the same time, there is a simple logic that determines that the component is exposed as soon as it is displayed, without considering the dwell time, which makes the data authenticity questionable; in addition, currently only exposure behavior is recorded but not dwell time, making it difficult to conduct differentiated analysis of the data. Summary of the Invention

[0004] The embodiments of the present disclosure at least provide a method, device, medium and equipment for automatically capturing exposure information of page components. By automatically capturing and analyzing component exposure information, manual statistical errors can be reduced and data accuracy can be improved.

[0005] The present disclosure provides a method for automatically capturing page component exposure information, including:

[0006] Monitor page scrolling events of the window; wherein the page scrolling events include scrolling speed, scrolling distance and scrolling direction;

[0007] When the scrolling stops or the scrolling speed is lower than a preset threshold, the current position of each component element in the page within the window is dynamically calculated based on the current scrolling distance and scrolling direction;

[0008] For each component element, if the component element enters the visible range of the window for the first time, mark the component element as exposed and record the entry timestamp of the component element entering the window; if the component element has been marked as exposed and is still in the visible range of the window, update the residence time of the component element;

[0009] If a component element leaves the visible range of the window, the departure timestamp of the component element is recorded, and the single stay duration is calculated based on the difference between the entry timestamp and the exit timestamp of the component element; for component elements that enter and exit the visible range of the window multiple times, the stay durations of each time are accumulated as the total stay duration;

[0010] When the total stay time of a component element in the window exceeds the preset minimum valid time, the exposure information corresponding to the component element is marked as valid exposure data; and the valid exposure data is encrypted and reported to the server in batches through the buffer queue.

[0011] The present disclosure provides an apparatus for automatically capturing exposure information of page components, including:

[0012] A page monitoring module, configured to monitor page scrolling events of a window; wherein the page scrolling events include scrolling speed, scrolling distance, and scrolling direction;

[0013] A position calculation module, configured to dynamically calculate the current position of each component element in the page within the window based on the current scrolling distance and scrolling direction when the scrolling stops or the scrolling speed is lower than a preset threshold;

[0014] a state monitoring module configured to, for each component element, mark the component element as being in an exposed state if the component element first enters the visible range of the window and record an entry timestamp of the component element entering the window; and update the residence time of the component element if the component element has been marked as being in an exposed state and is still in the visible range of the window;

[0015] a duration determination module configured to record the departure timestamp of a component element if it leaves the visible range of the window, and calculate a single stay duration based on the difference between the entry and exit timestamps of the component element; and for component elements that enter and exit the visible range of the window multiple times, accumulate the stay durations of each time as the total stay duration;

[0016] The data reporting module is used to mark the exposure information corresponding to the component element as valid exposure data when the total stay time of the component element in the window exceeds the preset minimum valid time; and to encrypt the valid exposure data in batches through the buffer queue and report it to the server.

[0017] An embodiment of the present disclosure provides a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the method for automatically capturing page component exposure information as described in any possible implementation method described above is performed.

[0018] An embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for automatically capturing exposure information of page components as described in any of the possible implementations described above is implemented.

[0019] The method, device, medium and equipment for automatically capturing exposure information of page components provided in the embodiments of the present disclosure can more accurately capture the dynamic exposure status of page component elements within the window by monitoring the page scrolling events of the window, and dynamically calculate the visible range of the page component according to the cessation of the user's scrolling behavior or when the scrolling speed is lower than the threshold; at the same time, it identifies the moment when the component element first enters the window, marks it as an exposure state, and continuously tracks its stay time; when the component element leaves the window, it records its departure timestamp and calculates the single stay time, and then accumulates the total stay time of multiple component elements entering and leaving the window. If the total stay time of the component element exceeds the preset minimum valid time, it is automatically marked as valid exposure data, and the data is encrypted and reported in batches through the buffer queue, ensuring stable performance in high-frequency scrolling and clicking scenarios, preventing page freezes caused by frequent interface calls, and ensuring data security and privacy protection.

[0020] This automated capture and encrypted reporting of page component exposure information allows for efficient and accurate collection of user behavior data, reducing manual statistical errors and improving the efficiency and reliability of data processing. Furthermore, this disclosure records the dwell time of each component element and compares the total dwell time with the preset effective duration, ensuring the authenticity and accuracy of the exposure data.

[0021] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings that need to be cited in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.

[0023] Figure 1 A schematic diagram of an application environment of a method for automatically capturing exposure information of page components provided by an embodiment of the present disclosure is shown;

[0024] Figure 2 A flow chart of a method for automatically capturing exposure information of page components provided by an embodiment of the present disclosure is shown;

[0025] Figure 3 A flowchart of an initial page rendering method provided by an embodiment of the present disclosure is shown;

[0026] Figure 4 A flowchart of a page lazy loading rendering method provided by an embodiment of the present disclosure is shown;

[0027] Figure 5 A schematic structural diagram of a device for automatically capturing exposure information of page components provided by an embodiment of the present disclosure is shown;

[0028] Figure 6 A schematic structural diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

[0030] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0031] The term "and / or" herein simply describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, and the existence of B alone. In addition, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.

[0032] To facilitate understanding of this embodiment, the execution subject of the method for automatically capturing exposure information of page components provided by the embodiment of the present disclosure is first introduced in detail. The method for automatically capturing exposure information of page components provided by the embodiment of the present invention can be applied to Figure 1 In an application environment, a client communicates with a server via a network. The client can be a mobile device, user terminal, terminal, handheld device, computing device, etc. The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms.

[0033] The following describes in detail the method for automatically capturing page component exposure information provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 2 FIG. 2 is a flow chart of a method for automatically capturing exposure information of page components provided by an embodiment of the present disclosure. The method includes the following steps S201 to S205:

[0034] S201, monitoring page scrolling events of the window.

[0035] It's understandable that scrolling is a common and frequent activity on web pages or application pages, and monitoring the page scroll events in the viewing window is the basis for capturing exposure information. Here, a page scroll event refers to a series of dynamic information generated when a user scrolls on a page, encompassing several key elements, such as scrolling speed, scrolling distance, and scrolling direction.

[0036] For example, the scrolling speed indicates how fast the page scrolls, which can be measured by the time interval between each scroll and the scrolling distance; the scrolling distance is the length of the page content that the user has browsed; the scrolling direction can be divided into upward scrolling and downward scrolling (also including left scrolling and right scrolling in horizontal scrolling pages). On the market page of a financial trading platform, users may frequently scroll the page to view the market information of different stocks, funds and other financial products. By monitoring the scrolling events, the platform can understand the user's attention to different products. For example, when a user quickly scrolls through the detailed information page of a certain stock, it means that he is not interested in the stock. On the contrary, if he stays for a long time, it means that he has a strong interest in the content.

[0037] In some other embodiments, the page scrolling event may also include scrolling acceleration, etc., which is not specifically limited here.

[0038] In some possible embodiments, reference Figure 3 As shown, before monitoring the page scrolling event of the window, the following steps S301 to S304 are also included:

[0039] S301, in response to a page display instruction about the window generated by a user triggering a page loading operation or a page switching operation, obtaining rendering data of the page to be displayed, and completing a page rendering task of an initial visible area in the window based on the rendering data.

[0040] It is understandable that when a user triggers a page loading operation (such as visiting the homepage of a financial platform for the first time) or a page switching operation (such as switching from a market page to a product recommendation page on a financial information platform), a page display instruction for the window will be generated. In response to this instruction, the rendering data of the page to be displayed can be obtained. These rendering data may include the HTML, CSS, JavaScript code of the page and possible media files (such as images or videos). Based on this data, the initial rendering of the page can be performed, that is, the page elements are loaded and displayed according to the visible area of the current window to ensure that the user can see a complete and stable interface in the early stage after the page is loaded.

[0041] S302 , during the page rendering process, recording the element coordinate information of each component element in the window, and assigning a unique identifier to each component element.

[0042] Specifically, during the page rendering process, the element coordinate information of each component element in the viewport can be recorded. Here, a component element refers to a portion of the page that has a specific function or displays content, including but not limited to buttons, pictures, text boxes, form fields, etc. The viewport refers to the area of the page that the user can currently see on the screen. It is the direct window for the user to interact with the page. The coordinate information of each component element is usually in pixels, describing the position of the component element relative to the top and upper left corner of the viewport, such as the vertical distance of the component element from the top of the viewport and the horizontal distance from the left side of the viewport. At the same time, a unique identifier is assigned to each component element so that the status and behavior of each component element can be accurately identified and tracked subsequently. Among them, the unique identifier is like the "identity card number" of each component element, which can ensure the accurate identification and tracking of the status and behavior of each component element.

[0043] In some possible embodiments, the coordinate information of the component element within the window can be obtained by using the onlayout event of the component element. Here, the onlayout event is triggered when the layout of the component element changes. By listening to this event, the accurate coordinate information of the component can be obtained after the layout is completed.

[0044] For example, on a financial platform's wealth management product recommendation page, each wealth management product card can be considered a component element. During the rendering process, the coordinates of each card within the viewport can be recorded. For example, a high-yield wealth management product card is 200 pixels from the top and 50 pixels from the left of the viewport. At the same time, each card is assigned a unique identifier, such as "product_card_001." This clearly identifies each card's position on the page and provides a basis for subsequent exposure information capture.

[0045] S303 , binding the unique identifier of each component element, the element coordinate information and the callback function corresponding to the component element to obtain registration information, and storing the registration information corresponding to each component element in the component element database.

[0046] Specifically, in order to achieve more efficient processing and tracking of various component elements in the page, the unique identifier of each component element, the element coordinate information and the callback function corresponding to the component element can be bound to obtain registration information. Here, the registration information includes the basic identification of the component element (such as a unique ID), its position in the page (such as coordinate information), and the callback function that needs to be executed when the event is triggered. Among them, the callback function refers to a function that is called when a specific event occurs (such as component element exposure, click, etc.) to process related logic.

[0047] Furthermore, after obtaining the registration information for each component element, the registration information corresponding to each component element can be stored in the component element database for query and call during subsequent page interaction. When the user scrolls the page or interacts with the component element, the relevant registration information can be quickly retrieved from the database and the corresponding operation can be performed according to the pre-defined callback function.

[0048] For example, continuing to take the financial product card of the above-mentioned financial platform as an example, the unique identifier of the card "product_card_001", the coordinate information (200 pixels from the top of the window, 50 pixels from the left side of the window) and the corresponding callback function are bound. The functions of the callback function may include recording exposure information when the card is exposed, jumping to the product details page when the card is clicked, etc. After the binding is completed, this registration information can be stored in the component element database. When the user scrolls the page or interacts with the card, the registration information of the card can be queried from the database, and the corresponding callback function can be called for processing.

[0049] S304: If the page contains dynamically loaded content, when a new component is mounted, the coordinate recording, identifier allocation and callback function binding process of the component element is triggered and updated to the component element database.

[0050] Here, if the page contains dynamically loaded content, for example, when the user scrolls the page, more component elements can be dynamically loaded based on the user's browsing behavior (such as infinite scroll loading of a financial information list). When a new component is mounted, the coordinate recording, identifier assignment, and callback function binding process of the component element will be triggered, and the relevant information will be updated to the component element database.

[0051] For example, in a financial information platform, when the user scrolls the page to view more news information, the system may dynamically load new news headline cards. Whenever a new news headline card is added, the onlayout of this news headline card can be triggered to automatically record the coordinate information of the card in the window, assign a unique identifier (such as "news_card_002"), and bind the corresponding callback function (such as jumping to the news details page when the card is clicked). Then, this new registration information is updated to the component element database. In this way, dynamically loaded component elements can be uniformly managed and tracked.

[0052] In the disclosed embodiments, by recording the coordinates of each component element within the viewport, assigning a unique identifier to each component element, and binding it to a callback function, accurate tracking and management of each component element on the page can be achieved. This allows for efficient response to user interactions, particularly during page scrolling or dynamic content loading, enabling real-time updates and processing of the status and behavior of each component.

[0053] S202 : When the scrolling stops or the scrolling speed is lower than a preset threshold, the current position of each component element in the page within the window is dynamically calculated according to the current scrolling distance and scrolling direction.

[0054] Here, while monitoring page scroll events in the window, the current position of each component element on the page within the window can be calculated in real time when the page scroll event indicates that the current scrolling behavior has stopped or the scrolling speed has fallen below a preset threshold. Stopping scrolling behavior means that the user has stopped scrolling and the page is relatively static. The preset threshold is a pre-set speed value. When the scrolling speed of the user sliding the page falls below this value, it can be assumed that the user's scrolling operation is nearing completion or that the user is slowly browsing the page, and further calculation of the component element's position can be performed.

[0055] Among them, by performing real-time dynamic calculation of the current position of each component element in the page within the window, the specific position of each component element in the window can be accurately known, such as the distance from the top and left side of the window, so as to determine whether the component element is exposed and subsequently calculate the exposure time.

[0056] For example, referring to Figure 4 As shown, in order to further optimize page loading performance and user experience, the page rendering proposed in the present disclosure adopts lazy loading technology. Before dynamically calculating the current position of each component element in the page within the window, the following steps S401 to S402 may be included:

[0057] S401: Based on the current scrolling distance and scrolling direction, predict the user's sliding trend and determine the preload area range of the window.

[0058] It's understandable that based on the current scrolling distance and direction, the user's scrolling tendency can be predicted. By analyzing the user's past scrolling behavior data, such as changes in scrolling speed and direction, it's possible to infer the page area the user is likely to scroll to next. Based on the predicted scrolling tendency, the scope of the window's preload area can be further determined. Here, the preload area is used to preload the content the user is likely to view, reducing user wait time.

[0059] S402, rendering the component elements within the current window and the preloaded area based on the rendering data of the page to be displayed, and triggering the coordinate recording, identifier allocation and callback function binding process of the component elements, and updating them to the component element database.

[0060] Furthermore, after determining the preload area, the component elements within the current window and the preload area can be rendered based on the rendering data of the page to be displayed. At this time, during the rendering process, the coordinate recording, identifier allocation and callback function binding process of the component elements will also be triggered, and the relevant information will be updated to the component element database (for details, please refer to the above steps S301 to S304).

[0061] Specifically, in the process of performing the page rendering task except for the above-mentioned initial visible area, it can include: first, comprehensively identifying the component elements within the current window and the preloaded area, and for each component element, first checking whether it has been assigned a unique identifier. If the component element enters the current rendering area for the first time (including the preloaded area that was not rendered during the initial rendering), it will be assigned a new unique identifier; if the component element has been rendered before and has a unique identifier, then the identifier is directly used without the need for repeated assignment. Secondly, while identifying the unique identifier, the coordinate information of each component element in the window must be recorded, and it is determined whether its coordinate information has been recorded before (that is, whether the component element has been rendered before and has a unique identifier) or whether it is consistent with the previously recorded information. If the coordinate information has changed, only the coordinate record of the component element is updated. Finally, after completing the above-mentioned coordinate recording, unique identifier assignment (if necessary) and callback function binding operations, the registration information corresponding to each component element (including unique identifier, coordinate information, callback function, etc.) can be updated to the component element database.

[0062] In the disclosed embodiments, the lazy loading technology is used to effectively optimize the page rendering process, significantly improving loading efficiency and reducing user waiting time. By predicting the user's sliding trend and loading page elements in advance within the predicted range, the responsiveness and smoothness of the page are further improved. At the same time, when rendering component elements, along with the allocation of unique identifiers, the recording of coordinate information, and the binding of callback functions, combined with the synchronous update of the component element database, the state consistency of each component element and the integrity of the data can be achieved.

[0063] In some possible embodiments, when the scrolling speed of the page is not lower than the above-mentioned preset threshold, the component element rendering task will be suspended until the scrolling behavior stops or the scrolling speed is lower than the preset threshold, and then the component elements within the current window and the preloaded area will be rendered according to the current scrolling distance, scrolling direction and rendering data of the page to be displayed. Specifically, when the user scrolls the page quickly, the frequent updates of the rendering components may not only cause the page to freeze, but also cause unnecessary performance burden on the system. Therefore, by monitoring the page scrolling speed and then pausing the component rendering task when the speed is too fast, this waste of resources can be effectively reduced, thereby reducing unnecessary rendering calculations.

[0064] S203, for each component element, if the component element enters the visible range of the window for the first time, mark the component element as exposed and record the entry timestamp of the component element entering the window; if the component element has been marked as exposed and is still within the visible range of the window, update the residence time of the component element.

[0065] It is understandable that for each component element, the exposure status needs to be judged and recorded. Specifically, if the component element enters the visible range of the window for the first time, it will be marked as exposed, and the timestamp of the component entering the window will be recorded. Here, the entry timestamp is the time point when the component element enters the window, usually expressed in the form of a timestamp (such as a Unix timestamp), which provides a starting point for the subsequent calculation of the residence time of the component element. For example, in a financial application, when the user scrolls to the introduction section of an investment product, the relevant charts, price trends and other components on the page enter the window for the first time. These components will be marked as exposed by the system and the residence time will begin to be recorded.

[0066] Similarly, when a component element has been marked as exposed and remains within the visible window, its dwell time is updated. Dwell time refers to the length of time a component element remains visible within the visible window. It is a key indicator of user attention to a component element; the longer the dwell time, the greater the user's interest in the content. For example, a user might spend a long time browsing a complex financial report. Based on this dwell time, it can be inferred that the report is likely of interest to the user. Financial websites can use this data to analyze user interest in specific investment products and make personalized recommendations based on individual user behavior.

[0067] S204: If a component element leaves the visible range of the window, the departure timestamp of the component element is recorded, and the single stay duration is calculated based on the difference between the entry timestamp and the exit timestamp of the component element; for component elements that enter and exit the visible range of the window multiple times, the stay durations of each time are accumulated as the total stay duration.

[0068] Specifically, if a component element leaves the visible range of the window, its exit timestamp can be recorded, and the single dwell duration can be calculated based on the difference between the entry and exit timestamps. For example, if a component element enters the window at 10:00:00 and leaves the window at 10:00:10, its single dwell duration is 10 seconds. Here, the single dwell duration can reflect the time the user paid attention to the component element during a browsing process.

[0069] It is understandable that if the component element appears on the page multiple times and is scrolled in and out of the window multiple times, the dwell time of each time can be accumulated as the total dwell time of the component element. For example, a component element stays in the window for 5 seconds for the first time, and after leaving, the user re-enters and stays for 8 seconds when browsing back, then its total dwell time is 13 seconds. Here, the total dwell time can more comprehensively reflect the user's overall attention to the component element, avoiding inaccurate dwell time statistics caused by accidental scrolling operations by the user. For example, the user's total dwell time data can provide feedback for the display method of financial products. If a component (such as portfolio recommendations) always appears frequently in the window and is stayed by the user for a long time, then the display frequency of the component can be increased to improve its exposure.

[0070] S205, when the total stay time of the component element in the window exceeds the preset minimum valid time, the exposure information corresponding to the component element is marked as valid exposure data; and the valid exposure data is encrypted and reported to the server in batches through the buffer queue.

[0071] Here, when the total duration of a component element's stay within the window exceeds the preset minimum valid duration, the system marks the corresponding exposure information as valid. The preset minimum valid duration is a time threshold set based on business needs and data statistical significance, such as 5 or 10 seconds. An exposure is only considered valid if the total duration of the component element exceeds this threshold. This threshold can be set based on factors such as page loading speed, average user browsing habits, and business objectives.

[0072] It's understandable that after the server receives valid exposure data, it can conduct in-depth analysis of this data to uncover user interests, preferences, and behavioral patterns regarding different component elements. This in turn provides a strong basis for application in business scenarios such as precision marketing for financial products, page layout optimization, and personalized recommendations. For example, if analysis reveals that users spend a longer time on the display component for a particular type of financial product, targeted promotion efforts for that product can be increased. Alternatively, the content sorting of information pages can be adjusted based on user interest in different information components to enhance the user experience.

[0073] In some possible embodiments, in order to optimize the storage space of the component element database and improve the efficiency of data processing, the component elements may also be checked regularly. When the exposure information corresponding to the component element is not marked as valid exposure data within a preset time period after the component element is marked as exposed, the registration information of the component element may be deleted from the component element database. Here, the preset time period may be set according to business characteristics and data update frequency, for example, to 30 seconds. Specifically, if a component element is marked as exposed and its total stay time within 30 seconds does not exceed the preset minimum valid time, it can be considered that the exposure of the component element does not meet the valid standard, and its registration information is cleared.

[0074] For example, on a financial platform's market information page, there may be some quickly scrolling market chart component elements. If the user only takes a quick glance and does not stay long enough to view them in detail, these component elements will not be marked as valid exposure data within the preset time period, and their registration information can be deleted to avoid storing a large amount of invalid data in the database, which would affect system performance.

[0075] Furthermore, after obtaining valid exposure data, it can be encrypted and reported in batches to the server via a buffer queue. The buffer queue prevents the server from being overwhelmed by the simultaneous reporting of large amounts of data. It can send data in batches according to specific policies (such as first-in, first-out). The buffer queue can dynamically adjust the frequency and amount of data sent based on the server's processing power and network conditions to ensure stable and efficient data reporting. Encryption is used to ensure data security and prevent theft or tampering during transmission. By encrypting the data, it can be ensured that only authorized servers can decrypt and read the data.

[0076] For example, information reporting in related technologies is typically processed using relatively simple and easily crackable algorithms such as Base64 and RSA. This reduces data security and makes it easy for hackers to decrypt and steal relevant data, potentially leaking user information. In response, this disclosure proposes using a PBOC-approved national encryption algorithm to encrypt valid exposed data to generate ciphertext, which is then reported to the server in batches via a buffer queue. This national encryption algorithm offers high security and reliability, effectively resisting various attack vectors and ensuring that only authorized servers can decrypt and read data.

[0077] In some possible embodiments, if the server fails to decrypt ciphertext more than the maximum number of retries, the system triggers a risk control policy. The maximum number of retries can be set based on business security requirements and actual circumstances, for example, 3. When the number of decryption failures exceeds this threshold, it may indicate an anomaly, such as data tampering during transmission, an encryption algorithm problem, or a malicious attack. Risk control policies may include flagging high-risk operations, restricting data reporting, or freezing associated accounts.

[0078] The method, device, medium and equipment for automatically capturing exposure information of page components provided in the embodiments of the present disclosure can more accurately capture the dynamic exposure status of page component elements within the window by monitoring the page scrolling events of the window, and dynamically calculate the visible range of the page component according to the cessation of the user's scrolling behavior or when the scrolling speed is lower than the threshold; at the same time, it identifies the moment when the component element first enters the window, marks it as an exposure state, and continuously tracks its stay time; when the component element leaves the window, it records its departure timestamp and calculates the single stay time, and then accumulates the total stay time of multiple component elements entering and leaving the window. If the total stay time of the component element exceeds the preset minimum valid time, it is automatically marked as valid exposure data, and the data is encrypted and reported in batches through the buffer queue, ensuring stable performance in high-frequency scrolling and clicking scenarios, preventing page freezes caused by frequent interface calls, and ensuring data security and privacy protection.

[0079] This automated capture and encrypted reporting of page component exposure information allows for efficient and accurate collection of user behavior data, reducing manual statistical errors and improving the efficiency and reliability of data processing. Furthermore, this disclosure records the dwell time of each component element and compares the total dwell time with the preset effective duration, ensuring the authenticity and accuracy of the exposure data.

[0080] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0081] Based on the same inventive concept, an embodiment of the present disclosure also provides an automatic capture device for page component exposure information corresponding to the automatic capture method for page component exposure information. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned automatic capture method for page component exposure information in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0082] Reference Figure 5FIG. 5 is a schematic diagram of an apparatus 500 for automatically capturing exposure information of page components provided by an embodiment of the present disclosure, the apparatus comprising:

[0083] The page monitoring module 501 is used to monitor page scrolling events of the window; wherein the page scrolling events include scrolling speed, scrolling distance and scrolling direction;

[0084] A position calculation module 502 is configured to dynamically calculate the current position of each component element in the page within the window based on the current scrolling distance and scrolling direction when the scrolling stops or the scrolling speed is lower than a preset threshold;

[0085] The state monitoring module 503 is configured to mark each component element as being in an exposed state if the component element enters the visible range of the window for the first time, and record the entry timestamp of the component element entering the window; if the component element has been marked as being in an exposed state and is still in the visible range of the window, update the residence time of the component element;

[0086] Duration determination module 504 is configured to record the departure timestamp of a component element if it leaves the visible range of the window, and calculate a single stay duration based on the difference between the entry and exit timestamps of the component element; for component elements that enter and exit the visible range of the window multiple times, the duration of each stay is accumulated as the total stay duration;

[0087] The data reporting module 505 is used to mark the exposure information corresponding to the component element as valid exposure data when the total stay time of the component element in the window exceeds the preset minimum valid time; and encrypt the valid exposure data in batches through the buffer queue and report it to the server.

[0088] In some possible embodiments, the page monitoring module 501 is further configured to:

[0089] In response to a page display instruction for the window generated by a user triggering a page loading operation or a page switching operation, obtaining rendering data of the page to be displayed, and completing a page rendering task for an initial visible area in the window based on the rendering data;

[0090] During page rendering, the coordinate information of each component element in the viewport is recorded, and a unique identifier is assigned to each component element.

[0091] Bind the unique identifier of each component element, the element coordinate information, and the callback function corresponding to the component element to obtain registration information, and store the registration information corresponding to each component element in the component element database;

[0092] If the page contains dynamically loaded content, when a new component is mounted, the coordinate recording, identifier allocation and callback function binding process of the component element is triggered and updated to the component element database.

[0093] In some possible embodiments, the position calculation module 502 is further configured to:

[0094] Based on the current scrolling distance and scrolling direction, predict the user's sliding trend and determine the preload area range of the window;

[0095] Render the component elements within the current window and the preloaded area based on the rendering data of the page to be displayed, and trigger the coordinate recording, identifier allocation and callback function binding process of the component elements, and update them to the component element database.

[0096] In some possible embodiments, the page monitoring module 501 is further configured to:

[0097] When the scrolling speed is not lower than the preset threshold, the component element rendering task is suspended until the scrolling behavior stops or the scrolling speed is lower than the preset threshold, and the component elements within the current window and the preloaded area are rendered according to the current scrolling distance, scrolling direction and rendering data of the page to be displayed.

[0098] In some possible embodiments, the data reporting module 505 is further configured to:

[0099] When the exposure information corresponding to a component element is not marked as valid exposure data within a preset time period after the component element is marked as an exposed state, the registration information of the component element is deleted from the component element database.

[0100] In some possible embodiments, the data reporting module 505 is specifically configured to:

[0101] The effective exposure data is encrypted using a national secret algorithm to generate ciphertext, and the ciphertext is reported to the server in batches through a buffer queue.

[0102] In some possible embodiments, the data reporting module 505 is further configured to:

[0103] If the server fails to decrypt the ciphertext more times than the maximum number of retries, a risk control strategy is triggered; wherein the risk control strategy includes marking high-risk operations, restricting data reporting, or freezing associated accounts.

[0104] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 66 is a schematic diagram of the structure of a computer device 600 provided in an embodiment of the present disclosure, including a processor 601, a memory 602, and a bus 603. The memory 602 is used to store execution instructions and includes a memory 6021 and an external memory 6022. The memory 6021 is also referred to as internal memory and is used to temporarily store calculation data in the processor 601 and data exchanged with an external memory 6022 such as a hard disk. The processor 601 exchanges data with the external memory 6022 through the memory 6021.

[0105] In the embodiment of the present application, the memory 602 is specifically used to store application code for executing the solution of the present application, and the execution is controlled by the processor 601. That is, when the computer device 600 is running, the processor 601 communicates with the memory 602 via the bus 603, so that the processor 601 executes the application code stored in the memory 602, thereby performing the method described in any of the aforementioned embodiments.

[0106] Among them, the memory 602 can be, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0107] The processor 601 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0108] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the computer device 600. In other embodiments of the present application, the computer device 600 may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0109] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program executes the steps of the method for automatically capturing page component exposure information described in the above method embodiment. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0110] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the method for automatically capturing the exposure information of page components described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0111] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0113] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0114] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0115] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0116] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.

Claims

1. A method for automatically capturing page component exposure information, characterized in that: include: Monitor page scrolling events of the window; wherein the page scrolling events include scrolling speed, scrolling distance and scrolling direction; When the scrolling stops or the scrolling speed is lower than a preset threshold, the current position of each component element in the page within the window is dynamically calculated based on the current scrolling distance and scrolling direction; For each component element, if the component element enters the visible range of the window for the first time, mark the component element as exposed and record the entry timestamp of the component element entering the window; if the component element has been marked as exposed and is still in the visible range of the window, update the residence time of the component element; If a component element leaves the visible range of the window, the departure timestamp of the component element is recorded, and the single stay duration is calculated based on the difference between the entry timestamp and the exit timestamp of the component element; for component elements that enter and exit the visible range of the window multiple times, the stay durations of each time are accumulated as the total stay duration; When the total stay time of a component element in the window exceeds the preset minimum valid time, the exposure information corresponding to the component element is marked as valid exposure data; and the valid exposure data is encrypted and reported to the server in batches through the buffer queue.

2. The method according to claim 1, characterized in that Before monitoring the page scrolling event of the window, the following steps are included: In response to a page display instruction for the window generated by a user triggering a page loading operation or a page switching operation, obtaining rendering data of the page to be displayed, and completing a page rendering task for an initial visible area in the window based on the rendering data; During page rendering, the coordinate information of each component element in the viewport is recorded, and a unique identifier is assigned to each component element. Bind the unique identifier of each component element, the element coordinate information, and the callback function corresponding to the component element to obtain registration information, and store the registration information corresponding to each component element in the component element database; If the page contains dynamically loaded content, when a new component is mounted, the coordinate recording, identifier allocation and callback function binding process of the component element is triggered and updated to the component element database.

3. The method according to claim 2, characterized in that The dynamic calculation of the current position of each component element in the page within the window includes: Based on the current scrolling distance and scrolling direction, predict the user's sliding trend and determine the preload area range of the window; Render the component elements within the current window and the preloaded area based on the rendering data of the page to be displayed, and trigger the coordinate recording, identifier allocation and callback function binding process of the component elements, and update them to the component element database.

4. The method according to claim 3, characterized in that After monitoring the page scrolling event of the window, the method further includes: When the scrolling speed is not lower than the preset threshold, the component element rendering task is suspended until the scrolling behavior stops or the scrolling speed is lower than the preset threshold, and the component elements within the current window and the preloaded area are rendered according to the current scrolling distance, scrolling direction and rendering data of the page to be displayed.

5. The method according to claim 1, wherein The method further comprises: When the exposure information corresponding to a component element is not marked as valid exposure data within a preset time period after the component element is marked as an exposed state, the registration information of the component element is deleted from the component element database.

6. The method according to claim 1, characterized in that The process of encrypting the effective exposure data in batches through the buffer queue and then reporting it to the server includes: The effective exposure data is encrypted using a national secret algorithm to generate ciphertext, and the ciphertext is reported to the server in batches through a buffer queue.

7. The method according to claim 6, characterized in that After the ciphertext is reported to the server in batches through the buffer queue, the method further includes: If the server fails to decrypt the ciphertext more times than the maximum number of retries, a risk control strategy is triggered; wherein the risk control strategy includes marking high-risk operations, restricting data reporting, or freezing associated accounts.

8. A device for automatically capturing exposure information of page components, characterized in that: include: A page monitoring module, configured to monitor page scrolling events of a window; wherein the page scrolling events include scrolling speed, scrolling distance, and scrolling direction; A position calculation module, configured to dynamically calculate the current position of each component element in the page within the window based on the current scrolling distance and scrolling direction when the scrolling stops or the scrolling speed is lower than a preset threshold; a state monitoring module configured to, for each component element, mark the component element as being in an exposed state if the component element first enters the visible range of the window and record an entry timestamp of the component element entering the window; and update the residence time of the component element if the component element has been marked as being in an exposed state and is still in the visible range of the window; a duration determination module configured to record the departure timestamp of a component element if it leaves the visible range of the window, and calculate a single stay duration based on the difference between the entry and exit timestamps of the component element; and for component elements that enter and exit the visible range of the window multiple times, accumulate the stay durations of each time as the total stay duration; The data reporting module is used to mark the exposure information corresponding to the component element as valid exposure data when the total stay time of the component element in the window exceeds the preset minimum valid time; and to encrypt the valid exposure data in batches through the buffer queue and report it to the server.

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

10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.