View exposure state determination method and related equipment
Through the monitoring view display status changes and polling mechanism, combined with historical exposure status and related parameters, the problem of inaccurate control of multi-type view exposure status and untimely update in the existing technology is solved, and the accurate and timely update of the view exposure status is achieved.
Patent Information
- Application Number
- CN202311612498.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2025-05-30
AI Technical Summary
The prior art cannot effectively determine the exposure state of multiple types of views, and the logical control is simple, the view exposure state cannot be accurately controlled, and the timeliness of view exposure state update cannot be guaranteed.
By monitoring the display state changes of the view, the current exposure state is determined based on the historical exposure state and exposure-related parameters of the view, and polling is performed at a predetermined time interval to ensure the timely update of the view exposure state.
It realizes precise control of various types of view exposure states under a set of logical systems, ensures real-time update of view exposure states, and solves the problems of excessive logic and untimely updates in the prior art.
Smart Images

Figure CN120066883A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of view exposure, and in particular, to a method for determining a view exposure state and related devices. Background Art
[0002] View exposure is an important user-perceived event for a program. With the rapid development of Internet technologies and application programs, users have higher and higher requirements for the accuracy of the pushed content. At this time, it is necessary to determine the personal preferences of users based on the exposure situation of the views browsed by the users, so as to be able to push more high-quality content for the users.
[0003] Currently, there is usually a simple logical control for the exposure state of a single type of view. However, for multiple types of views, there is currently no complete logical system that can determine the exposure states of multiple types of views. In addition, the logical systems in the prior art are generally relatively simple, unable to accurately control the exposure state of views, and unable to ensure the timeliness of updating the view exposure state. Summary of the Invention
[0004] In view of this, the purpose of the present disclosure is to propose a method for determining a view exposure state and related devices.
[0005] Based on the above purpose, the present disclosure provides a method for determining a view exposure state, including:
[0006] In response to detecting a change in the display state of a view, determining the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view; the historical exposure state is the exposure state of the view before the change in the display state of the view; the view includes a list view;
[0007] Polling the historical exposure states of all list views on the page where the list view is located at a predetermined time interval, and determining the current exposure state of each list view based on the historical exposure state of each list view and the exposure-related parameters.
[0008] Based on the above method for determining a view exposure state, an embodiment of the present disclosure provides a device for determining a view exposure state, including:
[0009] A determination module, configured to, in response to detecting a change in the display state of a view, determine the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view; the historical exposure state is the exposure state of the view before the change in the display state of the view; the view includes a list view;
[0010] The polling module polls the historical exposure status of all list views on the page where the list view is located at a predetermined time interval, and determines the current exposure status of each list view based on the historical exposure status of each list view and the exposure-related parameters.
[0011] In addition, an embodiment of the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above method is implemented.
[0012] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the above method.
[0013] An embodiment of the present disclosure further provides a computer program product including computer program instructions that, when run on a computer, cause the computer to execute the above method.
[0014] As can be seen from the above, through the method and related devices for determining the view exposure status provided by the present disclosure, by responding to the change in the display status of the view being monitored, based on the historical exposure status of the view and the exposure-related parameters of the view, the current exposure status of the view is determined; the historical exposure status is the exposure status of the view before the change in the display status of the view; the view includes a list view; the historical exposure status of all list views on the page where the list view is located is polled at a predetermined time interval, and the current exposure status of each list view is determined based on the historical exposure status of each list view and the exposure-related parameters. The above method can adjust the exposure status of multiple types of views under a set of logical systems, and also introduces exposure-related parameters to adjust the exposure status of the views, enabling more accurate control of the exposure status of the views. In addition, a polling mode is additionally set, which can poll the exposure status of the list view at a predetermined time interval and determine the exposure status of the view at a predetermined time interval, effectively ensuring the real-time update of the view exposure status, and thus achieving precise control of the view exposure status. It can be seen that the above method can effectively solve the problems that there is no complete set of logical systems to determine the exposure status of multiple types of views; the adjustment logic of the view exposure status is too simple to accurately determine the exposure status and cannot ensure the timeliness of the view exposure status update. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] To more clearly illustrate the technical solutions in the present disclosure or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following descriptions are only embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0016] Figure 1 Shows the implementation process of the method for determining the view exposure state according to some embodiments of the present disclosure;
[0017] Figure 2 Shows the implementation process of determining the normal view exposure state in the embodiments of the present disclosure;
[0018] Figure 3 The implementation process of determining the list view exposure state in the embodiments of the present disclosure;
[0019] Figure 4 Shows the implementation process of polling at a predetermined time interval in the embodiments of the present disclosure;
[0020] Figure 5 Shows the internal structure of the device for determining the view exposure state according to the embodiments of the present disclosure;
[0021] Figure 6 Shows a more specific schematic diagram of the hardware structure of an electronic device according to some embodiments of the present disclosure. Detailed implementation manners
[0022] To make the purpose, technical solutions and advantages of the present disclosure clearer and more understandable, the following will further describe the present disclosure in detail with reference to specific embodiments and the accompanying drawings.
[0023] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the ordinary meaning understood by those of ordinary skill in the field to which the present disclosure belongs. The "first", "second" and similar terms used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0024] It is understandable that before using the technical solutions of the various embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0025] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the technical solutions of the present disclosure according to the prompt message.
[0026] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0027] It is understandable that the above process of notifying and obtaining the user's authorization is only illustrative and does not limit the implementation manner of the present disclosure. Other manners that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0028] As mentioned above, currently, there is usually a simple logical control for the exposure status of a single type of view. However, for multiple types of views, there is currently no complete logical system that can determine the exposure status of multiple types of views. In addition, the logical systems in the prior art are generally relatively simple, unable to accurately control the exposure status of the view, and unable to ensure the timeliness of the update of the view exposure status.
[0029] To this end, some embodiments of the present disclosure provide a method for determining the view exposure status, which can adjust the exposure status of multiple types of views under a set of logical systems, and also introduce exposure-related parameters to adjust the exposure status of the view, enabling more accurate control of the exposure status of the view. In addition, a polling mode is additionally set, which can poll the exposure status of the list view at a predetermined time interval and determine the exposure status of the view at a predetermined time interval, effectively ensuring the real-time update of the view exposure status, and thus achieving accurate control of the view exposure status. In the embodiments of the present disclosure, the above method for determining the view exposure status can be implemented by an electronic device with computing capabilities.
[0030] Figure 1 Shows the implementation process of the view exposure status method described in the embodiments of the present disclosure. As Figure 1 shown, the method may include the following steps:
[0031] In step 102, in response to detecting a change in the display state of a view, determine the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view; the historical exposure state is the exposure state of the view before the change in the display state of the view; the view includes a list view.
[0032] First, it should be clear that for the present disclosure, a complete control logic is set for multiple types of views, and this control logic is established under a set of control frameworks. The present disclosure is provided with an exposure manager, and at least one exposure group is managed under the exposure manager. For each exposure group, at least one exposure item is managed under it. Each exposure group corresponds to a view controller, and the exposure targets in this view controller are all associated with this group. For each exposure item, it corresponds to a specific exposure target, which can be a normal view or a list view. For each exposure item, a corresponding exposure configuration is also set.
[0033] The above-mentioned normal view refers to a general view displayed on the interface, such as a button, a picture, etc. The above-mentioned list view is a view with a specific format, which can be specifically embodied in the form of a list. For the list view, it is further divided into a single-column list view and a multi-column list view. Different controllers can be used to control list views with different numbers of columns during actual control.
[0034] In an embodiment of the present disclosure, the change in the display state of the above-mentioned view may include the view appearing, the view disappearing, the sub-view being re-layout, the sub-view moving to the parent view, the sub-view being removed from the parent view, the view being hidden, and so on.
[0035] In an embodiment of the present disclosure, detecting the change in the display state of the above-mentioned view can be implemented by using a hook method.
[0036] For the Windows system, it is built on an event-driven mechanism. To put it simply, the entire system is implemented through message passing. A hook is a special message handling mechanism that can monitor various event messages in the system or a process, intercept messages sent to the target window, and process them. Therefore, we can customize hooks in the system to monitor the occurrence of specific events in the system and complete specific functions, such as screen word capture, log monitoring, intercepting keyboard and mouse inputs, etc. There are many types of hooks, and each type of hook can intercept corresponding messages. For example, a keyboard hook can intercept keyboard messages, and a shell hook can intercept, start, and close application messages. Hooks can be divided into thread hooks and system hooks. A thread hook can monitor event messages of a specified thread, and a system hook monitors event messages of all threads in the system. Therefore, a hook is an interception mechanism for Windows messages. It can intercept messages of a single process (thread hook), or intercept messages of all processes (system hook), and can also perform custom processing on the intercepted messages. In the embodiments of the present disclosure, a hook is used to monitor the display state of a view.
[0037] After detecting a change in the display state of the view, it is necessary to determine the exposure state of the current view according to a preset logic. When monitoring the display state of the view, the change in the display state of the view can be known by monitoring the life cycle of the view.
[0038] In the embodiments of the present disclosure, the parameters related to the exposure of the view may include the exposure area of the view, the transparency of the view, the position of the view, and the exposure time of the view. According to the foregoing exposure-related parameters, the current exposure state of the view can be known. However, it should be noted that in the embodiments of the present disclosure, the exposure state of the view is not only determined by the exposure-related parameters, but also includes other additional complex logics to assist in determining the exposure state of the view. For specific details, see the following description.
[0039] In the embodiments of the present disclosure, the historical exposure state of the foregoing view is the exposure state of the view before the change in the display state of the view, that is, the exposure state held by the view before determining the new exposure state of the view. In this embodiment, when determining the exposure state of the view, sometimes it is necessary to assist in determining the current exposure state of the view according to the historical exposure state of the corresponding view. That is, different historical exposure states may result in different finally determined current exposure states of the view, because different logical branches may exist for different historical exposure states. Therefore, the historical exposure state of the view can also be an important parameter for determining the current exposure state of the view.
[0040] The exposure state of the view can include unexposed, in the process of exposure, and exposed. For a view, its exposure state can be a temporary state quantity within a period of time, and in the embodiments of the present disclosure, the exposure state of the view circulates among the above three states.
[0041] Figure 2 It shows the implementation process of determining the normal view exposure state in the embodiments of the present disclosure.
[0042] In the embodiments of the present disclosure, the exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view; determining the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view includes: in response to the exposure area being greater than a first threshold, the transparency being greater than a second threshold, and the position being located on the visible page, determining that the current exposure state of the view is exposed.
[0043] As Figure 2 shown, in the embodiments of the present disclosure, it is judged whether the exposure area of the view is greater than a first threshold. If it is greater than the first threshold, then it is continued to judge whether the transparency of the view is greater than a second threshold. If it is greater than the second threshold, then it is continued to judge whether the view position is zero. Here, when the view position is zero, the view cannot be located on the visible page, or in other words, the view cannot appear on the current display page. When the view position is not zero, the view appears on the current page. In some other embodiments, at this time, it can be determined that the exposure state of the view is in the process of exposure. And when any one of the above three judgment conditions is not satisfied, it can be known that the exposure state of the view is unexposed at this time, and the exposure state of the view is determined accordingly. In some embodiments, if the historical exposure state of the view is in the process of exposure or exposed, at this time, it can be determined that the exposure state of the view is unexposed.
[0044] It should be noted that the above three judgment conditions Figure 2 only give an example of a judgment order, and the order of these three judgment conditions can actually be swapped, which does not affect determining the final exposure state of the view.
[0045] In the embodiments of the present disclosure, after determining that the current state of the view is exposed, it further includes: determining whether the view needs to be repeatedly exposed; in response to the view needing to be repeatedly exposed, re-determining the current exposure state of the view according to the historical exposure state of the view and the exposure-related parameters of the view.
[0046] Continue to refer to Figure 2, when all of the above three judgment conditions are satisfied, the issue of whether the view needs to be repeatedly exposed can also be considered at this time. In the embodiments of the present disclosure, by adding a judgment on whether the view needs to be repeatedly exposed, the exposure state of the view can be more accurately determined. Specifically, as shown in Figure 2 When it is determined that the view needs to be repeatedly exposed, the historical exposure state of the view at this time is continuously judged. If the historical exposure state is unexposed, the exposure state of the view is determined to be in the process of exposure at this time. If the historical exposure state is in the process of exposure, further determination is required, specifically, to judge whether the exposure time is greater than or equal to the third threshold. If the condition is satisfied, the exposure state of the view is determined to be exposed.
[0047] In the embodiments of the present disclosure, the change in the display state includes an appearance event and a disappearance event; the determining of the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view in response to monitoring the change in the display state of the view includes: in response to monitoring the appearance event of the list view, determining the current exposure state of the list view to be in the process of exposure; in response to monitoring the disappearance event of the list view, determining the current exposure state of the list view based on the historical exposure state of the list view and the exposure-related parameters of the list view.
[0048] In the embodiments of the present disclosure, the aforementioned appearance event refers to a certain row in the list view about to appear, and the aforementioned disappearance event refers to a certain row in the list view having disappeared.
[0049] Figure 3 shows the implementation process of determining the exposure state of the list view in the embodiments of the present disclosure.
[0050] In the embodiments of the present disclosure, the exposure-related parameters include the exposure duration of the view; the determining of the current exposure state of the list view based on the historical exposure state of the list view and the exposure-related parameters of the list view includes: in response to the historical exposure state of the list view being in the process of exposure and the exposure duration being greater than or equal to the third threshold, determining the current exposure state of the list view to be exposed; in response to the historical exposure state of the list view being in the process of exposure and the exposure duration being less than the third threshold, determining the current exposure state of the list view to be unexposed.
[0051] When the view is in list view and it is monitored that a row of the list view is about to appear, for the present disclosure, it can first be determined whether the list exposure of this row is turned on. The list exposure being turned on means that for this list, it needs to be exposed. If the list exposure of this row is not turned on, it means that this row does not need to be exposed, so the operation can be directly returned. After the list exposure is turned on, it is determined whether there is a corresponding exposure group in the existing logical framework that can manage this list view. If not, a corresponding exposure group is newly created. Next, it is continued to be determined whether there is a corresponding exposure item that can manage this list view. If not, a corresponding exposure item is newly created. At this time, there is also a judgment step, that is, to determine whether the override mode is turned on. At present, when explaining, it is defaulted that the override mode is not turned on. Therefore, it is directly confirmed that the current exposure state of this list view is in exposure. The foregoing creations of the exposure group and the exposure item are both created as needed, that is, when it is necessary to expose a certain view, it can be created by itself.
[0052] If it is monitored that a row of the list view has disappeared at this time, then similarly, it is necessary to first determine whether the list exposure is turned on. If it is not turned on, it is directly returned. If it is turned on, it is determined whether the override mode is turned on. Here, when explaining, it is defaulted that it is not turned on (if it is turned on, it can be directly returned at this time). Then, the current exposure state of the list view can be determined based on the historical exposure state of the list view. Specifically, referring to Figure 3 It can be known that when the historical exposure state of the list view is not unexposed, it is determined whether the historical exposure state is in exposure. If it is in exposure, it is continued to be determined whether the exposure time of this list view is greater than or equal to the third threshold. If the condition is met, it is determined that the exposure state of this list view is exposed. If the condition is not met, it is determined that the exposure state of this list view is unexposed. Here, because the exposure time does not reach the third threshold during exposure, and the event at this time is that a row of the list view has disappeared, it cannot meet the requirements for the exposure state to be exposed. Therefore, it is determined that the exposure state of the list view at this time is unexposed.
[0053] In an embodiment of the present disclosure, the method further includes: in response to monitoring the scroll stop event of the list view, polling the historical exposure states of all list views on the page where the list view is located, and determining the current exposure state of each list view based on the historical exposure state and the exposure-related parameters of each list view.
[0054] In an embodiment of the present disclosure, the scrolling stop event of the list view is listened for. If the occurrence of the scrolling stop event is detected, similarly, it is necessary to first determine whether the exposure switch corresponding to the list view is turned on. If it is turned on, the historical exposure status of all list views on the page where the list view is located is polled, that is, all pending rows on the page are traversed. Specifically, the exposure group corresponding to the page is obtained. When obtaining, it is obtained in units of a single view controller. After obtaining the corresponding exposure group, all exposure items in the exposure group are traversed, and subsequent detailed logical judgments are made.
[0055] In step 104, the historical exposure status of all list views on the page where the list view is located is polled at a predetermined time interval, and based on the historical exposure status of each list view and the exposure-related parameters, the current exposure status of each list view is determined.
[0056] In an embodiment of the present disclosure, the polling at a predetermined event interval is to address the following situations: First, the situation where the user stays still. Because if the user stays still, then for all views, the life cycle of the hook thereof will not change, so the change in the display status will not be detected either. At this time, the exposure status of these views will not change. And if the user stays still all the time, the exposure status will not be updated all the time. However, view exposure requires timeliness. If a certain view reaches the corresponding threshold at this time, its exposure status should change to being exposed or already exposed. But because the user stays still, the corresponding life cycle cannot be hooked, and its corresponding exposure status will not change either. Obviously, this is not conducive to the update of the view exposure status. Therefore, the present disclosure sets up a polling mechanism, that is, the exposure status of all list views is updated at a predetermined time interval, which effectively ensures the timeliness of the view exposure status update. Second, because a corresponding override mode is set in the present disclosure. In this mode, the present disclosure will use some new logics to determine the exposure status of the view. After the override mode is enabled, when determining the exposure status of the view, it does not need to rely on the aforementioned life cycle method and can directly perform internal polling, which can realize the manual inspection of the view exposure status.
[0057] In an embodiment of the present disclosure, determining the current exposure status of each list view based on the historical exposure status and the exposure-related parameters of each list view further includes: for each list view, obtaining the repeated exposure parameter of the list view; determining the current exposure status of the list view based on the repeated exposure parameter, the historical exposure status, and the exposure-related parameters; wherein, the repeated exposure configuration includes: the repeated exposure parameter within a single page, the repeated exposure parameter returned by the background, the repeated exposure parameter returned by the page, and the repeated exposure parameter when the program is active; the repeated exposure parameter within a single page is used to control whether the list view within a single page is repeatedly exposed; the repeated exposure parameter returned by the background is used to control whether the list view displayed after being returned by the background is repeatedly exposed; the repeated exposure parameter returned by the page is used to control whether the list view displayed after returning to the page is repeatedly exposed; the repeated exposure parameter when the program is active is used to control whether the list view displayed after the program becomes active is repeatedly exposed. The following is through Figure 4 to elaborate on the above embodiment in detail.
[0058] Figure 4 shows the implementation process of polling at a predetermined time interval in an embodiment of the present disclosure.
[0059] Specifically, during the polling process, first, it is judged whether the exposure area is greater than or equal to the first threshold, the transparency is greater than or equal to the second threshold, and the position is zero. If any one of the three does not meet the requirements, then it is judged whether the override mode is turned on. If it is not turned on, it directly returns. If the override mode is turned on, it is judged whether the historical exposure status is in the process of exposure. If it is in the process of exposure, the exposure status is determined to be unexposed. If it is not in the process of exposure and not unexposed, then it is judged whether the single-page repeated exposure is turned on and the exposure status is exposed. If so, the single-page exposed is set to single-page unexposed. Because the exposure status of the view is exposed at this time and the single-page repeated exposure is turned on, then the single-page exposed needs to be set to single-page unexposed at this time to facilitate subsequent repeated exposure of the view.
[0060] If the requirements are met during the process of judging the exposure area, transparency, and position, then it is determined whether the historical exposure state is exposed and the exposure duration is greater than the fourth threshold. If the requirements are met, the current exposure state is determined to be unexposed. If the requirements are not met, the historical exposure state is judged again. If it is exposed, it is judged whether single-page repeated exposure is enabled and there is unexposed content within the single page. If the requirements are met, the exposure state is determined to be in the process of exposure at this time, and repeated exposure starts. If the historical exposure state is judged to be unexposed during the above-mentioned re-judgment of the historical exposure state, then it is judged whether the override mode is enabled. If the override mode is not enabled, it is judged whether the return-page repeated exposure is enabled and the user has left and then returned to the page. If the requirements are met, the exposure state is determined to be in the process of exposure and the return-page repeated exposure is disabled. If the requirements are not met, it is judged whether the program-active repeated exposure is enabled and the user has returned to the program from the background. If the requirements are met, the exposure state is determined to be in the process of exposure and the background-return repeated exposure is disabled. The purpose of disabling the background-return repeated exposure here is to prevent the problem of infinite repeated exposure from occurring.
[0061] During the above-mentioned judgment process, if the override mode is enabled, it is judged whether the return-page repeated exposure is disabled and the page has been left after exposure. If the requirements are not met, it is continued to judge whether the program-active repeated exposure is disabled and the background program has been entered after exposure. If the requirements are still not met, the current exposure state of the view is determined to be in the process of exposure. During the above-mentioned process, if a situation that meets the requirements occurs, it directly returns without modifying the exposure state.
[0062] The above-mentioned polling scheme and the scheme for determining the view exposure state according to the life cycle are implemented in parallel. The technical scheme of using the monitoring life cycle method and the polling method in parallel can effectively ensure the timeliness of view exposure state update. In the polling scheme, the behavior of repeated exposure is specified in detail, making the situation of repeated exposure clearer, and effectively avoiding the problem of infinite repeated exposure through various logical judgments and parameter settings.
[0063] In the embodiments of the present disclosure, the method further includes: setting a target view; the target view is located on the first page; in response to an event that the first page is switched to the second page, re-determining the current exposure state of the target view; wherein, the first page and the second page are controlled by the same view controller.
[0064] In the prior art, for the first page and the second page controlled by the same view controller, if the user only switches between the first page and the second page, the life cycle events cannot be monitored. At this time, for the pages controlled by the same view controller, when switching between these pages, the exposure status of the views in the page cannot be updated in a timely manner. Therefore, the present disclosure sets a target view. For the user, the target view can be configured by himself. After setting the target view, when listening, the life cycle events of the target view will be monitored separately. That is, if the display status of the target view changes, at this time, the current exposure status of the corresponding target view will be determined again. Through the foregoing solution, the technical problem that the exposure status of the views of multiple pages controlled by a single view controller cannot be updated in a timely manner can be effectively solved.
[0065] The above method for determining the view exposure status monitors that the display status of the view changes, and determines the current exposure status of the view based on the historical exposure status of the view and the exposure-related parameters of the view; the historical exposure status is the exposure status of the view before the display status of the view changes; the view includes a list view; and polls the historical exposure status of all list views on the page where the list view is located at a predetermined time interval, and determines the current exposure status of each list view based on the historical exposure status and the exposure-related parameters of each list view. It can adjust the exposure status of multiple types of views under a set of logic systems, and also introduces exposure-related parameters to adjust the exposure status of the views, enabling more accurate control of the exposure status of the views. In addition, a polling mode is additionally set, which can poll the exposure status of the list view at a predetermined time interval and determine the exposure status of the view at a predetermined time interval, effectively ensuring the real-time update of the view exposure status, and thus realizing the accurate control of the view exposure status. It can be seen that the above method can effectively solve the problems that there is no complete set of logic systems to determine the exposure status of multiple types of views; the adjustment logic of the view exposure status is too simple to accurately determine the exposure status and cannot ensure the timeliness of the view exposure status update.
[0066] It should be noted that the method of the embodiments of the present disclosure can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of the present disclosure, and these multiple devices will interact with each other to complete the described method.
[0067] It should be noted that some embodiments of the present disclosure have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0068] Corresponding to the method for determining the view exposure state, an embodiment of the present disclosure also discloses a device for determining the view exposure state. Figure 5 Shows the internal structure of the device for determining the view exposure state according to the embodiment of the present disclosure. As Figure 5 shown, the device may include:
[0069] A determination module 502, configured to determine the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view in response to monitoring that the display state of the view changes; the historical exposure state is the exposure state of the view before the display state of the view changes; the view includes a list view;
[0070] A polling module 504, configured to poll the historical exposure states of all list views on the page where the list view is located at a predetermined time interval, and determine the current exposure state of each list view based on the historical exposure state of each list view and the exposure-related parameters.
[0071] In some embodiments of the present disclosure, the exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view;
[0072] The determination module 502 may include:
[0073] A first determination unit, configured to determine that the current exposure state of the view is exposed in response to the exposure area being greater than a first threshold, the transparency being greater than a second threshold, and the position being within the visible page.
[0074] In some embodiments of the present disclosure, the device further includes:
[0075] A repeated exposure module, configured to determine whether the view needs to be repeatedly exposed;
[0076] A re-determination of exposure state module, configured to re-determine the current exposure state of the view according to the historical exposure state of the view and the exposure-related parameters of the view in response to the view needing to be repeatedly exposed.
[0077] In some embodiments of the present disclosure, the change in the display state includes an appearance event and a disappearance event;
[0078] The determining module 502 may include:
[0079] An appearance unit, configured to determine that the current exposure state of the list view is in exposure in response to detecting the appearance event of the list view;
[0080] A disappearance unit, configured to determine the current exposure state of the list view based on the historical exposure state of the list view and the exposure-related parameters of the list view in response to detecting the disappearance event of the list view.
[0081] In some embodiments of the present disclosure, the exposure-related parameters include the exposure duration of the view;
[0082] The disappearance unit includes:
[0083] In response to the historical exposure state of the list view being in exposure and the exposure duration being greater than or equal to a third threshold, determining that the current exposure state of the list view is exposed;
[0084] In response to the historical exposure state of the list view being in exposure and the exposure duration being less than the third threshold, determining that the current exposure state of the list view is unexposed.
[0085] In some embodiments of the present disclosure, the apparatus further includes:
[0086] A scroll stop module, configured to poll the historical exposure states of all list views on the page where the list view is located in response to detecting the scroll stop event of the list view, and determine the current exposure state of each list view based on the historical exposure state and the exposure-related parameters of each list view.
[0087] In some embodiments of the present disclosure, the exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view;
[0088] The polling module 504 includes:
[0089] A second determining unit, configured to, for each list view, in response to the historical exposure state of the list view being in exposure and the exposure area being less than a first threshold, the transparency being less than a second threshold, and the position not being on the visible page, determine that the current exposure state of the list view is unexposed.
[0090] In some embodiments of the present disclosure, the polling module 504 further includes:
[0091] A repeated exposure control unit is configured to, for each of the list views, obtain the repeated exposure parameters of the list view; and determine the current exposure state of the list view based on the repeated exposure parameters, the historical exposure state, and the exposure-related parameters. The repeated exposure configuration includes: repeated exposure parameters within a single page, repeated exposure parameters returned by the background, repeated exposure parameters returned by the page, and repeated exposure parameters when the program is active. The repeated exposure parameters within a single page are used to control whether the list view within a single page is repeatedly exposed. The repeated exposure parameters returned by the background are used to control whether the list view displayed after being returned by the background is repeatedly exposed. The repeated exposure parameters returned by the page are used to control whether the list view displayed after returning to the page is repeatedly exposed. The repeated exposure parameters when the program is active are used to control whether the list view displayed after the program becomes active is repeatedly exposed.
[0092] In some embodiments of the present disclosure, the apparatus further includes:
[0093] A setting module, configured to set a target view; the target view is located on a first page;
[0094] A page switching module, configured to, in response to an event that the first page is switched to a second page, re-determine the current exposure state of the target view; wherein the first page and the second page are controlled by the same view controller.
[0095] For convenience of description, when describing the above apparatus, various modules are described separately according to their functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0096] The apparatus in the above embodiments is used to implement the corresponding view exposure determination method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated herein.
[0097] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the view exposure determination method in any of the above embodiments.
[0098] Figure 6 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.
[0099] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0100] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and called and executed by the processor 1010.
[0101] The input / output interface 1030 is used to connect to the input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.
[0102] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module can implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0103] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0104] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solutions of the embodiments of this specification, and do not necessarily include all the components shown in the figure.
[0105] The electronic device of the above embodiment is used to implement the method for determining the corresponding view exposure in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0106] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method for determining view exposure as described in any of the foregoing embodiments.
[0107] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0108] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the method for determining view exposure as described in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0109] Based on the same inventive concept, corresponding to the method for determining view exposure described in any of the above embodiments, the present disclosure also provides a computer program product including computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of the computer to cause the computer and / or the processor to execute the method for determining view exposure. Corresponding to the execution subject of each step in each embodiment of the method for determining view exposure, the processor executing the corresponding step can belong to the corresponding execution subject.
[0110] The computer program product of the above embodiment is used to cause the computer and / or the processor to execute the method for determining view exposure as described in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0111] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; under the concept of the present disclosure, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present disclosure as described above, and they are not provided in detail for the sake of brevity.
[0112] In addition, for simplicity of explanation and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations of these specific details. Accordingly, these descriptions should be considered illustrative rather than restrictive.
[0113] Although the present disclosure has been described in connection with specific embodiments of the present disclosure, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0114] The embodiments of the present disclosure are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A method for determining the exposure state of a view, comprising: responding to detecting a change in the display state of the view, and determining the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view; the historical exposure state is the exposure state of the view before the change in the display state of the view; the view includes a list view; polling the historical exposure states of all list views on the page where the list view is located at a predetermined time interval, and determining the current exposure state of each list view based on the historical exposure state of each list view and the exposure-related parameters.
2. The method according to claim 1, wherein, the exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view; the determining the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view includes: responding to the exposure area being greater than a first threshold, the transparency being greater than a second threshold, and the position being within the visible page, determining that the current exposure state of the view is exposed.
3. The method according to claim 2, wherein, after determining that the current state of the view is exposed, further comprising: determining whether the view needs to be re-exposed; responding to the view needing to be re-exposed, re-determining the current exposure state of the view according to the historical exposure state of the view and the exposure-related parameters of the view.
4. The method according to claim 1, wherein, the change in the display state includes an appearance event and a disappearance event; the responding to detecting a change in the display state of the view, and determining the current exposure state of the view based on the historical exposure state of the view and the exposure-related parameters of the view includes: responding to detecting the appearance event of the list view, determining that the current exposure state of the list view is being exposed; responding to detecting the disappearance event of the list view, determining the current exposure state of the list view based on the historical exposure state of the list view and the exposure-related parameters of the list view.
5. The method according to claim 4, wherein, the exposure-related parameters include the exposure duration of the view; the determining the current exposure state of the list view based on the historical exposure state of the list view and the exposure-related parameters of the list view includes: responding to the historical exposure state of the list view being being exposed and the exposure duration being greater than or equal to a third threshold, determining that the current exposure state of the list view is exposed; responding to the historical exposure state of the list view being being exposed and the exposure duration being less than the third threshold, determining that the current exposure state of the list view is not exposed.
6. The method according to claim 1, further comprising: In response to detecting the scrolling stop event of the list view, poll the historical exposure status of all list views on the page where the list view is located, and determine the current exposure status of each list view based on the historical exposure status of each list view and the exposure-related parameters.
7. The method according to claim 1, wherein, the exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view; the determining the current exposure status of each list view based on the historical exposure status of each list view and the exposure-related parameters includes: For each list view, in response to the historical exposure status of the list view being in the process of exposure, and the exposure area being less than a first threshold, the transparency being less than a second threshold, and the position not being within the visible page, determine that the current exposure status of the list view is unexposed.
8. The method according to claim 1, wherein, the determining the current exposure status of each list view based on the historical exposure status of each list view and the exposure-related parameters further includes: For each list view, obtain the repeated exposure parameter of the list view; determine the current exposure status of the list view based on the repeated exposure parameter, the historical exposure status, and the exposure-related parameters; wherein, the repeated exposure configuration includes: the repeated exposure parameter within a single page, the repeated exposure parameter returned by the background, the repeated exposure parameter returned by the page, and the repeated exposure parameter when the program is active; the repeated exposure parameter within a single page is used to control whether the list view within a single page is repeatedly exposed; the repeated exposure parameter returned by the background is used to control whether the list view displayed after being returned by the background is repeatedly exposed; the repeated exposure parameter returned by the page is used to control whether the list view displayed after returning to the page is repeatedly exposed; the repeated exposure parameter when the program is active is used to control whether the list view displayed after the program becomes active is repeatedly exposed.
9. The method according to claim 1, further including: Set a target view; The target view is located on the first page; In response to the event that the first page is switched to the second page, re-determine the current exposure status of the target view; wherein, the first page and the second page are controlled by the same view controller.
10. An apparatus for determining the exposure status of a view, including: A determining module, configured to, in response to detecting a change in the display status of the view, determine the current exposure status of the view based on the historical exposure status of the view and the exposure-related parameters of the view; The historical exposure status is the exposure status of the view before the change in the display status of the view; the view includes a list view; A polling module, configured to poll the historical exposure status of all list views on the page where the list view is located at a predetermined time interval, and determine the current exposure status of each list view based on the historical exposure status of each list view and the exposure-related parameters.
11. The apparatus according to claim 10, wherein, The exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view; The determination module includes: A first determination unit, configured to determine that the current exposure state of the view is exposed in response to the exposure area being greater than a first threshold, the transparency being greater than a second threshold, and the position being located on the visible page.
12. The apparatus according to claim 11, wherein, The apparatus further includes: A repeated exposure module, configured to determine whether the view needs to be repeatedly exposed; A re-determination of exposure state module, configured to re-determine the current exposure state of the view according to the historical exposure state of the view and the exposure-related parameters of the view in response to the view needing to be repeatedly exposed.
13. The apparatus according to claim 10, wherein, The change in the display state includes an appearance event and a disappearance event; The determination module includes: An appearance unit, configured to determine that the current exposure state of the list view is in the process of being exposed in response to monitoring the appearance event of the list view; A disappearance unit, configured to determine the current exposure state of the list view based on the historical exposure state of the list view and the exposure-related parameters of the list view in response to monitoring the disappearance event of the list view.
14. The apparatus according to claim 13, wherein, The exposure-related parameters include the exposure duration of the view; The disappearance unit includes: In response to the historical exposure state of the list view being in the process of being exposed and the exposure duration being greater than or equal to a third threshold, determining that the current exposure state of the list view is exposed; In response to the historical exposure state of the list view being in the process of being exposed and the exposure duration being less than the third threshold, determining that the current exposure state of the list view is not exposed.
15. The apparatus according to claim 10, further includes: A scroll stop module, configured to poll the historical exposure states of all list views on the page where the list view is located in response to monitoring the scroll stop event of the list view, and determine the current exposure state of each list view based on the historical exposure state of each list view and the exposure-related parameters.
16. The apparatus according to claim 10, wherein, The exposure-related parameters include the exposure area of the view, the transparency of the view, and the position of the view; The polling module includes: A second determination unit, configured to, for each list view, determine that the current exposure state of the list view is not exposed in response to the historical exposure state of the list view being in the process of being exposed, the exposure area being less than the first threshold, the transparency being less than the second threshold, and the position not being located on the visible page.
17. The apparatus according to claim 10, wherein, The polling module further includes: A repeated exposure control unit is configured to, for each of the list views, obtain the repeated exposure parameters of the list view; and determine the current exposure state of the list view based on the repeated exposure parameters, the historical exposure state, and the exposure-related parameters. The repeated exposure configuration includes: in-page repeated exposure parameters, background-returned repeated exposure parameters, page-returned repeated exposure parameters, and program-active repeated exposure parameters. The in-page repeated exposure parameters are used to control whether the list view within a single page is repeatedly exposed. The background-returned repeated exposure parameters are used to control whether the list view displayed after being returned from the background is repeatedly exposed. The page-returned repeated exposure parameters are used to control whether the list view displayed after returning to the page is repeatedly exposed. The program-active repeated exposure parameters are used to control whether the list view displayed after the program becomes active is repeatedly exposed.
18. The apparatus according to claim 10, further comprises: a setting module, configured to set a target view; the target view is located on a first page; a page switching module, configured to, in response to an event that the first page is switched to a second page, re-determine the current exposure state of the target view; wherein the first page and the second page are controlled by the same view controller.
19. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the program, the method according to any one of claims 1 to 9 is implemented.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein, the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 9.
21. A computer program product, comprising computer program instructions which, when run on a computer, cause the computer to execute the method according to any one of claims 1 - 9.