Exposure management method and device, equipment and storage medium

By triggering the exposure detection task when the view changes and generating related events based on the configuration information and visibility of the interface components, the problems of low exposure management efficiency and poor resource reuse in the prior art are solved, and efficient view exposure management is achieved.

CN119917389APending Publication Date: 2025-05-02BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510097046.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The existing exposure management methods are low in efficiency and poor resource reuse rates, making it difficult to efficiently and conveniently manage exposure events of views.

Method used

The exposure detection task is triggered by responding to the view changes associated with the interface; the target component to be monitored is determined based on the configuration information of multiple components in the interface; and based on the visibility of the target component, an event associated with the target component is generated to indicate the change in the exposure state of the target component.

Benefits of technology

It realizes the fine and convenient management of the exposure events of the view, reduces the number of exposure detection times, improves the efficiency of exposure detection tasks, and reduces the complexity and resource consumption of the exposure management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917389A_ABST
    Figure CN119917389A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an exposure management method and device, equipment and a storage medium. The method comprises the following steps: in response to view change associated with an interface, triggering an exposure detection task; determining a to-be-monitored target component based on configuration information of a plurality of components in the interface; based on the visibility of the target component in the interface, an event associated with the target component is generated, and the event indicates the change of the exposure state of the target component. According to the invention, the exposure event of the view can be managed finely and conveniently, the number of exposure detection times is reduced, and the efficiency of the exposure detection task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure relate generally to the field of computers, and more particularly to methods, devices, apparatuses, and computer-readable storage media for managing exposure. Background Art

[0002] With the development of computer technology, various forms of electronic devices can greatly enrich people's daily life. In the process of people using electronic devices, electronic devices need to manage the exposure of the view, so how to find an efficient and convenient exposure management method has become the focus of people's attention. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for managing exposure is provided. The method includes: in response to a view change associated with an interface, triggering an exposure detection task; determining a target component to be monitored based on configuration information of multiple components in the interface; and generating an event associated with the target component based on visibility of the target component in the interface, the event indicating a change in the exposure state of the target component.

[0004] In a second aspect of the present disclosure, a device for managing exposure is provided. The device includes: a trigger module configured to trigger an exposure detection task in response to a view change associated with an interface; a determination module configured to determine a target component to be monitored based on configuration information of multiple components in the interface; and a generation module configured to generate an event associated with the target component based on the visibility of the target component in the interface, the event indicating a change in the exposure state of the target component.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

[0007] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0009] Figure 1 A schematic diagram showing an example environment in which embodiments according to the present disclosure may be implemented;

[0010] Figure 2 An example exposure management process according to some embodiments of the present disclosure is shown;

[0011] Figure 3 An example exposure management process according to some embodiments of the present disclosure is shown;

[0012] Figure 4 shows an example exposure management interface according to some embodiments of the present disclosure;

[0013] Figure 5 An example exposure management process according to some embodiments of the present disclosure is shown;

[0014] Figure 6 A flowchart illustrating an example process for managing exposure according to some embodiments of the present disclosure;

[0015] Figure 7 A schematic structural block diagram showing an example apparatus for managing exposure according to some embodiments of the present disclosure; and

[0016] Figure 8 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0018] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0020] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.

[0021] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.

[0022] As mentioned above, with the development of computer technology, various forms of electronic devices can greatly enrich people's daily lives. In the process of people using electronic devices, electronic devices need to manage the exposure of views, so how to find an efficient and convenient exposure management method has become the focus of people's attention. However, the existing exposure management methods are inefficient and have poor resource reuse rates.

[0023] The embodiment of the present disclosure proposes a scheme for managing exposure. The scheme includes: triggering an exposure detection task in response to a view change associated with an interface; determining a target component to be monitored based on configuration information of multiple components in the interface; and generating an event associated with the target component based on the visibility of the target component in the interface, the event indicating a change in the exposure state of the target component.

[0024] In this way, the embodiments of the present disclosure can manage the exposure events of the view in a precise and convenient manner, reduce the number of exposure detections, and improve the efficiency of the exposure detection task. In addition, the embodiments of the present disclosure can also reduce the complexity of the exposure management system, reduce its development difficulty and resource consumption.

