A method, device, equipment and medium for identifying a close mark in a pop-up image
By segmenting and filtering pop-up images and combining them with a pre-trained neural network model, the problems of low efficiency and insufficient accuracy in the recognition of the close icon in existing technologies are solved. This achieves efficient and accurate recognition of the close icon in pop-up images, reducing labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2023-02-15
- Publication Date
- 2026-06-05
AI Technical Summary
Existing methods for identifying close buttons are inefficient and inaccurate, failing to effectively identify close buttons in pop-up windows, especially graphic buttons, leading to difficulties in monitoring user experience issues and illegal marketing activities.
By segmenting the image of the pop-up window to be identified, candidate images that meet preset conditions are selected, and a pre-trained neural network model is used for identification to select images containing the close icon. This method includes image segmentation, candidate image stitching, area filtering, and the application of a neural network model, which improves recognition efficiency and accuracy.
It improves the recognition efficiency and accuracy of close icons in pop-up images, reduces the cost of manual inspection, and can effectively identify various types of close icons, including text and graphic buttons, with a wide range of applications.
Smart Images

Figure CN116188906B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and medium for recognizing a close icon in a pop-up image. Background Technology
[0002] With the development of computer technology, more and more businesses and information are disseminated through the internet, and many businesses use pop-up ads to attract user traffic. However, some businesses deliberately omit the close button on pop-ups, forcing users to click on the advertisements – a violation of marketing regulations. This behavior can lead to user interaction problems and even trigger negative public opinion. Therefore, how to quickly and accurately determine whether a close button is present on a pop-up page has become an urgent problem to solve. Summary of the Invention
[0003] This specification provides a method, apparatus, device, and medium for identifying a close icon in a pop-up image, in order to solve the problems of low efficiency and inaccuracy in existing close icon identification methods.
[0004] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:
[0005] This specification provides an embodiment of a method for identifying a close icon in a pop-up window image, comprising:
[0006] Obtain the image of the pop-up window to be recognized;
[0007] The pop-up image to be identified is segmented to obtain multiple sub-images;
[0008] Based on the multiple sub-images, several candidate images are obtained; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified.
[0009] The candidate images are filtered according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified.
[0010] Each image in the target candidate image set is input into a pre-trained close marker recognition model to identify images containing the close marker. An embodiment of this specification provides a method for training a close marker recognition model, comprising:
[0011] Obtain training samples; the training samples include images containing a close icon and images not containing a close icon;
[0012] Obtain the neural network model to be trained; the neural network model to be trained includes 4 convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer.
[0013] The neural network model to be trained is trained using the training samples to obtain the off flag recognition model.
[0014] This specification provides an embodiment of a device for identifying a close icon in a pop-up window image, comprising:
[0015] The image acquisition module is used to acquire the image of the pop-up window to be recognized;
[0016] The image segmentation module is used to segment the pop-up image to be identified into multiple sub-images;
[0017] An image processing module is used to obtain several candidate images based on the plurality of sub-images; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified;
[0018] An image filtering module is used to filter the plurality of candidate images according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified.
[0019] The image recognition module is used to input each image in the target candidate image set into a pre-trained close sign recognition model to identify the image containing the close sign.
[0020] This specification provides an embodiment of a training device for a closed identifier recognition model, comprising:
[0021] The sample acquisition module is used to acquire training samples; the training samples include images containing a close marker and images not containing a close marker.
[0022] The model acquisition module is used to acquire the neural network model to be trained; the neural network model to be trained includes four convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer.
[0023] The model training module is used to train the neural network model to be trained using the training samples to obtain the off identifier recognition model.
[0024] This specification provides an embodiment of a device for recognizing a close icon in a pop-up image, comprising:
[0025] At least one processor; and,
[0026] A memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0028] Obtain the image of the pop-up window to be recognized;
[0029] The pop-up image to be identified is segmented to obtain multiple sub-images;
[0030] Based on the multiple sub-images, several candidate images are obtained; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified.
[0031] The candidate images are filtered according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified.
[0032] Each image in the target candidate image set is input into a pre-trained close flag recognition model to identify images containing the close flag.
[0033] This specification provides an embodiment of a training device for a closed identifier recognition model, comprising:
[0034] At least one processor; and,
[0035] A memory communicatively connected to the at least one processor; wherein,
[0036] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0037] Obtain training samples; the training samples include images containing a close icon and images not containing a close icon;
[0038] Obtain the neural network model to be trained; the neural network model to be trained includes 4 convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer.
[0039] The neural network model to be trained is trained using the training samples to obtain the off flag recognition model.
[0040] This specification provides a computer-readable medium storing computer-readable instructions that can be executed by a processor to implement a method for recognizing a close icon in a pop-up image or a method for training a close icon recognition model.
[0041] One embodiment of this specification achieves the following beneficial effects:
[0042] In the embodiments of this specification, the pop-up image to be identified can be segmented to obtain several candidate images. These images are then filtered according to preset conditions to obtain a target candidate image set. Each image in the target candidate image set that meets the preset conditions is identified using a pre-trained close flag recognition model to obtain an image containing a close flag. The images in the target candidate image set that meet the preset conditions are partial images of the pop-up image to be identified. Identifying these images using the pre-trained close flag recognition model filters out images that are unlikely to be close flags, reducing the amount of data the model needs to recognize, thereby improving the efficiency and accuracy of identifying close flags in the pop-up image.
[0043] Furthermore, the use of a pre-trained closure sign recognition model in the embodiments of this specification can also reduce the cost of manual inspection. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram illustrating an application scenario of a method for identifying a close icon in a pop-up image, as described in the embodiments of this specification.
[0046] Figure 2 A flowchart illustrating a method for identifying a close icon in a pop-up image, provided as an embodiment of this specification;
[0047] Figure 3 This is a schematic diagram of one identification result provided in the embodiments of this specification;
[0048] Figure 4A flowchart illustrating a training method for a closed identifier recognition model provided in an embodiment of this specification;
[0049] Figure 5 A flowchart illustrating a method for model training and recognizing a closed icon in a pop-up image, provided as an embodiment of this specification;
[0050] Figure 6 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of the structure of a device for recognizing the close icon in a pop-up image;
[0051] Figure 7 The embodiments provided in this specification correspond to Figure 4 A schematic diagram of the structure of a training device for a closed identifier recognition model;
[0052] Figure 8 This is a schematic diagram of the structure of a device for recognizing a close icon in a pop-up image or a training device for a close icon recognition model, provided as an embodiment of this specification. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.
[0054] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0055] In existing technologies, common methods for detecting pop-up window closure mainly include:
[0056] Visual inspection: This mainly involves manually inspecting a massive number of pop-up windows to identify those without a closing action point. This requires a significant amount of manpower and cannot meet the inspection needs of large-scale business operations.
[0057] This method, based on OCR (Optical Character Recognition) and an experience database, primarily relies on image OCR processing technology to recognize text on a webpage and uses a text experience database to determine if a close button exists. However, its coverage is limited; it can only recognize buttons with the text "close" and cannot recognize graphical buttons.
[0058] Front-end DOM (Document Object Model) tree detection: This method utilizes the capabilities of the front-end DOM tree to detect absolutely positioned pop-ups on a page and matches the text to indicate the presence of a close button. However, this method cannot detect icon-type buttons and can only identify absolutely positioned pop-ups that are outside the document flow, resulting in limited coverage.
[0059] To address the shortcomings of existing technologies, this solution provides the following embodiments:
[0060] Figure 1 This is a schematic diagram illustrating an application scenario of a method for recognizing a close icon in a pop-up window image, as described in an embodiment of this specification. Figure 1 As shown, the scheme may include a pop-up image to be identified (1) and a server (2). The server (2) may include a program for segmenting and stitching images, and may also include a recognition model. Specifically, the pop-up image to be identified can be segmented to obtain multiple sub-images, and at least two sub-images can be stitched together to obtain several candidate images. The candidate images that meet the preset conditions are then input into a pre-trained close icon recognition model for recognition.
[0061] Next, a method for recognizing a close icon in a pop-up image, as provided in the embodiments of the specification, will be described in detail with reference to the accompanying drawings:
[0062] Figure 2 This is a flowchart illustrating a method for identifying a close icon in a pop-up image, as provided in an embodiment of this specification. From a programming perspective, the entity executing the process can be a program hosted on an application server or an application client.
[0063] like Figure 2 As shown, the process may include the following steps:
[0064] Step 202: Obtain the image of the pop-up window to be recognized.
[0065] The image to be identified can be a page image containing the pop-up, such as a page with a pop-up in a mini-program, terminal application, or webpage. It can be a screenshot or a captured page image.
[0066] In practical applications, servers or terminals can collect pop-up pages that users browse during terminal use, and these pop-up pages can be used as images to be identified. Alternatively, images can be obtained by the server or terminal through background data collection; the specific acquisition method is not limited here.
[0067] Step 204: Segment the pop-up image to be identified to obtain multiple sub-images.
[0068] In the embodiments of this specification, the pop-up image to be identified can be segmented according to a preset size or a preset number, or existing image segmentation algorithms can be used to segment it to obtain multiple smaller sub-images.
[0069] Step 206: Based on the multiple sub-images, obtain several candidate images; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified.
[0070] The resulting sub-images are relatively small. There may be instances where a closed icon is segmented into multiple sub-images, or where a larger object is segmented into multiple smaller images. To ensure accuracy, in this embodiment, the sub-images can be stitched together to obtain several candidate images. Each candidate image can correspond to an object in the pop-up image to be identified. An object can be understood as a target, a category, etc. For example, the pop-up image to be identified might be a screenshot of a page, containing parts of the basic page, the pop-up page content, etc. Specifically, it can also contain text, images, etc. Candidate images can be obtained by stitching sub-images based on attributes such as position, color, and texture. For example, a candidate image could be an image containing text located in the upper left corner of the page, an image containing a graphic located in the middle of the page, or an image region defined by color.
[0071] Step 208: Filter the candidate images according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified.
[0072] Considering that the area of the close icon in the pop-up window will not be very large in practical applications, the embodiments of this specification can filter out the image areas that may have the close icon by means of area or area ratio. That is, the image areas that are unlikely to have the close icon can be filtered out. The candidate images that meet the preset selection conditions among several candidate images can be determined as the images in the target candidate image set.
[0073] Step 210: Input each image in the target candidate image set into the pre-trained close marker recognition model to identify candidate images containing the close marker.
[0074] Images in the target candidate image set that may contain a closed identifier can be input into a pre-trained recognition model for identification. It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0075] Figure 2 The method described above segments the pop-up image to be identified, yielding several candidate images. These images are then filtered according to preset conditions to obtain a target candidate image set. Each image in the target candidate image set that meets the preset conditions is then identified using a pre-trained close flag recognition model to obtain images containing close flags. Specifically, the images in the target candidate image set that meet the preset conditions are local images of the pop-up image to be identified. Identifying these images using the pre-trained close flag recognition model filters out images that are unlikely to be close flags, reducing the amount of data the model needs to process and thus improving the efficiency and accuracy of identifying close flags in pop-up images.
[0076] Furthermore, the embodiments in this specification employ a pre-trained closure marker recognition model for identification, which can also reduce the cost of manual inspection.
[0077] based on Figure 2 In addition to the method described herein, this specification also provides some specific implementation schemes of the method, which will be described below.
[0078] To further ensure the accuracy of recognition, the target candidate image set in the embodiments of this specification may also include images from multiple segmented sub-images that meet preset screening conditions. Optionally, the method in the embodiments of this specification may further include:
[0079] The multiple sub-images are filtered according to the preset filtering conditions, and the sub-images that meet the preset filtering conditions are selected as images in the target candidate image set.
[0080] In the embodiments of this specification, existing image segmentation algorithms can be used for image segmentation. The above-described segmentation of the pop-up image to be identified, resulting in multiple sub-images, may specifically include:
[0081] The image segmentation algorithm is used to segment the pop-up image to be identified into multiple sub-images; wherein the image segmentation algorithm may include an image segmentation algorithm based on similarity.
[0082] Among them, the image segmentation algorithm can be a graph-based image segmentation algorithm.
[0083] In the embodiments of this specification, the sub-images can also be stitched together to obtain candidate images. Optionally, the above-mentioned obtaining several candidate images based on the multiple sub-images may specifically include:
[0084] For each of the multiple sub-images, calculate the similarity between adjacent sub-images;
[0085] Adjacent sub-images that meet the preset similarity criteria are stitched together to obtain candidate images.
[0086] In practical applications, similarity can be calculated by comprehensively considering attributes such as color, texture, and size. Adjacent sub-images with high similarity can be stitched together so that the resulting candidate image can represent an object, or the sub-images representing an object can be stitched together. This can minimize interference images caused by image segmentation and improve the accuracy of identifying closed icons.
[0087] As one implementation method, the above-mentioned method of obtaining several candidate images based on the multiple sub-images may specifically include:
[0088] For one of the plurality of sub-images, calculate the first similarity between the sub-image adjacent to the one sub-image and the one sub-image;
[0089] The first candidate image is obtained by concatenating the first sub-image with the sub-image that has the highest similarity to the first sub-image.
[0090] In practical applications, the first candidate image obtained through stitching can be further stitched together as a sub-image. For example, the similarity between the sub-image adjacent to the first candidate image and the first candidate image can be calculated, and the sub-image with the highest similarity can be stitched together with the first candidate image to obtain the second candidate image. This process can be repeated to obtain several candidate images.
[0091] Specifically, the process of obtaining candidate images described above may include: creating regions of interest (ROIs) for object detection from the pop-up image to be identified using image segmentation methods, obtaining a set of small-scale regions R, which may contain the segmented sub-images, and also initializing a similarity set. Then, a similarity algorithm, which can consider factors such as color, texture, scale, and fill, is used to calculate the similarity between two adjacent regions in the region set R. The obtained similarity scores are added to the similarity set S. The similarity set S can be used to record the calculated similarities and their corresponding regions. Then, the two regions r with the highest similarity can be found from set S. i and r j Merge them into a new region r n Remove r from the similarity set Si and r j Calculate the similarity between them, and calculate r. n The similarity score with its neighboring regions is calculated, and the result is added to the similarity set S. Simultaneously, the new region r is... n Add regions to the region set R, and continue merging in this way until there are no neighboring regions that can be calculated, or the similarity set S is empty; use the regions in the final set R as candidate regions to be filtered.
[0092] Compared to exhaustive search or sliding window methods for filtering out regions where target objects appear in an image, these methods generate many redundant candidate regions, resulting in high time complexity. Furthermore, since it's impossible to consider every scale, the obtained target objects are not always accurate. In the embodiments of this specification, a region of interest (ROI) for object detection is first created. Small-scale regions are obtained using graph-based image segmentation methods, and then these are merged repeatedly to obtain larger-scale regions. Considering all features, such as color, texture, and size, and taking computational complexity into account, redundant candidate regions are effectively removed, significantly reducing the computational load. Finally, non-maximum suppression is applied to the output to obtain accurate target object information.
[0093] In the embodiments of this specification, a selective search algorithm can also be used to obtain candidate regions of the pop-up image to be identified.
[0094] The candidate images obtained in the embodiments of this specification may include several images of different sizes. The candidate images can be further filtered according to their sizes. The above-described filtering of the several candidate images according to preset filtering conditions yields a target candidate image set containing candidate images that satisfy the preset filtering conditions, which may specifically include:
[0095] Determine the area of each candidate image among the plurality of candidate images;
[0096] Determine whether the area of each candidate image is less than or equal to a first preset threshold;
[0097] Candidate images with an area less than or equal to a first preset threshold are identified as images in the target candidate image set.
[0098] The area of an image can be determined based on information such as image coordinates and pixels. The area of an image can be represented by pixel values. The first preset threshold can be a pixel threshold, such as 5KB or 10KB. The specific value can be set according to actual needs, and no specific limitation is made here.
[0099] The selection can also be based on area ratio. The above-mentioned selection of several candidate images according to preset selection criteria yields a target candidate image set containing candidate images that meet the preset selection criteria. Specifically, this set may include:
[0100] Determine the area of each candidate image among the plurality of candidate images;
[0101] Determine the area of the pop-up image to be identified;
[0102] Based on the area of each candidate image and the area of the pop-up image to be identified, the area ratio of each candidate image is determined.
[0103] Determine whether the area ratio of each candidate image is less than or equal to the second preset threshold;
[0104] Candidate images whose area percentage is less than or equal to a second preset threshold are determined as images in the target candidate image set.
[0105] The area ratio can be the ratio of the area of the candidate image to the area of the pop-up image to be identified, representing the proportion of the candidate image's area within the pop-up image to be identified. The second preset threshold can be set according to actual needs, such as one-tenth, one-fifth, one-fifteenth, etc., and the specific value is not specifically limited here.
[0106] In practical applications, the first or second preset threshold can be adjusted based on the accuracy and efficiency of the recognition results. This adjustment can be made manually or through machine learning methods.
[0107] The target candidate image set selected in the embodiments of this specification may include one or more images. Specifically, it may include images from the sub-images obtained through segmentation that meet preset screening conditions, or images from the candidate images obtained based on the sub-images that meet preset screening conditions. Each image in this set can be input into a pre-trained close icon recognition model, and the recognition result of each image can be used to determine whether the pop-up image to be recognized contains a close icon. Optionally, the above-mentioned inputting each image in the target candidate image set into the pre-trained close icon recognition model to obtain candidate images containing close icons may specifically include:
[0108] Each image is input into the pre-trained close sign recognition model to obtain a recognition score for each image; the recognition score is used to represent the probability that an image contains a close sign.
[0109] The image with the highest recognition score is identified as the image containing the closed icon.
[0110] The pre-trained close marker recognition model can be a trained neural network model that can identify each target candidate image in the target candidate image set. The image with the highest recognition score is the image containing the close marker. In practical applications, each image in the target candidate image set can be input into the final score value produced by the model to obtain a region score matrix; the region image with the highest score value can then be found from the score matrix.
[0111] To ensure accuracy, it can be determined whether the recognition score of the image with the highest identified score is greater than or equal to a preset threshold. If so, the image can be identified as containing the close flag; otherwise, the above process can be repeated. Figure 2 The identification process shown can also determine that the pop-up image to be identified does not contain a close icon. The number of times the same pop-up image to be identified can be set according to actual needs, and no specific limit is made here. In the embodiments of this specification, if the highest identification score obtained after one or more identifications is less than a preset threshold, it can also be determined that the pop-up image to be identified does not contain a close icon.
[0112] In practical applications, if a pop-up image is found to lack a close icon, it may indicate that the pop-up image is non-compliant and can be reported to management or review personnel for processing.
[0113] The location of the closing indicator can also be determined in the embodiments of this specification. Optionally, the method in the embodiments of this specification may also include:
[0114] Determine the location information of the image containing the close icon within the pop-up image to be identified.
[0115] The location of the image containing the close icon can represent the location of the close icon. To more accurately represent the location of the close icon, the center position of the image can be used as the final location output.
[0116] Figure 3 This is a schematic diagram of one identification result provided in the embodiments of this specification, such as... Figure 3 As shown, the image area containing the close icon can be marked by means of a frame 301, and the recognition score and location information 302 of the area can also be obtained.
[0117] In the embodiments of this specification, the image is first segmented into small sub-images, and then the small images are stitched together to form a candidate image that can represent an object. A pre-trained network model is used for recognition, which can be used to identify various types of closing icons, such as those containing text descriptions, those not containing text descriptions, those containing character icons, etc., and the scope of application can be wider.
[0118] In practical applications, to ensure that the identified close icon is one that functions to close the pop-up window, the code of the pop-up image to be identified can be obtained. The code corresponding to the close icon can then be extracted from the code, and it can be determined whether the code includes the function of closing the pop-up window. If so, it can be confirmed that the pop-up image contains a close control. In practical applications, a key code library can be set up. This key code library can contain key codes contained in the code statements used to close the pop-up window. The code corresponding to the close icon can be compared with the code in this key code library. If the code corresponding to the close icon contains the code from the key code library, it indicates that the close icon has the function of closing the pop-up window.
[0119] Alternatively, a computer can simulate clicking the close icon to determine if it has the function of closing the pop-up. This involves obtaining the code for the pop-up and the page it resides on; the server can then render the page and the pop-up, and simulate a human clicking the close icon.
[0120] Based on the same idea, the embodiments of this specification also provide a method for training the above-mentioned close icon recognition model for recognizing the close icon. Figure 4 This is a flowchart illustrating a training method for a closed identifier recognition model provided in an embodiment of this specification. From a programming perspective, the entity executing the process can be a program hosted on an application server or an application client.
[0121] like Figure 4 As shown, the process may include the following steps:
[0122] Step 402: Obtain training samples; the training samples include images containing a close icon and images not containing a close icon.
[0123] Training samples can be derived from existing pop-up images or from accumulated business pop-up sample data over many years. In practical applications, the close button icon or other forms of close markers in the pop-up can be cropped and extracted as positive samples. Simultaneously, some background areas in the pop-up can be extracted as a control set for negative sample labeling. The labeling can use 0 and 1, where 1 represents a positive sample (i.e., the close button) and 0 represents a negative sample (i.e., the background image of the non-close button). Other labeling methods can also be used; no specific limitations are specified here.
[0124] Step 404: Obtain the neural network model to be trained; the neural network model to be trained includes 4 convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer.
[0125] The neural network model in the embodiments of this specification may contain four convolutional layers. Four convolutional layers are sufficient to extract key features from the image from low to high dimensions.
[0126] Step 406: Train the neural network model to be trained using the training samples to obtain the off flag recognition model.
[0127] In the embodiments of this specification, a close icon recognition model that can accurately identify the close icon in a pop-up image can be obtained by training a neural network model containing four convolutional layers. The model structure does not need to be too complex to ensure recognition efficiency.
[0128] To improve model performance, after obtaining training samples as described above in the embodiments of this specification, the following may also be included:
[0129] The training samples are subjected to data augmentation to obtain augmented training samples; the number of augmented training samples is greater than or equal to the number of training samples.
[0130] The data augmentation process includes at least one of rotation, shearing, flipping, and scaling. In the embodiments of this specification, data augmentation can increase the diversity of training samples. The training samples before and after data augmentation can be used as the training sample set for training the aforementioned model, which is beneficial for improving model performance.
[0131] In the embodiments of this specification, the data in the training set may also be normalized to ensure that the model can converge smoothly in subsequent training. Optionally, the method in the embodiments of this specification may further include: normalizing the training data.
[0132] Common normalization methods include min-max standardization, Z-score standardization, and function transformation. As one implementation method, the normalization processing in the embodiments of this specification may include mean-variance normalization. Normalization does not simply transform the overall numerical values to the 0-1 range, as this would alter the distribution of the original data. Instead, mean-variance normalization (xu / S) can be used, where u is the mean and S is the standard deviation. This eliminates the adverse effects of outlier data and ensures gradient stability throughout training, thereby accelerating model convergence.
[0133] As one implementation, the neural network model to be trained in the embodiments of this specification may include an 11-layer neural network. The aforementioned fourth convolutional layer can be connected to the first fully connected layer through the second pooling layer, the first dropout layer, and the flattening layer. The first fully connected layer can be connected to the second fully connected layer through the second dropout layer.
[0134] The system can be structured as follows: The first layer can be a first convolutional layer with a 3x3 kernel size and 32 kernel types. The input image size can be (80, 80, 1), and the output can be (78, 78, 32), extracting 32 different images. The second layer can be a second convolutional layer with a 3x3 kernel size and 32 kernel types. The input image size can be (78, 78, 32), and the output can be (76, 76, 32). The third layer can be a first pooling layer using max pooling with a pooling window size of 2 and a stride of 2. The input image size can be (76, 76, 32), and the output can be (38, 38, 32). The fourth layer can be a third convolutional layer with a 3x3 kernel size and 64 kernel types. The input image size can be (38, 38, 32), and the output can be (36, 36, 64). The fifth layer can be a fourth convolutional layer: the kernel size can be 3*3, the kernel types can be 64, the input size can be (36, 36, 64), and the output can be (34, 34, 64). The sixth layer can be a second pooling layer: using max pooling, the pooling window can be 2, the stride can be 2, the input size can be (34, 34, 64), and the output can be (17, 17, 64). The seventh layer can be a first dropout layer: randomly selecting 25% of neurons and hiding them, not participating in the weight matrix calculation. The eighth layer can be a flattening layer: flattening the multidimensional input into one dimension, used for the transition from the convolutional layer to the fully connected layer. The input can be (17, 17, 64), and the output can be 18496. The ninth layer can be a first fully connected layer: the input image size can be 18496, and the output can be 128. When calculating the loss, an L2 regularization penalty factor can be added to the network to further prevent overfitting. The tenth layer can be a second dropout layer: it can randomly select 50% of the neurons and hide them, not participating in the calculation of the weight matrix. The eleventh layer can be a second fully connected layer, i.e., the output layer: the input image size can be 128, and the output can be the final result of binary classification. Based on the probability value, i.e., the recognition score mentioned above, it is determined whether it is a close button.
[0135] It is understood that the specific data such as the convolution kernel size, image input and output size can be determined according to actual needs. The above is only an example to illustrate the model structure and principle. The same or similar model structures should all be within the scope of this embodiment.
[0136] During model training, the cross-entropy function can be selected as the loss function, and the model structure and hyperparameters can be adjusted using the Adam optimization algorithm and backpropagation. The model can be comprehensively evaluated using its accuracy and recall; training can be terminated when the evaluation results meet the requirements.
[0137] The network described in the embodiments of this specification has at least the following advantages: First, the network can extract key features from images from low to high dimensions using only 4 layers of convolution. Second, MaxPooling is used to preserve the maximum local features of the image, and the use of a dropout layer with a coefficient of 0.5 in the deep network further reduces the joint adaptability between neurons, making the overall model more generalizable and preventing overfitting during training. Third, the cross-entropy function is selected as the loss function, and the Adam optimization algorithm and backpropagation are used to adjust the model structure and hyperparameters for training, improving the training effect. Fourth, L2 regularization is used in the loss function of the fully connected layer during training, reducing the complexity of the neural network and further preventing overfitting.
[0138] To more clearly illustrate the model training and the method for disabling identifier recognition provided in the embodiments of this specification, Figure 5 This specification provides a flowchart illustrating a method for model training and recognizing a close icon in a pop-up image, as shown in the embodiments below. Figure 5 As shown, the process can include a model training phase and a recognition phase.
[0139] The model training phase may include:
[0140] Step 502: Start training and obtain training samples. Training samples may include the close button image.
[0141] Step 504: Scale the training samples to a preset size, for example, 80*80 pixels. In practical applications, this preset size can be set according to the needs of the network model. After the image is input into the model, it will be converted into a vector or matrix. When the network finally inputs it to the fully connected layer for classification, its input dimension is generally a fixed size. Unifying the input image size to a fixed size facilitates the training of the entire network. For the scenario of recognizing the close icon of the pop-up image in the embodiments of this specification, 80*80 pixels is preferred. This size can better preserve all the features of the entire close button and obtain good model training results.
[0142] Step 506: Perform data augmentation on the acquired training sample data using methods such as rotation, shearing, flipping, and scaling to obtain the training set. Alternatively, the augmented data can be scaled to a preset size.
[0143] Step 508: Normalize the images in the training set to ensure that the model can converge smoothly in subsequent training.
[0144] Step 510: Train the convolutional neural network model using the normalized training data to obtain a close icon recognition model for identifying close icons in pop-up images. The final output layer of the convolutional neural network model can be connected to a classifier to directly output the recognition result. The close icon recognition model mentioned in the embodiments of this specification may include a convolutional neural network model and a classifier.
[0145] like Figure 5 As shown, the specific structure of the convolutional network model can be as described above. `conv` represents a convolutional layer, and the convolutional kernels can all be 3x3 in size. After convolution, the ReLU activation function is used for parameter activation. Max pooling is used during convolution to preserve local maxima. A dropout layer is inserted after the fully connected (Dense) layer in the network to prevent overfitting. The network outputs two classes through a fully connected layer: a final score indicating whether the image represents a close button. Finally, a softmax function is used to determine whether the image represents a close button.
[0146] The identification phase may include:
[0147] Step 512: Obtain the image of the pop-up window to be recognized.
[0148] Step 514: Obtain candidate images by segmenting and stitching the images. Alternatively, a selective search algorithm can be used to process the pop-up image to be identified to obtain candidate images.
[0149] Step 516: Based on preset filtering conditions such as area or area ratio, select the target candidate image set and filter out invalid images.
[0150] Step 518: Input each image from the target candidate image set into the trained closed sign recognition model to obtain the recognition score for each image.
[0151] Step 520: Select the image region with the highest score for output. You can mark the region or output the location information of the region.
[0152] The identification scheme for recognizing the close icon in pop-up images provided in this manual can improve the intelligence level of detecting illegal pop-ups, greatly save the cost of manual inspection, and can be applied to various scenarios such as offline inspection, online investigation, and pre-launch review.
[0153] The solution provided in this specification introduces image algorithms based on deep learning and object detection, overcoming the limitation of existing technologies such as OCR and front-end DOM tree recognition in detecting pop-up close buttons. First, a convolutional neural network is used to extract features and train the close button image, resulting in a high-precision close button classification model. Second, the image to be identified is filtered, or an image selective search algorithm can be used, to segment the page screenshot into multiple candidate regions. Each candidate region is input into the classification model trained by the network model to obtain a score matrix. The candidate region with the highest score is selected as the pop-up close button region as the final result. This solution can not only distinguish whether a page has a pop-up close button or icon, but also output its specific location coordinates, and its detection efficiency is also high.
[0154] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods. Figure 6 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of a device for recognizing the close icon in a pop-up window image. (See diagram below.) Figure 6 As shown, the device may include:
[0155] Image acquisition module 602 is used to acquire the image of the pop-up window to be recognized;
[0156] Image segmentation module 604 is used to segment the pop-up image to be identified to obtain multiple sub-images;
[0157] Image processing module 606 is used to obtain a plurality of candidate images based on the plurality of sub-images; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified;
[0158] The image filtering module 608 is used to filter the plurality of candidate images according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified.
[0159] The image recognition module 610 is used to input each image in the target candidate image set into a pre-trained close sign recognition model to recognize the image containing the close sign.
[0160] The specific methods that each module can execute, as well as other methods that the device can execute, can be found in the descriptions in the embodiments of the above methods, and will not be repeated here.
[0161] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods. Figure 7 The embodiments provided in this specification correspond to Figure 4 A schematic diagram of the structure of a training device for a closed identifier recognition model. (See diagram below.) Figure 7 As shown, the device may include:
[0162] The sample acquisition module 702 is used to acquire training samples; the training samples include images containing a close marker and images not containing a close marker.
[0163] The model acquisition module 704 is used to acquire the neural network model to be trained; the neural network model to be trained includes four convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer.
[0164] The model training module 706 is used to train the neural network model to be trained using the training samples to obtain the off identifier recognition model.
[0165] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.
[0166] Figure 8 This is a schematic diagram illustrating the structure of a device for recognizing a close icon in a pop-up image, or a training device for a close icon recognition model, as provided in an embodiment of this specification. Figure 8 As shown, device 800 may include:
[0167] At least one processor 810; and,
[0168] A memory 830 that is communicatively connected to the at least one processor.
[0169] Among them, corresponding to Figure 2 The method for identifying the close icon in a pop-up image, as shown, includes a memory 830 storing instructions 820 executable by the at least one processor 810. These instructions, when executed by the at least one processor 810, enable the at least one processor 810 to:
[0170] Obtain the image of the pop-up window to be recognized;
[0171] The pop-up image to be identified is segmented to obtain multiple sub-images;
[0172] Based on the multiple sub-images, several candidate images are obtained; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified.
[0173] The candidate images are filtered according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified.
[0174] Each image in the target candidate image set is input into a pre-trained close flag recognition model to identify images containing the close flag.
[0175] Among them, corresponding to Figure 4 The training method for the closed identifier recognition model shown includes a memory 830 storing instructions 820 executable by the at least one processor 810. These instructions, when executed by the at least one processor 810, enable the at least one processor 810 to:
[0176] Obtain training samples; the training samples include images containing a close icon and images not containing a close icon;
[0177] Obtain the neural network model to be trained; the neural network model to be trained includes 4 convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer.
[0178] The neural network model to be trained is trained using the training samples to obtain the off flag recognition model.
[0179] Based on the same approach, embodiments of this specification also provide a computer-readable medium corresponding to the above-described method. The computer-readable medium stores computer-readable instructions, which can be executed by a processor to implement the method for recognizing a close icon in a pop-up image or the training method for a close icon recognition model.
[0180] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 8 As the device shown is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0181] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0182] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0183] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0184] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0185] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0186] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0187] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0188] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0189] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0190] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0191] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0192] It should also be noted that 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. Without further limitation, 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 said element.
[0193] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0194] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0195] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for identifying a close icon in a pop-up image, comprising: Obtain the image of the pop-up window to be recognized; The pop-up image to be identified is segmented to obtain multiple sub-images; The sub-images representing an object are stitched together to obtain several candidate images; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified, wherein the object is text in an independent position, a graphic in an independent position, or an image region divided by color. The candidate images are filtered according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified. Each image in the target candidate image set is input into a pre-trained close flag recognition model to identify images containing close flags.
2. The method according to claim 1, wherein segmenting the pop-up image to be identified to obtain multiple sub-images specifically includes: The image to be identified is segmented using an image segmentation algorithm to obtain multiple sub-images; The image segmentation algorithm includes algorithms that segment images based on similarity.
3. The method according to claim 1, wherein stitching together the sub-images representing an object to obtain a plurality of candidate images specifically includes: For each of the multiple sub-images, calculate the similarity between adjacent sub-images; Adjacent sub-images that meet the preset similarity criteria are stitched together to obtain candidate images.
4. The method according to claim 3, wherein stitching together the sub-images representing an object to obtain a plurality of candidate images specifically includes: For one of the plurality of sub-images, calculate the first similarity between the sub-image adjacent to the one sub-image and the one sub-image; The first candidate image is obtained by concatenating the first sub-image with the sub-image that has the highest similarity to the first sub-image.
5. The method according to claim 1, wherein the candidate images include a plurality of images of different sizes.
6. The method according to claim 1, wherein filtering the plurality of candidate images according to preset filtering conditions to obtain a target candidate image set containing candidate images that satisfy the preset filtering conditions specifically includes: Determine the area of each candidate image among the plurality of candidate images; Determine whether the area of each candidate image is less than or equal to a first preset threshold; Candidate images with an area less than or equal to a first preset threshold are identified as images in the target candidate image set.
7. The method according to claim 1, wherein filtering the plurality of candidate images according to preset filtering conditions to obtain a target candidate image set containing candidate images that satisfy the preset filtering conditions specifically includes: Determine the area of each candidate image among the plurality of candidate images; Determine the area of the pop-up image to be identified; Based on the area of each candidate image and the area of the pop-up image to be identified, the area ratio of each candidate image is determined. Determine whether the area ratio of each candidate image is less than or equal to the second preset threshold; Candidate images whose area percentage is less than or equal to a second preset threshold are determined as images in the target candidate image set.
8. The method according to claim 1, wherein the target candidate image set comprises one or more images; The step of inputting each image in the target candidate image set into a pre-trained close marker recognition model to identify images containing the close marker specifically includes: Each image is input into the pre-trained closed sign recognition model to obtain the recognition score for each image. The recognition score is used to represent the probability that an image contains a closed icon; The image with the highest recognition score is identified as the image containing the closed icon.
9. The method according to claim 1, further comprising: Determine the location information of the image containing the close icon within the pop-up image to be identified.
10. A method for training a closed-signature recognition model, comprising: Obtain training samples; The training samples include images containing a close icon and images not containing a close icon; Obtain the neural network model to be trained; the neural network model to be trained includes 4 convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer. The neural network model to be trained is trained using the training samples to obtain a close icon recognition model. The close icon recognition model is used to identify images containing close icons in a target candidate image set. The target candidate image set is a set of candidate images that meet the preset screening conditions after filtering several candidate images according to preset screening conditions. The preset screening conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold. The area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be recognized. The candidate image is obtained by stitching together various sub-images representing an object. One candidate image corresponds to one object in the pop-up image to be recognized. The object is text in an independent position, a graphic in an independent position, or an image region divided by color. The sub-image is obtained by segmenting the pop-up image to be recognized.
11. The method according to claim 10, further comprising, after obtaining the training samples: The training samples are subjected to data augmentation to obtain augmented training samples; The number of enhanced training samples is greater than or equal to the number of training samples.
12. The method according to claim 11, wherein the data augmentation processing includes at least one of rotation, shearing, flipping, and scaling.
13. The method according to claim 10, further comprising, after obtaining the training samples: The training samples are normalized.
14. The method according to claim 13, wherein the normalization process includes a mean-variance normalization process.
15. The method according to claim 10, wherein the neural network model to be trained comprises an 11-layer neural network, wherein the fourth convolutional layer is connected to the first fully connected layer through a second pooling layer, a first dropout layer and a flattening layer, and the first fully connected layer is connected to the second fully connected layer through a second dropout layer.
16. An apparatus for identifying a close icon in a pop-up image, comprising: The image acquisition module is used to acquire the image of the pop-up window to be recognized; The image segmentation module is used to segment the pop-up image to be identified into multiple sub-images; The image processing module stitches together the sub-images representing an object to obtain several candidate images; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified, wherein the object is text in an independent location, a graphic in an independent location, or an image region divided by color. An image filtering module is used to filter the plurality of candidate images according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified. The image recognition module is used to input each image in the target candidate image set into a pre-trained close sign recognition model to identify the image containing the close sign.
17. A training apparatus for a closed-identity recognition model, comprising: The sample acquisition module is used to acquire training samples; The training samples include images containing a close icon and images not containing a close icon; The model acquisition module is used to acquire the neural network model to be trained; the neural network model to be trained includes four convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer. The model training module is used to train the neural network model to be trained using the training samples to obtain a close icon recognition model. The close icon recognition model is used to identify images containing close icons in a target candidate image set. The target candidate image set is a set of candidate images that meet the preset screening conditions after filtering several candidate images according to preset screening conditions. The preset screening conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold. The area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be recognized. The candidate image is obtained by stitching together various sub-images representing an object. One candidate image corresponds to one object in the pop-up image to be recognized. The object is text in an independent position, a graphic in an independent position, or an image region divided by color. The sub-image is obtained by segmenting the pop-up image to be recognized.
18. A device for recognizing a close icon in a pop-up image, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Obtain the image of the pop-up window to be recognized; The pop-up image to be identified is segmented to obtain multiple sub-images; The sub-images representing an object are stitched together to obtain several candidate images; each candidate image includes at least two of the sub-images; each candidate image corresponds to an object in the pop-up image to be identified, wherein the object is text in an independent position, a graphic in an independent position, or an image region divided by color. The candidate images are filtered according to preset filtering conditions to obtain a target candidate image set containing candidate images that meet the preset filtering conditions; the preset filtering conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold; the area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be identified. Each image in the target candidate image set is input into a pre-trained close flag recognition model to identify images containing the close flag.
19. A training device for a closed identifier recognition model, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Obtain training samples; the training samples include images containing a close icon and images not containing a close icon; Obtain the neural network model to be trained; the neural network model to be trained includes 4 convolutional layers, wherein the first convolutional layer and the second convolutional layer are connected, the third convolutional layer and the fourth convolutional layer are connected, and the second convolutional layer and the third convolutional layer are connected through the first pooling layer. The neural network model to be trained is trained using the training samples to obtain a close icon recognition model. The close icon recognition model is used to identify images containing close icons in a target candidate image set. The target candidate image set is a set of candidate images that meet the preset screening conditions after filtering several candidate images according to preset screening conditions. The preset screening conditions include an area less than or equal to a first preset threshold, or an area percentage value less than or equal to a second preset threshold. The area percentage value is used to represent the area percentage of the candidate image in the pop-up image to be recognized. The candidate image is obtained by stitching together various sub-images representing an object. One candidate image corresponds to one object in the pop-up image to be recognized. The object is text in an independent position, a graphic in an independent position, or an image region divided by color. The sub-image is obtained by segmenting the pop-up image to be recognized.
20. A computer-readable medium having stored thereon computer-readable instructions that can be executed by a processor to implement the method for recognizing a close icon in a pop-up image as described in any one of claims 1 to 9, or the method for training a close icon recognition model as described in any one of claims 10 to 15.
21. A computer program product, characterized in that, The method includes computer instructions that, when executed by a processor, implement the method for recognizing a close icon in a pop-up image as described in any one of claims 1 to 9, or the method for training a close icon recognition model as described in any one of claims 10 to 15.