Advertisement clearing method, device, equipment and storage medium

By generating or enlarging the response area of ​​the clearing control on the display interface of electronic devices, the problems of cumbersome and interfering ad clearing in the prior art are solved, achieving efficient and legal ad clearing and improving user experience.

CN122284882APending Publication Date: 2026-06-26CHENGDU OPPO TELECOMM TECH CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411922074.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively balance user experience, advertising revenue, and legal compliance when removing ads, resulting in cumbersome user operations, accidental operations, and ad interference.

Method used

By displaying the target view on the electronic device's display interface and performing anti-harassment processing, a clearing control is generated or enlarged to make its response area larger than the original area, allowing users to close the advertisement view by triggering an action.

Benefits of technology

It improved ad removal efficiency, reduced ad interference with users, enhanced user experience, and maintained a legal and compliant advertising ecosystem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284882A_ABST
    Figure CN122284882A_ABST
Patent Text Reader

Abstract

This application discloses an ad removal method, apparatus, device, and storage medium, comprising: displaying a first interface, the first interface including a target view, the target view being an ad view excluding a first removal control or a view displaying the first removal control, the first removal control being associated with the ad view and used to remove the ad view; performing anti-harassment processing on the target view to obtain a second interface, the second interface including a second removal control, wherein when the first interface includes the first removal control, the response area of ​​the second removal control is larger than the response area of ​​the first removal control; and closing the second interface in response to a triggering operation on the second removal control. This can improve ad removal efficiency and reduce ad interference to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and to, but is not limited to, an ad removal method, apparatus, device, and storage medium. Background Technology

[0002] Users typically encounter various types of advertisements when browsing applications or web pages on electronic devices. These advertisements may appear in the form of pop-ups, banners, or interstitial videos. While they bring revenue to content providers to some extent, they also significantly disrupt the user experience.

[0003] Removing these ads often requires additional user action, such as manually closing them. These steps are not only cumbersome but can also lead to accidental actions, causing unnecessary trouble and inconvenience for users. Therefore, how to reduce the interference of ads on users while ensuring the revenue of content creators has become an urgent problem to be solved in optimizing the user experience of electronic devices. Summary of the Invention

[0004] In view of this, the ad removal method, apparatus, device, and storage medium provided in the embodiments of this application can improve ad removal efficiency and reduce ad interference to users. The ad removal method, apparatus, device, and storage medium provided in the embodiments of this application are implemented as follows:

[0005] In a first aspect, embodiments of this application provide an advertisement removal method, including:

[0006] Display a first interface, the first interface including a target view, the target view being an ad view that does not include the first clear control or a view that displays the first clear control, the first clear control being associated with the ad view, the first clear control being used to clear the ad view;

[0007] The target view is subjected to anti-harassment processing to obtain a second interface, which includes a second clear control. When the first interface includes the first clear control, the response area of ​​the second clear control is larger than the response area of ​​the first clear control.

[0008] In response to the triggering operation of the second clear control, the second interface is closed.

[0009] Secondly, embodiments of this application provide an advertisement removal device, comprising:

[0010] The display module is used to display a first interface, the first interface including a target view, the target view being an advertisement view excluding the first clear control or a view displaying the first clear control, the first clear control being associated with the advertisement view, and the first clear control being used to clear the advertisement view;

[0011] The processing module is used to perform anti-harassment processing on the target view to obtain a second interface. The second interface includes a second clear control. When the first interface includes the first clear control, the response area of ​​the second clear control is larger than the response area of ​​the first clear control.

[0012] The response module is used to close the second interface in response to a trigger operation on the second clear control.

[0013] Thirdly, embodiments of this application provide a computer device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the program to implement the method described in embodiments of this application.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in embodiments of this application.

[0015] The advertising removal method, apparatus, computer device, and computer-readable storage medium provided in this application embodiment allow an electronic device to display a first interface, which includes a target view. The target view may be an advertising view that does not include a removal control, or a view that displays a removal control. The removal control is associated with the advertising view and can be used to remove the advertising view. Then, the electronic device can perform anti-harassment processing on the target view to obtain a second interface, which includes a second removal control. If the first interface includes a first removal control, the response area of ​​the second removal control is larger than the response area of ​​the first removal control. Finally, the electronic device can close the second interface in response to a trigger operation on the second removal control.

[0016] In this way, when there is an advertisement view on the display interface of an electronic device, anti-harassment processing can be performed on the advertisement view or the clearing control in the advertisement view, so that the processed advertisement view includes a clearing control that is easy to respond to, thereby improving the efficiency of advertisement clearing, reducing the interference of advertisements to users, and improving the user experience. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0018] Figure 1 This is a schematic diagram illustrating the effect of removing advertisements in the related technologies provided in the embodiments of this application;

[0019] Figure 2 An advertising display interface in a related art provided in this application embodiment;

[0020] Figure 3 An advertising display interface in another related technology provided in the embodiments of this application;

[0021] Figure 4 An advertising display interface in another related technology provided in the embodiments of this application;

[0022] Figure 5 An advertising display interface in another related technology provided in the embodiments of this application;

[0023] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0024] Figure 7 A schematic diagram illustrating the implementation process of the ad removal method provided in this application embodiment;

[0025] Figure 8 This application provides an illustration of the effect of enabling or disabling the anti-harassment function of a target application in an embodiment of the present application.

[0026] Figure 9 This is a schematic diagram illustrating the effect of obtaining a list of advertising feature parameters according to an embodiment of this application.

[0027] Figure 10 This application provides a schematic diagram of an implementation process for anti-harassment processing of a target view.

[0028] Figure 11 A comparative diagram of the first interface and the second interface is provided;

[0029] Figure 12 This is a schematic diagram illustrating the implementation process of anti-harassment processing for another pair of target views provided in an embodiment of this application;

[0030] Figure 13 A schematic diagram illustrating the display effect of a target view provided in an embodiment of this application;

[0031] Figure 14 A comparative schematic diagram of another first interface and a second interface provided for an embodiment of this application;

[0032] Figure 15 This is a schematic diagram illustrating the implementation process of anti-harassment processing for another pair of target views provided in an embodiment of this application.

[0033] Figure 16 A comparative schematic diagram of another first interface and a second interface provided for an embodiment of this application;

[0034] Figure 17 A schematic diagram illustrating the workflow of an advertising feature collection module provided in this application embodiment;

[0035] Figure 18 A schematic diagram illustrating the workflow of an advertising feature matching module provided in an embodiment of this application;

[0036] Figure 19 A schematic diagram of the workflow of an advertising auxiliary processing module provided in an embodiment of this application;

[0037] Figure 20 This is a schematic diagram of the structure of the advertisement removal device provided in the embodiments of this application;

[0038] Figure 21 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0041] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0042] It should be noted that the terms "first, second, third" used in the embodiments of this application are used to distinguish similar or different objects and do not represent a specific order of objects. It can be understood that "first, second, third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0043] Before introducing the relevant technical solutions of this application, the terms involved in the embodiments of this application will be explained.

[0044] Application (APP): An APP is a software application specifically designed for a particular device (such as a smartphone, tablet, etc.). Each APP is designed to perform specific tasks, such as social interaction, entertainment, learning, and office work. They help users complete various daily tasks and provide convenient services and experiences.

[0045] Click-Through-Rate (CTR): This refers to the actual number of clicks (or the number of visits to the target webpage) on an online advertisement (such as image ads, text ads, keyword ads, ranking ads, video ads, etc.) divided by the number of ad impressions (i.e., the number of times the ad is displayed).

[0046] Artificial Intelligence Generative Content (AIGC): AIGC technology is primarily based on AI technologies such as deep learning algorithms, neural network models, and pre-trained models. It learns from and expands upon existing data, generating content autonomously and automatically based on topics determined through human interaction.

