Automatic detection method and related device for misleading icons of application programs
By obtaining icons and text attributes in APK files, obtaining icon categories and calculating similarity, and automatically detecting misleading icons in applications, solving the problem of time-consuming and labor-intensive detection of detection processes in the prior art, improving detection accuracy and efficiency .
Patent Information
- Application Number
- CN202310826895.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-07-06
AI Technical Summary
The lack of methods in the prior art to automatically detect misleading icons in applications makes the detection process time-consuming and laborious, affecting the user experience and the ratings and downloads of the application.
By obtaining the target icon and text attributes in the APK file, obtaining the icon category, and calculating the similarity between the intent set and the text attributes. If the similarity is less than the preset threshold, the icon is determined to be a misleading icon.
It realizes the ability to automatically detect misleading icons, saves developers' time and energy, improves detection accuracy, and solves the time and effort of manual detection.
Smart Images

Figure CN117194993B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of icon detection, and in particular to an automatic detection method for misleading icons of an application program and related equipment. Background Art
[0002] Smartphones play an important role in our daily lives. People can access a variety of services through various applications in their smartphones. Graphical User Interface (GUI) is the bridge between applications and users. A well-designed GUI can make applications more attractive and usable, which helps increase the downloads and usage of applications. As an important part of GUI, UI widgets (such as buttons) are ubiquitous and provide users with a convenient way to interact with applications.
[0003] In the prior art, many UI widgets use icons to intuitively convey their functions. These widgets are referred to as icon widgets in previous literature. Well-designed icons can accurately convey the functions of the corresponding widgets to users, while poorly designed icons may confuse users and even mislead them to perform incorrect operations. Surveys have found that misleading icons are currently prevalent in smartphone applications. According to a survey of 9075 icons in 1111 top-ranked Android applications in 32 different application categories on Google Play, 28% (312 / 1111) of the applications contain at least one misleading icon. Such misleading icons may lead to poor user experience, which in turn affects the ratings and downloads of the application.
[0004] In practice, detecting these icons is not an easy task. Developers are required to carefully check each icon widget in their application or analyze user feedback to find potential problems, which is a time-consuming and laborious process, especially when the application contains a large number of icon widgets or user reviews. Therefore, there is an urgent need for a method to automatically detect misleading icons to assist developers or application companies in detecting and identifying these misleading icons.
[0005] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0006] In view of the above-mentioned defects of the prior art, an automatic detection method and related equipment for misleading icons in applications are provided, aiming to solve the problem that there is no automatic detection method for misleading icons in applications in the prior art, and the detection process can only be time-consuming and laborious through manual detection.
[0007] A first aspect of the present invention provides a method for automatically detecting misleading icons of an application program, comprising:
[0008] Acquire a target file, and extract a target icon and a target text attribute from the target file, wherein the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon;
[0009] Obtaining the target category corresponding to the target icon;
[0010] Acquire a target intent set according to the target category, wherein the target intent set is a set of intent terms corresponding to the target category;
[0011] The similarity between the target intent set and the target text attribute is calculated, and if the similarity is less than a preset threshold, a determination result of outputting the target icon is a misleading icon.
[0012] The automatic detection method of misleading application icons, wherein the target icon is a graphic in the target file that meets the first target condition;
[0013] Wherein, the first target condition is:
[0014] The target icon is visible to the user, an area occupied by the target icon is less than 5% of a total screen area, and an aspect ratio of the target icon is greater than 0.75.
[0015] The method for automatically detecting misleading icons of an application, wherein the target text attribute includes a first target text, a second target text and a third target text, wherein the first target text is a content description of the target icon, the second target text is an identifier of the target icon, and the third target text is text in the target file surrounding the target icon that meets the second target condition.
[0016] In the method for automatically detecting misleading application icons, the step of obtaining the target category corresponding to the target icon includes:
[0017] Preprocessing the target icon to obtain a first image;
[0018] The first image is input into a target classification model to obtain the target category, where the target category includes an unknown category.
[0019] The method for automatically detecting misleading application icons, wherein the step of obtaining a target intent set according to the target category includes:
[0020] If the target category is the unknown category, outputting a determination result of the target icon as a non-misleading icon;
[0021] If the target category is not the unknown category, a target intent set is obtained according to the target category.
[0022] The method for automatically detecting misleading application icons, wherein the calculating the similarity between the target intent set and the target text attribute comprises:
[0023] Respectively calculating similarities between the first target text, the second target text and the third target text and the target intent set to obtain a first target similarity, a second target similarity and a third target similarity;
[0024] The highest value among the first target similarity, the second target similarity and the third target similarity is output as the similarity between the target intent set and the target text attribute.
[0025] The method for automatically detecting misleading icons of an application program, wherein the similarity calculation of the first target text, the second target text, and the third target text with the target intent set is performed to obtain the first target similarity, the second target similarity, and the third target similarity, including:
[0026] Calculate the cosine similarity between the first target text and each intent in the target intent set to obtain multiple first similarities, and output the first similarity with the highest value as the first target similarity;
[0027] Calculate the cosine similarity between the second target text and each intent in the target intent set to obtain multiple second similarities, and output the second similarity with the highest value as the second target similarity;
[0028] The cosine similarity between the third target text and each intent in the target intent set is calculated to obtain multiple third similarities, and the third similarity with the highest value is output as the third target similarity.
[0029] A second aspect of the present invention provides an automatic detection device for misleading application icons, comprising:
[0030] A file receiving module, the file receiving module is used to obtain a target file, extract a target icon and a target text attribute in the target file, the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon;
[0031] A classification module, the classification module is used to obtain the target category corresponding to the target icon;
[0032] An intention acquisition module, the intention acquisition module is used to acquire a target intention set according to the target category, the target intention set is a set of intention terms corresponding to the target category;
[0033] A determination module is used to calculate the similarity between the target intent set and the target text attribute. If the similarity is less than a preset threshold, the determination result of the target icon is output as a misleading icon.
[0034] According to a third aspect of the present invention, a terminal is provided, comprising: a processor, a storage medium communicatively connected to the processor, the storage medium being suitable for storing a plurality of instructions, and the processor being suitable for calling the instructions in the storage medium to execute the steps of the method for automatically detecting misleading application icons as described in any one of the above items.
[0035] A fourth aspect of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for automatically detecting misleading application icons as described in any of the above items.
[0036] Beneficial effect: Compared with the prior art, the present invention provides an automatic detection method for misleading icons of applications and related equipment. In the automatic detection method for misleading icons of applications provided by the present invention, by obtaining a target file, extracting a target icon and a target text attribute in the target file, wherein the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon, then obtaining a target category corresponding to the target icon, obtaining a target intent set according to the target category, and the target intent set is a set of intent terms corresponding to the target category, and finally calculating the similarity between the target intent set and the target text attribute. If the similarity is less than a preset threshold, the judgment result of the target icon is output as a misleading icon. The misleading icons in the APK file can be automatically detected, thus saving the time and energy of developers in finding misleading icons, and the accuracy is higher and more convenient, which solves the problem that there is no method for automatically detecting misleading icons in applications in the prior art, and the detection process can only be time-consuming and laborious through manual detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of an embodiment of a method for automatically detecting misleading application icons provided by the present invention;
[0038] Figure 2 A flowchart of an embodiment of the method for automatically detecting misleading application icons provided by the present invention;
[0039] Figure 3 A classification flow chart in an embodiment of the method for automatically detecting misleading application icons provided by the present invention;
[0040] Figure 4A flowchart of constructing an intention map in an embodiment of a method for automatically detecting misleading icons of an application provided by the present invention;
[0041] Figure 5 A schematic diagram of the structure of an embodiment of an automatic detection device for misleading application icons provided by the present invention;
[0042] Figure 6 A structural principle diagram of an embodiment of a terminal provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0045] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0046] Embodiment 1
[0047] The method for automatically detecting misleading application icons provided in this embodiment may be executed by a terminal, which may be, but is not limited to, a smart phone, a computer, etc. The following description will be made using a smart phone as an example. Figure 1 As shown, the method for automatically detecting misleading application icons provided in this embodiment includes the following steps:
[0048] In this embodiment, a method for automatically detecting misleading icons of application programs is provided. Figure 1 As shown, the method for automatically detecting misleading application icons provided by the present invention comprises the following steps:
[0049] S100: Acquire a target file, and extract a target icon and a target text attribute in the target file, wherein the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon.
[0050] In this embodiment, the terminal is equipped with an automatic detection tool for misleading application icons, and the automatic detection tool for misleading application icons is an IconSeer tool. In more embodiments, the automatic detection method for misleading application icons can be applied to more tool software or terminals. The input of the IconSeer tool is the APK file to be tested, and the automatic detection method for misleading application icons provided in this embodiment is used to automatically detect misleading icons, and then a misleading icon detection report is output.
[0051] Specifically, the workflow of the IconSeer tool is as follows: Figure 2 As shown, after receiving the APK file, the icons in the APK file and their corresponding text attributes are extracted, and then icon classification, icon-intent mapping retrieval and text difference detection are performed.
[0052] This embodiment takes the target icon in the target file as an example for explanation. First, the target file is obtained, and the target icon and the corresponding target text attribute in the target file are extracted. Specifically, the target icon is a graphic in the target file that meets the first target condition;
[0053] Wherein, the first target condition is:
[0054] The target icon is visible to the user, an area occupied by the target icon is less than 5% of a total screen area, and an aspect ratio of the target icon is greater than 0.75.
[0055] In this embodiment, images in the APK file that meet the following conditions are defined as icons: (1) visible to the user; (2) occupying an area less than 5% of the total screen area; (3) having an aspect ratio greater than 0.75. In other words, an image in the target file can be considered an icon if it is visible to the user, occupies an area less than 5% of the total screen area, and has an aspect ratio greater than 0.75.
[0056] Specifically, the target text attributes include a first target text, a second target text and a third target text, wherein the first target text is a content description of the target icon, the second target text is an identifier of the target icon, and the third target text is text in the target file surrounding the target icon that meets the second target condition.
[0057] Wherein, the second target condition is:
[0058] The third target text is a sibling component of the target icon, and the center point of the third target text is within a first threshold range of the horizontal line or vertical line of the target icon, and the vertical or vertical distance between the third target text and the target icon is less than a second threshold, and the third target text is not a subcomponent of the toolbar component.
[0059] Specifically, the first target text is the content description of the target icon, which refers to the value of the content_description attribute of the target icon. The developer provides the function of the icon widget by setting this value. The second target text is the identifier of the target icon, which refers to the id attribute of the target icon. The developer provides the icon widget with an identifier related to the function by setting the value of this attribute. The third target text is the text around the target icon that meets the second target condition, which is a text annotation provided by the developer around the icon widget to facilitate user interaction. In this embodiment, the third target text is obtained by extracting the value of the text component that satisfies the second target condition, wherein the second target condition specifically includes: (1) the third target text is a sibling component of the target icon widget in the GUI hierarchy; (2) the third target text is on a horizontal or vertical line with the target icon and the horizontal or vertical coordinate difference between the center point of the target icon and the center point of the text component is less than the first threshold. In this embodiment, the first threshold is 20 pixels; (3) the third target text is close to the target icon, and the horizontal or vertical coordinate difference between the boundary of the target icon and the boundary of the third target text is less than the second threshold. In this embodiment, the second threshold is 200 pixels; (4) the third target text is not a subcomponent of the Toolbar component.
[0060] According to the first target condition and the second target condition, <target icon, target text attribute> pairs are extracted from the target file. Specifically, the IconSeer tool uses the lightweight operation generator DroidBot to automatically explore the application corresponding to the target file, and the time is set to half an hour. During the exploration process, the IconSeer tool saves screenshots of the program running and their corresponding GUI hierarchy. Then, the IconSeer tool extracts <target icon, target text attribute> pairs from the screenshots and GUI hierarchy according to the first target condition and the second target condition. Each <target icon, target text attribute> pair is represented as<icon,content_description,id,icon-surrounding-text> A quadruple, where icon is the target icon, content_description is the first target text, id is the second target text, and icon-surrounding-text is the third target text. Each quadruple contains at least one non-empty text attribute. If the three text attributes are the same and the structural similarity index (SSIM) of the two icons is greater than 0.9, the two quadruple are considered to be the same quadruple.
[0061] After extracting the target icon and the target text attribute corresponding thereto, the method further comprises the following steps:
[0062] S200: Obtain a target category corresponding to the target icon.
[0063] The obtaining the target category corresponding to the target icon includes:
[0064] S210, preprocessing the target icon to obtain a first image;
[0065] S220: Input the first image into a target classification model to obtain the target category, where the target category includes an unknown category.
[0066] Specifically, refer to Figure 3 After the IconSeer tool extracts the target icon and the corresponding target text attribute, it will classify the target icon to obtain the target category corresponding to the target icon.
[0067] The acquiring the target category corresponding to the target icon includes preprocessing the target icon to obtain a first image.
[0068] The preprocessing of the target icon includes:
[0069] Adjust the size of the target icon to 64*64 pixels;
[0070] Convert the target icon into a grayscale image to eliminate the influence of color;
[0071] An edge detection algorithm is used to enhance the edge of the target icon to obtain a first image.
[0072] In this embodiment, the edge detection algorithm is Canny edge detection, and the values of the parameters minVal and maxVal are set to 10 and 40 respectively.
[0073] After obtaining the first image, the first image is input into a target classification model to obtain the target category, where the target category includes an unknown category.
[0074] The target classification model contains a target dataset. The target dataset is a closed-set icon classifier trained from a manually labeled target dataset, which contains 57,794 icons from 179 categories. Specifically, the DenseNet161 model is fine-tuned, its classification layer is replaced with a custom head model, and the reconstructed model is trained on the target dataset. The custom head model contains three fully connected layers: Linear(numFeatures, 512), Linear(512, 256), and Linear(256, 179). The two numbers in brackets represent the input and output dimensions of the layer, and numFeatures is the same as the input dimension of the original classification layer of the model. During training, the main weights of the original model are frozen, that is, only the weights of the three custom linear layers are trained on the dataset. Epochs is set to 50 and BatchSize is set to 64. Then, Adam is selected as the optimizer and the learning rate is set to 0.001. Finally, the output of the fully connected layer (the second to last layer) of the DenseNet161 model is sent to the OpenMax layer, which aims to adjust the activation vector (AV) to avoid assigning high confidence to a category when processing "unknown" images. Finally, the output of the OpenMax layer is sent to the SoftMax layer to generate probabilities for each category (including the "unknown" category). In other words, when the target icon does not belong to the same category as the icons in the target dataset, it is output as an unknown category.
[0075] S300. Obtain a target intent set according to the target category, where the target intent set is a set of intent terms corresponding to the target category.
[0076] The acquiring the target intention set according to the target category includes:
[0077] S310: If the target category is the unknown category, outputting a determination result of the target icon as a non-misleading icon;
[0078] S320: If the target category is not the unknown category, obtaining a target intent set according to the target category.
[0079] Specifically, if the target category is the unknown category, the IconSeer tool will not further detect it but assume that it is a normal icon and directly output the judgment result as a non-misleading icon. If the target category is not the unknown category, after obtaining the target category, the IconSeer tool will obtain the target intent set according to the target category.
[0080] Before obtaining the target intention set according to the target category, the method further includes:
[0081] Build an icon-intent mapping retrieval module.
[0082] Reference Figure 4 ,The construction of the icon-intent mapping retrieval module includes: an application collection phase, an <icon, text attribute> extraction phase, an icon category construction phase and an icon-intent mapping construction phase.
[0083] During the application collection phase, the latest versions of the top 500 applications in 32 categories were crawled from Google Play, and 15,571 applications were downloaded.
[0084] In the <icon, text attribute> extraction stage, static analysis is used to extract <icon-text attribute> pairs from the code (bytecode or Java source code) and resource files of 15,571 applications to collect a comprehensive icon-text pair dataset. However, because the text around the icon is only presented at runtime, and static analysis cannot easily and accurately extract such runtime information, static analysis can only extract two text attributes, namely content_description and id. In this way, 268,353 triples were obtained through static analysis on layout XML files and program codes.<icon,content_description,id> In the icon category construction phase, 10% of the triples were first sampled, and then 179 icon categories were determined on this dataset through open coding. The labels of this small dataset were manually annotated.
[0085] In the icon-intent mapping construction phase, an icon classifier was trained using a small labeled dataset, and the icon classifier was used to classify the overall icon set. Finally, after manual verification of the classification results, 185,980 labeled icon datasets from 179 categories were obtained. Finally, for icons with the same category label in the icon dataset, all their text attributes (including id and content_description) were collected into a set to extract the text description of the icon intent of the corresponding category. For each text attribute in each different category set, it was first converted to lowercase and then tokenized using common text delimiters (such as space, underscore, and camel case). In the resulting word set, the term frequency-inverse document frequency (TF-IDF) was calculated for each word. For each document, terms with a TF-IDF score greater than 0.005 were retained. Finally, after manual inspection and multiple rounds of discussion, 1,425 intents corresponding to 179 categories were obtained. That is to say, in the icon-intent mapping retrieval module, a total of 1425 intents corresponding to 179 categories are provided, so that the IconSeer tool can obtain the corresponding target intent set according to the target category.
[0086] S400, calculating the similarity between the target intent set and the target text attribute, and if it is less than a preset threshold, outputting a determination result of the target icon as a misleading icon.
[0087] The calculating of the similarity between the target intent set and the target text attribute includes:
[0088] S410, respectively calculating similarities between the first target text, the second target text, and the third target text and the target intent set to obtain a first target similarity, a second target similarity, and a third target similarity;
[0089] S420: Output the highest value among the first target similarity, the second target similarity and the third target similarity as the similarity between the target intent set and the target text attribute.
[0090] The respectively calculating similarities between the first target text, the second target text and the third target text and the target intent set to obtain a first target similarity, a second target similarity and a third target similarity includes:
[0091] S411, performing cosine similarity calculation on the first target text and each intent in the target intent set respectively to obtain multiple first similarities, and outputting the first similarity with the highest value as the first target similarity;
[0092] S412, performing cosine similarity calculation on the second target text and each intent in the target intent set respectively to obtain multiple second similarities, and outputting the second similarity with the highest value as the second target similarity;
[0093] S413, performing cosine similarity calculation on the third target text and each intent in the target intent set respectively to obtain multiple third similarities, and outputting the third similarity with the highest value as the third target similarity.
[0094] Specifically, after the IconSeer tool obtains the target intent set corresponding to the target icon, it performs text difference detection and calculates the similarity between the target intent set and the target text attribute to check whether the target icon is consistent with the corresponding target text attribute.
[0095] Specifically, the target intention set is expressed as Figure 1 ,meaning Figure 2 , ..., intention n>, the target text attribute is expressed as<content_description,id,icon-surrounding-text> In this embodiment, it is necessary to judge < Figure 1 ,meaning Figure 2 , ..., intention n> and content_description, id, icon-surrounding-text are inconsistent. When the target intention set is inconsistent with the three text attributes, the report is inconsistent and the target icon is output as a misleading icon. When the target intention set is consistent with any one of the text attributes, it means that the target icon is a non-misleading icon. Since the process of judging whether the intention set and the three text attributes are inconsistent is the same, here we take content_description, that is, the first target text, as an example to summarize the judgment of <intention> Figure 1 ,meaning Figure 2 ,…, the process of determining whether the intention n> is inconsistent with the first target text.
[0096] First, initialize an n-dimensional array [s1, s2, ..., sn] to store the similarity between intent i (i = 1, ..., n) and the first target text. Before calculating the similarity between intent i and the first target text, preprocess intent i and the first target text. The preprocessing includes four steps: use nltk to remove punctuation, use wordninja to segment words, convert words to lowercase, and use nltk to restore words. That is to say, before calculating the cosine similarity between the first target text and each intent in the target intent set, it also includes preprocessing the first target text and each intent in the target intent set.
[0097] For the i-th intent after preprocessing, if the first target text after preprocessing completely contains intent i, si is assigned a value of 1; if not, the word vectors trained by pre-trained Glove on Wikipedia2014 and Gigaword5 data are used to encode intent i and the first target text, and then the cosine similarity between the two text vectors is calculated and assigned to si. Figure 1 ,meaning Figure 2 , ..., intention n> and the first target text> the first similarity sim is Max(s1, s2, ..., sn). If sim is less than the preset threshold agreed in advance, the determination result of the target icon is output as a misleading icon. In this embodiment, the preset threshold is 0.9. That is, in this embodiment, if sim<0.9, it is considered that <intention n> is a misleading icon. Figure 1 ,meaning Figure 2 , …, intention n> is inconsistent with the first target text. If the sims corresponding to the three text attributes and the target intention set are all less than 0.9, the determination result of the target icon output is a misleading icon; conversely, if one of the three text attributes has a sim≥0.9, they are considered to be consistent. At this time, the determination result of the target icon output is a non-misleading icon.
[0098] In summary, this embodiment provides a method for automatically detecting misleading icons of applications, by obtaining a target file, extracting a target icon and a target text attribute in the target file, wherein the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon, and then obtaining a target category corresponding to the target icon, and obtaining a target intent set according to the target category, wherein the target intent set is a set of intent terms corresponding to the target category, and finally calculating the similarity between the target intent set and the target text attribute, and if it is less than a preset threshold, the target icon is determined to be a misleading icon. The method for automatically detecting misleading icons of applications provided by this embodiment can automatically detect misleading icons in APK files, thus saving developers time and energy in finding misleading icons, and having higher accuracy and convenience, which solves the problem that there is no method in the prior art for automatically detecting misleading icons in applications, and the detection process can only be time-consuming and laborious through manual detection.
[0099] It should be understood that, although the various steps in the flowcharts given in the accompanying drawings of the present invention are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of the steps in the present invention is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps of the present invention may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0101] Embodiment 2
[0102] Based on the above embodiments, the present invention further provides an automatic detection device for misleading application icons, the functional module diagram of which is shown in FIG. Figure 5 As shown, the automatic detection means of the misleading icon of the application include:
[0103] A file receiving module, the file receiving module is used to obtain a target file, extract a target icon and a target text attribute in the target file, the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon, as described in the first embodiment;
[0104] A classification module, the classification module is used to obtain the target category corresponding to the target icon, as described in the first embodiment;
[0105] An intention acquisition module, the intention acquisition module is used to acquire a target intention set according to the target category, the target intention set is a set of intention terms corresponding to the target category, as described in the first embodiment;
[0106] A determination module is used to calculate the similarity between the target intent set and the target text attribute. If the similarity is less than a preset threshold, the determination result of the target icon is output as a misleading icon.
[0107] Embodiment 3
[0108] Based on the automatic detection method of misleading application icons described in the first embodiment, the present invention also provides a terminal, whose principle block diagram can be as follows: Figure 6 The terminal includes a memory 20 and a processor 10. The memory 20 stores an automatic detection program for misleading application icons. When the processor 10 executes the computer program, it can at least implement the following steps:
[0109] Acquire a target file, and extract a target icon and a target text attribute from the target file, wherein the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon;
[0110] Obtaining the target category corresponding to the target icon;
[0111] Acquire a target intent set according to the target category, wherein the target intent set is a set of intent terms corresponding to the target category;
[0112] The similarity between the target intent set and the target text attribute is calculated, and if the similarity is less than a preset threshold, a determination result of outputting the target icon is a misleading icon.
[0113] Wherein, the target icon is a graphic in the target file that meets the first target condition;
[0114] Wherein, the first target condition is:
[0115] The target icon is visible to the user, an area occupied by the target icon is less than 5% of a total screen area, and an aspect ratio of the target icon is greater than 0.75.
[0116] Among them, the target text attributes include a first target text, a second target text and a third target text, wherein the first target text is a content description of the target icon, the second target text is an identifier of the target icon, and the third target text is text in the target file surrounding the target icon that meets the second target condition.
[0117] Wherein, obtaining the target category corresponding to the target icon includes:
[0118] Preprocessing the target icon to obtain a first image;
[0119] The first image is input into a target classification model to obtain the target category, where the target category includes an unknown category.
[0120] Wherein, obtaining a target intention set according to the target category includes:
[0121] If the target category is the unknown category, outputting a determination result of the target icon as a non-misleading icon;
[0122] If the target category is not the unknown category, a target intent set is obtained according to the target category.
[0123] The calculating of the similarity between the target intent set and the target text attribute includes:
[0124] Respectively calculating similarities between the first target text, the second target text and the third target text and the target intent set to obtain a first target similarity, a second target similarity and a third target similarity;
[0125] The highest value among the first target similarity, the second target similarity and the third target similarity is output as the similarity between the target intent set and the target text attribute.
[0126] The step of respectively calculating similarities between the first target text, the second target text and the third target text and the target intent set to obtain a first target similarity, a second target similarity and a third target similarity includes:
[0127] Calculate the cosine similarity between the first target text and each intent in the target intent set to obtain multiple first similarities, and output the first similarity with the highest value as the first target similarity;
[0128] Calculate the cosine similarity between the second target text and each intent in the target intent set to obtain multiple second similarities, and output the second similarity with the highest value as the second target similarity;
[0129] The cosine similarity between the third target text and each intent in the target intent set is calculated to obtain multiple third similarities, and the third similarity with the highest value is output as the third target similarity.
[0130] Embodiment 4
[0131] The present invention also provides a storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the method for automatically detecting misleading application icons described in the above embodiment.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automatic detection method for misleading application icons, It is characterized in that include: Acquire a target file, and extract a target icon and a target text attribute from the target file, wherein the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon; Obtaining the target category corresponding to the target icon; Acquire a target intent set according to the target category, wherein the target intent set is a set of intent terms corresponding to the target category; Calculating the similarity between the target intent set and the target text attribute, and if the similarity is less than a preset threshold, outputting a determination result of the target icon as a misleading icon; The target icon is a graphic in the target file that meets the first target condition; Wherein, the first target condition is: The target icon is visible to the user, the area occupied by the target icon is less than 5% of the total screen area, and the aspect ratio of the target icon is greater than 0.75; The target text attributes include a first target text, a second target text and a third target text, wherein the first target text is a content description of the target icon, the second target text is an identifier of the target icon, and the third target text is text in the target file surrounding the target icon that meets a second target condition.
2. The method for automatically detecting misleading application icons according to claim 1, It is characterized in that The obtaining the target category corresponding to the target icon includes: Preprocessing the target icon to obtain a first image; The first image is input into a target classification model to obtain the target category, where the target category includes an unknown category.
3. The automatic detection method for misleading application icons according to claim 2, It is characterized in that The acquiring the target intention set according to the target category includes: If the target category is the unknown category, outputting a determination result of the target icon as a non-misleading icon; If the target category is not the unknown category, a target intent set is obtained according to the target category.
4. The method for automatically detecting misleading application icons according to claim 1, It is characterized in that The calculating the similarity between the target intent set and the target text attribute includes: Respectively calculating similarities between the first target text, the second target text and the third target text and the target intent set to obtain a first target similarity, a second target similarity and a third target similarity; The highest value among the first target similarity, the second target similarity and the third target similarity is output as the similarity between the target intent set and the target text attribute.
5. The method for automatically detecting misleading application icons according to claim 4, It is characterized in that The respectively calculating similarities between the first target text, the second target text and the third target text and the target intent set to obtain a first target similarity, a second target similarity and a third target similarity includes: Calculate the cosine similarity between the first target text and each intent in the target intent set to obtain multiple first similarities, and output the first similarity with the highest value as the first target similarity; Calculate the cosine similarity between the second target text and each intent in the target intent set to obtain multiple second similarities, and output the second similarity with the highest value as the second target similarity; The cosine similarity between the third target text and each intent in the target intent set is calculated to obtain multiple third similarities, and the third similarity with the highest value is output as the third target similarity.
6. An automatic detection device for misleading icons of applications, It is characterized in that The device comprises: A file receiving module, the file receiving module is used to obtain a target file, extract a target icon and a target text attribute in the target file, the target file is an APK file, and the target text attribute is a set of text descriptions corresponding to the target icon; A classification module, the classification module is used to obtain the target category corresponding to the target icon; An intention acquisition module, the intention acquisition module is used to acquire a target intention set according to the target category, the target intention set is a set of intention terms corresponding to the target category; A determination module, the determination module is used to calculate the similarity between the target intent set and the target text attribute, and if the similarity is less than a preset threshold, outputting a determination result of the target icon as a misleading icon; The target icon is a graphic in the target file that meets the first target condition; Wherein, the first target condition is: The target icon is visible to the user, the area occupied by the target icon is less than 5% of the total screen area, and the aspect ratio of the target icon is greater than 0.75; The target text attributes include a first target text, a second target text and a third target text, wherein the first target text is a content description of the target icon, the second target text is an identifier of the target icon, and the third target text is text in the target file surrounding the target icon that meets a second target condition.
7. A terminal, It is characterized in that The terminal includes: a processor, a storage medium communicatively connected to the processor, the storage medium being suitable for storing a plurality of instructions, and the processor being suitable for calling the instructions in the storage medium to execute the steps of the method for automatically detecting misleading application icons as described in any one of claims 1 to 5 above.
8. A storage medium, It is characterized in that The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for automatically detecting misleading application icons as described in any one of claims 1-5.