[0025] Various example implementations of the solution are described in detail below in conjunction with the accompanying drawings.

[0026] Example Environment

[0027] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include electronic device 110 .

[0028] In the example environment 100, the electronic device 110 may run an application that supports the appropriate. The electronic device 110 may present a view in a screen viewport, and the view may include one or more containers. The container may include one or more nodes, and the nodes may be exposed or de-exposed, for example, the node may appear in the viewport in response to a preset event (i.e., visible) or the node may not appear in the viewport in response to another preset event (i.e., invisible).

[0029] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0030] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0031] Example Exposure Management Process

[0032] Figure 2 , Figure 3 and Figure 5 An example exposure management process according to some embodiments of the present disclosure is shown, which may be performed by Figure 1 The electronic device 110 shown is executed.

[0033] Figure 4 An example exposure management interface according to some embodiments of the present disclosure is shown, which can be used, for example, by Figure 1 The electronic device 110 shown is provided. The nodes in the electronic device 110 can be exposed or de-exposed, and the embodiment of the present disclosure can manage the exposure event or de-exposure event of the node in the view and trigger the corresponding exposure detection task.

[0034] like Figure 2 As shown, Figure 2An example exposure management process 200 is shown. Based on the above process, the embodiments of the present disclosure can monitor the exposure / anti-exposure events of the node by setting the exposure identification (exposure-id) attribute, the unique identification (UniqueID) attribute, binding the UI appearance / UI disappearance (uiappear / uidisappear) event or calling the exposure data source interface. In addition, the electronic device 110 can also use the stop exposure 202 (stopExposure), resume exposure 204 (resumeExposure), and set the observer frame rate (setObserverFrameRate) 214 methods to control exposure detection. When the view changes, the electronic device 110 can send an exposure detection task 210 to the main thread 230 and throttle according to the timestamp. In the exposure detection task, the electronic device 110 can traverse the exposure data source, determine whether the node is visible according to its position, and calculate the difference between the results of the two exposure detections before and after, and send an exposure / anti-exposure event.

[0035] In some embodiments, the electronic device 110 may trigger the exposure detection task 210 in response to a view change associated with the interface. In some embodiments, the view change includes at least one of the following: layout adjustment of the interface; scrolling of the interface; attribute change of the interface; animation presentation in the interface.

[0036] In some examples, such as Figure 1 As shown, the electronic device 110 can detect changes in the view components in the interface. If the view changes, the electronic device 110 can mark the changed view components with a dirty flag. Stopping exposure can stop the exposure detection task, and continuing exposure can start the exposure detection task. The electronic device 110 can determine whether a view change has occurred by observing the dirty flag. The observer frame rate setting method can avoid triggering detection events too frequently by setting the trigger frequency of the view detection event, and it can determine the time interval between detection events by timestamps. The electronic device 110 can loop the exposure detection task in the run loop (RunLoop) 216 based on the time interval between detection events.

[0037] Specifically, in box 206 and box 208, the electronic device 110 may check UI dirty and page dirty, respectively, and the dirty flags involved in the present disclosure include UI dirty and page dirty, wherein the UI dirty flag is used to identify the view change of the UI element in the interface. For example, if the UI element in the view moves in position, or changes in size or its display style changes, the UI element may be marked with a UI dirty flag. In an embodiment of the present disclosure, if the page changes, for example, a card in the interface is slid up or down or switched, or jumps from one page to another, the electronic device 110 may mark the page with a page dirty flag.

[0038] In other examples, view changes may also include: the electronic device 110 switches from landscape mode to portrait mode, causing the layout of the interface to change; the electronic device 110 scrolls the interface in a streaming application to switch media streams; the interface properties of the electronic device 110 change, for example, the distance of the interface from the edge of the screen changes; the electronic device 110 presents an animation effect, which can change the layout or style of interface elements.

[0039] In some embodiments, if the electronic device 110 detects that an element in the interface is marked with a dirty flag, the electronic device 110 may trigger the exposure detection task 210 .