[0047] In the current Android device and app market, advertising has become one of the main sources of revenue. Nevertheless, as... Figure 1 The diagram illustrates the effect of ad removal in a related technology. Besides the "disable system tool ads" solution provided by a few electronic device manufacturers (which only supports system-owned ad recommendations), some manufacturers use a "clean mode" (the system itself does not push ads, but cannot restrict ads from other electronic device manufacturers' applications) to directly disable their own ads. Apart from these solutions, the industry generally lacks refined management and optimization of ad display. While these methods are simple and direct, they fail to adequately balance the legitimate rights and interests of app developers, electronic device manufacturers, and users. For example, the complete elimination of ads in the "clean mode" is unacceptable to the market.

[0048] Furthermore, some unscrupulous apps use various methods to trick users into clicking on advertisements in order to generate revenue. For example, Figure 2 Provide an advertising display interface in a related technology, such as Figure 2 As shown, some apps choose to place a very small close button on the advertisement interface.

[0049] or, Figure 3 Provide an ad display interface in another related technology, such as Figure 3 As shown, some apps choose to place fake close buttons on their advertising interfaces.

[0050] or, Figure 4Provide an ad display interface in another related technology, such as Figure 4 As shown, some advertisements are missing a close button.

[0051] or, Figure 5 Provide an ad display interface in another related technology, such as Figure 5 As shown, some ad interfaces hide the close button or obscure it.

[0052] It is clear that the aforementioned behaviors not only infringe upon users' rights and negatively impact user experience, but also damage the reputation of electronic device manufacturers and app developers. These actions fail to guarantee that users can turn off ads at their own discretion; instead, they easily lead to misleading or deceptive clicks, failing to maintain a healthy and fair advertising ecosystem, and thus cannot protect users' legitimate rights or improve the overall user experience.

[0053] To address the aforementioned shortcomings, various solutions have been proposed in related technologies.

[0054] In some cases, electronic devices may offer a button to disable system tool ads in their system settings, allowing users to choose whether to turn it on or off. However, this feature only disables ads for system tools and does not affect ads from third-party software or their own app stores. For example, see [reference needed]. Figure 1 The tools that can be turned off here include weather, calendar, security center, input method, download manager, desktop folder, etc.

[0055] However, the implementation method for ad-blocking is relatively weak, only optimizing some system utility ads. This means that although the option to turn off ads is provided, it does not completely eliminate all ads, and users may still encounter ads in other non-system utility apps, without alleviating the problem of ads in third-party apps.

[0056] Alternatively, in other cases, all systems in an electronic device are free of any form of advertising and operation, completely cutting off advertising at the system level, but this method has no control over advertising in third-party apps.

[0057] While this method completely eliminates system-wide advertising through a "three-zero" policy (zero ads, zero push notifications, zero pre-installed apps), it also completely sacrifices the profits of electronic device manufacturers. Furthermore, this method may not affect advertising in third-party apps, so users may still encounter ads when using third-party apps.

[0058] Alternatively, in other cases, third-party applications can leverage Android's accessibility features to simulate the user's click of the skip / close button, automatically helping users skip ads. This method requires no system modification and works for all apps and systems.

[0059] While this solution can block all ads and improve user experience, its broad coverage could impact the revenue of electronic device manufacturers, app developers, and advertisers. It may raise issues of advertising compliance and even violate relevant regulations, thus posing significant controversy and risks.

[0060] In summary, each of the aforementioned ad-removal technologies has its advantages and disadvantages. The first and second methods are primarily from the producer's perspective, sacrificing some advertising revenue to improve user experience. The third method, however, uses technical means to completely block ads, but this approach may negatively impact the advertising ecosystem and pose risks. Therefore, a more balanced and legally compliant ad governance solution is necessary, one that can reduce malicious advertising while ensuring normal advertising revenue.

[0061] In view of this, embodiments of this application provide an ad removal method, which is applied to electronic devices. Electronic devices may include, but are not limited to, mobile phones, wearable devices (such as smartwatches, smart bracelets, smart glasses, etc.), tablet computers, laptops, in-vehicle terminals, PCs (Personal Computers), etc.

[0062] The function implemented by this method can be achieved by the processor in the electronic device calling program code. Of course, the program code can be stored in the computer storage medium. It can be seen that the electronic device includes at least a processor and a storage medium.

[0063] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0064] For example, such as Figure 6 As shown, the electronic device 60 may include a processor 601, an external memory interface 602, an internal memory 603, and a universal serial bus (USB) interface 604.

[0065] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 60. In other embodiments of this application, the electronic device 60 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0066] Processor 601 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors. For example, processor 601 may be a smart terminal CPU, such as a Snapdragon series processor. In some embodiments, processor 601 may include one or more interfaces. Interfaces may include inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, universal asynchronous receiver / transmitter (UART) interfaces, mobile industry processor interfaces (MIPI) interfaces, general purpose input / output (GPIO) interfaces, subscriber identity module (SIM) interfaces, and / or universal serial bus (USB) interfaces, etc.

[0067] The external memory interface 602 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 60. The external memory card communicates with the processor 601 through the external memory interface 602 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0068] The internal memory 603 can be used to store computer executable program code, which includes instructions. The internal memory 603 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 60 (such as audio data, phonebook, etc.).

[0069] In addition, the electronic devices involved in the embodiments of this application may also be equipped with an operating system, on which applications can be installed and run. The embodiments of this application do not limit this.

[0070] Figure 7 This is a schematic diagram illustrating the implementation flow of the ad removal method provided in an embodiment of this application. Figure 7 As shown, the method may include the following steps 701 to 703:

[0071] Step 701: Display a first interface. The first interface includes a target view, which is either an ad view that does not include the first clear control or a view that displays the first clear control. The first clear control is associated with the ad view and is used to clear the ad view.

[0072] Understandably, when an electronic device is running a target application, the target application's display interface may show an advertising view, but based on the above... Figures 2 to 5 Based on the display of the displayed ad views, there are several situations that make it inconvenient or impossible for users to directly close the ad views, thus reducing the user experience.

[0073] Based on this, in the embodiments of this application, relevant processing can be performed on the interface that makes it inconvenient or impossible for the user to close directly, so that the processed interface makes it easier for the user to close the advertisement directly.

[0074] In this embodiment of the application, a first interface can be displayed on the electronic device. This first interface includes a target view, which may be an advertising view that does not include the first clear control, for example, Figure 4 The advertisement view shown does not include the first clear control, meaning that there is no clear control in the target view that allows the user to directly perform a trigger operation to close the advertisement view.

[0075] Alternatively, the target view here could be a view displaying the first clear control, which is associated with the ad view and used to clear it. That is, the first interface displays the first clear control, but this clear control is used to clear the ad view associated with it. Here, the response area of ​​the first clear control is below a threshold; for example, the first clear control could be a clear control smaller than the size of a normal clear control. In other words, based on the current first clear control, the user cannot normally close or quickly close the ad view associated with it.

[0076] Step 702: Perform anti-harassment processing on the target view to obtain a second interface. The second interface includes a second clear control. If the first interface includes a first clear control, the response area of ​​the second clear control is larger than the response area of ​​the first clear control.

[0077] It is evident that, based on the target view currently displayed on the first interface of the electronic device, users cannot properly or quickly close the advertisement view, resulting in a poor user experience.

[0078] Based on this, in this embodiment of the application, the target view can be subjected to anti-harassment processing to obtain a second interface containing a second clear control, and when the first interface includes a first clear control, the response area of ​​the second clear control in the second interface is larger than the response area of ​​the first clear control.

[0079] Thus, for ad views that do not contain a clear control, users can close the ad view using the newly generated second clear control; for first clear controls that contain a first clear control but have a smaller response area, processing them into second clear controls with a larger response area can effectively improve the efficiency of users closing the ad views associated with them.

