Business object filtering method, device, electronic device and computer storage medium
Using image recognition technology to identify and filter business objects on page screenshots solves the problems of frequent updates and accidental killing of existing advertising filtering mechanisms, and achieves efficient and low-cost advertising filtering effects.
Patent Information
- Application Number
- CN201910261039.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-04-02
AI Technical Summary
The existing ad filtering mechanism needs to constantly update rules to adapt to new ad types, which results in high operating costs and is prone to accidental killings. It also requires manual analysis, which is costly.
Use image recognition technology to identify business objects on page screenshots, obtain the identified information, determine the page elements that match the business objects, filter them, and display the filtered pages.
No matter how the advertisement is written, it can be effectively identified and processed to avoid accidental killing, reduce the need to update business object filtering rules, and significantly reduce implementation costs.
Smart Images

Figure CN111767454B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a business object filtering method, device, electronic device and computer storage medium. Background Art
[0002] As distribution and promotion technologies become more mature, more and more business objects, such as advertising manufacturers, use various applications to distribute and promote their business objects. However, these business objects are usually not what users need, but seriously affect the user's use of applications or programs. Therefore, filtering business objects has become an important function of many applications and programs.
[0003] For example, in online user feedback, advertisement-related issues account for a very high proportion. Therefore, advertisement filtering has always been a very important function of browsers. Currently, many domestic browsers have this function, and it is one of the functions that users pay the most attention to. The traditional advertisement filtering mechanism mainly extracts page advertisement features manually; then these features are made into rules that can be operated online and sent to the browser; the browser kernel parses the filtering method and target elements based on these rules, deletes or hides the target elements, or intercepts advertisement requests. After the above advertisement filtering rules are launched, in order to adapt to the various new advertisement types, it is necessary to continuously manually operate and iterate the online advertisement filtering rules. The basic process includes: new advertisements appear-->manually analyze the page-->extract rules-->add new filtering rules to update the original advertisement filtering rules.
[0004] However, this filtering method has the following problems: first, as business objects with different writing styles, such as advertisements, emerge, the rules need to be constantly updated, resulting in high operating costs; second, adding a business object filtering rule, such as an advertisement filtering rule, may not be comprehensive enough on the one hand, and may easily cause "false kills" and filter out normal page content on the other hand; third, the extraction of rules requires manual analysis, which is costly. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a business object filtering solution to solve at least part of the above problems.
[0006] According to a first aspect of an embodiment of the present invention, a business object filtering method is provided, comprising: obtaining information of an identified business object based on an identification result of a business object identification performed on a screenshot of a page to be filtered; determining page elements in the page to be filtered that match the information of the business object; filtering the page elements of the page to be filtered, and displaying the filtered page.
[0007] According to a second aspect of an embodiment of the present invention, a business object filtering device is provided, comprising: an acquisition module, used to acquire information of an identified business object based on an identification result of a business object identification performed on a screenshot of a page to be filtered; a determination module, used to determine page elements in the page to be filtered that match the information of the business object; and a filtering module, used to filter the page elements of the page to be filtered and display the page after the filtering process.
[0008] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the business object filtering method described in the first aspect.
[0009] According to a fourth aspect of an embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the business object filtering method as described in the first aspect is implemented.
[0010] According to the business object filtering solution provided by the embodiment of the present invention, the page screenshot corresponding to the page is firstly subjected to business object recognition through image recognition technology to identify the business object to be filtered and obtain the information of the identified business object; then, based on the information of the identified business object, the page element corresponding to the business object information is determined from the page; then, the page element is filtered out from the page so that the displayed page no longer contains the business object.
[0011] The business object filtering scheme provided by the embodiment of the present invention, first, uses image recognition technology as a means of business object recognition, and because the image recognition algorithm itself has the characteristic of being continuously optimized as the recognition data increases, no matter how the business object is written, it can be effectively recognized; second, because the business object can be accurately identified through image recognition, it can not only ensure the comprehensive processing of the business object, but also avoid the "mistaken killing" of normal page elements; third, by searching and determining the page elements that match the identified business object in the page, even if a business object with a new writing method is generated, there is no need to update the business object filtering rules, which greatly reduces the implementation cost of business object filtering. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0013] Figure 1 A flowchart of a method for filtering business objects according to Embodiment 1 of the present invention;
[0014] Figure 2 This is a flowchart of a method for filtering business objects according to Embodiment 2 of the present invention;
[0015] Figure 3 This is a flowchart of a method for filtering business objects according to Embodiment 3 of the present invention;
[0016] Figure 4 for Figure 3 A schematic diagram of a training scenario of a business object recognition engine in the illustrated embodiment;
[0017] Figure 5 is a structural block diagram of a business object filtering device according to Embodiment 4 of the present invention;
[0018] Figure 6 is a structural block diagram of a business object filtering device according to Embodiment 5 of the present invention;
[0019] Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device according to Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0021] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.
[0022] Embodiment 1
[0023] Reference Figure 1 , shows a step flow chart of a business object filtering method according to embodiment 1 of the present invention.
[0024] The business object filtering method of this embodiment includes the following steps:
[0025] Step S102: acquiring information of the identified business object based on the result of identifying the business object of the page screenshot of the page to be filtered.
[0026] The page to be filtered may be any appropriate page that can be used by the business object manufacturer to distribute and promote the application APP of the business object, such as a browser webpage, any page of an application APP, etc. The generation or acquisition of the page screenshot of the page to be filtered may also be implemented in any appropriate manner, such as generating a page screenshot based on information of the page element of the page to be filtered, or generating a page screenshot in the form of a screen snapshot, etc.
[0027] In the embodiment of the present invention, the business object can be set by those skilled in the art as any appropriate object to be filtered according to actual needs, including but not limited to advertisements, or a specific object, etc. A suitable image recognition algorithm can be used to identify the business object in the page screenshot, and the image recognition algorithm can be, for example, an image recognition algorithm based on a convolutional neural network, a SURF algorithm, a SIFT algorithm, a K-MEANS algorithm, a DFS algorithm, a BFS algorithm, etc., which is not limited in the embodiment of the present invention.
[0028] Business object recognition can be performed on the client side of the screenshot of the page to be filtered, or the screenshot can be sent to the server side, which will perform business object recognition and return the recognition result. Business object recognition on the client side has high recognition efficiency and speed; business object recognition on the server side can reduce the local data processing burden and system consumption of the client side.
[0029] If there is a business object that needs to be filtered in the page screenshot of the page to be filtered, the corresponding business object information can be obtained, such as the location information, size information, identification information, name information, etc. of the business object, so as to determine the corresponding page element later.
[0030] Step S104: determining page elements in the to-be-filtered page that match the information of the business object.
[0031] The page elements of a page may include some or all of the elements in text, pictures, audio, animation, and video, and the business object can also be displayed in the form of one of the above page elements. Because each page element has corresponding information in the page, such as identification information, attribute information, layout information, location information, etc., it is convenient to determine its display position and display method in the page. Based on this, after obtaining the information of the business object, the page element that matches the information of the business object can be found from the page elements according to the information of the business object and the information of the page element.
[0032] Step S106: filtering the page elements of the page to be filtered, and displaying the filtered page.
[0033] The page elements that match the information of the business object are the page elements that need to be filtered. Therefore, these page elements in the filtered page need to be filtered, such as deleted or hidden, to achieve the effect of limiting their display. After filtering these page elements, these page elements will no longer exist in the displayed page, that is, the business object will no longer exist, thereby achieving the filtering of the business object in the page.
[0034] According to this embodiment, first, business object recognition is performed on the page screenshot corresponding to the page through image recognition technology to identify the business object to be filtered; then, based on the information of the identified business object, the page element corresponding to the business object information is determined from the page; then, the page element is filtered out from the page so that the displayed page no longer contains the business object.
[0035] Through this embodiment, first, image recognition technology is used as a means of identifying business objects, and because the image recognition algorithm itself has the characteristic of being continuously optimized as the recognition data increases, no matter how the business object is written, it can be effectively identified; second, because the business object can be accurately identified through image recognition, it can not only ensure the comprehensive processing of the business object, but also avoid the "mistaken killing" of normal page elements; third, by searching and determining the page elements that match the identified business object in the page, even if a business object with a new writing method is generated, there is no need to update the business object filtering rules, which greatly reduces the implementation cost of business object filtering.
[0036] The service object filtering method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: mobile terminals (such as mobile phones, PADs, etc.), servers, and PCs, etc.
[0037] Embodiment 2
[0038] Reference Figure 2 , shows a step flow chart of a business object filtering method according to embodiment 2 of the present invention.
[0039] The business object filtering method of this embodiment includes the following steps:
[0040] Step S202: Obtain a screenshot of the page to be filtered.
[0041] In this embodiment, the page screenshot of the page to be filtered is obtained by generating, including: obtaining rendering data of the page to be filtered from the cache of the application where the page to be filtered is located; and generating a page screenshot of the page to be filtered according to the rendering data.
[0042] Many applications are equipped with application caches such as browser caches, which are used to copy a copy of the requested resources and store it in the application, so that the next time the resource is requested, the copy can be used to respond to the request according to the cache mechanism. For example, the browser cache will copy a copy of a requested Web resource (such as HTML page, picture, JS, data, etc.) and store it in the browser. The cache will save a copy of the output content according to the received access request; when the next access request comes, if it is the same URL, the cache will decide whether to directly use the copy to respond to the access request or send the access request to the source server again according to the cache mechanism. It is more common that the browser will cache the web pages of the visited website. When the URL address is visited again, if the web page has not been updated, it will not download the web page again, but directly use the locally cached web page. Based on this, in this embodiment, it is selected to obtain the rendering data of the page to be filtered from the application cache, and generate the corresponding page screenshot according to the rendering data. For the page to be filtered that is visited for the first time, the data of the page to be filtered can be cached in a preloaded manner, and then the corresponding page screenshot is generated based on the rendered data. The business objects in the page to be filtered are filtered before displaying the page to be filtered, and the corresponding page is displayed after filtering based on the preloaded data.
[0043] By using the rendering data in the cache to generate page screenshots, on the one hand, since the rendering data is obtained from the cache, the generation of page screenshots is faster and more efficient; on the other hand, this method can obtain information on all page elements of the page to be filtered, including information on page elements displayed to users within the display range of the current page and information on page elements outside the display range of the current page that have not yet been displayed to users, so that the page elements in the generated page screenshots are more complete and comprehensive, thereby improving the recognition efficiency of business objects.
[0044] However, other methods of generating page screenshots, such as screen printing or view VIEW control screenshots, are also applicable to the solution of this embodiment. In addition, the page screenshots of the page to be filtered can be generated and stored in advance, and the method of directly obtaining them from the storage address when needed is also applicable to the solution of this embodiment.
[0045] Step S204: performing business object identification on the page screenshot of the page to be filtered.
[0046] In this embodiment, business object identification is performed locally on the client for the page screenshot of the page to be filtered, so as to implement rapid filtering of the business objects.
[0047] The business object may be set by those skilled in the art according to actual needs, and the specific implementation of business object recognition on the page screenshot may also be implemented by those skilled in the art using any appropriate image recognition method according to actual needs.
[0048] Step S206: acquiring information of the identified business object based on the result of identifying the business object of the page screenshot of the page to be filtered.
[0049] In this embodiment, the information of the identified business object includes at least: coordinate information and / or position information of the business object. Optionally, the width and height information of the area where the business object is located may also be included. Of course, other information of the business object may also be included, such as identification information or name information. Among them, the coordinate information of the business object is used to indicate the coordinates of the business object in the page screenshot; the position information of the business object is used to indicate the relative position of the business object in the page screenshot, for example, the distance from the border of the page screenshot or the position relative to a certain target in the page screenshot, etc. Because the business object in the page screenshot corresponds to the page element in the page to be filtered, the corresponding page element in the page to be filtered can be determined more quickly and efficiently using the coordinate information and / or position information of the business object.
[0050] Step S208: Determine the page elements in the to-be-filtered page that match the information of the business object.
[0051] In a feasible manner, the page elements that match the information of the business object can be found and determined based on the node information of the page elements in the page to be filtered. The node information of the page elements can be the node information of the node corresponding to the page element in the DOM (Document Object Model) tree of the page to be filtered, or can also be the node information of the node corresponding to the page element in the Render tree of the page to be filtered, etc. In this way, the existing information of the page to be filtered is effectively utilized, and the cost of determining the business object in the page to be filtered is reduced; it can also make the speed of determining the business object in the page to be filtered faster.
[0052] Taking a browser as an example, after parsing an HTML webpage, the browser will generate a corresponding DOM tree. Each node on the DOM tree corresponds to each page element in the webpage. Based on this, the information matching the information of the business object can be found from the node information of the node in the DOM tree, and then the page element corresponding to the node is determined as the page element matching the information of the business object.
[0053] For another example, because the DOM tree itself cannot be used directly for typesetting and rendering, the browser will also generate a Render tree for the web page. Each node RenderObject on the Render tree corresponds one-to-one to a node on the DOM tree. In order to facilitate the processing of page elements, the browser will also generate corresponding RenderLayers for some RenderObjects. RenderObjects and RenderLayers have a subordinate relationship, and multiple RenderLayers generate a Layer tree. Based on this, when determining the page element that matches the information of the business object, you can also traverse the Layer tree, visit each RenderLayer, and then traverse the RenderObjects subordinate to this RenderLayer, and determine the RenderObject that matches the information of the business object. The page element corresponding to this RenderObject is the page element that matches the information of the business object.
[0054] However, the present invention is not limited thereto. Other methods of determining page elements according to information of business objects, such as determining corresponding page elements by a Hittest algorithm according to coordinate information of business objects, are also applicable to the solutions of the embodiments of the present invention.
[0055] Step S210: filtering the page elements of the page to be filtered, and displaying the filtered page.
[0056] The filtering process of the page elements includes but is not limited to: deleting or hiding. In a feasible manner, it can be determined whether to delete or hide the page elements according to the layout information of the page elements in the page to be filtered. For example, according to the layout information of the page elements in the page to be filtered, if it is determined that after deleting the page elements, the layout information of other page elements in the page to be filtered changes, then the page elements are hidden; otherwise, they are deleted.
[0057] The layout information of the page elements in the page to be filtered indicates the display position of the page elements in the page to be filtered and the relative position relationship with other page elements. If the layout of other elements in the page to be filtered will not change after the page elements corresponding to the business object are deleted, the page elements corresponding to the business object can be deleted. Otherwise, the page elements are hidden to avoid affecting the layout of other page elements due to the deletion of the page elements.
[0058] By determining the manner of deleting or hiding the page elements according to the layout information, the influence of the filtering of the business objects on the layout of the filtered page can be reduced to a minimum, thereby achieving a better effect of the filtering of the business objects.
[0059] After filtering, the displayed page will no longer contain business objects, which not only meets the filtering needs for business objects, but also improves the user experience.
[0060] Step S212: using the page screenshot of the page to be filtered and the identified information of the business object, updating the business object identification engine.
[0061] This step is an optional step, and the business object recognition engine can be set on the client and / or server. The business object recognition engine set on the client can perform business object recognition on the page screenshot of the page to be filtered; the business object recognition engine set on the server can continuously optimize according to the page screenshots reported by each client and the information of the identified business objects, and then the optimized business object engine can be published to the client to update and optimize the business object recognition engine of the client; or, if the client does not set up a business object recognition engine, the client can send the page screenshot of the page to be filtered to the server, and the business object recognition engine on the server can perform business object recognition and return the information of the identified business object to the client so that the client can perform subsequent filtering processing.
[0062] Through this step, the business object identification engine used for business object identification can be continuously optimized to provide support for better business object identification in the future.
[0063] According to this embodiment, first, business object recognition is performed on the page screenshot corresponding to the page through image recognition technology to identify the business object to be filtered and obtain the information of the identified business object; then, based on the information of the identified business object, the page element corresponding to the business object information is determined from the page; then, the page element is filtered out from the page so that the displayed page no longer contains the business object.
[0064] Through this embodiment, first, image recognition technology is used as a means of identifying business objects, and because the image recognition algorithm itself has the characteristic of being continuously optimized as the recognition data increases, no matter how the business object is written, it can be effectively identified; second, because the business object can be accurately identified through image recognition, it can not only ensure the comprehensive processing of the business object, but also avoid the "mistaken killing" of normal page elements; third, by searching and determining the page elements that match the identified business object in the page, even if a business object with a new writing method is generated, there is no need to update the business object filtering rules, which greatly reduces the implementation cost of business object filtering.
[0065] The service object filtering method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: mobile terminals (such as mobile phones, PADs, etc.), servers, and PCs, etc.
[0066] Embodiment 3
[0067] Reference Figure 3 , shows a step flow chart of a business object filtering method according to embodiment three of the present invention.
[0068] In this embodiment, the business object filtering method of the embodiment of the present invention is described by taking the filtering of advertisements on a browser webpage as an example. However, those skilled in the art should understand that other similar scenarios such as filtering advertisements on other applications, filtering other business objects in other applications, or filtering other business objects on a browser webpage can all be implemented with reference to this embodiment.
[0069] The business object filtering method of this embodiment includes the following steps:
[0070] Step S302: loading and rendering the web page.
[0071] For example, when a user needs to access a web page, he or she can open a web page through a browser, and then the browser kernel will load and render the web page.
[0072] Step S304: Generate a screenshot of the webpage content.
[0073] For example, the browser kernel may generate a screenshot of the webpage content of the webpage based on rendering data stored in the browser cache when the browser renders the webpage.
[0074] Step S306: Identify the advertisement area through the business object identification engine.
[0075] For example, the generated screenshot of the webpage content may be input into a business object recognition engine to identify the advertisement area therein.
[0076] Step S308: Determine whether an advertisement is recognized based on the recognition result; if an advertisement is recognized, execute step S310; otherwise, end this process.
[0077] Step S310: Calculate the coordinates, width and height of the advertisement area.
[0078] The specific implementation of this step can be implemented by those skilled in the art in any appropriate manner according to actual conditions, such as calculating the width and height of the advertising area by calculating the distance between corresponding coordinate points.
[0079] Step S312: The browser kernel uses the Hittest algorithm to search for advertising elements in the web page according to the coordinates, width and height of the advertising area.
[0080] Among them, the Hittest algorithm can be used to detect whether two objects or targets overlap or intersect. Furthermore, if they overlap or intersect, some set operations can be performed. Therefore, when using the Hittest algorithm to find advertising elements in a web page, the coordinates and width and height of the advertising area need to be passed to the Hittest algorithm so that it can accurately determine whether the area indicated by the coordinates and width and height overlaps or intersects with the advertising element area in the web page. Through the Hittest algorithm, you can not only accurately find advertising elements in a web page, but also implement the subsequent filtering processing of advertising elements.
[0081] Step S314: The browser kernel deletes or hides the advertisement element.
[0082] After the width, height and coordinates of the advertising area are passed to the browser kernel, the browser kernel uses these data to find the corresponding advertising element nodes in the web page, and then deletes or hides these advertising element nodes, thereby achieving the purpose of filtering advertisements.
[0083] Step S316: Upload the webpage content screenshot and the information of the advertisement area to the cloud server to train the business object recognition engine on the server side.
[0084] For example, Figure 4 As shown, after the browser kernel sends a screenshot of the web page content to the business object recognition engine for business object recognition, obtains the information of the advertising area and completes the advertising filtering based on the information, the screenshot of the web page content and the information of the relevant advertising area (such as coordinates and width and height) can be transmitted to the cloud server; the cloud server stores the uploaded data in a training database as training data for optimizing the business object recognition engine on the server side; the business object recognition engine on the server side with deep learning capabilities obtains training data from the training database and optimizes its own algorithm model; after the optimization training of the business object recognition engine is completed, the server can push (or notify the client to actively pull) the business object recognition engine to the client according to certain conditions (such as the improvement in accuracy, the interval from the last update, etc.), and complete the update of the client's business object recognition engine (such as using a hot update replacement method to complete the update of the client's business object recognition engine).
[0085] Through this embodiment, on the one hand, image recognition technology is applied to web page advertisement filtering, thereby realizing effective identification and processing of advertisements in web pages; on the other hand, there is no need for manual analysis of web pages to extract advertisement filtering rules at a later stage, and the later maintenance cost is low; on the other hand, deep learning technology is used to continuously optimize the business object recognition engine, thereby increasing the accuracy of advertisement recognition and being able to adapt to external advertisement changes in a timely manner.
[0086] The service object filtering method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: mobile terminals (such as mobile phones, PADs, etc.), servers, and PCs, etc.
[0087] Embodiment 4
[0088] Reference Figure 5 , shows a structural block diagram of a business object filtering device according to Embodiment 4 of the present invention.
[0089] The business object filtering device of this embodiment includes: an acquisition module 402, which is used to obtain information of the identified business object based on the recognition result of the business object recognition on the page screenshot of the page to be filtered; a determination module 404, which is used to determine the page elements in the page to be filtered that match the information of the business object; a filtering module 406, which is used to filter the page elements of the page to be filtered and display the page after the filtering process.
[0090] The business object filtering device of this embodiment is used to implement the corresponding business object filtering methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the business object filtering device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0091] Embodiment 5
[0092] Reference Figure 6 , shows a structural block diagram of a business object filtering device according to Embodiment 5 of the present invention.
[0093] The business object filtering device of this embodiment includes: an acquisition module 502, which is used to obtain information of the identified business object based on the recognition result of the business object recognition of the page screenshot of the page to be filtered; a determination module 504, which is used to determine the page elements in the page to be filtered that match the information of the business object; a filtering module 506, which is used to filter the page elements of the page to be filtered and display the page after the filtering process.
[0094] Optionally, the determination module 504 is used to search and determine the page elements that match the information of the business object according to the node information of the page elements in the page to be filtered.
[0095] Optionally, the information of the business object includes coordinate information and / or position information of the business object.
[0096] Optionally, the business object filtering device of this embodiment also includes: a generation module 508, which is used to obtain rendering data of the page to be filtered from the cache of the application where the page to be filtered is located before the acquisition module 502 obtains the information of the identified business object based on the recognition result of the business object recognition on the page screenshot of the page to be filtered; and generates a page screenshot of the page to be filtered based on the rendering data.
[0097] Optionally, the filtering module 506 is used to determine whether to delete or hide the page element according to the layout information of the page element in the page to be filtered, and display the page after the filtering process.
[0098] Optionally, the filtering module 506 is used to determine, based on the layout information of the page element in the page to be filtered, that if the layout information of other page elements in the page to be filtered changes after the page element is deleted, then hide the page element; otherwise, delete it; and display the page after the hiding or deletion process.
[0099] Optionally, the business object filtering device of this embodiment further includes: an updating module 510, configured to update a business object identification engine using the page screenshot and the information of the business object.
[0100] The business object filtering device of this embodiment is used to implement the corresponding business object filtering methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the business object filtering device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0101] Embodiment 6
[0102] Reference Figure 7 , shows a schematic diagram of the structure of an electronic device according to Embodiment 6 of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0103] like Figure 7 As shown, the electronic device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0104] in:
[0105] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0106] The communication interface 604 is used to communicate with other electronic devices or servers.
[0107] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps in the above-mentioned business object filtering method embodiment.
[0108] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0109] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0110] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0111] Program 610 can be specifically used to enable the processor 602 to perform the following operations: obtain information about the identified business object based on the identification result of the business object identification on the page screenshot of the page to be filtered; determine the page elements in the page to be filtered that match the information of the business object; filter the page elements of the page to be filtered, and display the page after filtering.
[0112] In an optional embodiment, program 610 is also used to enable processor 602 to search and determine page elements that match the information of the business object in the page to be filtered based on node information of the page elements in the page to be filtered.
[0113] In an optional implementation, the information of the business object includes coordinate information and / or location information of the business object.
[0114] In an optional embodiment, program 610 is also used to enable the processor 602 to obtain rendering data of the page to be filtered from the cache of the application where the page to be filtered is located before obtaining information of the identified business object based on the recognition result of the business object identification on the page screenshot of the page to be filtered; and generate a page screenshot of the page to be filtered based on the rendering data.
[0115] In an optional implementation, the program 610 is further configured to enable the processor 602 to determine whether to delete or hide the page elements when filtering the page elements on the page to be filtered, based on the layout information of the page elements in the page to be filtered.
[0116] In an optional embodiment, program 610 is also used to enable the processor 602 to determine whether to delete or hide the page element based on the layout information of the page element in the page to be filtered. If the layout information of other page elements in the page to be filtered changes after the page element is deleted, the page element is hidden; otherwise, it is deleted.
[0117] In an optional implementation, the program 610 is further configured to enable the processor 602 to update a business object identification engine using the page screenshot and the information of the business object.
[0118] The specific implementation of each step in program 610 can refer to the corresponding description of the corresponding steps and units in the above-mentioned business object filtering method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.
[0119] Through the electronic device of this embodiment, the page screenshot corresponding to the page is firstly identified by image recognition technology to identify the business object to be filtered; then, based on the information of the identified business object, the page element corresponding to the business object information is determined from the page; then, the page element is filtered out from the page so that the displayed page no longer contains the business object.
[0120] Through the electronic device of this embodiment, first, image recognition technology is used as a means of identifying business objects, and because the image recognition algorithm itself has the characteristic of being continuously optimized as the recognition data increases, no matter how the business object is written, it can be effectively identified; second, because the business object can be accurately identified through image recognition, it can not only ensure the comprehensive processing of the business object, but also avoid the "mistaken killing" of normal page elements; third, by searching and determining the page elements that match the identified business object in the page, even if a business object with a new writing method is generated, there is no need to update the business object filtering rules, which greatly reduces the implementation cost of business object filtering.
[0121] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.
[0122] The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor, or hardware, the business object filtering method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the business object filtering method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the business object filtering method shown herein.
[0123] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.
[0124] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. A business object filtering method, comprising: According to the recognition result of business object recognition on the page screenshot of the page to be filtered, information of the recognized business object is obtained; Searching and determining, according to the node information of the page elements in the to-be-filtered page, the page elements that match the information of the business object; Filtering the page elements on the page to be filtered, and displaying the filtered page; The node information of the page element in the to-be-filtered page is the node information of the node corresponding to the page element in the rendering tree of the to-be-filtered page; The searching and determining, according to the node information of the page elements in the to-be-filtered page, the page elements matching the information of the business object comprises: The rendering tree is traversed, each rendering layer in the rendering tree is accessed, and nodes subordinate to each rendering layer are traversed, a target node matching the information of the business object is determined by using a Hittest algorithm, and a page element corresponding to the target node is determined as a page element matching the information of the business object.
2. The method according to claim 1, wherein: The information of the business object includes coordinate information and / or position information of the business object.
3. The method according to claim 1, wherein: Before obtaining information of the identified business object based on the identification result of the business object identification for the page screenshot of the page to be filtered, the method further includes: Obtaining rendering data of the page to be filtered from the cache of the application where the page to be filtered is located; A page screenshot of the page to be filtered is generated according to the rendering data.
4. The method according to claim 1, wherein: The filtering process of the page elements on the page to be filtered includes: Determine whether to delete or hide the page element according to the layout information of the page element in the to-be-filtered page.
5. The method according to claim 4, wherein: The step of determining to delete or hide the page element according to the layout information of the page element in the to-be-filtered page includes: According to the layout information of the page element in the page to be filtered, if it is determined that after deleting the page element, the layout information of other page elements in the page to be filtered changes, the page element is hidden; otherwise, it is deleted.
6. The method according to claim 1, wherein: The method further comprises: Using the page screenshot and the information of the business object, a business object identification engine is updated.
7. A business object filtering device, comprising: An acquisition module, used for acquiring information of the identified business object according to the recognition result of the business object recognition of the page screenshot of the page to be filtered; A determination module, used to search and determine the page elements that match the information of the business object according to the node information of the page elements in the page to be filtered; A filtering module, used to filter the page elements of the page to be filtered and display the filtered page; The node information of the page element in the to-be-filtered page is the node information of the node corresponding to the page element in the rendering tree of the to-be-filtered page; The determination module is specifically used to: traverse the rendering tree, access each rendering layer in the rendering tree, and traverse the nodes subordinate to each rendering layer, use the Hittest algorithm to determine the target node that matches the information of the business object, and determine the page element corresponding to the target node as the page element that matches the information of the business object.
8. The device according to claim 7, wherein: The information of the business object includes coordinate information and / or position information of the business object.
9. The device according to claim 7, wherein: The device also includes: A generation module is used to obtain rendering data of the page to be filtered from the cache of the application where the page to be filtered is located, before the acquisition module obtains information of the identified business object based on the identification result of the business object identified on the page screenshot of the page to be filtered; and generate a page screenshot of the page to be filtered based on the rendering data.
10. The device according to claim 7, wherein: The filtering module is used to determine whether to delete or hide the page elements according to the layout information of the page elements in the page to be filtered, and display the page after the filtering process.
11. The device according to claim 10, wherein: The filtering module is used to determine, based on the layout information of the page element in the page to be filtered, that if the layout information of other page elements in the page to be filtered changes after the page element is deleted, then hide the page element; Otherwise, delete the page; display the page after hiding or deleting the page.
12. The device according to claim 7, wherein: The device also includes: An updating module is used to update a business object identification engine using the page screenshot and the information of the business object.
13. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the business object filtering method according to any one of claims 1 to 6.
14. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the business object filtering method according to any one of claims 1 to 6 is implemented.