[0040] In some embodiments, an exposure detection task performed by the electronic device 110 may detect the occurrence of an event.

[0041] In some embodiments, the above events include: an exposure event, which indicates that the target component changes from an invisible state to a visible state, and / or a reverse exposure event, which indicates that the target component changes from a visible state to an invisible state.

[0042] In some examples, an exposure event refers to a notification of a state change of visibility of a view in an interface from invisible to visible. A de-exposure event refers to a notification of a state change of visibility of a view in an interface from visible to invisible.

[0043] In some embodiments, the exposure detection task 210 can be divided into five steps. In box 218, the electronic device 110 traverses the UI that needs to be exposed. In box 220, the electronic device 110 detects the UI on the current screen, and in box 222, the electronic device 110 compares the last detected UI on the screen with the previously detected UI, and calculates the relative position change in box 226. Finally, the electronic device 110 sends exposure and anti-exposure events in box 224.

[0044] In some embodiments, the electronic device 110 may determine the target component to be monitored based on the configuration information of the multiple components in the interface. For example, the electronic device 110 may determine the view component (e.g., UI element, page, etc.) to be monitored in the interface based on the configuration information set by the user or developer.

[0045] In some embodiments, the configuration information may include global exposure parameters associated with the interface, the global exposure parameters are associated with the target component and / or are associated with component parameters of the target component, the component parameters indicate the event type to be monitored.

[0046] In some embodiments, an IntersectionObserver may be used in the embodiments of the present disclosure to observe events. IntersectionObserver is a method for asynchronously detecting changes in the viewport intersection between a target element and an ancestor element.

[0047] In some embodiments, for cross-observers, embodiments of the present disclosure provide two modes of exposure monitoring.

[0048] The first method is global exposure, which includes: setting the exposure flag of the node, and listening to the exposure / anti-exposure event by means of a global event emitter. In some embodiments, the above-mentioned global exposure parameter may include the exposure flag involved herein. The exposure flag may indicate the identifier of the view element in the interface. For example, button 1 may be bound to exposure flag = 1, and button 2 may be bound to exposure flag = 2. The above-mentioned exposure flag or global exposure parameter may be unique, and it may uniquely indicate any view element or node in the interface.

[0049] Examples of global exposure parameters may include:<view exposure-id="1" / >

[0050] The second way is custom exposure, which includes: binding the UI appearance / UI disappearance of the node to monitor the exposure / de-exposure event of the node. In some embodiments, the component parameters associated with the target component may include UI appearance and / or UI disappearance parameters, which may indicate the type of event to be monitored. For example, UI appearance may indicate an exposure event of a view element (i.e., the originally invisible element is transformed to be visible), and UI disappearance may indicate a de-exposure event of a view element (i.e., the originally visible element is transformed to be invisible).

[0051] Examples of component parameters may include, for example:<view binduiappear={onAppear}binduidisappear={onDisappear} / > , which means that the electronic device 110 can return a corresponding return value when an exposure event or a reverse exposure event is detected.

[0052] In some embodiments, at box 212, the electronic device 110 may store the unique identifier, the exposed identifier, and the UI appearance / UI disappearance events in an exposed UI map.

[0053] The disclosed embodiments can trigger exposure detection only when the view changes, thus avoiding useless exposure detection and reducing computational overhead.

[0054] Furthermore, in some embodiments, Figure 2 The unique identifier shown in may represent an identifier associated with the exposure event.

[0055] In some embodiments, the electronic device 110 may also determine at least one exposure attribute based on the configuration information, and the at least one exposure attribute is associated with the exposure condition. These exposure attributes may be determined based on the preconfigured configuration information, and the electronic device 110 may determine whether the target component meets the conditions of the exposure event or the anti-exposure event based on these exposure attributes.

[0056] In some embodiments, for refined exposure requirements, the exposure attributes may include: a first scaling parameter of the screen viewport in the exposure detection task and / or a second scaling parameter of the component viewport in the exposure detection task and / or a visible area ratio that triggers an event associated with the target component.