[0080] Understandably, different users have different needs regarding whether or not to turn off the ad view in the display interface. For example, some users do not like the ad view in the interface, so they will have the need to turn off the ad view. However, some users may not have the need to turn off the ad view.

[0081] Based on this, in some embodiments, before performing anti-harassment processing on the target view to obtain the second interface, it can be determined whether to enable the anti-harassment function corresponding to the target application displaying the first interface; and if it is determined that the anti-harassment function corresponding to the target application is enabled, then the target view is subjected to anti-harassment processing to obtain the second interface.

[0082] Here, there are no restrictions on how to enable the anti-harassment function of the target application.

[0083] In some embodiments, for example Figure 8 Provide a diagram illustrating the effect of enabling or disabling the anti-harassment function of a target application. For example... Figure 8 As shown, a control switch with anti-harassment function can be displayed on a specific interface of the electronic device. Furthermore, to achieve more granular control over each application in the electronic device, a control switch can be set for each application to enable or disable its corresponding anti-harassment function. Thus, when the target application (e.g., application 1) receives the corresponding enable operation, it can be determined that the anti-harassment function of the target application is enabled, meaning the user has a need to close the advertising view in the target application. Based on this, anti-harassment processing is then applied to the target view in the first interface of the target application to obtain the second interface.

[0084] By implementing this embodiment, users can freely choose whether to enable the application's anti-ad harassment function to match different user needs, improve user experience, and broaden device usage scenarios.

[0085] Understandably, for the same version of an application, the ad view that appears during its operation may be fixed. For example, for application A, whose version number is version 3, the target view (including the ad view and the view that displays the first clear control associated with the ad view) displayed by application A on different electronic devices during its operation is fixed.

[0086] Based on this, in the embodiments of this application, before performing anti-harassment processing on the target view, the processing parameters corresponding to the target view can be obtained first, so as to perform corresponding anti-harassment processing on the target view based on the processing parameters corresponding to the target view.

[0087] In this embodiment of the application, the method of obtaining the processing parameters corresponding to the target view is not limited.

[0088] In some embodiments, the electronic device may obtain a list of advertising feature parameters corresponding to the target application when the target application is launched. The list of advertising feature parameters includes a first view appearing in the target application and a first processing parameter corresponding to the first view, as well as a second view and a second processing parameter corresponding to the second view.

[0089] The first view is an ad view that does not include the clear control, the second view is an ad view that includes the clear control, and the second processing parameter is the processing parameter corresponding to the clear control.

[0090] In other words, the list of advertising feature parameters corresponding to the target application includes at least two types of processing parameters corresponding to the views, the first being, for example... Figure 4The example shown is an ad view excluding the clear control (i.e., the first view). For this type of ad view, the ad feature parameter list stores the first processing parameters corresponding to that ad view; the second type is as follows... Figure 2 , Figure 3 , Figure 5 or Figure 6 The example shown includes an ad view with a clear control, but for various reasons, users cannot easily close the ad view using the clear control. For this type of ad view, the ad feature parameter list stores the second processing parameter corresponding to the clear control in the ad view.

[0091] In some embodiments, in order to obtain a list of advertising feature parameters corresponding to the currently running target application, the electronic device may upload the identification information of the target application to the server, the identification information including the name and version information of the target application; and receive the list of advertising feature parameters sent by the server, the list of advertising feature parameters being a list of advertising feature parameters corresponding to the target application pre-stored in the server.

[0092] For example, Figure 9 A schematic diagram illustrating the effect of retrieving a list of advertising feature parameters is provided. For example... Figure 9 As shown, electronic devices can upload the identification information of multiple installed applications or the identification information of a single application to a cloud server at specific stages (such as the first time the device is turned on, each time the anti-advertising function is turned on, or when the target application is launched). The identification information includes at least the application's name and version information.

[0093] In this embodiment of the application, the cloud server pre-stores lists of advertising feature parameters for different applications and their corresponding versions. For example, such as... Figure 9 As shown, the cloud server stores advertising feature parameter lists corresponding to versions 1, 2, 3...N of application A, versions 1, 2...N of application B, versions 1, 2...N of application C, and versions 1, 2...N of application D. Upon receiving the application identification information uploaded by the electronic device (e.g., this identification information indicates that the application for which the advertising feature parameter list is to be obtained is version 3 of application A), the cloud server can match the corresponding advertising feature parameter list from the database based on the received identification information and then send the advertising feature parameter list to the electronic device.

[0094] In some embodiments, in order to pre-store lists of advertising feature parameters for different applications and their corresponding versions, the cloud server can simulate user triggering operations on the display interfaces of different applications in the electronic device to traverse each display interface in the application and obtain each display interface; then, it can determine whether each display interface contains an advertising view, and if it is determined that an advertising view is included, store the advertising feature parameters corresponding to the advertising view.

[0095] It should be noted that when constructing the ad feature parameter list, it is only necessary to ensure that the parameters stored in the ad feature parameter list are the minimum feature set that can correctly match the target view, and it is not necessary to write all the features of the target view into the ad feature parameter list.

[0096] Then, after receiving the list of advertising feature parameters, the electronic device can determine the processing parameters corresponding to the target view based on the target view currently displayed by the target application and the list of advertising feature parameters.

[0097] In some embodiments, the electronic device can compare the target view currently displayed on the first interface with an ad feature parameter list to find the processing parameters corresponding to the target view from the ad feature parameter list. Here, the ad feature parameter list stores identification information for multiple ad views corresponding to each application, as well as ad feature parameters corresponding to each ad view. Therefore, the identification information corresponding to the target view can be used to find the ad feature parameters corresponding to that target view from the ad feature parameter list.

[0098] It should be noted that the processing parameters for the obtained target view will vary depending on the type of target view.

[0099] If the target view is an ad view that does not include a clear control, the processing parameter of the target view is the first processing parameter corresponding to the first view. If the target view is a view that displays a clear control, the processing parameter of the target view is the second processing parameter corresponding to the second view.

[0100] In this way, when performing anti-harassment processing on the target view based on processing parameters, the target view can be processed quickly.

[0101] In the embodiments of this application, the methods for performing anti-harassment processing on the target view to obtain the second interface are different depending on the type of the target view.

[0102] In some embodiments, when the target view is an advertising view that does not include the first clear control, anti-harassment processing is performed on the target view to obtain a second interface. This can be achieved by performing the following steps 1001 to 1003:

[0103] Step 1001: Obtain the processing parameters corresponding to the target view. The processing parameters include the position of the second clear control to be displayed in the first interface.

[0104] Step 1002: Generate a second clear control based on the processing parameters.

[0105] Since the target view does not include a clear control, a clear control can be created at a specified location in the target view to close the target view (ad view).

[0106] Based on this, the second clear control can be generated according to its display position on the first interface and other processing parameters, such as the size (width and height) of the second clear control.

[0107] In some embodiments, the second clear control can be generated by performing actions such as Figure 19 The relevant description methods are not elaborated here.

[0108] In some embodiments, the close click event bound to the generated second clear control varies depending on how the target view is displayed. For example, it can be bound to a close click event of one of the View, Window, or Activity, so that the second clear control can correctly close the ad view associated with the target view.

[0109] In some embodiments, different listeners can be set for the second clear control in the target view according to the type of the target view, so as to listen for events of the view (such as window, button, text box, etc.) such as click, selection, attribute change, etc., and execute the corresponding code logic when these events occur, thereby realizing the closing of the advertisement view.

[0110] In some embodiments, the generated second clear control may also include a text description, such as describing the second clear control as "Close Ads".

[0111] Step 1003: Update the first interface to obtain the second interface, which includes a second clear control and an advertisement view.

[0112] Figure 11 Provide a comparative diagram of the first and second interfaces. For example... Figure 11 As shown, the first interface does not include a clear control in the ad view, meaning that the user cannot directly close the ad view. The second interface includes a second clear control and an ad view. The second clear control is associated with the ad view and can close the associated ad view in response to a received touch operation.

