Method and system for detecting gambling APP and storage medium
By combining the similarity matching algorithm and the target detection model, the static and text features of the APP are extracted, which solves the problem of difficulty in detecting gambling APPs with existing technology and achieves accurate identification and detection of gambling APPs.
Patent Information
- Application Number
- CN202111514446.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-12-10
AI Technical Summary
The existing technology for detecting gambling websites is mainly based on web page text classification, which makes it difficult to effectively detect gambling APPs. Especially because most gambling APPs use the same framework as game development, making classification and detection difficult.
Use a similarity matching algorithm to calculate the similarity between the static features of the APP and the black library features, dynamically install and run the APK, use the YOLO target detection model and customized text classification model after small target optimization, extract the image matrix and text features, and fuse the features to calculate the suspected Probability to determine whether the APP is a gambling APP.
It achieves accurate identification and detection of gambling APPs, improves detection efficiency and accuracy, and overcomes the shortcomings of existing technologies that are difficult to directly classify and detect gambling APPs.
Smart Images

Figure CN114186231B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of security, and more specifically to a method and system for detecting gambling applications (APPs). Background Art
[0002] With the rapid development of Internet technology, the Internet application market is flooded with a lot of bad information, such as information promoting gambling, pornography, violence, etc. These information seriously pollute the minds of minors and undermine social customs. Existing technologies for detecting gambling websites usually classify based on web page text, and directly classify using deep learning networks through web page screenshots, and there is no better method for detecting gambling apps. Most gambling apps are developed using the same framework as game development, making it difficult to directly classify and detect them.
[0003] In order to overcome the above-mentioned defects, it is necessary to provide an innovative method and system for detecting gambling apps. Summary of the invention
[0004] A brief overview of the disclosure is given below in order to provide a basic understanding of some aspects of the disclosure. However, it should be understood that this overview is not an exhaustive overview of the disclosure. It is not intended to identify the key or important parts of the disclosure, nor is it intended to limit the scope of the disclosure. Its purpose is simply to give some concepts of the disclosure in a simplified form as a prelude to a more detailed description given later.
[0005] According to one aspect of the present disclosure, a method for detecting gambling APPs is provided, comprising: using a similarity matching algorithm to calculate the similarity between static features of an APP to be detected and static features in a black library of application APP features, wherein the static features include at least one of an APP name, a package name, a developer signature, an icon, a smali source code, and strings.xml static features of the APP; when the similarity is greater than a first predetermined threshold, dynamically installing and running an Android application package APK, and obtaining a dynamically loaded APP thumbnail and a home page; extracting an image matrix, and using a target detection model optimized by a small target to target detect gambling elements, and obtaining a gambling element feature vector; obtaining image text, calculating an LDA theme word vector, selecting a classification word vector using a feature selection method, and calculating text features as a text feature vector using a custom text classification model; fusing the gambling element feature vector and the text feature vector, and using a classification model to calculate the suspected probability that the APP to be detected is suspected to be a gambling APP; and comparing the suspected probability with a second predetermined threshold, and when the suspected probability is greater than the second predetermined threshold, determining the APP to be detected to be a gambling APP.
[0006] According to a second aspect of the present disclosure, a system for detecting gambling APPs is provided, including an APP static feature acquisition unit, for acquiring APP static features including at least one of an APP name, a package name, a developer signature, an icon, a smali source code, and strings.xml from a downloaded APP to be detected; an APP static feature matching unit, for comparing the acquired APP features with an APP whitelist library and an APP feature blacklist, respectively, to achieve whitelist filtering and gambling shell APP identification; a screenshot unit, for acquiring dynamically loaded small images and home pages by dynamically installing and running APK; a gambling element feature acquisition unit, for extracting an image matrix, and using a YOLO target detection model optimized by a small target to target detect gambling elements to obtain a gambling element feature vector; a text feature acquisition unit, for calculating an LDA theme word vector by acquiring image text, selecting a classification word vector using a feature selection method, and calculating text features as a text feature vector using a custom text classification model; and a fusion unit, for fusing the gambling element feature vector and the text feature vector, and calculating the suspected probability that the APP to be detected is suspected to be a gambling APP through a classification model to achieve identification of the gambling APP.
[0007] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which includes computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors execute the method according to the above aspects of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0009] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0010] Figure 1 A general schematic diagram of a system for detecting gambling APPs according to an embodiment of the present disclosure is shown;
[0011] Figure 2 A flowchart of a method for detecting a gambling APP according to an embodiment of the present disclosure is shown;
[0012] Figure 3A A flow chart of obtaining a gambling element feature vector by using an optimized YOLO target detection model according to an embodiment of the present disclosure is shown;
[0013] Figure 3B A schematic diagram showing the calculated statistical characteristics of gambling elements;
[0014] Figure 4AA flowchart of obtaining a text feature vector using a custom text classification model according to an embodiment of the present disclosure is shown;
[0015] Figure 4B A schematic diagram showing a custom text classification model according to an embodiment of the present disclosure; and
[0016] Figure 5 An exemplary configuration of a computing device that can implement an embodiment according to the present disclosure is shown. DETAILED DESCRIPTION
[0017] Figure 1 A schematic block diagram of a system 100 for detecting gambling apps according to an embodiment of the present disclosure is shown. The system 100 includes an app static feature acquisition unit 101, an app whitelist library 102, an app feature blacklist 103, an app static feature matching unit 104, a screenshot unit 105, a gambling element feature acquisition unit 106, a text feature acquisition unit 107, and a fusion unit 108, which are interconnected and communicated with each other.
[0018] The APP static feature acquisition unit 101 is used to acquire static features such as APP name, package name, developer signature, icon, smali source code and strings.xml from the downloaded APP to be detected.
[0019] The APP static feature matching unit 104 is used to compare the static features of the acquired APP with the static features in the APP whitelist library 102 and the APP feature blacklist library 103, respectively, to achieve whitelist filtering and gambling shell-changing APP identification.
[0020] The screenshot unit 105 obtains the dynamically loaded thumbnails by dynamically installing and running the Android application package (APK), and captures the login page and the home page after the loading is completed.
[0021] The gambling element feature acquisition unit 106 is used to extract the image matrix, detect the gambling elements such as chips, dice and roulette by using the small target optimized YOLO target detection model to detect the regression loss, and obtain the probability and quantity statistical features of the gambling elements as the gambling element feature vector.
[0022] The text feature acquisition unit 107 acquires the image text through optical character recognition (OCR), calculates the LDA weighted topic word vector, and selects the classification word vector using the feature selection method. The gambling inhibition word, incentive word, and gray word text features are calculated as the text feature vector using the self-attention method and the custom text classification model.
[0023] The fusion unit 108 is used to fuse the gambling element feature vector and the text feature vector, and calculate the probability that the APP to be detected is suspected to be a gambling APP through the classification model, so as to realize the identification of the gambling APP.
[0024] Reference now Figure 2 A flowchart describing a method for detecting a gambling APP according to an embodiment of the present disclosure.
[0025] First, in step S201, a similarity matching algorithm is used to calculate the similarity between the static features of the APP to be detected and the static features in the APP feature black library, wherein the static features of the APP include at least one of the APP name, package name, developer signature, icon, smali source code and strings.xml.
[0026] According to the embodiments of the present disclosure, the original APK file information is extracted by downloading the APP to be detected, including but not limited to APP name, package name, developer signature, smali source code, strings.xml and other APP static features. The smali source code is preprocessed, the smali source code information is extracted using a compression method, and the discrete cosine transform (DCT) multi-bin hashing method is used to obtain the icon features of the APP.
[0027] The similarity between the static features of the APP to be detected and the static features in the APP whitelist library is calculated by using a similarity matching algorithm. If the similarity between the static features in the APP whitelist library and the static features in the APP whitelist library is less than a third predetermined threshold, the APP to be detected is determined to be a normal APP.
[0028] When the similarity between the static features in the APP whitelist library is greater than the third predetermined threshold, the similarity between the static features of the APP to be detected and the static features in the APP feature blacklist is calculated.
[0029] When the similarity between the static features of the APP to be detected and the static features in the APP feature black library is greater than the first predetermined threshold, in step S202, the APK is dynamically installed and run, the dynamically loaded APP thumbnail is obtained, and the login and home pages after loading are captured.
[0030] In step S203, the image matrix is extracted and input into the YOLO target detection model after small target optimization to detect gambling elements and obtain probability and quantity statistical features as gambling element feature vectors. The specific process of using the optimized YOLO target detection model to obtain gambling element feature vectors will be described in detail below. Figure 3A and 3B Provide detailed explanation.
[0031] In step S204, the image text is obtained, the LDA topic word vector is calculated, the classification word vector is selected using the feature selection method, and the text features of the inhibition word, the stimulation word, and the gray word are calculated as the text feature vector using the custom text classification model. The specific process of obtaining the text feature vector using the custom text classification model will be described below in conjunction with Figure 4A and 4B Provide detailed explanation.
[0032] In step S205, the obtained gambling element feature vector and text feature vector are integrated, and the probability that the APP to be detected is suspected to be a gambling APP is calculated using the classification model.
[0033] In step S206, the suspected probability is compared with a second predetermined threshold, and when the suspected probability is greater than the second predetermined threshold, the APP to be detected is determined to be a gambling APP.
[0034] Figure 3A A flowchart of obtaining a gambling element feature vector by using an optimized YOLO target detection model according to an embodiment of the present disclosure is shown.
[0035] In step 301, an image matrix is extracted from the acquired APP thumbnails and home page.
[0036] In step 302, gambling elements such as roulette, chips, balls, poker and dice are detected.
[0037] In step 303, the image matrix is input into the YOLO target detection model after small target optimization. The weighted loss function L after the Yolo model optimization is:
[0038]
[0039] where p i , is the true value and predicted value of each anchor box category; t i , is the deviation between each anchor box and the ground truth; w and h are the width and height of the ground truth; FL(,)(focal loss) is the classification loss function of target detection; L reg is the regression loss, λ and μ are weights, 0≤λ≤1, 0≤μ≤1; c is a constant greater than 0; and N cls is the category of the object to be detected. The addition of penalty items and variable constants for small targets improves the detection effect of small targets.
[0040] In step 304, the statistical features of the gambling elements, including but not limited to the maximum probability, average probability, quantity and other statistical features of the gambling elements roulette, chips, balls, poker and dice, are calculated as the gambling element feature vector, such as Figure 3B shown.
[0041] Figure 4A A flowchart for obtaining a text feature vector using a custom text classification model is shown.
[0042] In step 401, image text is obtained from the obtained APP thumbnail and home page OCR.
[0043] In step 402, the LDA weighted topic word vector is calculated, and the classification word vector is selected using a feature selection method.
[0044] In step 403, the OCRed image text is input into a custom text classification model, and a multi-scale convolution layer is used to construct 1-gram, ..., n-gram multi-text features, and a dynamic maxpooling layer is filtered to obtain multi-text features 1-layer, 3-layer, ..., n-layer. A dropout layer is used for model averaging, and the multi-features are concat into one-dimensional features. A fully connected layer with a Relu activation function is added to calculate the text features of the suppression words, gray words, and excitation words as text feature vectors, such as Figure 4B shown.
[0045] According to the system and method for detecting gambling apps disclosed in the present invention, by obtaining app thumbnails and homepage screenshots, based on the detected gambling elements and text information, an optimized YOLO target detection model and a custom text classification model are used to improve the detection effect for small targets, thereby realizing the detection of gambling apps.
[0046] Figure 5 An exemplary configuration of a computing device 500 capable of implementing embodiments according to the present disclosure is shown.
[0047] The computing device 500 is an example of a hardware device to which the above aspects of the present disclosure can be applied. The computing device 500 can be any machine configured to perform processing and / or calculations. The computing device 500 can be, but is not limited to, a tablet computer, a personal data assistant (PDA), a smart phone, a car computer, or a combination thereof.
[0048] like Figure 5As shown, computing device 500 may include one or more components that may be connected or communicated with bus 502 via one or more interfaces. Bus 502 may include, but is not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, etc. Computing device 500 may include, for example, one or more processors 504, one or more input devices 506, and one or more output devices 508. One or more processors 504 may be any type of processor, and may include, but is not limited to, one or more general-purpose processors or special-purpose processors (such as special-purpose processing chips). Processor 502 may correspond to, for example, Figure 1 The various units of the system for detecting gambling apps in. Input device 506 can be any type of input device capable of inputting information to a computing device, and can include, but is not limited to, a mouse, a keyboard, a touch screen, a microphone, and / or a remote controller. Output device 508 can be any type of device capable of presenting information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer.
[0049] The computing device 500 may also include or be connected to a non-transitory storage device 514, which may be any non-transitory storage device that can implement data storage, and may include, but is not limited to, a disk drive, an optical storage device, a solid-state memory, a floppy disk, a flexible disk, a hard disk, a tape, or any other magnetic medium, a compressed disk or any other optical medium, a cache memory, and / or any other storage chip or module, and / or any other medium from which a computer can read data, instructions, and / or code. The computing device 500 may also include a random access memory (RAM) 510 and a read-only memory (ROM) 512. The ROM 512 may store programs, utilities, or processes to be executed in a non-volatile manner. The RAM 510 may provide volatile data storage and store instructions related to the operation of the computing device 500. The computing device 500 may also include a network / bus interface 516 coupled to a data link 518. The network / bus interface 516 can be any type of device or system capable of enabling communication with external devices and / or networks, and can include but is not limited to modems, network cards, infrared communication devices, wireless communication devices and / or chipsets (such as Bluetooth™ devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication facilities, etc.).
[0050] The present disclosure may be implemented as any combination of an apparatus, a system, an integrated circuit, and a computer program on a non-transitory computer-readable medium. One or more processors may be implemented as an integrated circuit (IC), an application specific integrated circuit (ASIC), or a large scale integrated circuit (LSI), a system LSI, a super LSI, or a super LSI component that performs some or all of the functions described in the present disclosure.
[0051] The present disclosure includes the use of software, applications, computer programs, or algorithms. The software, applications, computer programs, or algorithms may be stored on a non-transitory computer-readable medium to enable a computer such as one or more processors to perform the above steps and the steps described in the accompanying drawings. For example, one or more memories store the software or algorithm in executable instructions, and one or more processors may associate a set of instructions to execute the software or algorithm to provide various functions according to the embodiments described in the present disclosure.
[0052] Software and computer programs (which may also be referred to as programs, software applications, applications, components or code) include machine instructions for a programmable processor and may be implemented in a high-level procedural language, an object-oriented programming language, a functional programming language, a logic programming language, or an assembly language or a machine language. The term "computer-readable medium" refers to any computer program product, apparatus or device for providing machine instructions or data to a programmable data processor, such as magnetic disks, optical disks, solid-state storage devices, memories and programmable logic devices (PLDs), including computer-readable media that receive machine instructions as computer-readable signals.
[0053] For example, computer readable media may include dynamic random access memory (DRAM), random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), compact disk read-only memory (CD-ROM) or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the desired computer readable program code in the form of instructions or data structures and can be accessed by a general or special purpose computer or a general or special purpose processor. As used herein, disk or disc includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically by laser. Combinations of the above are also included in the scope of computer readable media.
[0054] The subject matter of the present disclosure is provided as an example of devices, systems, methods and programs for performing the features described in the present disclosure. However, in addition to the above-mentioned features, other features or variations may also be expected. It is expected that the implementation of the components and functions of the present disclosure may be completed with any emerging technology that may replace any of the above-mentioned implementation technologies.
[0055] In addition, the above description provides examples without limiting the scope, applicability or configuration set forth in the claims. Without departing from the spirit and scope of the present disclosure, the functions and arrangements of the elements discussed may be changed. Various embodiments may appropriately omit, replace or add various processes or components. For example, features described with respect to certain embodiments may be combined in other embodiments.
[0056] In addition, in the description of the present disclosure, the terms “first”, “second”, “third”, etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance and order.
[0057] Similarly, while operations are depicted in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed to achieve desired results. In certain circumstances, multitasking and parallel processing can be advantageous.
Claims
1. A method for detecting a gambling APP, comprising: Using a similarity matching algorithm, calculate the similarity between the static features of the APP to be detected and the static features in the application APP feature black library, wherein the static features include at least one of the APP name, package name, developer signature, icon, smali source code and strings.xml; When the similarity is greater than a first predetermined threshold, dynamically install and run the Android application package APK, and obtain the dynamically loaded APP thumbnail and home page; Extract the image matrix, use the small target optimized target detection model to detect gambling elements, and obtain the gambling element feature vector; Get the image text, calculate the LDA topic word vector, use the feature selection method to select the classification word vector, and use the custom text classification model to calculate the text features as the text feature vector; The gambling element feature vector and the text feature vector are integrated, and the classification model is used to calculate the probability that the APP to be detected is suspected to be a gambling APP; and The suspected probability is compared with the second predetermined threshold, and when the suspected probability is greater than the second predetermined threshold, the APP to be detected is determined to be a gambling APP.
2. The method according to claim 1, wherein obtaining static features of the APP comprises: Extract the original APK file information of the APP to be detected, which includes at least one of the APP name, package name, developer signature, smali source code and strings.xml static features; Preprocess the smali source code and extract the samli source code information using compression methods; and The discrete cosine transform multi-binning hashing method is used to obtain the icon features of the APP.
3. The method according to claim 1 or 2, further comprising: Use the similarity matching algorithm to calculate the similarity between the static features of the APP to be detected and the static features in the APP whitelist library; When the similarity is less than the third predetermined threshold, it is determined that the APP to be detected is a normal APP.
4. The method according to claim 1 or 2, wherein the target detection model optimized by the small target is used to target detect gambling elements, and obtaining the gambling element feature vector comprises: Detecting gambling elements, the gambling elements comprising at least one of a roulette wheel, chips, lottery balls, poker, and dice; The image matrix is input into the YOLO target detection model after small target optimization. The weighted loss function L after Yolo model optimization is: where p i , is the true value and predicted value of each anchor box category, t i , is the deviation between each anchor box and the ground truth, w and h are the width and height of the ground truth, FL(,) is the classification loss function of target detection, and L reg is the regression loss, λ and μ are weights, where 0≤λ≤1, 0≤μ≤1, c is a constant greater than 0, N cls is the category of the object being detected; as well as The maximum probability, average probability and quantitative statistical features of at least one of the gambling elements roulette, chips, colored balls, poker and dice are calculated as the gambling element feature vector.
5. The method according to claim 1 or 2, wherein using a custom text classification model to calculate a text feature vector comprises: Calculate the LDA weighted topic word vector and use the feature selection method to select the classification word vector; The image text after optical symbol recognition is input into the custom text classification model, and a multi-scale convolutional layer is used to construct 1-gram, ..., n-gram multi-text features; Perform dynamic maxpooling layer filtering to obtain multi-layer text features 1-layer, 3-layer, ..., n-layer; Use the dropout layer to perform model averaging, concat the multivariate features into one-dimensional features, and add a fully connected layer with the Relu activation function; as well as Calculate the text features of suppression words, gray words, and stimulation words as text feature vectors.
6. A system for detecting gambling apps, comprising: An APP static feature acquisition unit (101), used to acquire APP static features including at least one of APP name, package name, developer signature, icon, smali source code and strings.xml from the downloaded APP to be detected; An APP static feature matching unit (104), used to compare the acquired APP features with the APP whitelist library (102) and the APP feature blacklist library (103) respectively to achieve whitelist filtering and gambling shell-changing APP identification; A screenshot unit (105), used to obtain dynamically loaded thumbnails and home pages by dynamically installing and running the APK; A gambling element feature acquisition unit (106) is used to extract the image matrix and use the YOLO target detection model optimized for small targets to detect gambling elements to obtain a gambling element feature vector; A text feature acquisition unit (107) is used to acquire image text, calculate LDA topic word vectors, select classification word vectors using a feature selection method, and calculate text features as text feature vectors using a custom text classification model; and The fusion unit (108) is used to fuse the gambling element feature vector and the text feature vector, and calculate the probability that the APP to be detected is suspected to be a gambling APP through a classification model, so as to realize the identification of the gambling APP.
7. A computer-readable storage medium having instructions stored thereon, wherein when the instructions are executed by a processor, the processor executes the method for detecting gambling apps as described in any one of claims 1 to 5.