[0057] In some examples, the first scaling attribute may include, for example, exposure-screen-margin-* (exposure screen boundary), which sets the boundary scaling value of the screen viewport in the exposure detection task. In some examples, the second scaling attribute may include, for example, exposure-ui-margin-* (exposure UI boundary), which sets the viewport boundary scaling value of the node in the exposure detection task. In some examples, the visible area ratio may include, for example, exposure-area (exposure area), which sets the visible area ratio of the node greater than a certain value to trigger the exposure event.

[0058] In some examples, the electronic device 110 may determine that the node triggers an exposure event, for example, in response to a visible area ratio of the node being greater than 30% and a zoom value reaching a preset condition.

[0059] In some embodiments, the exposure detection task is associated with at least one of the following interfaces: a first interface for stopping the exposure detection task of a specified node; a second interface for starting the exposure detection task of a specified node; and a third interface for the execution frequency of the exposure detection task.

[0060] In some examples, embodiments of the present disclosure provide related methods for controlling exposure detection tasks, and these methods involve controlling the exposure detection tasks using a first interface, a second interface, and a third interface.

[0061] In some examples, the first interface may include stop exposure, which is used to stop the exposure detection task. In some examples, the second interface may include continue exposure, which is used to start the exposure detection task. In some examples, the third interface may include set observer frame rate, which is used to set the frequency of the exposure detection task.

[0062] In some embodiments, the electronic device 110 may generate the event associated with the target component in response to visibility satisfying the exposure condition. For example, the electronic device 110 may expose the target component in response to a zoom attribute or a visible area ratio satisfying the exposure condition, i.e., triggering an exposure event of the target component.

[0063] The embodiments described in the present disclosure can provide a declarative and refined exposure interface, thereby reducing the cost of getting started for developers.

[0064] like Figure 3 As shown, Figure 3 An example process 300 of the electronic device 110 controlling an exposure detection task is shown.

[0065] In some embodiments, the electronic device 110 may determine the historical time of executing the historical exposure detection task in response to the view change; and trigger the exposure detection task in response to the interval from the historical time to the current time reaching a preset duration. That is, the electronic device 110 may detect the frequency of the exposure detection task based on the interval time between two exposure detection tasks. The occurrence time of the exposure detection task may be determined by Figure 3 The timestamp or time tag shown in .