[0113] In this embodiment of the application, when the target view is an ad view that does not include the first clear control, a second clear control can be generated in the ad view to close the ad view, thereby improving the ad clearing efficiency and reducing the interference of ads on users.

[0114] In some other embodiments, when the target view is a view displaying the first clear control, anti-interference processing is applied to the target view to obtain a second interface, which can be achieved by performing the following steps 1201 to 1203:

[0115] Step 1201: Obtain the processing parameters corresponding to the target view. The processing parameters include magnification, magnification width, and magnification height.

[0116] Understandably, in practical situations, such as Figure 13 As shown, some target views that need to be magnified lack obvious features, and processing them based on their own corresponding advertising feature parameters may easily lead to false positives. However, their subviews have obvious features. For example, the close button (i.e., the first clear control) in the target view to be magnified is a FrameLayout with a background because the close click event is bound to this target view, but it has no obvious features, while its subview is a TextView with the text "Skip". In this case, corresponding advertising feature parameters can be written for the subviews with obvious features, filtering out the TextView corresponding to the "Skip" control, and specifying a query up one level to the parent view. In subsequent processing, its parent view FrameLayout can be processed.

[0117] Based on this, in some embodiments, the electronic device can first check whether the target view corresponding to the processing parameters needs to perform a parent query. If so, it finds the parent view corresponding to the target view according to the level; then, it performs different processing on the parent view according to the processing parameters. In this case, anti-interference processing on the target view is equivalent to anti-interference processing on the parent view.

[0118] Understandably, in some embodiments, such as... Figure 2 or Figure 3 As shown, although the ad view includes a clear control, the response area of ​​the clear control is small, making it difficult for users to effectively close the associated ad view using the clear control.

[0119] Based on this, in this embodiment, the first clear control can be magnified. Furthermore, to more conveniently prevent harassment during clear control processing, only the processing parameters corresponding to the view containing the clear control need to be obtained, without needing to obtain the processing parameters corresponding to the advertisement view associated with the clear control. Therefore, parameters such as magnification factor, magnification width, and magnification height required for magnifying the first clear control can be obtained.

[0120] Step 1202: According to the processing parameters, the size of the first clear control is enlarged to obtain the second clear control, the size of the second clear control is larger than the size of the first clear control.

[0121] In some embodiments, when enlarging the size of the first clear control according to the processing parameters, the original size of the first clear control, such as the original width and the original height, can be obtained first. Then, the first clear control can be enlarged as a whole using the magnification factor, the magnification width, and the magnification height to obtain the second clear control. The size of the second clear control is larger than that of the second clear control, so that the user can better close the ad view associated with the second clear control based on the second clear control.

[0122] Of course, in some embodiments, the size of the second clear control also needs to match the associated ad view so that the updated second interface displays better.

[0123] In some embodiments, different listeners can be set for the second clear control in the target view according to the type of the target view, so as to listen for events of the view (such as window, button, text box, etc.) such as click, selection, attribute change, etc., and execute the corresponding code logic when these events occur, thereby realizing the closing of the advertisement view.

[0124] In some embodiments, the processed second clear control may also include a text description, such as describing the second clear control as "Close Ads".

[0125] Step 1203: Update the first interface to obtain the second interface, which includes a second clear control.

[0126] Figure 14 Provide a comparative diagram of the first and second interfaces. For example... Figure 14 As shown, the first interface includes a first clear control in the ad view, which is smaller in size, while the second interface includes a second clear control, which is larger in size. The second clear control is associated with the ad view and can close the associated ad view in response to a received touch operation.

[0127] In this embodiment of the application, when the target view is a view displaying the first clear control, the size of the first clear control can be enlarged to obtain a larger second clear control, so as to close the advertisement view through the second clear control, thereby improving the advertisement clearing efficiency and reducing the interference of advertisements to users.

[0128] In some other embodiments, when the target view is a view displaying the first clear control, anti-interference processing is applied to the target view to obtain a second interface. This can be achieved by performing the following steps 1501 to 1503:

[0129] Step 1501: Obtain the processing parameters corresponding to the target view. The processing parameters include the boundary value and magnification of the first clear control on the first interface.

[0130] Understandably, in some embodiments, such as Figure 2 or Figure 3 As shown, although the ad view includes a clear control, the response area of ​​the clear control is small, making it difficult for users to effectively close the associated ad view using the clear control.

[0131] Based on this, in this embodiment of the application, the first clear control can be selected to be enlarged in hotspot mode. In order to make it easier to perform anti-harassment processing on the clear control, only the processing parameters corresponding to the view containing the clear control need to be obtained, without having to obtain the processing parameters corresponding to the advertisement view corresponding to the clear control.

[0132] Therefore, when performing hot zone magnification processing on the first clear control, parameters such as the boundary value and magnification factor of the first clear control on the first interface can be obtained.

[0133] Step 1502: According to the processing parameters, perform hotspot magnification processing on the first clear control to obtain the second clear control. The size of the second clear control is equal to the size of the first clear control, and the response area of ​​the second clear control is larger than the response area of ​​the first clear control.

[0134] In some embodiments, in order to achieve hotspot magnification of the first clear control, the top, bottom, left and right boundary values ​​of the first clear control on the first interface can be obtained first, and then the response area of ​​the first clear control can be magnified according to the magnification factor to obtain the second clear control.

[0135] In some embodiments, when implementing the hot zone magnification processing of the first clear control, it is also necessary to prevent the coordinates of the magnified second clear control from exceeding a certain range. Therefore, the left boundary value of the expected magnified second clear control can be obtained by subtracting the width of the expected magnified second clear control from the horizontal coordinate of the center of the target view. If it exceeds the predetermined left boundary value, the left boundary value of the magnified second clear control should be the predetermined left boundary value. The same applies to the other boundaries.

[0136] In some embodiments, different listeners can be set for the second clear control in the target view according to the type of the target view, so as to listen for events of the view (such as window, button, text box, etc.) such as click, selection, attribute change, etc., and execute the corresponding code logic when these events occur, thereby realizing the closing of the advertisement view.

[0137] In some embodiments, the processed second clear control may also include a text description, such as describing the second clear control as "Close Ads".

[0138] Step 1503: Update the first interface to obtain the second interface, which includes a second clear control.

[0139] Figure 16 Provide a comparative diagram of the first and second interfaces. For example... Figure 16 As shown, the first interface includes a first clear control in the ad view, which has a small response area, while the second interface includes a second clear control, which has a larger response area. The second clear control is associated with the ad view and can close the associated ad view in response to a received touch operation.

[0140] In this embodiment of the application, when the target view is a view displaying the first clear control, the first clear control is hotspot magnified to obtain a second clear control with a larger response area, so as to close the ad view through the second clear control, thereby improving the ad clearing efficiency and reducing the interference of ads on users.

[0141] Step 703: In response to the triggering operation of the second clear control, close the second interface.

[0142] In this embodiment of the application, the type of triggering operation is not limited. For example, the triggering operation can be any one of the following: click operation, swipe operation, hover operation, etc.

[0143] In this embodiment, the electronic device displays a first interface, which includes a target view. The target view may be an advertisement view that does not include a clear control, or a view that displays a clear control. The clear control is associated with the advertisement view and can be used to clear the advertisement view. Then, the electronic device can perform anti-harassment processing on the target view to obtain a second interface. The second interface includes a second clear control, and the response area of ​​the second clear control is larger than the response area of ​​the first clear control. Finally, the electronic device can close the second interface in response to the triggering operation of the second clear control.

