Image detection method and related device
By performing overall screenshots and local tailoring of the application interface, combined with the abnormal detection of the object detection model, the problem of difficulty in detecting smaller visual plug-ins in the existing technology is solved, and the accuracy and effectiveness of cheat detection are improved.
Patent Information
- Application Number
- CN202311779674.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-06-24
AI Technical Summary
The prior art is difficult to detect smaller visual plug-ins in the application interface of the application, resulting in poor accuracy and effectiveness of cheat detection.
By taking overall screenshots of the application interface of the application and cutting them locally multiple times, multiple local images are generated, and then inputting these images to the object detection model for abnormal detection of the target object, determining the object detection result of the overall image.
It improves the accuracy and effectiveness of cheat detection of smaller visual plug-ins in the application interface, and can promptly fight against cheating of smaller visual plug-ins.
Smart Images

Figure CN120198342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to an image detection method and related devices. Background Art
[0002] At present, during the application process of an application, users may use external plugins to cheat in order to achieve their expectations; for example, during the game process of a game application, users may use external plugins to cheat in order to win the game; therefore, it is very important to detect cheating during the application process of an application.
[0003] In related technologies, the method for detecting cheating during the application process of an application is as follows: The overall screenshot of the application interface of the application is input into a visual detection model for cheating detection to obtain the detection result of the overall screenshot, and suspicious screenshots are selected through the detection result and sent to manual review. However, the above method is difficult to detect small visual external plugins in the application interface of the application. Summary of the Invention
[0004] To solve the above technical problems, this application provides an image detection method and related devices, which can accurately detect small visual external plugins in the application interface of an application during the application process of the application, improve the cheating detection accuracy and cheating detection effect of small visual external plugins, and help to combat the cheating behavior of small visual external plugins in a timely manner.
[0005] The embodiments of this application disclose the following technical solutions:
[0006] On the one hand, the embodiments of this application provide an image detection method, and the method includes:
[0007] Take an overall screenshot of the application interface of the application to obtain a to-be-detected overall image;
[0008] Perform multiple local croppings on the to-be-detected overall image to obtain multiple to-be-detected local images; the local areas of the multiple to-be-detected local images in the to-be-detected overall image are different;
[0009] Perform anomaly detection on the multiple to-be-detected local images for a target object through a target detection model to obtain multiple local detection results corresponding to the multiple to-be-detected local images; the target object is a visual object not configured by the application;
[0010] Determine the target detection result of the to-be-detected overall image according to the multiple local detection results.
[0011] On the other hand, the embodiments of this application provide an image detection device, and the device includes: a screenshot unit, a cropping unit, a detection unit, and a determination unit;
[0012] The screenshot unit is configured to take an overall screenshot of the application interface of the application to obtain an overall image to be tested;
[0013] The cropping unit is configured to perform multiple local croppings on the overall image to be tested to obtain multiple local images to be tested; the local areas of the multiple local images to be tested in the overall image to be tested are different;
[0014] The detection unit is configured to perform anomaly detection on the multiple local images to be tested for a target object through a target detection model to obtain multiple local detection results corresponding to the multiple local images to be tested; the target object is a visual object not configured in the application;
[0015] The determination unit is configured to determine the target detection result of the overall image to be tested according to the multiple local detection results.
[0016] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory:
[0017] The memory is configured to store a computer program and transmit the computer program to the processor;
[0018] The processor is configured to execute the method described in any of the foregoing aspects according to the instructions in the computer program.
[0019] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which is configured to store a computer program. When the computer program runs on a computer device, the computer device is caused to execute the method described in any of the foregoing aspects.
[0020] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program runs on a computer device, the computer device is caused to execute the method described in any of the foregoing aspects.
[0021] As can be seen from the above technical solutions, first, the entire application interface of the application is captured as the overall image to be tested; the overall image to be tested is locally cropped multiple times into multiple local images to be tested, where the local areas of the multiple local images to be tested in the overall image to be tested are different; this method captures the entire application interface of the application and locally crops it multiple times to increase the proportion of the object, making it easier to highlight the smaller visual plug-ins in the application interface of the application. Then, the multiple local images to be tested are input into the target detection model to detect the visual objects that are not configured in the application, that is, the target objects, and multiple local detection results corresponding to the multiple local images to be tested are obtained; this method specifically detects the visual objects that are not configured in the application and can cover the smaller visual plug-ins in the application interface of the application. Finally, through the multiple local detection results, the target detection result of the overall image to be tested is determined; this method uses the multiple local detection results that can detect the smaller visual plug-ins to determine the detection result of the application interface of the application, and can accurately detect the cheating behavior of the smaller visual plug-ins. Based on this, this method accurately detects the smaller visual plug-ins in the application interface of the application during the application process of the application, improves the accuracy and effect of cheating detection of the smaller visual plug-ins, and helps to combat the cheating behavior of the smaller visual plug-ins in a timely manner. Description of the Drawings
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 System schematic diagram of an image detection method provided by an embodiment of the present application;
[0024] Figure 2 Flowchart of an image detection method provided by an embodiment of the present application;
[0025] Figure 3 Schematic diagram of an overall image to be tested and multiple local images to be tested provided by an embodiment of the present application;
[0026] Figure 4 Schematic diagram of the architecture of a first detection model provided by an embodiment of the present application;
[0027] Figure 5 Schematic diagram of obtaining an abnormal local image provided by an embodiment of the present application;
[0028] Figure 6 Another schematic diagram of obtaining an abnormal local image provided by an embodiment of the present application;
[0029] Figure 7 Schematic diagram for obtaining an abnormal overall image provided by an embodiment of the present application;
[0030] Figure 8 Another schematic diagram for obtaining an abnormal overall image provided by an embodiment of the present application;
[0031] Figure 9 Specific flowchart of image detection provided by an embodiment of the present application;
[0032] Figure 10 Another specific flowchart of image detection provided by an embodiment of the present application;
[0033] Figure 11 Specific flowchart of updating a general detection model provided by an embodiment of the present application;
[0034] Figure 12 Flowchart of another image detection method provided by an embodiment of the present application;
[0035] Figure 13 Structural diagram of an image detection device provided by an embodiment of the present application;
[0036] Figure 14 Structural diagram of a server provided by an embodiment of the present application;
[0037] Figure 15 Structural diagram of a terminal provided by an embodiment of the present application. Detailed implementation manners
[0038] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0039] Currently, in order to detect whether a user uses a plug-in to cheat during the application process of an application, usually the overall screenshot of the application interface of the application is input into a visual detection model for cheat detection to obtain the detection result of the overall screenshot, and the suspicious screenshots are screened out through the detection result and sent to manual review. For example, during the game process of a game program, to detect whether a user uses a plug-in to cheat, the overall screenshot of the game interface of the game program can be input into a visual detection model for cheat detection to obtain the detection result of the overall screenshot, and the suspicious screenshots are screened out through the detection result and sent to manual review.
[0040] However, through research, it is found that the above method is difficult to detect small visual plug-ins in the application interface of the application. For example, the above method is difficult to detect small visual plug-ins in the game interface of the game program.
[0041] An embodiment of the present application provides an image detection method, which can accurately detect small visual cheats in the application interface of an application during the application process of the application, improve the accuracy and effect of cheat detection for small visual cheats, and help combat the cheating behavior of small visual cheats in a timely manner.
[0042] Next, the system architecture of the image detection method will be introduced. Refer to Figure 1 , Figure 1 which is a schematic diagram of a system for an image detection method provided by an embodiment of the present application. The system includes a computer device 100, and the computer device 100 is used to execute the image detection method.
[0043] The computer device 100 takes an overall screenshot of the application interface of the application to obtain a to-be-tested overall image.
[0044] As an example, if the application is a game program and the application interface of the game program is a game interface, then the computer device 100 takes an overall screenshot of the game interface of the game program as the to-be-tested overall image.
[0045] The computer device 100 performs multiple local clippings on the to-be-tested overall image to obtain multiple to-be-tested local images; the local areas of the multiple to-be-tested local images in the to-be-tested overall image are different.
[0046] As an example, the multiple local clippings are N local clippings, where N is a positive integer and N≥2. On the basis of the above example, the computer device 100 clips the to-be-tested overall image N times to obtain N to-be-tested local images, where the local areas of the N to-be-tested local images in the to-be-tested overall image are different.
[0047] The computer device 100 performs anomaly detection on the multiple to-be-tested local images for a target object through a target detection model to obtain multiple local detection results corresponding to the multiple to-be-tested local images; the target object is a visual object not configured by the application.
[0048] As an example, if the target object is a small visual cheat, on the basis of the above example, the computer device 100 inputs the N to-be-tested local images into the target detection model to detect the visual object not configured by the game program, that is, to detect the small visual cheat, and obtains N local detection results corresponding to the N to-be-tested local images.
[0049] The computer device 100 determines the target detection result of the to-be-tested overall image according to the multiple local detection results.
[0050] As an example, on the basis of the above example, the computer device 100 determines the target detection result of the to-be-tested overall image as an external cheat detection result through the N local detection results.
[0051] That is to say, by globally intercepting the application interface of the application and locally cropping it multiple times to increase the proportion of the object, it is easier to highlight the smaller visual plug-ins in the application interface of the application. Targeted detection of visual objects not configured in the application can cover the smaller visual plug-ins in the application interface of the application. By using multiple local detection results that can detect smaller visual plug-ins to determine the detection result of the application interface of the application, the cheating behavior of smaller visual plug-ins can be accurately detected. Based on this, during the application process of the application, this method accurately detects smaller visual plug-ins in the application interface of the application, improves the cheating detection accuracy and cheating detection effect of smaller visual plug-ins, and helps to combat the cheating behavior of smaller visual plug-ins in a timely manner.
[0052] It should be noted that the image detection method in the embodiment of this application involves artificial intelligence. Artificial intelligence uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, and is a theory, method, technology, and application system that perceives the environment, acquires knowledge, and uses knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making.
[0053] Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model, also known as the large model or the foundation model, can be widely applied to downstream tasks in various directions of artificial intelligence after fine-tuning. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. In the embodiment of this application, artificial intelligence technology mainly involves computer vision technology, natural language processing technology, and machine learning / deep learning and other technologies.
[0054] Computer vision is a science that studies how to enable machines to "see". Further, it refers to machine vision that uses cameras and computers to replace human eyes for target recognition, tracking, and measurement, etc., and further performs graphic processing to make the computer-processed images more suitable for human eyes to observe or be transmitted to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies and attempts to establish artificial intelligence systems that can obtain information from images or multi-dimensional data. The large model technology has brought important changes to the development of computer vision technology. Pretrained models in the field of vision such as Swin-Transformer, Vision Transformer, Vision MoE, and MAE can be quickly and widely applied to downstream specific tasks after fine-tuning. In the embodiments of this application, computer vision technology mainly involves technologies such as image processing, image recognition, image semantic understanding, image retrieval, optical character recognition, video processing, video semantic understanding, and video content / behavior recognition.
[0055] Natural language processing is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between humans and computers in natural language. Natural language processing involves natural language, that is, the language used by people in daily life, and is closely related to linguistics research; at the same time, it involves computer science and mathematics. The important technology for model training in the field of artificial intelligence, the pretrained model, is developed from the large language model in the NLP field. After fine-tuning, the large language model can be widely applied to downstream tasks. In the embodiments of this application, natural language processing technology mainly involves technologies such as text processing, semantic understanding, and robot question answering.
[0056] Machine learning / deep learning is an interdisciplinary subject involving multiple fields such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning from demonstration. The pretrained model is the latest development result of deep learning, integrating the above technologies.
[0057] It should be noted that in the embodiments of this application, the computer device can be a server or a terminal. The method provided in the embodiments of this application can be executed independently by the terminal or the server, or can be executed in cooperation by the terminal and the server. Among them, when the method provided in the embodiments of this application is executed independently by the terminal or the server, its execution method is the same as Figure 1The corresponding embodiments are similar, mainly by replacing the computer device with a terminal or a server. In addition, when the method provided in the embodiments of the present application is executed in cooperation with a terminal and a server, the steps that need to be reflected on the front-end interface can be executed by the terminal, while some steps that require background calculation and do not need to be reflected on the front-end interface can be executed by the server.
[0058] Among them, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart voice interaction device, a vehicle-mounted terminal, an extended reality device, an aircraft, etc., but is not limited thereto. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present application does not make any restrictions here. For example, the terminal and the server can be connected through a network, and the network can be a wired or wireless network.
[0059] In addition, the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, autonomous driving, digital humans, virtual humans, virtual reality, augmented reality, mixed reality, audio and video, etc.
[0060] Next, taking the computer device executing the method provided in the embodiments of the present application as an example, the image detection method provided in the embodiments of the present application will be introduced in detail in combination with the accompanying drawings. See Figure 2 , Figure 2 is a flowchart of an image detection method provided in the embodiments of the present application. The method includes:
[0061] S201: Take an overall screenshot of the application interface of the application to obtain the overall image to be detected.
[0062] S202: Perform multiple local croppings on the overall image to be detected to obtain multiple local images to be detected; the local areas of the multiple local images to be detected in the overall image to be detected are different.
[0063] In the related art, in order to detect whether a user uses a plug-in to cheat during the application process of an application, usually the overall screenshot of the application interface of the application is input into a visual detection model for cheat detection to obtain the detection result of the overall screenshot, and the suspicious screenshots are screened out through the detection result and sent to manual review. However, through research, it is found that the above method is difficult to detect small visual plug-ins in the application interface of the application.
[0064] Therefore, in the embodiments of the present application, to solve the above problems, considering that smaller visual plug-ins occupy a relatively small area in the application interface of the application, the application interface of the application can be captured as a whole and locally cropped multiple times, which is equivalent to increasing the proportion of objects in the application interface of the application, so as to easily detect smaller visual plug-ins in the application interface of the application subsequently.
[0065] That is, first capture the application interface of the application as a whole to obtain a to-be-tested overall image; then locally crop the to-be-tested overall image multiple times to obtain multiple to-be-tested local images, where the local areas of the multiple to-be-tested local images in the to-be-tested overall image are different.
[0066] Wherein, the application interface of the application refers to the display interface during the application process of the application; the to-be-tested overall image refers to the overall captured image of the display interface during the application process of the application; the to-be-tested local image refers to the local area image of the display interface during the application process of the application.
[0067] Based on this, performing multiple local crops on the to-be-tested overall image to obtain multiple to-be-tested local images actually means: cropping a to-be-tested overall image representing the overall captured image multiple times into multiple local area images as multiple to-be-tested local images.
[0068] The implementation method of S201 - S202 by capturing the application interface of the application as a whole and locally cropping it multiple times can increase the proportion of each object in the application interface of the application, so that when there are smaller visual plug-ins in the application interface of the application, it is easier to highlight the smaller visual plug-ins; it provides more suitable image data for subsequent detection of whether there are smaller visual plug-ins in the application interface of the application.
[0069] As an example of S201 - S202, the application is a game program, the application interface of the game program is a game interface, and the multiple local crops are N local crops, where N is a positive integer and N≥2; the computer device captures the game interface of the game program as a whole to obtain a to-be-tested overall image; the computer device performs N local crops on the to-be-tested overall image to obtain N to-be-tested local images; among them, the local areas of the N to-be-tested local images in the to-be-tested overall image are different.
[0070] S203: Perform anomaly detection on multiple to-be-tested local images for a target object through a target detection model to obtain multiple local detection results corresponding to the multiple to-be-tested local images; the target object is a visual object not configured by the application.
[0071] In the embodiments of the present application, after the overall screenshot of the application interface of the application is taken and locally cropped multiple times, in order to solve the above problem, a target detection model can be configured to detect whether the image after multiple local crops includes a visual object not configured in the application, that is, to detect whether the image after multiple local crops includes a target visual class plug-in, which is equivalent to detecting whether the image after multiple local crops includes a smaller visual class plug-in, so as to accurately detect whether there is a smaller visual class plug-in in the application interface of the application subsequently.
[0072] That is, a target detection model is obtained in advance. After obtaining multiple local images to be tested by executing S201 - S202, the multiple local images to be tested are input into the target detection model to detect visual objects not configured in the application, that is, to detect target objects, and multiple local detection results corresponding to the multiple local images to be tested are obtained.
[0073] Among them, the target detection model is used to detect whether an image includes a target object, and it is represented by the detection probability that the image includes the target object whether the image includes the target object; the local detection result represents the detection probability that the local image to be tested includes the target object; the visual object refers to an object that can be directly felt visually composed of multiple pixels, and the target object refers to a smaller visual class plug-in, and the visual class plug-in refers to a cheating object that can be directly felt visually and obtains benefits for users by modifying application data. In the game interface of the game program, the target object includes one or more of a box perspective plug-in and a bone perspective plug-in. The box perspective plug-in refers to a cheating object that prompts the position in the form of a box to obtain benefits for users, and the bone perspective plug-in refers to a cheating object that prompts the position in the form of bones to obtain benefits for users.
[0074] Based on the fact that S203 is more likely to expose smaller visual class plug-ins when the overall application interface of the application is intercepted and locally cropped multiple times, through the implementation method of specifically detecting visual objects not configured in the application, it can cover smaller visual class plug-ins in the application interface of the application, so that the local detection result can indicate whether there is a smaller visual class plug-in in the application interface of the application; it provides an accurate judgment basis for subsequently determining whether there is a smaller visual class plug-in in the application interface of the application.
[0075] As an example of S203, the target object is a smaller visual class plug-in. Based on the above example of S201 - S202, the computer device performs anomaly detection on N local images to be tested for visual objects not configured in the game program through the target detection model, that is, anomaly detection for smaller visual class plug-ins, and obtains N local detection results corresponding to the N local images to be tested. Among them, the target object includes one or more of a box perspective plug-in and a bone perspective plug-in.
[0076] S204: Determine the target detection result of the overall image to be measured according to multiple local detection results.
[0077] In the embodiments of the present application, after detecting whether the images after multiple local clippings include smaller visual plug-ins, to solve the above problems, by synthesizing multiple detection results, it can be accurately determined whether there are smaller visual plug-ins in the application interface of the application program, so as to improve the accuracy and effect of cheating detection of smaller visual plug-ins, and help to timely combat the cheating behavior of smaller visual plug-ins.
[0078] That is, after executing S203 to obtain multiple local detection results corresponding to multiple local images to be measured, determine the target detection result of the overall image to be measured through the multiple local detection results.
[0079] Among them, the target detection result represents the output probability that the overall image to be measured includes the target object, that is, the detection result of whether there are smaller visual plug-ins in the application interface of the application program.
[0080] This S204 determines the detection result of the application interface of the application program based on multiple local detection results indicating whether there are smaller visual plug-ins in the application interface of the application program, can accurately detect the cheating behavior of smaller visual plug-ins, and improve the accuracy and effect of cheating detection of smaller visual plug-ins; provides an accurate basis for processing to timely combat the cheating behavior of smaller visual plug-ins in the future.
[0081] As an example of S204, based on the above example of S203, the computer device determines the target detection result of the overall image to be measured as the plug-in detection result according to N local detection results.
[0082] As can be seen from the above technical solution, first, the application interface of the application program is captured as a whole to obtain a to-be-tested overall image; the to-be-tested overall image is locally cropped multiple times to obtain multiple to-be-tested local images, where the local areas of the multiple to-be-tested local images in the to-be-tested overall image are different; this method captures the application interface of the application program as a whole and locally crops it multiple times to increase the proportion of the object, making it easier to highlight the smaller visual plug-ins in the application interface of the application program. Then, the multiple to-be-tested local images are input into the target detection model to detect the visual objects that are not configured in the application program, that is, the target objects, and multiple local detection results corresponding to the multiple to-be-tested local images are obtained; this method specifically detects the visual objects that are not configured in the application program and have a small object area, and can cover the smaller visual plug-ins in the application interface of the application program. Finally, through the multiple local detection results, the target detection result of the to-be-tested overall image is determined; this method uses the multiple local detection results that can detect the smaller visual plug-ins to determine the detection result of the application interface of the application program, and can accurately detect the cheating behavior of the smaller visual plug-ins. Based on this, this method accurately detects the smaller visual plug-ins in the application interface of the application program during the application process of the application program, improves the cheating detection accuracy and cheating detection effect of the smaller visual plug-ins, and helps to combat the cheating behavior of the smaller visual plug-ins in a timely manner.
[0083] In the embodiment of the present application, when specifically implementing the above S202, considering the application service of the application program, smaller visual plug-ins are likely to be concentrated in the central area of the application interface of the application program or the offset area corresponding to the central area; for example, based on the game service of the game program, it can be known that smaller visual plug-ins such as box perspective plug-ins or bone perspective plug-ins are concentrated in the central area, the area to the left of the center, or the area to the right of the center of the game interface of the game program. Therefore, in order to achieve accurate local cropping for subsequent detection of smaller visual plug-ins for the to-be-tested overall image, the process of locally cropping the to-be-tested overall image multiple times to obtain multiple to-be-tested local images actually means: first, determining the central area of the to-be-tested overall image; then, offsetting the position of the central area to obtain the offset area corresponding to the central area; finally, locally cropping the to-be-tested overall image multiple times according to the central area and the offset area to obtain multiple to-be-tested local images. Based on this, the present application provides a possible implementation manner, and S202 includes S2021 - S2023 (not shown in the figure):
[0084] S2021: Determine the central area of the to-be-tested overall image.
[0085] S2022: Perform position offset on the central area to obtain the offset area corresponding to the central area.
[0086] Among them, in the specific implementation of S2022, it can be a leftward position offset and a rightward position offset of the entire central region to obtain offset regions corresponding to the central region, including a region to the left of the center and a region to the right of the center.
[0087] In addition, in the specific implementation of S2022, it can also be an upward position offset and a downward position offset of the entire central region to obtain offset regions corresponding to the central region, including a region above the center and a region below the center.
[0088] S2023: Perform multiple local croppings on the overall image to be measured according to the central region and the offset regions to obtain multiple local images to be measured.
[0089] Among them, in the specific implementation of S2022, it can be to crop the overall image to be measured into the central region image of the overall image to be measured according to the central region; crop the overall image to be measured into the offset region image of the overall image to be measured according to the offset region; and determine the central region image of the overall image to be measured and the offset region image of the overall image to be measured as multiple local images to be measured.
[0090] When the offset region includes a region to the left of the center and a region to the right of the center, the multiple local images to be measured include the central region image of the overall image to be measured, the region to the left of the center image of the overall image to be measured, and the region to the right of the center image of the overall image to be measured; when the offset region also includes a region above the center and a region below the center, the multiple local images to be measured also include the region above the center image of the overall image to be measured and the region below the center image of the overall image to be measured.
[0091] The implementation method of the central region of the application interface of the multiple local cropping application and the offset regions corresponding to the central region in S2021 - S2023 can not only accurately increase the proportion of the object of the smaller visual plug-in in the application interface of the application, but also reduce the background interference generated in other regions of the application interface of the application, thereby further highlighting the smaller visual plug-in; and provide more accurate image data for subsequent detection of the smaller visual plug-in in the application interface of the application.
[0092] As an example of S2021 - S2023, on the basis of the above S201 - S202 examples, the computer device determines the central region of the overall image to be measured; the computer device performs a position offset on the central region to obtain offset regions corresponding to the central region as a region to the left of the center and a region to the right of the center; the computer device performs 3 local croppings on the overall image to be measured according to the central region, the region to the left of the center, and the region to the right of the center to obtain 3 local images to be measured. See Figure 3 , Figure 3 is a schematic diagram of an overall image to be measured and multiple local images to be measured provided by an embodiment of the present application; among them,Figure 3 In (a), it represents the overall image to be measured obtained by taking an overall screenshot of the game interface of the game program. There is a box perspective cheat in the game interface of the game program, so the overall image to be measured includes the box perspective cheat. Figure 3 In (b), it represents three local images to be measured obtained by performing three local croppings on the overall image to be measured according to the left-center area, the center area, and the right-center area of the overall image to be measured. The local image to be measured corresponding to the center area of the overall image to be measured includes the box perspective cheat.
[0093] In the embodiments of the present application, for the target detection model in S203 above, a first detection model is trained in advance through the normal local images corresponding to the application interface of the application, the first normal label that the normal local images do not include the target object, the abnormal local images corresponding to the application interface of the application, and the first abnormal label that the abnormal local images include the target object to obtain the target detection model.
[0094] The specific training process of the target detection model refers to: First, obtain the normal local images and abnormal local images corresponding to the application interface; the normal local images are marked with the first normal label that does not include the target object, and the abnormal local images are marked with the first abnormal label that includes the target object. Then, input the normal local images and abnormal local images into the first detection model for abnormal detection of the target object, that is, detect the target object, and output the local prediction results of the normal local images and the local prediction results of the abnormal local images. Finally, based on the local prediction results of the normal local images and the local prediction results of the abnormal local images, combined with the first normal label marked by the normal local images and the first abnormal label marked by the abnormal local images, adjust the model parameters of the first detection model to achieve training, so that the local prediction results of the normal local images are close to the first normal label and the local prediction results of the abnormal local images are close to the first abnormal label to complete the model training, and use the trained first detection model as the target detection model. Based on this, the present application provides a possible implementation manner. The steps for obtaining the target detection model in S203 include S1 - S3 (not shown in the figure):
[0095] S1: Obtain the normal local images and abnormal local images corresponding to the application interface; the normal local images are marked with the first normal label that does not include the target object, and the abnormal local images are marked with the first abnormal label that includes the target object.
[0096] Among them, a normal local image refers to a local area image of the display interface of the application program that does not include the target object during the historical application process; the first normal label is used to indicate that the normal local image does not include the target object; an abnormal local image refers to a local area image of the display interface of the application program that includes the target object during the historical application process; the first abnormal label is used to indicate that the abnormal local image includes the target object.
[0097] S2: Perform anomaly detection on the normal local image and the abnormal local image for the target object through the first detection model, and obtain the local prediction result of the normal local image and the local prediction result of the abnormal local image.
[0098] Among them, the first detection model is used to predict whether the image includes the target object, and it represents whether the image includes the target object through the prediction probability that the image includes the target object; the local prediction result of the normal local image represents the prediction probability that the normal local image includes the target object; the local prediction result of the abnormal local image represents the prediction probability that the abnormal local image includes the target object.
[0099] S3: Adjust the model parameters of the first detection model according to the local prediction result of the normal local image, the first normal label, the local prediction result of the abnormal local image, and the first abnormal label, and obtain the target detection model.
[0100] Among them, the target detection model is the first detection model after the model parameter adjustment is completed.
[0101] Based on the normal local image and the abnormal local image corresponding to the application interface of the application program, through targeted detection of visual objects not configured in the application program, the local prediction result of the normal local image and the local prediction result of the abnormal local image are obtained, and the model parameters of the first detection model are adjusted according to the training direction that makes the local prediction result of the normal local image close to the first normal label and the local prediction result of the abnormal local image close to the first abnormal label. In this implementation method, the association relationship between the normal local image and the first normal label, as well as the abnormal local image and the first abnormal label, is learned quickly, effectively, and accurately, and the model training is completed to obtain the target detection model; it provides an accurate detection model for subsequent rapid, effective, and accurate detection of whether the image includes a small visual type external plug-in.
[0102] As an example of the above S1 - S3, based on the example of S203 above, the computer device obtains a normal partial image and an abnormal partial image corresponding to the game interface of the game program; wherein, the normal partial image is marked with a first normal label excluding smaller visual cheats, and the abnormal partial image is marked with a first abnormal label including smaller visual cheats; the computer device performs abnormal detection for smaller visual cheats on the normal partial image and the abnormal partial image through a first detection model, and obtains a local prediction result of the normal partial image and a local prediction result of the abnormal partial image; the computer device adjusts the model parameters of the first detection model according to the local prediction result of the normal partial image, the first normal label, the local prediction result of the abnormal partial image, and the first abnormal label, and obtains a target detection model. Wherein, the target object includes one or more of a box perspective cheat and a bone perspective cheat.
[0103] See Figure 4 , Figure 4 is a schematic structural diagram of a first detection model provided by an embodiment of the present application. If the first detection model adopts a deep residual network Resnet architecture, then the target detection model trained by the first detection model for detecting whether an image includes a target object adopts a Resnet architecture; on this basis, Figure 4 (a) in shows a ResnetXTSE architecture, and the ResnetXTSE architecture includes a convolutional layer, an attention module, and an addition module; wherein, the attention module can highlight the target object in the image, so that the first detection model can accurately predict whether the image includes a target object, so that the target detection model can accurately detect whether the image includes a target object, that is, it is convenient to accurately detect whether there are smaller visual cheats in the application interface of the application program through the target detection model. Figure 4In (b), it represents the ResnetMutiGate architecture, which includes a convolutional layer, a coarse-grained and fine-grained attention module, and a gating module. Among them, the coarse-grained and fine-grained attention module is optimized from the attention module. The coarse-grained and fine-grained attention module includes an average pooling layer, a linear fully connected layer, a convolutional layer, an addition module, a Sigmod function layer, and a multiplication module. The coarse-grained and fine-grained attention can enhance the difference between the target object in the image and the surrounding background, further highlighting the target object in the image, reducing the situation where the first detection model misses detecting an image including the target object, and thus reducing the situation where the target detection model misses detecting an image including the target object. That is, it is convenient to reduce the existence of small visual class plug-ins in the application interface of the application missed by the target detection model; the gating module is optimized from the addition module; this gating module can reduce the situation where the first detection model misdetects an image including the target object, and thus reduce the situation where the target detection model misdetects an image including the target object. That is, it is convenient to reduce the existence of small visual class plug-ins in the application interface of the application misdetected by the target detection model. Among them, for the normal local image in S1, the historical normal image corresponding to the application interface of the application is randomly cropped to obtain the normal local image; for the abnormal local image in S1, in the case where it is difficult to obtain the abnormal local image corresponding to the application interface of the application, in order to quickly and effectively obtain the abnormal local image, the abnormal local image can be constructed based on the normal local image. In practical applications, the steps for obtaining the abnormal local image in S1 can include the following various implementation methods:
[0104] One implementation method means that on the basis of determining the generation method of the target object, after obtaining the normal local image, the target object is automatically generated in the normal local image to obtain the abnormal local image. Based on this, the present application provides a possible implementation method. The steps for obtaining the abnormal local image in S1 include S4 (not shown in the figure): automatically generating the target object for the normal local image to obtain the abnormal local image.
[0105] This S4 can quickly and effectively construct the abnormal local image corresponding to the application interface of the application by automatically generating the target object in the normal local image corresponding to the application interface of the application, so as to quickly and effectively obtain the abnormal local image; and quickly and effectively provide training data for subsequent training of the target detection model.
[0106] As an example of the above S4, on the basis of the above S1 - S3 examples, the computer device automatically generates a smaller visual class plug-in for the normal local image to obtain the abnormal local image. See Figure 5 , Figure 5A schematic diagram of obtaining an abnormal partial image provided by an embodiment of the present application. Herein, the target object refers to a smaller visual type of external plug-in, specifically a box perspective external plug-in; the computer device automatically generates a box perspective external plug-in in the normal partial image to obtain the abnormal partial image. Figure 5 The box perspective external plug-in is specifically a solid line box perspective external plug-in. In the embodiment of the present application, the specific manifestation form of the box perspective external plug-in is not limited. The box perspective external plug-in may also specifically be a dotted line box perspective external plug-in. Of course, the computer device may also automatically generate a bone perspective external plug-in in the normal partial image to obtain the abnormal partial image.
[0107] Another implementation manner means that: without determining the generation manner of the target object, the target object in the historical abnormal image corresponding to the application interface of the application program is extracted as the target object template, and the target object template is fused into the normal partial image to obtain the abnormal partial image. Based on this, the present application provides a possible implementation manner. The steps of obtaining the abnormal partial image in S1 include S5 - S6 (not shown in the figure):
[0108] S5: Extract the target object from the historical abnormal image to obtain the target object template.
[0109] S6: Perform image fusion on the normal partial image and the target object template to obtain the abnormal partial image.
[0110] This implementation manner of S5 - S6, by extracting the target object in the historical abnormal image corresponding to the application interface of the application program as the target object template and fusing the target object template into the normal partial image, does not require collecting the historical abnormal image corresponding to the application interface of the application program and cropping it into the abnormal partial image, nor does it require determining the generation manner of the target object, and can quickly and effectively construct the abnormal partial image corresponding to the application interface of the application program, thereby quickly and effectively obtaining the abnormal partial image; and quickly and effectively providing training data for subsequent training of the target detection model.
[0111] As an example of the S5 - S6, on the basis of the above S1 - S3 example, the computer device extracts the external plug-in from the smaller visual type of external plug-in in the historical abnormal image to obtain the template of the smaller visual type of external plug-in. Perform image fusion on the normal partial image and the template of the smaller visual type of external plug-in to obtain the abnormal partial image. Refer to Figure 6 , Figure 6 A schematic diagram of another method for obtaining an abnormal partial image provided by an embodiment of the present application; wherein, the target object refers to a smaller visual type of external plug-in, specifically a bone perspective external plug-in; the computer device extracts the bone perspective external plug-in from the historical abnormal image corresponding to the game interface of the game program to obtain the bone perspective external plug-in template; the computer device performs image fusion on the normal partial image and the bone perspective external plug-in template to obtain the abnormal partial image. Figure 6The middle bone perspective cheat is specifically a solid line bone perspective cheat. In the embodiments of the present application, the specific manifestation form of the bone perspective cheat is not limited. The bone perspective cheat can also specifically be a dotted line bone perspective cheat. Of course, the computer device can also extract the cheat of the box perspective cheat from the historical abnormal images to obtain a box perspective cheat template; the computer device can also perform image fusion on the normal local image and the box perspective cheat template to obtain an abnormal local image.
[0112] In addition, there are also visual objects configured in the application interface of the application program that are similar to the target object, that is, similar objects, resulting in similar objects in the historical local image corresponding to the application interface of the application program being misdetected as the target object. Then, the historical local image including the similar object misdetected as the target object is a historical misdetection image; in order to prevent the target detection model from misdetecting similar objects in the local image to be measured as the target object, for the normal local image in S1, the similar objects in the historical misdetection image can also be extracted as a similar object template, the similar object template can be fused into the normal local image to obtain a fused local image, and the fused local image can be determined as the new normal local image. Therefore, the present application provides a possible implementation manner. The steps for obtaining the normal local image in S1 include S7-S10 (not shown in the figure):
[0113] S7: Obtain historical misdetection images; similar objects in the historical misdetection images are misdetected as the target object.
[0114] S8: Perform object extraction on the similar objects in the historical misdetection images to obtain a similar object template.
[0115] S9: Perform image fusion on the normal local image and the similar object template to obtain a fused local image.
[0116] S10: Determine the normal local image according to the fused local image.
[0117] The implementation manner of S7-S10 by extracting the similar objects in the historical misdetection images corresponding to the application interface of the application program as the similar object template and fusing the similar object template into the normal local image can add normal local images that are easily misdetected corresponding to the application interface of the application program; provide more targeted training data for subsequent training of the target detection model, thereby reducing the misdetection probability of the trained target detection model.
[0118] As an example of S7-S10, on the basis of the above S1-S3 example, the computer device obtains historical misdetection images; among them, the similar objects in the historical misdetection images are misdetected as smaller visual class cheats; the computer device performs object extraction on the similar objects in the historical misdetection images to obtain a similar object template; the computer device performs image fusion on the normal local image and the similar object template to obtain a normal local image.
[0119] In addition, in the embodiments of the present application, in order to avoid misdetection in S203 where each to-be-tested partial image is detected by a target detection model to determine whether it includes a target object, resulting in an incorrect target detection result for the to-be-tested overall image due to misdetection of a small visual plug-in in the application interface of the application, the following implementation method can be adopted:
[0120] One implementation method means: further detecting whether there are visual plug-ins and text plug-ins in the application interface of the application at the overall screenshot level; that is, inputting the to-be-tested overall image into an anomaly detection model for anomaly detection to detect visual objects and text objects not configured in the application, and obtaining the overall detection result of the to-be-tested overall image. In this case, when specifically implementing S204, the target detection result of the to-be-tested overall image is comprehensively determined based on multiple local detection results and the overall detection result. Based on this, the present application provides a possible implementation method, and the method further includes S11 (not shown in the figure): performing anomaly detection on the to-be-tested overall image through the anomaly detection model to obtain the overall detection result of the to-be-tested overall image; correspondingly, the above S204 includes S2041 (not shown in the figure): determining the target detection result according to multiple local detection results and the overall detection result.
[0121] Among them, the overall detection result represents the overall detection probability that the to-be-tested overall image includes visual objects and text objects not configured in the application. When the local detection result represents the local detection probability that the to-be-tested partial image includes a target object, if the overall detection probability is greater than or equal to the first target probability, and any local detection probability among multiple local detection probabilities is greater than or equal to the second target probability, it is determined that the target detection result is that the to-be-tested overall image includes a target object, that is, there is a small visual plug-in in the application interface of the application, and the small visual plug-in is directly countered. The first target probability refers to the lower limit probability that the image includes visual objects and text objects not configured in the application, and the second target probability refers to the lower limit probability that the image includes a target object.
[0122] If the overall detection probability is less than the first target probability, and any local detection probability among multiple local detection probabilities is greater than or equal to the second target probability, it is determined that the target detection result is that the to-be-tested overall image may include a target object, that is, there may be a small visual plug-in in the application interface of the application, and manual review is performed on multiple to-be-tested partial images.
[0123] If the overall detection probability is greater than or equal to the first target probability, and all local detection probabilities are less than the second target probability, it is determined that the target detection result is that the to-be-tested overall image may not include a target object, that is, there may be no small visual plug-in in the application interface of the application, and manual review is performed on multiple to-be-tested partial images.
[0124] By further detecting the implementation methods of visual objects and text objects that are not configured in the application overall, based on multiple local detection results, and combining the overall detection results indicating whether there are visual plug-ins and text plug-ins in the application interface of the application, the S11 and S2041 determine the detection results of the application interface of the application, which can more accurately detect the cheating behavior of smaller visual plug-ins, further improve the cheating detection accuracy and cheating detection effect of smaller visual plug-ins, and improve the detection coverage and detection accuracy of detecting whether there are plug-ins in the application interface of the application.
[0125] As an example of S11 and S2041, based on the above examples of S201 - S203, the computer device performs anomaly detection on the overall image to be measured through an anomaly detection model to obtain the overall detection result of the overall image to be measured; the computer device determines the plug-in detection result of the overall image to be measured according to the N local detection results and the overall detection result.
[0126] Among them, when specifically implementing S11, in order to detect whether there are visual plug-ins and text plug-ins in the application interface of the application at the overall screenshot level and be able to cover smaller visual plug-ins to a certain extent, the overall image to be measured can be further enlarged, and the enlarged overall image to be measured is input into the anomaly detection model for anomaly detection to detect visual objects and text objects that are not configured in the application, so as to obtain the overall detection result of the overall image to be measured. Based on this, the present application provides a possible implementation method. The above S11 includes the following S11a - S11b (not shown in the figure):
[0127] S11a: Enlarge the overall image to be measured to obtain the enlarged overall image to be measured.
[0128] S11b: Perform anomaly detection on the enlarged overall image to be measured through an anomaly detection model to obtain the overall detection result.
[0129] By first enlarging the overall image to be measured and then detecting visual objects and text objects that are not configured in the application overall, the S11a and S11b can increase the object areas of each object in the application interface of the application. When there are smaller visual plug-ins in the application interface of the application, it is equivalent to enlarging the smaller visual plug-ins, so that the overall detection result covers smaller visual plug-ins to a certain extent, further improving the cheating detection accuracy and cheating detection effect of smaller visual plug-ins, and further improving the detection coverage and detection accuracy of detecting whether there are plug-ins in the application interface of the application.
[0130] Another implementation means: constructing a target detection model includes two detection sub-models with different detection granularities. For each local image to be detected, first input the local image to be detected into the detection sub-model with a larger detection granularity to detect visual objects not configured by the detection application, that is, to detect the target object, and obtain the first detection result of the local image to be detected. This first detection result represents the first detection probability that the local image to be detected includes the target object. When the first detection probability is greater than or equal to the first preset probability, it indicates that the local image to be detected may include the target object, and then input the local image to be detected into the detection sub-model with a smaller detection granularity to detect visual objects not configured by the detection application, that is, to detect the target object, and obtain the second detection result of the local image to be detected. Determine the local detection result of the local image to be detected through the second detection result. When the first detection probability is less than the first preset probability, it indicates that the local image to be detected does not include the target object, and directly determine the local detection result of the local image to be detected through the first detection result. Based on this, the present application provides a possible implementation. The target detection model includes a first detection sub-model and a second detection sub-model, and the detection granularity of the first detection sub-model is greater than that of the second detection sub-model; the above S203 includes the following S2031 - S2033, or, the above S203 includes S2031 and S2034 (not shown in the figure):
[0131] S2031: For each local image to be detected, perform anomaly detection for the target object on the local image to be detected through the first detection sub-model, and obtain the first detection result of the local image to be detected; the first detection result represents the first detection probability that the local image to be detected includes the target object.
[0132] S2032: If the first detection probability is greater than or equal to the first preset probability, perform anomaly detection for the target object on the local image to be detected through the second detection sub-model, and obtain the second detection result of the local image to be detected.
[0133] S2033: Determine the local detection result of the local image to be detected according to the second detection result.
[0134] S2034: If the first detection probability is less than the first preset probability, determine the local detection result of the local image to be detected according to the first detection result.
[0135] Wherein, the first preset probability refers to the lower limit probability that the image includes the target object.
[0136] By first coarsely and then finely detecting the visually unconfigured objects of the application program in a targeted manner, S2031 - S2034 enables the local detection results to more accurately represent whether there are smaller visual plug-ins in the application interface of the application program, thereby being able to more accurately detect the cheating behavior of smaller visual plug-ins and further improving the accuracy and effect of cheating detection for smaller visual plug-ins.
[0137] As an example of S2031 - S2034, the first preset probability is a. Based on the above S203 example, for each local image to be tested, the computer device performs anomaly detection on the local image to be tested for visually unconfigured objects of the game program through the first detection sub-model, that is, anomaly detection for smaller visual plug-ins, to obtain the first detection result of the local image to be tested. If the first detection probability of the local image to be tested represented by the first detection result is greater than or equal to a, the second detection sub-model is used to perform anomaly detection on the local image to be tested for visually unconfigured objects of the game program, that is, anomaly detection for smaller visual plug-ins, to obtain the second detection result of the local image to be tested; the local detection result of the local image to be tested is determined according to the second detection result. If the first detection probability is less than a, the local detection result of the local image to be tested is determined according to the first detection result. Among them, the target object includes one or more of box perspective plug-ins and bone perspective plug-ins.
[0138] In addition, in the embodiments of the present application, considering that there may also be parameter text plug-ins in the application interface of the application program, in order to detect whether there are parameter text plug-ins in the application interface of the application program, a list detection model can also be configured to detect whether the overall image to be tested includes parameter text that is not configured by the application program, that is, to detect whether the overall image to be tested includes a target list, which is equivalent to whether the overall image to be tested includes a parameter text plug-in.
[0139] That is, the list detection model is obtained in advance, and the overall image to be tested is input into the list detection model to detect the parameter text that is not configured by the application program, that is, to detect the target list, to obtain the list detection result of the overall image to be tested.
[0140] The list detection result represents the second detection probability that the overall image to be tested includes the target list; when the second detection probability is greater than or equal to the second preset probability, it means that the overall image to be tested may include the target list, and text recognition is performed on the overall image to be tested to obtain the text recognition result; the target detection result of the overall image to be tested is updated through the matching result between the text recognition result and the preset text set including multiple parameter texts that are not configured by the application program, so as to accurately detect the cheating behavior of parameter text plug-ins. Therefore, the present application provides a possible implementation manner, and the method further includes the following S12 - S14 (not shown in the figure):
[0141] S12: Perform anomaly detection on the overall image to be measured for the target list through the list detection model, and obtain the list detection result of the overall image to be measured; the list detection result represents the second detection probability that the overall image to be measured includes the target list, and the target list includes parameter texts not configured in the application program.
[0142] Among them, the target list model is used to detect the result that the image includes the target list, and it indicates whether the image includes the target list through the detection probability that the image includes the target list; the target list refers to a parameter text type external plug-in.
[0143] S13: If the second detection probability is greater than or equal to the second preset probability, perform text recognition on the overall image to be measured, and obtain the text recognition result.
[0144] Among them, the second preset probability is the lower limit probability that the image includes the target list.
[0145] S14: Update the target detection result according to the matching result between the text recognition result and the preset text set; the preset text set includes multiple parameter texts not configured in the application program.
[0146] Based on the overall interception of the application interface of the application program, the implementation method of S12 - S14 can cover the parameter text type external plug-ins in the application interface of the application program by specifically detecting the parameter texts not configured in the application program and matching the preset text set including multiple parameter texts not configured in the application program after text recognition, so that the target detection result can indicate whether there are parameter text type external plug-ins in the application interface of the application program, can more accurately detect the cheating behavior of the parameter text type external plug-ins, further improve the cheating detection accuracy and cheating detection effect of the parameter text type external plug-ins, and improve the detection coverage and detection accuracy of whether there are external plug-ins in the application interface of the detected application program.
[0147] As an example of S12 - S14, the target list is a parameter text type external plug-in. Based on the above S204 example, the computer device performs anomaly detection on the overall image to be measured for the parameter texts not configured in the game program, that is, for the parameter text type external plug-ins, through the list detection model, and obtains the list detection result of the overall image to be measured; the list detection result represents the second detection probability that the overall image to be measured includes the parameter text type external plug-ins. If the second detection probability is greater than or equal to the second preset probability, the computer device performs text recognition on the overall image to be measured and obtains the text recognition result. The computer device updates the target detection result according to the matching result between the text recognition result and the preset text set including multiple parameter texts not configured in the game program.
[0148] Among them, for the list detection model in S12 above, a target detection model is obtained by training a second detection model in advance with the normal overall image corresponding to the application interface of the application, the second normal label of the normal overall image excluding the target list, the abnormal overall image corresponding to the application interface of the application, and the second abnormal label of the abnormal overall image including the target list.
[0149] The specific training process of the target detection model means: First, obtain the normal overall image and the abnormal overall image corresponding to the application interface; the normal overall image is marked with the second normal label excluding the target list, and the abnormal overall image is marked with the second abnormal label including the target list. Then, input the normal overall image and the abnormal overall image into the second detection model for abnormal detection of the target list, detect the parameter text not configured by the application, that is, detect the target list, and output the first prediction result of the normal overall image and the second prediction result of the abnormal overall image. Finally, based on the first prediction result of the normal overall image and the second prediction result of the abnormal overall image, combined with the second normal label marked on the normal overall image and the second abnormal label marked on the abnormal overall image, adjust the model parameters of the second detection model to achieve training, so that the second prediction result of the normal overall image is close to the second normal label and the second prediction result of the abnormal overall image is close to the second abnormal label to complete the model training, and use the trained second detection model as the target detection model. Therefore, the present application provides a possible implementation method. The steps for obtaining the list detection model in S12 include S15 - S17 (not shown in the figure):
[0150] S15: Obtain the normal overall image and the abnormal overall image corresponding to the application interface; the normal overall image is marked with the second normal label excluding the target list, and the abnormal overall image is marked with the second abnormal label including the target list.
[0151] Among them, the normal overall image refers to the overall screenshot image of the display interface of the application that does not include the target list during the historical application process of the application; the second normal label is used to indicate that the normal overall image does not include the target list; the abnormal overall image refers to the overall screenshot image of the display interface of the application that includes the target list during the historical application process of the application; the second abnormal label is used to indicate that the abnormal overall image includes the target list.
[0152] S16: Perform abnormal detection of the target list on the normal overall image and the abnormal overall image through the second detection model, and obtain the first prediction result of the normal overall image and the second prediction result of the abnormal overall image.
[0153] Among them, the second detection model is used to predict whether the image includes a target list, and whether the image includes the target list is represented by the prediction probability of the image including the target list; the first prediction result of a normal overall image represents the prediction probability that the normal overall image includes the target list; the second prediction result of an abnormal overall image represents the prediction probability that the abnormal overall image includes the target list.
[0154] S17: According to the first prediction result, the second normal label, the second prediction result, and the second abnormal label, adjust the model parameters of the second detection model to obtain a list detection model.
[0155] Among them, the list detection model is the second detection model with the model parameter adjustment completed.
[0156] Based on the normal overall image and the abnormal overall image corresponding to the application interface of the application program in S15 - S17, by specifically detecting the parameter text not configured in the application program, the first prediction result of the normal overall image and the second prediction result of the abnormal overall image are obtained. According to the training direction of making the first prediction result close to the second normal label and the second prediction result close to the second abnormal label, the implementation method of adjusting the model parameters of the second detection model quickly, effectively, and accurately learns the correlation between the normal overall image and the second normal label, as well as the abnormal overall image and the second abnormal label, and completes the model training to obtain the target detection model; it provides an accurate detection model for quickly, effectively, and accurately detecting whether the image includes parameter text - type plug - ins subsequently.
[0157] As an example of the above S15 - S17, based on the example of S12 - S14 above, obtain the normal overall image and the abnormal overall image corresponding to the game interface of the game program; among them, the normal overall image is marked with the second normal label indicating no parameter text - type plug - ins, and the abnormal overall image is marked with the second abnormal label indicating the existence of parameter text - type plug - ins; the computer device performs abnormal detection for parameter text - type plug - ins on the normal overall image and the abnormal overall image through the second detection model to obtain the first prediction result of the normal overall image and the first prediction result of the abnormal overall image; the computer device adjusts the model parameters of the second detection model according to the first prediction result, the second normal label, the second prediction result, and the second abnormal label to obtain the target detection model.
[0158] Among them, for the normal overall image in S15, the historical normal image corresponding to the application interface of the application is intercepted as a whole to obtain the normal overall image; for the abnormal overall image in S15, when it is difficult to obtain the abnormal overall image corresponding to the application interface of the application, in order to quickly and effectively obtain the abnormal overall image, the abnormal overall image can be constructed based on the normal overall image. Therefore, the steps for obtaining the abnormal overall image in S15 can include the following various implementation methods:
[0159] One implementation method means that on the basis of determining the generation method of the target list, after obtaining the normal overall image, the target list is automatically generated in the normal overall image to obtain the abnormal overall image. Therefore, the present application provides a possible implementation method. The steps for obtaining the abnormal overall image in S15 include S18 (not shown in the figure): automatically generating the target list for the normal overall image to obtain the abnormal overall image.
[0160] This implementation method of S18 by automatically generating the target list in the normal overall image corresponding to the application interface of the application can quickly and effectively construct the abnormal overall image corresponding to the application interface of the application without collecting the historical abnormal image corresponding to the application interface as the abnormal overall image, so as to quickly and effectively obtain the abnormal overall image; and quickly and effectively provide training data for subsequent training of the list detection model.
[0161] As an example of the above S18, on the basis of the above S15-S17 examples, see Figure 7 , Figure 7 which is a schematic diagram for obtaining the abnormal overall image provided by the embodiment of the present application; the computer device automatically generates a parameter text type plug-in in the normal overall image to obtain the abnormal overall image.
[0162] Another implementation method means that without determining the generation method of the target list, the target list in the historical abnormal image corresponding to the application interface of the application is extracted as the target list template, and the target list template is fused with the normal overall image to obtain the abnormal overall image. Therefore, the present application provides a possible implementation method. The steps for obtaining the abnormal overall image in S15 include S19-S20 (not shown in the figure):
[0163] S19: Extract the target list from the historical abnormal image to obtain the target list template.
[0164] S20: Perform image fusion on the normal overall image and the target list template to obtain the abnormal overall image.
[0165] The S19-S20 can quickly and effectively construct the abnormal overall image corresponding to the application interface of the application program by extracting the target list in the historical abnormal images corresponding to the application interface of the application program as the target list template and fusing the target list template into the normal overall image, without collecting the historical abnormal images corresponding to the application interface as the abnormal overall image and without determining the generation method of the target list, so as to quickly and effectively obtain the abnormal overall image, and can quickly and effectively provide training data for the subsequent training of the target detection model.
[0166] As an example of the S19-S20, based on the above S15-S17 examples, refer to Figure 8 , Figure 8 which is another schematic diagram for obtaining the abnormal overall image provided by the embodiment of the present application; the computer device extracts the plug-in of the parameter text type in the historical abnormal image to obtain the plug-in template of the parameter text type; the computer device performs image fusion on the normal overall image and the plug-in template of the parameter text type to obtain the abnormal overall image.
[0167] In summary, refer to Figure 9 , Figure 9 which is a specific flowchart of image detection provided by the embodiment of the present application. The specific process is as follows: First, take a screenshot of the game interface of the game program to obtain the overall image to be tested. Then, on the one hand, perform abnormal detection on the overall image to be tested through the abnormal detection model to obtain the overall detection result of the overall image to be tested; on the other hand, perform multiple local clippings on the overall image to be tested according to the central area of the overall image to be tested to obtain multiple local images to be tested, and the local areas of the multiple local images to be tested in the overall image to be tested are different; perform abnormal detection on the multiple local images to be tested for the target visual plug-in through the target detection model to obtain multiple local detection results corresponding to the multiple local images to be tested; the target visual plug-in is a visual object not configured in the game program. Finally, determine the plug-in detection result of the overall image to be tested according to the multiple local detection results and the overall detection result.
[0168] In addition, on the other hand, perform abnormal detection on the overall image to be tested for the parameter text type plug-in through the list detection model to obtain the list detection result of the overall image to be tested; the parameter text type plug-in is a parameter text not configured in the game program, and the list detection result represents the second detection probability that the overall image to be tested includes the parameter text type plug-in; if the second detection probability is greater than or equal to the second preset probability, perform text recognition on the overall image to be tested through the text recognition model to obtain the text recognition result; update the plug-in detection result according to the matching result between the text recognition result and the preset text set; the preset text set includes multiple parameter texts in the plug-ins not configured in the game program.
[0169] In addition, if the overall detection probability of the overall image to be measured represented by the overall detection result, which includes visual objects and text objects not configured by the application program, is greater than or equal to the first target probability, text recognition is performed on the overall image to be measured through a text recognition model to obtain a text recognition result.
[0170] See Figure 10 , Figure 10 which is a specific flowchart of another image detection provided by an embodiment of the present application. The specific process is as follows: First, a screenshot of the game interface of the game program is taken as a whole to obtain the overall image to be measured. Second, multiple local crops are performed on the overall image to be measured according to the central region of the overall image to be measured to obtain multiple local images to be measured, and the local regions of the multiple local images to be measured in the overall image to be measured are different. Then, for each local image to be measured, an abnormal detection for the target visual class plug-in is performed on the local image to be measured through a first detection sub-model to obtain a first detection result of the local image to be measured, and the first detection result represents the first detection probability that the local image to be measured includes the target object; if the first detection probability is greater than or equal to the first preset probability, an abnormal detection for the target visual class plug-in is performed on the local image to be measured through a second detection sub-model to obtain a second detection result of the local image to be measured; the local detection result of the local image to be measured is determined according to the second detection result; if the first detection probability is less than the first preset probability, the local detection result of the local image to be measured is determined according to the first detection result; the target visual class plug-in is a visual object not configured by the game program. Finally, the plug-in detection result of the overall image to be measured is determined according to multiple local detection results.
[0171] In addition, an abnormal detection for the parameter text class plug-in is performed on the overall image to be measured through a list detection model to obtain a list detection result of the overall image to be measured; the parameter text class plug-in is parameter text not configured by the game program, and the list detection result represents the second detection probability that the overall image to be measured includes the parameter text class plug-in; if the second detection probability is greater than or equal to the second preset probability, text recognition is performed on the overall image to be measured through a text recognition model to obtain a text recognition result; the plug-in detection result is updated according to the matching result between the text recognition result and the preset text set; the preset text set includes multiple parameter texts not configured by the game program.
[0172] In addition, an abnormal detection is performed on the overall image to be measured through an abnormal detection model to obtain an overall detection result of the overall image to be measured; if the overall detection probability of the overall image to be measured represented by the overall detection result, which includes visual objects and text objects not configured by the application program, is greater than or equal to the first target probability, text recognition is performed on the overall image to be measured through a text recognition model to obtain a text recognition result.
[0173] In addition, in the embodiments of the present application, it is difficult to obtain the new abnormal images corresponding to the presence of plug-ins in the application interface of the new application. The above-mentioned object detection model, abnormal detection model, and list detection model cannot quickly and effectively detect whether there are plug-ins in the application interface of the new application. To solve this problem, the new screenshot images corresponding to the application interface of the new application can also be detected for abnormalities through a general detection model to obtain suspicious screenshot images that may have plug-ins and normal screenshot images that do not have plug-ins. Using the above abnormal construction method, the normal screenshot images are constructed into abnormal screenshot images, and then the abnormal screenshot images are further detected for abnormalities through the general detection model to screen out the abnormal screenshot images that fail to be successfully detected as having plug-ins as the new training data of the general detection model. Among them, the general detection model is one or more of the general models of the object detection model, the general models of the abnormal detection model, or the general models of the list detection model. At the same time, to avoid false detection and missed detection of the new screenshot images being detected as suspicious screenshot images, the suspicious screenshot images can also be reviewed and labeled, and the suspicious screenshot images labeled with abnormal labels are also used as the new training data of the general detection model. Based on this, the present application provides a possible implementation method, and the method further includes the following S21-S26 (not shown in the figure):
[0174] S21: Take multiple screenshots of the application interface of the new application to obtain multiple new screenshot images.
[0175] S22: Detect the abnormalities of the multiple new screenshot images through the general detection model to obtain multiple first suspicious images and multiple new normal images; the general detection model is one or more of the general models of the object detection model, the general models of the abnormal detection model, or the general models of the list detection model.
[0176] S23: Perform abnormal construction on the multiple new normal images to obtain multiple first abnormal images.
[0177] S24: Detect the abnormalities of the multiple first abnormal images through the general detection model to obtain multiple second suspicious images and multiple second abnormal images.
[0178] S25: Determine the new abnormal images according to the abnormal images marked in the multiple first suspicious images and the multiple second suspicious images.
[0179] S26: Update the model parameters of the general detection model according to the new abnormal images and the preset abnormal labels of the new abnormal images to obtain the updated general detection model.
[0180] The S21 - S26 can quickly and effectively construct a new abnormal image corresponding to the presence of external plug - ins in the application interface of a new application, so as to quickly and effectively fine - tune the general model of the target detection model, the general model of the abnormal detection model, or the general model of the list detection model through the new abnormal image, reduce the cold - start time for detecting whether there are external plug - ins in the application interface of the new application, and thus help to timely combat the cheating behavior of smaller visual - type external plug - ins during the application process of the new application.
[0181] As an example of the above S21 - S26, based on the above example, refer to Figure 11 , Figure 11 This is a specific flowchart for updating the general detection model provided by an embodiment of this application; the computer device takes multiple screenshots of the game interface of the new game program to obtain multiple new screenshot images; the computer device performs abnormal detection on the multiple new screenshot images through the general detection model to obtain multiple first suspicious images and multiple new normal images; the computer device performs abnormal construction on the multiple new normal images to obtain multiple first abnormal images; the computer device performs abnormal detection on the multiple first abnormal images through the general detection model to obtain multiple second suspicious images and multiple second abnormal images; the computer device determines the new abnormal image according to the abnormal images marked in the multiple first suspicious images and the multiple second suspicious images; the computer device updates the model parameters of the general detection model according to the new abnormal image and the preset abnormal label of the new abnormal image to obtain the updated general detection model.
[0182] In summary, refer to Figure 12 , Figure 12 This is a flowchart of another image detection method provided by an embodiment of this application, and the method includes:
[0183] S1201: Take an overall screenshot of the game interface of the game program to obtain the overall image to be measured.
[0184] S1202: Determine the central area of the overall image to be measured.
[0185] S1203: Perform position offset on the central area to obtain the offset area corresponding to the central area.
[0186] S1204: Perform multiple local clippings on the overall image to be measured according to the central area and the offset area to obtain multiple local images to be measured.
[0187] S1205: Perform abnormal detection on the multiple local images to be measured through the target detection model for target visual - type external plug - ins, and obtain multiple local detection results corresponding to the multiple local images to be measured; the target visual - type external plug - in is a visual object not configured in the game program.
[0188] S1206: Perform anomaly detection on the overall image to be measured through an anomaly detection model to obtain the overall detection result of the overall image to be measured.
[0189] S1207: Determine the add-on detection result of the overall image to be measured according to multiple local detection results and the overall detection result.
[0190] S1208: Perform anomaly detection on the overall image to be measured for parameter text type add-ons through a list detection model to obtain the list detection result of the overall image to be measured; the list detection result represents the second detection probability that the overall image to be measured includes parameter text type add-ons, and the parameter text type add-ons are parameter texts not configured in the game program.
[0191] S1209: If the second detection probability is greater than or equal to the second preset probability, perform text recognition on the overall image to be measured to obtain the text recognition result.
[0192] S1210: Update the add-on detection result according to the matching result between the text recognition result and the preset text set; the preset text set includes multiple parameter texts not configured in the game program.
[0193] It can be seen from the above technical solutions that during the application process of the application, not only can small visual add-ons in the application interface of the application be accurately detected, improving the cheating detection accuracy and cheating detection effect of small visual add-ons, but also parameter text type add-ons in the application interface of the application can be accurately detected, thereby improving the detection coverage and detection accuracy of whether there are add-ons in the application interface of the application; it helps to timely combat the cheating behaviors of small visual add-ons and parameter text type add-ons.
[0194] It should be noted that based on the implementation manners provided in the above aspects of the present application, further combinations can be made to provide more implementation manners.
[0195] Based on Figure 2 Corresponding to the image detection method provided in the embodiment, the embodiment of the present application further provides an image detection device. Refer to Figure 13 , Figure 13 This is the structural diagram of an image detection device provided by the embodiment of the present application. The image detection device 1300 includes: a screenshot unit 1301, a clipping unit 1302, a detection unit 1303, and a determination unit 1304;
[0196] The screenshot unit 1301 is configured to perform an overall screenshot of the application interface of the application to obtain the overall image to be measured;
[0197] The clipping unit 1302 is configured to perform multiple local clippings on the overall image to be measured to obtain multiple local images to be measured; the local regions of the multiple local images to be measured in the overall image to be measured are different;
[0198] The detection unit 1303 is configured to perform anomaly detection on multiple local images to be tested for a target object through a target detection model, and obtain multiple local detection results corresponding to the multiple local images to be tested; the target object is a visual object not configured in the application program;
[0199] The determination unit 1304 is configured to determine the target detection result of the overall image to be tested according to the multiple local detection results.
[0200] In a possible implementation, the cropping unit 1302 is specifically configured to:
[0201] Determine the central region of the overall image to be tested;
[0202] Perform a position offset on the central region to obtain an offset region corresponding to the central region;
[0203] Perform multiple local croppings on the overall image to be tested according to the central region and the offset region, and obtain multiple local images to be tested.
[0204] In a possible implementation, the apparatus further includes: a first acquisition unit and a first adjustment unit;
[0205] The first acquisition unit is configured to acquire a normal local image and an abnormal local image corresponding to the application interface; the normal local image is marked with a first normal label that does not include the target object, and the abnormal local image is marked with a first abnormal label that includes the target object;
[0206] The detection unit 1303 is further configured to perform anomaly detection on the normal local image and the abnormal local image for the target object through a first detection model, and obtain a local prediction result of the normal local image and a local prediction result of the abnormal local image;
[0207] The first adjustment unit is configured to adjust the model parameters of the first detection model according to the local prediction result of the normal local image, the first normal label, the local prediction result of the abnormal local image, and the first abnormal label, and obtain a target detection model.
[0208] In a possible implementation, the detection unit 1303 is further configured to:
[0209] Perform anomaly detection on the overall image to be tested through an anomaly detection model, and obtain an overall detection result of the overall image to be tested;
[0210] The determination unit 1304 is specifically configured to:
[0211] Determine the target detection result according to the multiple local detection results and the overall detection result.
[0212] In a possible implementation, the detection unit 1303 is specifically configured to:
[0213] Enlarge the overall image to be measured to obtain an enlarged overall image to be measured;
[0214] Perform anomaly detection on the enlarged overall image to be measured through an anomaly detection model to obtain an overall detection result.
[0215] In a possible implementation, the target detection model includes a first detection sub-model and a second detection sub-model. The detection unit 1303 is specifically configured to:
[0216] For each local image to be measured, perform anomaly detection on the local image to be measured for the target object through the first detection sub-model to obtain a first detection result of the local image to be measured; the first detection result represents the first detection probability that the local image to be measured includes the target object;
[0217] If the first detection probability is greater than or equal to a first preset probability, perform anomaly detection on the local image to be measured for the target object through the second detection sub-model to obtain a second detection result of the local image to be measured;
[0218] Determine the local detection result of the local image to be measured according to the second detection result;
[0219] If the first detection probability is less than the first preset probability, determine the local detection result of the local image to be measured according to the first detection result.
[0220] In a possible implementation, the apparatus further includes: a first generation unit;
[0221] The first generation unit is configured to automatically generate the target object for the normal local image to obtain an abnormal local image.
[0222] In a possible implementation, the apparatus further includes: a first extraction unit and a first fusion unit;
[0223] The first extraction unit is configured to extract the target object from the historical abnormal images to obtain a target object template;
[0224] The first fusion unit is configured to perform image fusion on the normal local image and the target object template to obtain an abnormal local image.
[0225] In a possible implementation, the apparatus further includes: a second extraction unit and a second fusion unit;
[0226] The first acquisition unit is further configured to acquire historical mis-detected images; similar objects in the historical mis-detected images are mis-detected as the target object;
[0227] A second extraction unit, configured to extract objects from similar objects in historical mis-detection images to obtain a similar object template;
[0228] A second fusion unit, configured to perform image fusion on a normal partial image and a similar object template to obtain a fused partial image;
[0229] The determination unit 1304 is further configured to determine a normal partial image according to the fused partial image.
[0230] In a possible implementation manner, the apparatus further includes: an identification unit and a first update unit;
[0231] The detection unit 1303 is further configured to perform anomaly detection on the to-be-tested overall image for a target list through a list detection model to obtain a list detection result of the to-be-tested overall image; the list detection result represents a second detection probability that the to-be-tested overall image includes the target list, and the target list is a parameter text not configured by the application program;
[0232] The identification unit is configured to perform text recognition on the to-be-tested overall image to obtain a text recognition result if the second detection probability is greater than or equal to a second preset probability;
[0233] The first update unit is configured to update the target detection result according to a matching result between the text recognition result and a preset text set; the preset text set includes multiple parameter texts not configured in the application program.
[0234] In a possible implementation manner, the apparatus further includes: a second acquisition unit and a second adjustment unit;
[0235] The second acquisition unit is configured to acquire a normal overall image and an abnormal overall image corresponding to the application interface; the normal overall image is marked with a second normal label not including the target list, and the abnormal overall image is marked with a second abnormal label including the target list;
[0236] The detection unit 1303 is further configured to perform anomaly detection on the normal overall image and the abnormal overall image for the target list through a second detection model to obtain a first prediction result of the normal overall image and a second prediction result of the abnormal overall image;
[0237] The second adjustment unit is configured to adjust model parameters of the second detection model according to the first prediction result, the second normal label, the second prediction result, and the second abnormal label to obtain a list detection model.
[0238] In a possible implementation manner, the apparatus further includes: a second generation unit;
[0239] The second generation unit is configured to automatically generate an abnormal overall image for the normal overall image for the target list.
[0240] In a possible implementation, the device further includes: a third extraction unit and a third fusion unit;
[0241] The third extraction unit is configured to extract a target list from the historical abnormal images to obtain a target list template;
[0242] The third fusion unit is configured to perform image fusion on the normal overall image and the target list template to obtain an abnormal overall image.
[0243] In a possible implementation, the device further includes: a construction unit and a second update unit;
[0244] The screenshot unit 1301 is further configured to take multiple screenshots of the application interface of the new application to obtain multiple new screenshot images;
[0245] The detection unit 1303 is further configured to perform abnormal detection on the multiple new screenshot images through a general detection model to obtain multiple first suspicious images and multiple new normal images; the general detection model is one or more of a general model of a target detection model, a general model of an abnormal detection model, or a general model of a list detection model;
[0246] The construction unit is configured to perform abnormal construction on the multiple new normal images to obtain multiple first abnormal images;
[0247] The detection unit 1303 is further configured to perform abnormal detection on the multiple first abnormal images through the general detection model to obtain multiple second suspicious images and multiple second abnormal images;
[0248] The determination unit 1304 is further configured to determine new abnormal images according to the labeled abnormal images in the multiple first suspicious images and the multiple second suspicious images;
[0249] The second update unit is configured to update the model parameters of the general detection model according to the new abnormal images and the preset abnormal labels of the new abnormal images to obtain an updated general detection model.
[0250] As can be seen from the above technical solutions, the image detection device includes a screenshot unit, a cropping unit, a detection unit, and a determination unit. The screenshot unit takes a screenshot of the application interface of the application as a to-be-detected overall image; the cropping unit locally crops the to-be-detected overall image multiple times into multiple to-be-detected local images, where the local areas of the multiple to-be-detected local images in the to-be-detected overall image are different; this unit takes a screenshot of the application interface of the application as a whole and locally crops it multiple times to increase the proportion of the object, making it easier to highlight the smaller visual plug-ins in the application interface of the application. The detection unit inputs the multiple to-be-detected local images into the target detection model to detect the visual objects that are not configured in the application, that is, the target objects, and obtains multiple local detection results corresponding to the multiple to-be-detected local images; this unit specifically detects the visual objects with a smaller object area that are not configured in the application, and can cover the smaller visual plug-ins in the application interface of the application. The determination unit determines the target detection result of the to-be-detected overall image through the multiple local detection results; this unit determines the detection result of the application interface of the application based on the multiple local detection results that can detect the smaller visual plug-ins, and can accurately detect the cheating behavior of the smaller visual plug-ins. Based on this, the device accurately detects the smaller visual plug-ins in the application interface of the application during the application process of the application, improves the cheating detection accuracy and cheating detection effect of the smaller visual plug-ins, and helps to combat the cheating behavior of the smaller visual plug-ins in a timely manner.
[0251] The embodiment of the present application also provides a computer device, which can be a server. Refer to Figure 14 , Figure 14 which is a structural diagram of a server provided by the embodiment of the present application. The server 1400 may vary greatly due to configuration or performance differences, and may include one or more processors, such as the CPU 1422, and a memory 1432, and one or more storage media 1430 (such as one or more mass storage devices) for storing application programs 1442 or data 1444. Among them, the memory 1432 and the storage media 1430 can be transient storage or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 1422 can be set to communicate with the storage media 1430 and execute a series of instruction operations in the storage media 1430 on the server 1400.
[0252] The server 1400 may further include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1458, and / or, one or more operating systems 1441, such as Windows Server TM , Mac OS XTM , Unix TM , Linux TM , FreeBSD TM and so on.
[0253] In this embodiment, the central processing unit 1422 in the server 1400 can execute the methods provided in the various alternative implementations of the foregoing embodiments.
[0254] The computer device provided by the embodiments of the present application may also be a terminal. Refer to Figure 15 , Figure 15 which is a structural diagram of a terminal provided by the embodiments of the present application. Taking the terminal as a smart phone as an example, the smart phone includes: a Radio Frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a Wireless Fidelity (WiFi) module 1570, a processor 1580, and a power supply 15120 and other components. The input unit 1530 may include a touch panel 1531 and other input devices 1532. The display unit 1540 may include a display panel 1541. The audio circuit 1560 may include a speaker 1561 and a microphone 1562. Those skilled in the art can understand that Figure 15 the structure of the smart phone shown in
[0255] does not limit the smart phone, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0256] The processor 1580 is the control center of the smart phone, connecting various parts of the entire smart phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 1520, and by invoking the data stored in the memory 1520, it performs various functions of the smart phone and processes data. Optionally, the processor 1580 may include one or more processing units; preferably, the processor 1580 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1580 either.
[0257] In this embodiment, the processor 1580 in the smart phone can execute the methods provided in various optional implementation manners of the above embodiment.
[0258] According to one aspect of the present application, there is provided a computer-readable storage medium for storing a computer program. When the computer program runs on a computer device, the computer device is caused to execute the methods provided in various optional implementation manners of the above embodiment.
[0259] According to one aspect of the present application, there is provided a computer program product. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the methods provided in various optional implementation manners of the above embodiment.
[0260] The descriptions of the processes or structures corresponding to the above respective drawings each have their own focuses. For parts not detailed in a certain process or structure, reference may be made to the relevant descriptions of other processes or structures.
[0261] The terms "first", "second", etc. in the specification of the present application and the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0262] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0263] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0264] In addition, in each embodiment of the present application, the functional units can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0265] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), RAM, magnetic disks, or optical discs that can store computer programs.
[0266] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. And these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. An image detection method, characterized in that, The method includes: Taking an overall screenshot of the application interface of the application to obtain an overall image to be tested; Performing multiple local croppings on the overall image to be tested to obtain multiple local images to be tested; the local regions of the multiple local images to be tested in the overall image to be tested are different; Performing anomaly detection on the multiple local images to be tested for a target object through a target detection model to obtain multiple local detection results corresponding to the multiple local images to be tested; the target object is a visual object not configured in the application; Determining a target detection result of the overall image to be tested according to the multiple local detection results.
2. The method according to claim 1, characterized in that, The performing multiple local croppings on the overall image to be tested to obtain multiple local images to be tested includes: Determining a central region of the overall image to be tested; Performing a position offset on the central region to obtain an offset region corresponding to the central region; Performing multiple local croppings on the overall image to be tested according to the central region and the offset region to obtain the multiple local images to be tested.
3. The method according to claim 1, wherein The obtaining step of the target detection model includes: Obtaining a normal local image and an abnormal local image corresponding to the application interface; the normal local image is marked with a first normal label not including the target object, and the abnormal local image is marked with a first abnormal label including the target object; Performing anomaly detection on the normal local image and the abnormal local image for the target object through a first detection model to obtain a local prediction result of the normal local image and a local prediction result of the abnormal local image; Adjusting model parameters of the first detection model according to the local prediction result of the normal local image, the first normal label, the local prediction result of the abnormal local image, and the first abnormal label to obtain the target detection model.
4. The method according to claim 1, wherein The method further includes: Performing anomaly detection on the overall image to be tested through an anomaly detection model to obtain an overall detection result of the overall image to be tested; The determining a target detection result of the overall image to be tested according to the multiple local detection results includes: Determining the target detection result according to the multiple local detection results and the overall detection result.
5. The method according to claim 4, characterized in that, The performing anomaly detection on the overall image to be tested through an anomaly detection model to obtain an overall detection result of the overall image to be tested includes: Magnifying the overall image to be tested to obtain a magnified overall image to be tested; Performing anomaly detection on the magnified overall image to be tested through the anomaly detection model to obtain the overall detection result.
6. The method according to claim 1, characterized in that, The target detection model includes a first detection sub-model and a second detection sub-model, and the detection granularity of the first detection sub-model is greater than that of the second detection sub-model; the performing anomaly detection on the multiple local images to be tested for a target object through a target detection model to obtain multiple local detection results corresponding to the multiple local images to be tested includes: For each local image to be tested, perform anomaly detection on the local image to be tested for the target object through the first detection sub-model, and obtain a first detection result of the local image to be tested; the first detection result represents a first detection probability that the local image to be tested includes the target object. If the first detection probability is greater than or equal to a first preset probability, perform anomaly detection on the local image to be tested for the target object through the second detection sub-model, and obtain a second detection result of the local image to be tested. Determine a local detection result of the local image to be tested according to the second detection result. If the first detection probability is less than the first preset probability, determine the local detection result of the local image to be tested according to the first detection result.
7. The method according to claim 3, wherein The step of obtaining the abnormal local image includes: Automatically generate the abnormal local image for the target object from the normal local image.
8. The method according to claim 3, wherein The step of obtaining the abnormal local image includes: Extract the target object from the historical abnormal images to obtain a target object template. Fuse the normal local image and the target object template to obtain the abnormal local image.
9. The method according to claim 3, wherein The step of obtaining the normal local image includes: Obtain historical mis-detected images; similar objects in the historical mis-detected images are mis-detected as the target object. Extract the similar object from the historical mis-detected image to obtain a similar object template. Fuse the normal local image and the similar object template to obtain a fused local image. Determine the normal local image according to the fused local image.
10. The method according to any one of claims 1-9, characterized in that The method further includes: Perform anomaly detection on the overall image to be tested for the target list through a list detection model, and obtain a list detection result of the overall image to be tested; the target list includes parameter texts not configured by the application program, and the list detection result represents a second detection probability that the overall image to be tested includes the target list. If the second detection probability is greater than or equal to a second preset probability, perform text recognition on the overall image to be tested to obtain a text recognition result. Update the target detection result according to the matching result between the text recognition result and a preset text set; the preset text set includes multiple parameter texts not configured by the application program.
11. The method according to claim 10, characterized in that, The step of obtaining the list detection model includes: Obtain a normal overall image and an abnormal overall image corresponding to the application interface; the normal overall image is marked with a second normal label not including the target list, and the abnormal overall image is marked with a second abnormal label including the target list. Perform anomaly detection on the normal overall image and the abnormal overall image for the target list through a second detection model, and obtain a first prediction result of the normal overall image and a second prediction result of the abnormal overall image. Adjust the model parameters of the second detection model according to the first prediction result, the second normal label, the second prediction result, and the second abnormal label to obtain the list detection model.
12. The method according to claim 11, wherein The steps for obtaining the abnormal overall image include: Automatically generating the abnormal overall image for the target list from the normal overall image.
13. The method according to claim 11, wherein The steps for obtaining the abnormal overall image include: Extracting the target list from the historical abnormal images to obtain a target list template. Fusing the normal overall image and the target list template to obtain the abnormal overall image.
14. The method according to claim 1, characterized in that, The method further includes: Taking multiple screenshots of the application interface of the new application to obtain multiple new screenshot images. Performing abnormal detection on the multiple new screenshot images through a general detection model to obtain multiple first suspicious images and multiple new normal images; the general detection model is one or more of the general model of the target detection model, the general model of the abnormal detection model, or the general model of the list detection model. Performing abnormal construction on the multiple new normal images to obtain multiple first abnormal images. Performing abnormal detection on the multiple first abnormal images through the general detection model to obtain multiple second suspicious images and multiple second abnormal images. Determining the new abnormal images based on the labeled abnormal images among the multiple first suspicious images and the multiple second suspicious images. Updating the model parameters of the general detection model according to the new abnormal images and the preset abnormal labels of the new abnormal images to obtain an updated general detection model.
15. An image detection device, characterized in that, The device includes: a screenshot unit, a cropping unit, a detection unit, and a determination unit. The screenshot unit is configured to take an overall screenshot of the application interface of the application to obtain a to-be-tested overall image. The cropping unit is configured to perform multiple local croppings on the to-be-tested overall image to obtain multiple to-be-tested local images; the local areas of the multiple to-be-tested local images in the to-be-tested overall image are different. The detection unit is configured to perform abnormal detection on the multiple to-be-tested local images for the target object through a target detection model to obtain multiple local detection results corresponding to the multiple to-be-tested local images; the target object is a visual object not configured in the application. The determination unit is configured to determine the target detection result of the to-be-tested overall image according to the multiple local detection results.
16. A computer device, characterized in that, The computer device includes a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor. The processor is configured to execute the method according to any one of claims 1-14 based on the instructions in the computer program.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, and when the computer program runs on the computer device, the computer device is caused to execute the method according to any one of claims 1-14.
18. A computer program product comprising a computer program, characterized in that, When the computer program runs on the computer device, the computer device is caused to execute the method according to any one of claims 1-14.