[0066] In some examples, in order to reduce the number of exposure detection tasks triggered, the embodiments of the present disclosure introduce a global observer (for example, Figure 3 The global UI observation 302 shown in is used to trigger the exposure detection task as needed.

[0067] At block 308, the electronic device 110 checks for page changes. Whenever any form of view change occurs, such as layout adjustment, content scrolling, property change, etc., the global observer will set the flag to a dirty state at block 304. Subsequently, in the next run loop 310, the electronic device 110 will determine whether to perform the exposure detection task based on the flag and the detection frequency preset at block 306. If so, the exposure detection task will be performed and the flag will be reset.

[0068] like Figure 4As shown, Figure 4 A schematic diagram 400 is shown of electronic device 110 detecting visibility (ie, visibility) of a target component.

[0069] In some embodiments, the electronic device 110 may generate an event associated with the target component based on the visibility of the target component in the interface, where the event indicates a change in the exposure state of the target component.

[0070] In some embodiments, visibility may indicate at least one of the following: whether component parameters of the target component meet preset conditions; whether the target component is visible relative to the parent component; whether the target component is visible relative to a preset view; whether the target component is visible relative to the screen viewport 410.

[0071] In some examples, for view visibility judgment, the exposure detection task of the electronic device 110 can detect the visibility of the node (i.e., the target component). The detection of visibility can be based on the component parameters of the target component, for example, the node itself is visible, that is, the width and height (i.e., the component parameters) are not zero (i.e., meet the preset conditions), whether the component is opaque; whether the target component is visible relative to the parent component, for example, whether the node is visible relative to the ancestor node, that is, the width and height of the ancestor node are not zero and opaque, and when the ancestor node is a scrollable container, the node needs to be within the viewport of the ancestor node; whether the target component is visible relative to the preset view, for example, the node is visible relative to view 420 (i.e., the preset view), and the viewport of the node and the viewport of view 420 have an intersection; whether the target component is visible relative to the screen viewport 410, for example, whether the node is visible relative to the screen, and whether the viewport of the node and the viewport of the screen have an intersection.

[0072] like Figure 4 As shown in , node 1 440, node 2 450, node 3 460 and node 4 470 all have intersections with the ancestor container 430, the viewport and the screen viewport 410, then the electronic device 110 can determine that nodes 1-4 are visible relative to the view 420. However, if the nodes in the ancestor container 430 continue to scroll, the nodes that do not have an intersection with the viewport of the ancestor container 430 will be determined by the electronic device 110 as invisible, i.e., triggering an anti-exposure event.

[0073] In other examples, if the electronic device 110 attempts to determine whether any node is visible, the electronic device 110 first determines whether the ancestor node or parent node of the node is visible. If the ancestor node or parent node is not visible, the node is also not visible. Figure 4 If the ancestor container 430 shown in FIG. 4 is not visible, then nodes 1-4 are also not visible.

[0074] In some embodiments, the electronic device 110 may determine location information of at least one reference component; and determine visibility of the target component based on the location information of the at least one reference component.

[0075] like Figure 5 As shown, in block 502, the electronic device 110 may first detect a UI currently on the screen.

[0076] In some embodiments, in order to efficiently and accurately determine the visibility of a view, the electronic device 110 first needs to determine whether the view itself is in a visible state in block 504, which involves checking the view's visible properties and state. Thereafter, in block 506, the electronic device 110 may traverse the view tree upwards to find a parent node that may have a clipping effect on the node.

[0077] In some embodiments, the reference component involved here may include the above-mentioned parent node, and the electronic device 110 may determine the visibility of the target component based on the position information of the parent node and its visibility. Afterwards, in box 508, the electronic device 110 may calculate the position of the page, the node, and all related parent nodes relative to the screen. In box 510, the electronic device 110 may calculate the intersection of the viewports of the page, the node, and all related parent nodes. In box 512, the electronic device 110 may choose to use the minimum intersection as the basis for visibility judgment.

[0078] If the electronic device 110 determines that the location of the node has not been updated, the electronic device 110 may reuse the location of the node to save computing resources at block 516. If the location of the node has been updated, the electronic device 110 may recalculate the location of the node at block 518.

[0079] The embodiments of the present disclosure can reuse the parent view position in exposure detection, avoid repeated view position calculations, and thus further reduce calculation overhead.

[0080] In some embodiments, the electronic device 110 may cache the location information of at least one reference component for determining the visibility of at least one other component. For example, in this calculation process, the electronic device 110 may reuse the result that has been calculated by the previous exposure data source. Afterwards, the electronic device 110 may calculate the minimum viewport intersection of the node based on the above relative position relationship. Finally, the electronic device 110 may determine whether the node is visible based on the minimum viewport intersection. The minimum viewport intersection is related to the interactive or overlapping area of ​​the view. For example, the electronic device 110 may determine the minimum viewport intersection by determining the intersection of the node, container, view, and screen viewport. The location information of the reference component may be cached in a mapping relationship record or in a buffer, for example.

[0081] In this way, the embodiments of the present disclosure can manage the exposure events of the view in a precise and convenient manner, reduce the number of exposure detections, and improve the efficiency of the exposure detection task. In addition, the embodiments of the present disclosure can also reduce the complexity of the exposure management system, reduce its development difficulty and resource consumption.

[0082] The disclosed embodiment can also quickly and accurately determine the visibility of a node based on the intersection of multiple views, nodes, and viewports, thereby further improving the efficiency of exposure management.

[0083] Example Process

[0084] Figure 6 600 is a flowchart of an example process 600 for managing exposure according to some embodiments of the present disclosure. The process 600 may be implemented at the electronic device 110. Figure 1 600 is described below.

[0085] like Figure 6 As shown, in box 610, the electronic device 110 triggers an exposure detection task in response to a view change associated with the interface.

[0086] In block 620 , the electronic device 110 determines a target component to be monitored based on configuration information of the plurality of components in the interface.

[0087] In block 630 , the electronic device 110 generates an event associated with the target component based on visibility of the target component in the interface, the event indicating a change in an exposure state of the target component.

[0088] In some embodiments, the event includes: an exposure event, which indicates that the target component changes from an invisible state to a visible state; or a reverse exposure event, which indicates that the target component changes from a visible state to an invisible state.

[0089] In some embodiments, the configuration information includes at least one of the following: a global exposure parameter associated with the interface, the global exposure parameter being associated with the target component; and a component parameter associated with the target component, the component parameter indicating an event type to be monitored.

[0090] In some embodiments, process 600 further includes: determining at least one exposure attribute based on the configuration information, the at least one exposure attribute being associated with an exposure condition; and generating the event associated with the target component in response to the visibility satisfying the exposure condition.

[0091] In some embodiments, the at least one exposure attribute includes at least one of the following: a first scaling parameter of the screen viewport in the exposure detection task; a second scaling parameter of the component viewport in the exposure detection task; and a visible area ratio that triggers the event associated with the target component.

[0092] In some embodiments, the exposure detection task is associated with at least one of the following interfaces: a first interface, used to stop the exposure detection task of a specified node; a second interface, used to start the exposure detection task of a specified node; and a third interface, used for the execution frequency of the exposure detection task.

[0093] In some embodiments, the view change includes at least one of the following: layout adjustment of the interface; scrolling of the interface; property change of the interface; animation presentation in the interface.

[0094] In some embodiments, process 600 further includes: determining a historical time for executing a historical exposure detection task in response to the view change; and triggering the exposure detection task in response to an interval from the historical time to the current time reaching a preset duration.

[0095] In some embodiments, the visibility indicates at least one of the following: whether a component parameter of the target component satisfies a preset condition; whether the target component is visible relative to a parent component; whether the target component is visible relative to a preset view; and whether the target component is visible relative to a screen viewport.

[0096] In some embodiments, process 600 further includes: determining position information of at least one reference component; and determining the visibility of the target component based on the position information of the at least one reference component.

[0097] In some embodiments, process 600 further includes caching the position information of the at least one reference component for use in determining visibility of at least one other component.

[0098] Example devices and equipment

[0099] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 7 A schematic structural block diagram of an example apparatus 700 for managing exposure according to some embodiments of the present disclosure is shown. The apparatus 700 may be implemented as or included in the electronic device 110. Each module / component in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.

[0100] like Figure 7As shown, the device 700 includes: a trigger module 710, configured to trigger an exposure detection task in response to a view change associated with an interface; a determination module 720, configured to determine a target component to be monitored based on configuration information of multiple components in the interface; and a generation module 730, configured to generate an event associated with the target component based on visibility of the target component in the interface, the event indicating a change in the exposure state of the target component.

[0101] In some embodiments, the event includes: an exposure event, which indicates that the target component changes from an invisible state to a visible state; or a reverse exposure event, which indicates that the target component changes from a visible state to an invisible state.

[0102] In some embodiments, the configuration information includes at least one of the following: a global exposure parameter associated with the interface, the global exposure parameter is associated with the target component; and a component parameter associated with the target component, the component parameter indicates an event type to be monitored.

[0103] In some embodiments, the device 700 also includes a property determination module configured to: determine at least one exposure property based on the configuration information, the at least one exposure property is associated with the exposure condition; and generate an event associated with the target component in response to visibility satisfying the exposure condition.

[0104] In some embodiments, at least one exposure attribute includes at least one of the following: a first scaling parameter of a screen viewport in an exposure detection task; a second scaling parameter of a component viewport in an exposure detection task; and a visible area ratio that triggers an event associated with a target component.

[0105] In some embodiments, the exposure detection task is associated with at least one of the following interfaces: a first interface for stopping the exposure detection task of a specified node; a second interface for starting the exposure detection task of a specified node; and a third interface for the execution frequency of the exposure detection task.

[0106] In some embodiments, the view change includes at least one of the following: layout adjustment of the interface; scrolling of the interface; property change of the interface; animation presentation in the interface.

[0107] In some embodiments, the device 700 also includes a detection module configured to: determine the historical time for executing the historical exposure detection task in response to the view change; and trigger the exposure detection task in response to the interval from the historical time to the current time reaching a preset duration.

[0108] In some embodiments, visibility indicates at least one of the following: whether a component parameter of the target component satisfies a preset condition; whether the target component is visible relative to an upper-level component; whether the target component is visible relative to a preset view; whether the target component is visible relative to a screen viewport.

[0109] In some embodiments, the apparatus 700 further includes a position determination module configured to: determine position information of at least one reference component; and determine visibility of the target component based on the position information of the at least one reference component.

[0110] In some embodiments, the apparatus 700 further includes a cache module configured to: cache location information of at least one reference component for use in determining visibility of at least one other component.

[0111] like Figure 8 As shown, the electronic device 800 is in the form of a general electronic device. The components of the electronic device 800 may include, but are not limited to, one or more processors or processing units 810, a memory 820, a storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 820. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 800.

[0112] The electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 800.

[0113] The electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 8 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0114] The communication unit 840 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0115] The input device 850 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 860 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 800 may also communicate with one or more external devices (not shown) through the communication unit 840 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 800, or communicate with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0116] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0117] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0118] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0119] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0120] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0121] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for managing exposure, comprising: In response to a view change associated with the interface, triggering an exposure detection task; Determine the target component to be monitored based on the configuration information of the multiple components in the interface; Based on the visibility of the target component in the interface, an event associated with the target component is generated, the event indicating a change in an exposure state of the target component.