[0144] As can be seen, in this embodiment of the application, when there is an advertisement view on the display interface of the electronic device, the advertisement view can be protected from harassment, or the clearing control in the advertisement view can be protected from harassment, so that the processed advertisement view includes a clearing control that is easy to respond to, thereby realizing the closing of the advertisement view, improving the advertisement clearing efficiency, reducing the interference of advertisements to users, and improving the user experience.

[0145] The following describes an exemplary application of the embodiments of this application in a real-world application scenario.

[0146] This application provides an ad removal method, which can be implemented through four processing modules: an ad feature collection module, a management and loading module, an ad feature matching module, and an ad auxiliary processing module.

[0147] in, Figure 17 A schematic diagram illustrating the implementation process of an advertising feature collection module is provided. For example... Figure 17 As shown in the embodiments of this application, the advertising feature collection module is mainly responsible for automatically exploring and collecting the splash screen advertisement when the target application starts in the electronic device, as well as the interface screenshots of the pop-up advertisements inside the target application during runtime, and the UI layout structure information, so as to assist the subsequent feature library maintenance personnel in quickly locating the advertising pages in the application and greatly shortening the time spent writing advertising feature rules.

[0148] 1. This module supports automatic installation, startup, and shutdown of the target application (APP).

[0149] 2. This module supports simulating user clicks on the display interface of the target application using the Fastboot UI traversal tool, so as to traverse the display interface and explore as many interfaces as possible in the target application.

[0150] 3. This module can use the Uiautomator framework to take screenshots of the display interface of the target application in the usage scenario, as well as obtain information about view controls and activities in the display layout, and save them as PNG files and UIX files respectively.

[0151] 4. This module can support the detection of the interface by matching the keyword strings of advertising features to determine whether the displayed interface contains advertising content.

[0152] 5. This module can use the Structural Similarity Index (SSIM) algorithm to calculate the similarity of screenshots of the display interface, thereby removing duplicate screenshots of display pages in the target application and deleting duplicate application display interface screenshots and layout files with an image similarity of more than 90%, thus reducing redundant advertising page features.

[0153] The SSIM algorithm defines structural information from the perspective of image composition as an attribute that reflects the structure of objects in a scene, independent of brightness and contrast, and models distortion as a combination of three different factors: brightness, contrast, and structure. Specifically, the SSIM algorithm comprehensively evaluates the overall similarity between two images by calculating the similarity of brightness, contrast, and structure.

[0154] In some embodiments, after obtaining the advertising feature data in the application, the advertising feature data can be stored in JSON format.

[0155] In this embodiment, the management loading module is responsible for managing the advertising feature data and switching the advertising anti-harassment function on and off.

[0156] The advertising feature data can be stored locally in .db file format. Its content is synchronized by the control module in the electronic device by pulling data from the cloud server through network requests. The data on the cloud server is generated into rule files by the advertising feature collection module and uploaded.

[0157] For example, such as Figure 9 As shown, electronic devices can upload the identification information of multiple installed applications, or the identification information of a single application, to a cloud server at specific stages (such as the first power-on, each time the ad-blocking function is activated, or when the target application is launched). This identification information includes at least the application's name and version information. The cloud server can then match the received identification information with a list of ad feature parameters corresponding to the application from its database and distribute the list of ad feature parameters to the electronic device.

[0158] In some embodiments, cloud database maintenance and management utilize tools such as SQL Server Management Studio, MySQL Workbench, and Oracle SQL Developer. Database management includes basic operations such as adding, deleting, modifying, and querying advertising feature data to ensure real-time updates and accuracy. Specific operations are listed below:

[0159] Add (or insert): Add a new record to a database table using the INSERT statement.

[0160] Delete: Use the DELETE statement to remove one or more records from a database table.

[0161] Modify: Use the UPDATE statement to update existing records in a database table.

[0162] Query: Retrieves all advertising feature data based on the SELECT statement and limiting conditions.

[0163] Because the number and versions of applications installed on different electronic devices vary, cloud servers need to generate customized feature data and package it into .db files to be sent to electronic devices.

[0164] For complex database update tasks, scripts or programming languages ​​(such as SQL, Python, etc.) can be used to automate the update process and improve efficiency. The cloud server maintains an advertising feature database for each application. When a user triggers an ad, the system matches the application's name and version and sends out the corresponding list of advertising feature data.

[0165] Regarding the global ad-blocking function's on / off switch, the data transmission for the ad-blocking function is implemented on the Android system's system_server side. The function's activation and deactivation are controlled by a specific boolean variable, and the value of this boolean variable is determined by an application with specific system permissions.

[0166] For example, such as Figure 8 As shown, users can control the on / off switch of the anti-advertising function on a specific interface in their electronic devices.

[0167] In this application, users can turn the global ad blocking feature on or off through the display interface. When the global ad blocking feature is enabled, users can also control whether ad blocking is enabled or disabled for specific applications through a fine-grained application list interface. This enable / disable functionality first uses ViewModel—an Android business logic or screen-level state container—to temporarily store data during application runtime; secondly, it uses Android's Room—a modern relational database framework for Android applications—to persistently store configuration lists and ad feature data within the application.

[0168] In addition, when a user installs an application, the system will immediately retrieve the advertising feature data from the cloud server and synchronize it to the local device. In this case, the application's anti-harassment management function can be turned off by default, waiting for the user to turn it on manually. When a user uninstalls a related application, the corresponding advertising feature data on the system side will also be deleted from the electronic device, and the application control item in the application list will be deleted to maintain real-time synchronization.

[0169] In this embodiment, the ad feature matching module is responsible for parsing the matching rules and matching the target view that conforms to the rules. The ad feature matching module resides in the Android Framework layer, such as... Figure 18 As shown, a specific workflow of an advertising feature matching module is presented.

[0170] When the application starts, the management loading module passes the ad control feature string of the current application to the ad feature matching module through the Bundle object of bindApplication().

[0171] When the advertising feature matching module performs related processing, such as Figure 18 As shown, different actions can be taken depending on whether the application is on the control list:

[0172] (1) If the application is not in the control list and the Bundle does not contain the corresponding features, it will not enter the feature matching engine and will be processed according to the original process of the Android system (i.e., the ad removal method will not be executed).

[0173] (2) When the application is in the control list (i.e. the application is allowed to enable the anti-harassment function), the feature matching logic branch is entered.

[0174] Then, the ad feature matching module parses and constructs the ad feature parameters, converting the ad control feature string into a map object with the Activity name as the key and the list of ad View features to be matched as the value. The ad feature parameter list includes the feature parameters of each ad view, and the feature parameters of each ad view may include the target's class name, resource ID, width, height, etc.

[0175] It should be noted that when constructing the ad feature parameter list, matching items are specified through one or more ad features. It is only necessary to ensure that the feature matching items contained in the ad feature parameter list are the minimum feature set that correctly filters out the target view. It is not necessary to write all features of the target view into the ad feature parameter list.

[0176] The matching logic entry point is located in the `setView()` function of the `ViewRootImpl` class. `DecorView` is the root node of the page layout tree, and the `ViewRootImpl` class stores `DecorView` objects through the `mView` member variable. Using `setView()` as the matching entry point allows monitoring of ad content displayed through View, Window, and Activity. The feature matching engine first obtains the Activity object to which `mView` (i.e., the current `DecorView` object) belongs based on its context. If the Activity object exists in the rule map from the previous step, then `mView` adds a `ViewTreeObserver.OnGlobalLayoutListener()` listener. Whenever a View object on the page needs to be remeasured, relaid, or redrawn, the feature matching function `adMonitoring()` within the overridden `onGlobalLayout()` method of the listener is entered.

[0177] `adMonitoring()` recursively examines every View in the layout tree rooted at `mView`. It retrieves features by calling member functions or exposing member variables of the View, compares these features with each View in the ad View feature list, and filters out two types of target views:

[0178] (1) Ads without a close / skip button will directly return to the view containing the ad content;