2. The method according to claim 1, wherein the event comprises: an exposure event, wherein the exposure event indicates that the target component changes from an invisible state to a visible state; or A de-exposure event indicates that the target component changes from a visible state to an invisible state.

3. The method according to claim 1, wherein the configuration information comprises at least one of the following: a global exposure parameter associated with the interface, the global exposure parameter being associated with the target component; A component parameter associated with the target component, the component parameter indicating a type of event to be monitored.

4. The method according to claim 1, further comprising: determining at least one exposure attribute based on the configuration information, the at least one exposure attribute being associated with an exposure condition; as well as In response to the visibility satisfying the exposure condition, the event associated with the target component is generated.

5. The method of claim 4, wherein the at least one exposure attribute comprises at least one of the following: A first scaling parameter of the screen viewport in the exposure detection task; A second scaling parameter of the component viewport in the exposure detection task; The proportion of the visible area that triggered the event associated with the target component.

6. The method according to claim 1, wherein the exposure detection task is associated with at least one of the following interfaces: A first interface, used to stop the exposure detection task of a specified node; A second interface, used to start the exposure detection task of a specified node; The third interface is used for the execution frequency of the exposure detection task.

7. The method according to claim 1, wherein the view change comprises at least one of the following: Adjust the layout of the interface; Scrolling of the interface; Changes in interface attributes; Animation presentation in the interface.

8. The method of claim 1 , wherein in response to a view change associated with the interface, triggering the exposure detection task comprises: In response to the view change, determining a historical time for performing a historical exposure detection task; as well as In response to the interval from the historical time to the current time reaching a preset duration, the exposure detection task is triggered.

9. The method of claim 1, wherein the visibility indicates at least one of: Whether the component parameters of the target component meet the preset conditions; Whether the target component is visible relative to the parent component; Whether the target component is visible relative to a preset view; Whether the target component is visible relative to the screen viewport.

10. The method according to claim 1, further comprising: determining position information of at least one reference component; as well as The visibility of the target component is determined based on the position information of the at least one reference component.

11. The method according to claim 10, further comprising: The position information of the at least one reference component is cached for use in determining visibility of at least one other component.

12. An apparatus for managing exposure, comprising: a trigger module, configured to trigger an exposure detection task in response to a view change associated with the interface; A determination module, configured to determine a target component to be monitored based on configuration information of multiple components in the interface; as well as A generating module is configured to generate an event associated with the target component based on visibility of the target component in the interface, wherein the event indicates a change in an exposure state of the target component.

13. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 11 when executed by the at least one processing unit.

14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 11.