[0179] (2) Ads containing close / skip buttons return to the view where the close control is located.

[0180] Subsequently, the view that matches the matching rules and the corresponding processing parameters can be passed to the advertising auxiliary processing module.

[0181] After receiving the view and processing parameters filtered by the feature matching module, the advertising auxiliary processing module can perform anti-harassment processing on the view according to the processing parameters.

[0182] Understandably, in practical situations, such as Figure 13As shown, some target views that need to be magnified lack obvious features, and writing features to match them directly can easily lead to false positives. However, their subviews have obvious features. For example, the close button (i.e., the first clear control) in the target ad view to be magnified is a FrameLayout with a background because the close click event is bound to this view, but it has no obvious features, while its subview is a TextView with the text "Skip". In this case, corresponding ad feature parameters can be written for the subviews with obvious features, allowing the ad feature matching module to filter out the TextView corresponding to the "Skip" control and specify the parent view to be searched one level up. Finally, the ad assistance module will process its parent view, the FrameLayout.

[0183] Figure 19 A flowchart illustrating the workflow of an advertising auxiliary processing module is provided.

[0184] like Figure 19 As shown, after receiving the filtered views and their corresponding processing parameters, the advertising auxiliary processing module can first check whether the target view corresponding to the processing parameters needs to be queried by a parent. If so, it can find the parent view (a type of target view) according to the level. Then, it can perform different processing on the target view according to the advertising type indicated by the processing parameters.

[0185] For example, (1) when the target view is an ad view that does not contain a close button (i.e., the first clear control), an ad view that needs to generate a close button (i.e., the second clear control) is required. The ad auxiliary processing module determines the position of the close button (i.e. the second clear control) to be generated in the ad view and whether to add a background, etc., according to the processing parameters, so as to generate a clear close button (i.e., generate the second clear control) at a specified position in the target view (i.e. the ad view).

[0186] Furthermore, depending on how the target view is displayed, the close button (i.e., the generated second clear control) will be bound to different close click events. For example, it can be bound to a close click event of one of the View, Window, or Activity, so that the close button (i.e., the second clear control) can correctly close the advertisement view.

[0187] The specific steps are as follows:

[0188] a. Create a TextView object, set the closing text using the TextView.setText() function, such as "[x] Close Ads"; set the text size using the TextView.setTextSize() function; and set the background using the TextView.SetBackground() function.

[0189] b. If the processing parameters include the option to add padding (ADD_PADDING), then...

[0190] The TextView.setPaddingRelative() function adds a padding value.

[0191] c. Determine the parent class of the target view. Target views that inherit from FrameLayout, RelativeLayout, or LinearLayout will generate different layout parameters (LayoutParams), which are then assigned to the target view using the TextView.setLayoutParams() function.

[0192] i. For targets inheriting from FrameLayout, generate a FrameLayout.LayoutParams object. If the processing parameters include the option to add margin (ADD_MARGIN), set the margin using FrameLayout.LayoutParams.setMargins(); if it includes the option to move the close button to the right (CLOSEBTNRIGHTALIGN), then...

[0193] The Gravity.RIGHT flag of FrameLayout.LayoutParams.gravity is set to true; if the close button is brought down (CLOSEBTNBOTTOMALIGN) option is included, the Gravity.BOTTOM flag of FrameLayout.LayoutParams.gravity is set to true.

[0194] ii. For targets inheriting from RelativeLayout, generate a RelativeLayout.LayoutParams object. If the processing parameters include the option to add margin (ADD_MARGIN), set the margin using RelativeLayout.LayoutParams.setMargins(); if it includes the option to move the close button to the right (CLOSEBTNRIGHTALIGN), call RelativeLayout.LayoutParams.addRule(RelativeLayout.ALIGNPARENTRIGHT); if it includes the option to move the close button down (CLOSEBTNBOTTOMALIGN), call...

[0195] RelativeLayout.LayoutParams.addRule(RelativeLayout.ALIGNPARENTBOTTOM);

[0196] iii. For targets that inherit from LinearLayout, generate a LinearLayout.LayoutParams object. If the processing parameters include the option to add margin (ADD_MARGIN), set the margin using LinearLayout.LayoutParams.setMargins(); if it includes the option to move the close button to the right (CLOSEBTNRIGHTALIGN), then...

[0197] The Gravity.RIGHT flag of LinearLayout.LayoutParams.gravity is set to true; if the option to close the button (CLOSEBTNBOTTOMALIGN) is included, the Gravity.BOTTOM flag of LinearLayout.LayoutParams.gravity is set to true.

[0198] d. Based on the type of the target view in the processing parameters, call TextView.setOnClickListener() to set different click listeners:

[0199] i. If the processing parameter includes ADCONTENTVIEW, meaning the target view to be closed is a View object, then pass the target view object to the click listener. Override the onClick() function, first obtain the layout parameters ViewGroup.LayoutParams of the target view using the View.getLayoutParams() function, set its ViewGroup.LayoutParams.width and ViewGroup.LayoutParams.height values ​​to 0, and finally call the View.setLayoutParams() function to update the new width and height values.

[0200] ii. If the processing parameter includes ADCONTENTWINDOW, meaning the target view to be closed is a Window object, then pass the ViewRootImpl object with the layout change listener set to the click listener. Override the onClick() function and call ViewRootImpl.doDie() to destroy the ViewRootImpl object.

[0201] iii. If the processing parameter includes ADCONTENTACTIVITY, meaning the target view to be closed is an Activity object, then the ViewRootImpl object with the layout change listener set is passed to the click listener. The onClick() function is overridden, and the Activity object containing the target view is obtained through the ViewRootImpl.mView member variable, which is the context of the current layout root node DecorView object. The Activity object is then destroyed by calling the Activity.finish() method.

[0202] e. Set the Z-axis coordinate of the close button to the maximum value using TextView.setZ(Float.MAX_VALUE) to prevent the close button from being obscured.

[0203] f. Use the TextView.setContentDescription() function to add a clear description to the close button, such as "Close Ad".

[0204] g. Convert the target View type to a ViewGroup object, and add the close button to the screen using the ViewGroup.addView() method.

[0205] (2) If the ad view contains a close button, and the target view is a close button that needs to be enlarged (i.e., the first clear control), the ad auxiliary processing module can enlarge the width and height of the close button according to the magnification specified in the processing parameters. To reduce the number of rules, recursive magnification can be specified through a flag, which will perform the same magnification operation on the target view and all its subviews. The specific steps are as follows:

[0206] a. If the target text size is a subclass of TextView and the processing parameter includes ENLARGE_TEXT, then use TextView.getTextSize() to get the original text size of the target text, multiply it by the magnification factor in the rule, and then call TextView.setTextSize() to set the text size to the magnified value.

[0207] b. Obtain the target layout parameter ViewGroup.LayoutParams object through the View.getLayoutParams() function, taking setting the width as an example:

[0208] i. Obtain the original width of the target using the View.getWidth() function. If the processing parameter includes ENLARGEWIDTH, multiply the original width by the magnification factor and assign it to the ViewGroup.LayoutParams.width member variable.

[0209] ii. If the processing parameter includes WRAPCONTENTWIDTH, then let

[0210] Setting ViewGroup.LayoutParams.width to ViewGroup.LayoutParams.WRAP_CONTENT makes the width adapt to the view content.

[0211] iii. Similarly, after modifying the width and height of the ViewGroup.LayoutParams object, call the View.setLayoutParams() function to apply the layout parameters.

[0212] c. If the processing parameters include ADD_PADDING, add padding values ​​using the View.setPaddingRelative() function.

[0213] d. If the processing parameters include ADD_BACKGROUND, add a background using the View.setBackground() function.

[0214] e. If the processing parameters include RECURSIVE_ENHANCE, then the View is converted into a ViewGroup object, and the zoom operation is recursively performed on all subviews.

[0215] f. Use the TextView.setContentDescription() function to add a clear description to the target view, such as "Turn off ads".

[0216] g. By calling the ViewGroup.bringChildToFront() function on the root node DecorView of the layout tree, the zoomed-in target is placed on the top layer to prevent it from being obscured.

[0217] h. Call the View.invalidate() function to refresh the page and make the zoom effect appear on the screen.

[0218] (3) In the advertisement view containing the close button (i.e., the advertisement view containing the first clear control), if it is necessary to enlarge the target's close hotspot, the advertisement auxiliary processing module will calculate the position coordinates of the target center on the electronic device's display screen based on the original width and height of the first clear control. Then, it will calculate the enlarged hotspot size based on its width, height, and magnification ratio. Using the target center position as the center coordinates of the hotspot, a hotspot view will be generated and added to the screen. Then, a click event will be bound to the hotspot. Any click event on the hotspot view will trigger a click on the target center, achieving the effect of enlarging the hotspot by passing through the click event.

[0219] The specific steps are as follows:

[0220] a. Create two Rect objects to store the top, bottom, left, and right boundary values ​​of the target view on the screen obtained through the View.getClobalVisibleRect() function, and the boundary value of the DecorView, the root node of the layout tree.

[0221] b. Calculate the enlarged hotspot boundary. First, calculate the original width and height of the target View's hotspot and the center coordinates of the target View using the target View's compiled values. Then, calculate the expected width and height of the enlarged hotspot based on the magnification ratio in the matching rules. To prevent the enlarged hotspot coordinates from exceeding the DecorView's range, use the x-coordinate of the target View's center coordinates minus the expected enlarged hotspot width / 2. This gives the expected left boundary value of the enlarged hotspot. If it exceeds the DecorView's left boundary value, the left boundary value of the enlarged hotspot should be the DecorView's left boundary value. The same logic applies to other boundaries. This yields a Rect object storing the enlarged hotspot boundary values.

[0222] c. Create a new view object as a hotspot view. Calculate the width and height of the hotspot using the hotspot boundary values ​​from step b, and then create a ViewGroup.LayoutParams object based on these values.

[0223] d. Add a click event listener to the hotspot view using the `View.setOnClickListener()` function; override the `onClick()` function, first sending a click event to the `DecorView` using the `sendTouchEvent()` function to achieve the effect of passing through the click event and enlarging the hotspot. The click coordinates of the `sendTouchEvent()` function are the center coordinates of the target view calculated in step b; then, obtain the layout parameters `ViewGroup.LayoutParams` of the target view using the `View.getLayoutParams()` function, set its `ViewGroup.LayoutParams.width` and `ViewGroup.LayoutParams.height` values ​​to 0, and finally call the `View.setLayoutParams()` function to update the new width and height values, so that the hotspot view is automatically destroyed after the click.

[0224] e. Set an associated state listener for the hotspot view using the View.addOnAttachStateChangeListener() function, and override the onViewDetachedFromWindow() function to remove the hotspot view after the target view moves off-screen or is destroyed due to ad closing. The method for removing the hotspot view is the same as step d.

[0225] f. If the processing parameters include ADD_BACKGROUND, add a background using the View.setBackground() function.

[0226] g. Use View.setX() to set the left offset of the hotspot view, View.setY() to set the right offset of the hotspot view, and View.setZ() to place the hotspot view's y-coordinate at the top.

[0227] h. Use the TextView.setContentDescription() function to add a clear description to the hotspot view, such as "Turn off ads".

[0228] i. Convert the DecorView object to a ViewGroup object, and add the hotspot view to the screen using the ViewGroup.addView() method.

[0229] In some embodiments, in addition to zoom buttons and hotspots, the ad view can also provide more flexible and user-friendly interaction methods, such as sidebar pop-up bubbles and drop-down menus, enabling users to manage ads more intuitively and conveniently.

[0230] Currently, the construction of advertising feature libraries relies on semi-automated and manual collection in the offline stage, which limits the coverage and the frequency of daily application updates, while increasing labor costs. Therefore, in some embodiments, AIGC technology can be introduced to train image recognition models, which can automatically explore applications in electronic devices in the offline stage, automatically identify advertising features and populate the feature library, thereby reducing labor costs and accelerating the construction of the feature library.

[0231] In some embodiments, a large model can be integrated into the management loading module. Whenever an ad pops up, the system can automatically identify the pop-up image, accurately locate the Activity data of the ad view, and automatically configure the ad feature parameters. This approach can optimize the cost of offline tools, achieve model matching from semi-automation to full automation, and improve the efficiency and accuracy of ad processing.

[0232] In some embodiments, machine learning algorithms can be used to monitor advertising effectiveness in real time, analyze user behavior and feedback, and dynamically adjust advertising strategies to achieve more accurate target audience positioning and higher conversion rates.

[0233] In some embodiments, a cross-platform advertising management framework can be built to ensure consistency and optimal display of ads across different devices and operating systems, thereby enhancing brand image and user experience.

[0234] By implementing this embodiment, by adding clearing options (such as enlarged hotspots, pop-up bubbles, sidebars, etc.) to ad views that do not have clearing controls, users can more intuitively and conveniently identify and close ads without affecting the ad presentation, reducing accidental operations and thus improving operability and user experience.

[0235] Implementing this embodiment can optimize the user feedback process for abnormal advertisements, eliminating the lengthy process of application managers providing feedback, making corrections, re-listing, and users reinstalling, thus significantly improving the resolution time.

[0236] Implementing this embodiment can reduce the user experience of accidental redirection, decrease unnecessary redirections caused by accidental ad clicks, and protect consumers' right to choose and their right to fair trade.

[0237] Implementing this embodiment does not affect the normal delivery of advertisements and user access, thus not harming the legitimate revenue of advertisers and producers, while avoiding user churn due to poor advertising experience.

[0238] By implementing this embodiment, the actual click-through rate of advertisements can be increased by optimizing the hot zones and button design of advertisements, thereby improving the effectiveness of advertisement delivery.

[0239] Implementing this embodiment enhances advertising compliance by restricting clickable areas and prominently displaying "skip / close" buttons.

[0240] Implementing this embodiment can improve the advertising experience, reduce user complaints and disputes caused by advertising issues, lower after-sales service costs for businesses, and reduce customer complaints.

[0241] It should be understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0242] Based on the foregoing embodiments, this application provides an advertisement removal device, which includes various modules and units included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA), etc.

[0243] Figure 20 This is a schematic diagram of the structure of the advertisement removal device provided in the embodiments of this application, as shown below. Figure 20 As shown, the device 2000 includes a display module 2001, a processing module 2002, and a response module 2003, wherein:

[0244] Display module 2001 is used to display a first interface, the first interface including a target view, the target view being an advertisement view excluding the first clear control or a view displaying the first clear control, the first clear control being associated with the advertisement view, and the first clear control being used to clear the advertisement view;

[0245] Processing module 2002 is used to perform anti-harassment processing on the target view to obtain a second interface. The second interface includes a second clear control. When the first interface includes the first clear control, the response area of ​​the second clear control is larger than the response area of ​​the first clear control.

[0246] The response module 2003 is used to close the second interface in response to a trigger operation on the second clear control.

[0247] In some embodiments, the target view is an advertisement view that does not include the first clear control, and the processing module 2002 includes an acquisition module, a generation module, and an update module;

[0248] The acquisition module is used to acquire the processing parameters corresponding to the target view, the processing parameters including the display position of the second clear control in the first interface;

[0249] The generation module is used to generate the second clear control according to the processing parameters;

[0250] The update module is used to update the first interface to obtain the second interface, the second interface including the second clear control and the advertisement view.

[0251] In some embodiments, the target view is a view that displays the first clear control, and the processing module 1902 further includes a processing submodule;

[0252] The acquisition module is also used to acquire the processing parameters corresponding to the target view, the processing parameters including magnification, magnification width and magnification height;

[0253] The processing submodule is used to enlarge the size of the first clear control according to the processing parameters to obtain the second clear control, wherein the size of the second clear control is larger than the size of the first clear control;

[0254] The update module is used to update the first interface to obtain the second interface, the second interface including the second clear control.

[0255] In some embodiments, the target information is a view that displays the first clear control;

[0256] The acquisition module is specifically used to acquire the processing parameters corresponding to the target view, the processing parameters including the boundary value and magnification of the first clear control on the first interface;

[0257] The processing submodule is used to perform hotspot magnification processing on the first clear control according to the processing parameters to obtain a second clear control. The size of the second clear control is equal to the size of the first clear control, and the response area of ​​the second clear control is larger than the response area of ​​the first clear control.

[0258] The update module is used to update the first interface to obtain the second interface, the second interface including the second clear control.

[0259] In some embodiments, the acquisition module further includes an acquisition submodule and a determination module;

[0260] The acquisition submodule is used to acquire a list of advertising feature parameters corresponding to the target application when the target application is launched. The list of advertising feature parameters includes a first view appearing in the target application and a first processing parameter corresponding to the first view, as well as a second view and a second processing parameter corresponding to the second view. The first view is an advertising view that does not include a clear control, the second view is an advertising view that includes a clear control, the second processing parameter is the processing parameter corresponding to the clear control, and the target application is an application that displays the first interface.

[0261] The determining module is used to determine the processing parameters corresponding to the target view based on the target view currently displayed by the application and the list of advertising feature parameters.

[0262] In some embodiments, the determining module is specifically used to compare the target view with the list of advertising feature parameters to obtain the processing parameters corresponding to the target view. When the type of the target view is an advertising view that does not include a clear control, the processing parameters of the target view are the first processing parameters corresponding to the first view. When the type of the target view is a view that displays a clear control, the processing parameters of the target view are the second processing parameters corresponding to the second view.

[0263] In some embodiments, the acquisition submodule is further configured to upload the identification information of the target application to the server, the identification information including the name and version information of the target application;

[0264] The server receives the list of advertising feature parameters, which is a list of advertising feature parameters corresponding to the target application that is pre-stored in the server.

[0265] In some embodiments, the determining module is further configured to determine whether to enable the anti-harassment function corresponding to the target application; if it is determined that the anti-harassment function corresponding to the target application is enabled, the target view is subjected to anti-harassment processing to obtain the second interface.

[0266] In some embodiments, the clear control is displayed inside the interface and is a close button; or, the clear control is displayed on the side of the interface and is a drop-down list.

[0267] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0268] It should be noted that, in the embodiments of this application... Figure 20 The module division of the advertisement removal device shown is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or be integrated into one unit by two or more units. The integrated units can be implemented in hardware, as software functional units, or a combination of software and hardware.

[0269] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0270] This application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 21 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the methods described above.

[0271] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method provided in the above embodiments.

[0272] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the method provided in the above-described method embodiments.

[0273] Those skilled in the art will understand that Figure 21 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0274] In one embodiment, the ad removal device provided in this application can be implemented as a computer program, which can be implemented in the form of, for example, Figure 21The device operates on the computer device shown. The memory of the computer device can store the various program modules that make up the above-described apparatus. The computer program, composed of the various program modules, causes the processor to execute the steps of the methods in the various embodiments of this application described in this specification.

[0275] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0276] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.

[0277] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.

[0278] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0279] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.

[0280] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0281] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0282] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0283] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0284] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0285] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0286] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0287] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An ad removal method, characterized in that, The method includes: Display a first interface, the first interface including a target view, the target view being an ad view that does not include the first clear control or a view that displays the first clear control, the first clear control being associated with the ad view, the first clear control being used to clear the ad view; The target view is subjected to anti-harassment processing to obtain a second interface, which includes a second clear control. When the first interface includes the first clear control, the response area of ​​the second clear control is larger than the response area of ​​the first clear control. In response to the triggering operation of the second clear control, the second interface is closed.

2. The method according to claim 1, characterized in that, The target view is an advertising view that does not include the first clear control. The step of performing anti-harassment processing on the target view to obtain a second interface includes: Obtain the processing parameters corresponding to the target view, the processing parameters including the display position of the second clear control in the first interface; The second clear control is generated based on the processing parameters; The first interface is updated to obtain the second interface, which includes the second clear control and the advertisement view.

3. The method according to claim 1, characterized in that, The target view is the view that displays the first clear control. The step of performing anti-harassment processing on the target view to obtain a second interface includes: Obtain the processing parameters corresponding to the target view, including magnification, magnification width, and magnification height; According to the processing parameters, the first clear control is enlarged to obtain the second clear control, the size of the second clear control is larger than the size of the first clear control; The first interface is updated to obtain the second interface, which includes the second clear control.

4. The method according to claim 1, characterized in that, The target information is a view displaying the first clear control. The step of performing anti-harassment processing on the target view to obtain a second interface includes: Obtain the processing parameters corresponding to the target view, the processing parameters including the boundary value and magnification of the first clear control on the first interface; According to the processing parameters, the first clear control is subjected to hotspot magnification processing to obtain a second clear control. The size of the second clear control is equal to the size of the first clear control, and the response area of ​​the second clear control is larger than the response area of ​​the first clear control. The first interface is updated to obtain the second interface, which includes the second clear control.

5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the processing parameters corresponding to the target view includes: When the target application is launched, an ad feature parameter list corresponding to the target application is obtained. The ad feature parameter list includes a first view appearing in the target application and a first processing parameter corresponding to the first view, as well as a second view and a second processing parameter corresponding to the second view. The first view is an ad view that does not include a clear control, the second view is an ad view that includes a clear control, the second processing parameter is a processing parameter corresponding to the clear control, and the target application is an application that displays the first interface. Based on the target view currently displayed by the target application and the list of advertising feature parameters, determine the processing parameters corresponding to the target view.

6. The method according to claim 5, characterized in that, The step of determining the processing parameters corresponding to the target view based on the target view currently displayed by the application and the list of advertising feature parameters includes: The target view is compared with the list of advertising feature parameters to obtain the processing parameters corresponding to the target view. When the type of the target view is an advertising view that does not include a clear control, the processing parameters of the target view are the first processing parameters corresponding to the first view. When the type of the target view is a view that displays a clear control, the processing parameters of the target view are the second processing parameters corresponding to the second view.

7. The method according to claim 5, characterized in that, The step of obtaining the list of advertising feature parameters corresponding to the target application includes: Upload the identification information of the target application to the server, the identification information including the name and version information of the target application; The server receives the list of advertising feature parameters, which is a list of advertising feature parameters corresponding to the target application that is pre-stored in the server.

8. The method according to claim 5, characterized in that, Before performing anti-harassment processing on the target view to obtain the second interface, the method further includes: Determine whether to enable the anti-harassment function corresponding to the target application; If the anti-harassment function corresponding to the target application is enabled, the target view is processed to obtain the second interface.

9. The method according to any one of claims 1 to 4, characterized in that, The clear control is displayed inside the interface and is a close button; or, the clear control is displayed on the side of the interface and is a drop-down list.

10. An advertisement removal device, characterized in that, include: The display module is used to display a first interface, the first interface including a target view, the target view being an advertisement view excluding the first clear control or a view displaying the first clear control, the first clear control being associated with the advertisement view, and the first clear control being used to clear the advertisement view; The processing module is used to perform anti-harassment processing on the target view to obtain a second interface. The second interface includes a second clear control. When the first interface includes the first clear control, the response area of ​​the second clear control is larger than the response area of ​​the first clear control. The response module is used to close the second interface in response to a trigger operation on the second clear control.

11. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 9.