Image classification method and device, equipment, medium and program product
Through the first-level classification model screening and the second-level classification model refinement detection, the problem of manual review of game screenshots taking time is solved, and efficient cheat detection and automatic punishment are achieved.
Patent Information
- Application Number
- CN202311776914.2
- 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
In the prior art, the cheating traces in manual review of game screenshots require a lot of manpower and material resources and take a long time, resulting in low cheat detection efficiency.
A method of image classification is provided to filter out game images that may have cheating traces through the first-level classification model, and perform fine detection through the second-level classification model to determine the type and probability of cheating.
It reduces the number of game images that require manual review, improves the efficiency of cheat detection, and realizes the function of automatically punishing cheat accounts.
Smart Images

Figure CN120198698A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of artificial intelligence, and in particular, to an image classification method, device, equipment, medium and program product. Background Art
[0002] A game cheat is a game means that obtains an unfair advantage by modifying game data or exploiting game loopholes. A game cheat will enable a game character to obtain abilities, skills, etc. beyond the normal level, seriously affecting the fairness of the game.
[0003] In the related art, game screenshots of each client in the game are obtained, and then the game screenshots are sent to relevant reviewers. The reviewers will manually review the game screenshots to determine whether there are cheating traces in the game screenshots. If so, the account corresponding to the game screenshot will be punished.
[0004] However, in the related art, manually reviewing cheating traces in game screenshots requires a large amount of manpower and material resources and takes a long time, resulting in low efficiency of cheating detection in the game. Summary of the Invention
[0005] Embodiments of the present application provide an image classification method, device, equipment, medium and program product, which can improve the efficiency of cheating detection in the game. The technical solutions are as follows:
[0006] On the one hand, an image classification method is provided. The method includes:
[0007] Obtain a first game image to be classified;
[0008] Perform type prediction on the first game image through a first-level classification model to obtain a first classification result, where the first classification result is used to indicate the presence of abnormal elements in the first game image, and the abnormal elements are elements generated by using cheating means in the game;
[0009] In the case where the first classification result indicates the presence of the abnormal elements in the first game image, perform type prediction on the first game image through a second-level classification model to obtain a second classification result, where the second classification result is used to indicate the probability that the first game image belongs to n abnormal element types, and n is a positive integer.
[0010] On the other hand, an image classification device is provided. The device includes:
[0011] A first acquisition module, configured to acquire a first game image to be classified;
[0012] A first prediction module, configured to perform type prediction on the first game image through a first-level classification model to obtain a first classification result, where the first classification result is used to indicate the presence of abnormal elements in the first game image, and the abnormal elements are elements generated by using cheating means in the game;
[0013] A second prediction module, configured to, when the first classification result indicates the presence of the abnormal elements in the first game image, perform type prediction on the first game image through a second-level classification model to obtain a second classification result, where the second classification result is used to indicate the probability that the first game image belongs to n abnormal element types, and n is a positive integer.
[0014] On the other hand, a computer device is provided, where the computer device includes a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement any one of the above image classification methods.
[0015] On the other hand, a computer-readable storage medium is provided, where at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement any one of the above image classification methods.
[0016] On the other hand, a computer program product or a computer program is provided, where the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any one of the above image classification methods.
[0017] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include:
[0018] The type of the game image is predicted through a first-level classification model to obtain the presence of abnormal elements in the game image; if there are abnormal elements in the game image, the type of the game image is predicted through a second-level classification model to obtain the probabilities that the abnormal elements in the game image belong to n abnormal element types. Among them, through the first-level classification model, suspicious game images with cheating traces can be screened out from a large number of game images, filtering out normal game images without cheating traces and reducing the number of game images that need to be further detected for cheating; through the second-level classification model, refined detection of the types of abnormal elements can be performed on the suspicious game images, so as to determine whether there are cheating traces of a certain type in the suspicious game images. In the case of determining that there are cheating traces of a certain type in the suspicious game images, the cheating accounts corresponding to the suspicious game images can be automatically punished, thereby reducing the number of game images that need to be manually reviewed and improving the efficiency of cheating detection for games. Brief Description of the Drawings
[0019] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following described drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0021] Figure 2 is a flowchart of an image classification method provided by an exemplary embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a two-stage cheating detection scheme provided by an exemplary embodiment of the present application;
[0023] Figure 4 is a flowchart of a training method for a classification model provided by an exemplary embodiment of the present application;
[0024] Figure 5 is a flowchart of a training method for a classification model provided by another exemplary embodiment of the present application;
[0025] Figure 6 is a schematic diagram of the classification of cheating samples provided by an exemplary embodiment of the present application;
[0026] Figure 7 is a schematic diagram of the classification of a method for constructing cheating samples provided by an exemplary embodiment of the present application;
[0027] Figure 8It is a schematic diagram of constructing cheating samples provided by an exemplary embodiment of the present application;
[0028] Figure 9 It is a schematic diagram of the generated cheating samples provided by an exemplary embodiment of the present application;
[0029] Figure 10 It is a schematic diagram of classifying normal samples provided by an exemplary embodiment of the present application;
[0030] Figure 11 It is a schematic diagram of classifying the method for constructing normal samples provided by an exemplary embodiment of the present application;
[0031] Figure 12 It is a schematic diagram of constructing normal samples provided by an exemplary embodiment of the present application;
[0032] Figure 13 It is a schematic diagram of the training process of the classification model provided by an exemplary embodiment of the present application;
[0033] Figure 14 It is a schematic diagram of the iterative operation of the classification model provided by an exemplary embodiment of the present application;
[0034] Figure 15 It is a block diagram of the structure of an image classification device provided by an exemplary embodiment of the present application;
[0035] Figure 16 It is a block diagram of the structure of an image classification device provided by another exemplary embodiment of the present application;
[0036] Figure 17 It is a block diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Detailed implementation manners
[0037] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0038] In the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. It should be understood that there is no logical or temporal dependency between "first" and "second", nor are the quantity and execution order limited.
[0039] First, a brief introduction will be given to the nouns involved in the embodiments of the present application.
[0040] Artificial Intelligence (AI): It is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It 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, enabling machines to have the functions of perception, reasoning and decision-making.
[0041] Artificial intelligence technology is an interdisciplinary subject with a wide range of fields involved, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include sensors, special 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.
[0042] In related technologies, game screenshots of each client in the game are obtained, and then the game screenshots are sent to relevant auditors. The auditors will manually review the game screenshots to determine whether there are cheating traces in the game screenshots. If there are, the account corresponding to the game screenshot will be punished. However, in related technologies, manually reviewing cheating traces in game screenshots requires a large amount of manpower and material resources and takes a long time, resulting in low efficiency in detecting cheating in games.
[0043] The embodiment of this application provides an image classification method. Through the primary classification model, suspicious game images with cheating traces can be screened out from a large number of game images, filtering out normal game images without cheating traces and reducing the number of game images that need to be further detected for cheating; through the secondary classification model, refined detection of abnormal element types can be carried out for suspicious game images, so as to determine whether there are cheating traces of a certain type in the suspicious game images. In the case of determining that there are cheating traces of a certain type in the suspicious game images, the cheating account corresponding to the suspicious game image can be automatically punished, thus reducing the number of game images that need to be manually reviewed and improving the efficiency of detecting cheating in games.
[0044] It should be noted that, before collecting relevant data of the user (such as: the first game image, etc.) and during the process of collecting relevant data of the user, a prompt interface, a pop-up window or a voice prompt message can be displayed. The prompt interface, pop-up window or voice prompt message is used to prompt the user that their relevant data is being collected at present, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the confirmation operation of the user on the prompt interface or the pop-up window. Otherwise (that is, when the confirmation operation of the user on the prompt interface or the pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are ended, that is, the relevant data of the user is not obtained. In other words, all user data collected by this application is collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards.
[0045] The implementation environment of the specific real image classification method will be described below.
[0046] The image classification method provided by the embodiment of this application can be implemented independently by the terminal or the server, or can be jointly implemented by the terminal and the server. Taking the joint implementation of the image classification method by the terminal and the server as an example for description. Figure 1 The schematic diagram of the implementation environment provided by an exemplary embodiment of this application is as Figure 1 shown. This implementation environment includes a terminal 110, a server 120 and a communication network 130. Among them, the terminal 110 and the server 120 are connected through the communication network 130.
[0047] In some embodiments, a target application program with a game cheating detection function is installed and run in the terminal 110. The target application program can be implemented as a game management application program, a game detection application program, an instant messaging application program, etc., and the embodiment of this application does not limit this. Schematically, when it is necessary to perform cheating detection on the first game image, the first game image can be input into the terminal 110, and the terminal 110 sends the object first game image to the server 120 for cheating detection.
[0048] Optionally, the server 120 is used to provide background services for the target application program installed in the terminal 110. Schematically, a first-level classification model and a second-level classification model are set in the server 120. After receiving the first game image, the server 120 performs type prediction on the first game image through the first-level classification model to obtain a first classification result for indicating the presence of abnormal elements in the first game image; in the case where the first classification result indicates that there are abnormal elements in the first game image, the server 120 performs type prediction on the first game image through the second-level classification model to obtain a second classification result for indicating the probability that the first game image belongs to n abnormal element types.
[0049] Optionally, if the second classification result indicates that the first game image belongs to at least one abnormal element type, it is considered that the account corresponding to the first game image has cheated. The account corresponding to the first game image can be automatically punished, and the punishment result can be sent to the terminal corresponding to the account. If the second classification result indicates that the first game image does not belong to any abnormal element type, the second classification result and the review instruction can be sent to terminal 110 for further determination of the first game image by the reviewer.
[0050] In some embodiments, at least one of the first-level classification model and the second-level classification model can also be deployed on terminal 110 to implement part or the entire game cheating detection process by terminal 110. The embodiments of the present application do not limit this.
[0051] Among them, terminal 110 includes at least one of terminals such as smart phones, tablet computers, portable laptops, desktop computers, smart speakers, smart wearable devices, smart voice interaction devices, smart home appliances, and vehicle-mounted terminals.
[0052] It should be noted that server 120 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0053] Among them, cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model, which can form a resource pool, be used on demand, and be flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the background system for logical processing. Data at different levels will be processed separately, and various industry data requires a powerful system back-end support, which can only be achieved through cloud computing. Optionally, server 120 can also be implemented as a node in a blockchain system.
[0054] Based on the above introduction, an image classification method will be introduced.
[0055] Figure 2The following is a flowchart of an image classification method provided by an embodiment of the present application. Taking the application of this method to a server as shown in Figure 1 as an example, the method includes the following steps 210 to 230.
[0056] Step 210: Obtain a first game image to be classified.
[0057] Optionally, the first game image includes a screenshot of a game screen in the game. Schematically, obtain a screenshot of the game screen of the client in the ongoing game session; or, obtain a recorded video of a saved historical game session, and obtain a screenshot of the game screen based on the recorded video.
[0058] Schematically, the above first game image is a general term, that is, the first game image can be a single game image or multiple game images. Usually, a batch of game images can be input into the model for classification. This batch of game images can be game images corresponding to a single account or game images corresponding to multiple accounts, which is not limited here.
[0059] Schematically, the first game image is in the target game, and the target game includes any one of an auto chess game, a puzzle game, a fighting game, a third-person shooting game (TPS), a first-person shooting game (FPS), a multiplayer online battle arena game (MOBA), and a multiplayer gunfight survival game. The embodiments of the present application do not limit this.
[0060] Step 220: Perform type prediction on the first game image through a first-level classification model to obtain a first classification result.
[0061] Among them, the first classification result is used to indicate the presence of abnormal elements in the first game image, and the abnormal elements are elements generated by using cheating means in the game.
[0062] Schematically, the abnormal elements are the elements indicating cheating traces in the game image. In the game, if such abnormal elements are displayed on the game interface of a certain player, it means that the player probably uses a cheating program to cheat.
[0063] Schematically, there can be multiple types of abnormal elements, and different types of abnormal elements represent different cheating means. Optionally, the abnormal element types of the abnormal elements include at least one of the following types:
[0064] 1. Graphic marking elements.
[0065] Schematically, the graphical marking element indicates cheating means of a certain type in the game. Through the graphical marking element, information such as the position and status of player A can be displayed to player B in the form of a graphical mark.
[0066] Optionally, the graphical marking element includes a square element, a circular element, etc., and the embodiments of the present application do not limit this. Schematically, taking the square element as an example, the position and size of player A are represented by the position and size of the square, so that player B can more easily find the position of player A; or, the health value of player A is represented by the color or size of the square, so that player B can more easily judge the life status of player A.
[0067] 2. Skeletal element.
[0068] Schematically, the skeletal element indicates cheating means based on skeletal information in the game. Through the skeletal element, the skeletal information of player A is displayed to player B, and player B can obtain the position, orientation, equipment status, etc. of player A through this skeletal information.
[0069] 3. Health bar element.
[0070] Schematically, the health bar element indicates cheating means based on player attribute values in the game. Through the health bar element, the numerical values of player A are displayed to player B, so that player B can easily know the remaining situation of the player's attribute values, where the numerical values include health value, skill cooling duration, etc.
[0071] 4. Thermal perspective element.
[0072] Schematically, the thermal perspective element indicates cheating means of the perspective type in the game. Through the thermal perspective element, player B can see through the position, orientation and other information of player A behind obstacles (such as walls, etc.), so that player B can more easily find player A.
[0073] It should be noted that the above examples of the abnormal element types of abnormal elements are only schematic descriptions. There are also many other types of abnormal elements in the game, such as aiming elements, attack range marking elements, etc., which will not be elaborated here.
[0074] Among them, the first-level classification model is a binary classification model. Optionally, the first classification model includes a model based on a Convolutional Neural Network (CNN), such as a model based on a Deep Residual Learning for Image Recognition (ResNet), a model based on a Visual Geometry Group Network (VGGNet), etc., and the embodiments of the present application do not limit this.
[0075] Schematically, image features of the first game image are extracted by a first-level classification model, such as color features, texture features, shape features, edge features, etc.; then, the feature analysis is performed on the image features by the first-level classification model, and the first classification result is output. If the first classification result is 0.9, it means that the probability of the existence of abnormal elements in the first game image is 0.9, which is greater than the threshold 0.5, indicating that there are abnormal elements in the first game image; if the first classification result is 0.2, it means that the probability of the existence of abnormal elements in the first game image is 0.2, which is less than the threshold 0.5, indicating that there are no abnormal elements in the first game image.
[0076] In some embodiments, the first-level classification model includes at least one of the following classification models:
[0077] 1. The first first-level classification model.
[0078] Schematically, the first first-level classification model is a multi-type binary classification model, and the multi-type binary classification model can identify the inclusion of the first game image for multiple types of abnormal elements. It should be noted that the process of predicting by the multi-type binary classification model does not require type recognition, and only needs to determine whether the first game image contains abnormal elements of this type.
[0079] 2. The second first-level classification model.
[0080] Schematically, the second first-level classification model is a single-type binary classification model, and the single-type binary classification model can identify the inclusion of the first game image for abnormal elements of a specified type.
[0081] In some embodiments, the first game image is type-predicted by the first first-level classification model and the second first-level classification model to obtain the first classification result.
[0082] Optionally, the first game image is type-predicted by the first first-level classification model to obtain a first sub-classification result, and the first sub-classification result is used to indicate the existence of m abnormal elements in the first game image. The m abnormal elements respectively correspond to abnormal element types, and m is an integer greater than n. The first game image is type-predicted by the second first-level classification model to obtain a second sub-classification result, and the second sub-classification result is used to indicate the existence of abnormal elements of the target abnormal element type in the first game image. Based on the first sub-classification result or the second sub-classification result, the first classification result is determined.
[0083] Schematically, when any one of the first sub-classification result or the second sub-classification result indicates the existence of an abnormal element in the first game image, the first classification result indicates the existence of an abnormal element in the first game image. When both the first sub-classification result and the second sub-classification result indicate the non-existence of an abnormal element in the first game image, the first classification result indicates the non-existence of an abnormal element in the first game image.
[0084] Alternatively, the first game image is subjected to type prediction by the first first-level classification model to obtain a first sub-classification result, where the first sub-classification result is used to indicate the existence of m abnormal elements in the first game image, and the m abnormal elements respectively correspond to abnormal element types, and m is an integer greater than n. When the first sub-classification result indicates the non-existence of an abnormal element in the first game image, the first game image is subjected to type prediction by the second first-level classification model to obtain a second sub-classification result, and the second sub-classification result is used as the first classification result, where the second sub-classification result is used to indicate the existence of abnormal elements of the target abnormal element type in the first game image. When the first sub-classification result indicates the existence of an abnormal element in the first game image, the first sub-classification result is used as the first classification result.
[0085] Schematically, by setting a multi-type binary classification model, it is possible to quickly detect cheating in game images of multiple cheating types, improving the efficiency of preliminary cheating detection; by setting a single-type binary classification model to further judge game images that the multi-type binary classification model identifies as having no cheating traces, thereby improving the detection coverage rate of the first-level classification model for cheating types, that is, increasing the number of cheating types that the first-level classification model can identify. In addition, when new cheating means appear subsequently in setting the single-type binary classification model, it is not necessary to retrain the multi-type binary classification model based on game images corresponding to the new cheating means, and only a single-type binary classification model needs to be trained separately, increasing the flexibility of the first-level classification model.
[0086] Optionally, the target abnormal element type is any one of the m abnormal element types; or, the preset type requirement means that the m abnormal element types include the target abnormal element type, and the recognition difficulty of the target abnormal element type is greater than the preset difficulty requirement; or, the preset type requirement means that the m abnormal element types do not include the target abnormal element type, and the recognition difficulty of the target abnormal element type is greater than the preset difficulty requirement.
[0087] Schematically, the recognition difficulty of the target abnormal element type being greater than the preset difficulty requirement means that the target abnormal element type meets at least one of the following conditions:
[0088] (1) The number of training images corresponding to the target abnormal element type is less than the preset number.
[0089] That is, it indicates the lack of training data corresponding to the target abnormal element type. In the case of lacking training data, a dedicated binary classification model corresponding to this type can be set up. Through the dedicated binary classification model, the features most relevant to this type in the image can be extracted for type prediction, thereby improving the recognition accuracy of the target abnormal element type.
[0090] (2) The size of the abnormal element existing in the training image corresponding to the target abnormal element type is smaller than the preset size.
[0091] That is, when the cheating trace indicated by the target abnormal element type is small, by setting up a dedicated binary classification model, more precise features related to this type in the image can be focused on, thereby improving the recognition accuracy of the target abnormal element type.
[0092] (3) The similarity between the abnormal element indicated by the target abnormal element type and the target scene element in the game is greater than the preset similarity.
[0093] That is, when the cheating trace is easily confused with the normal elements in the game screen, by setting up a dedicated binary classification model, the features that are beneficial to distinguish the cheating trace and the normal elements in the image can be extracted, thereby improving the recognition accuracy of the target abnormal element type.
[0094] It should be noted that the above examples of the conditions that the target abnormal element type needs to meet are only for illustrative purposes and will not be elaborated here.
[0095] Taking the target abnormal element type as an element type other than the m abnormal element types, and the target abnormal element type meeting at least one of the above conditions as an example for illustration.
[0096] Schematically, for some anomaly element types that are relatively easy to identify (e.g., there is a large amount of available training data, obvious cheating traces, etc.), multi-type binary classification models can be set up, and for anomaly element types that are relatively difficult to identify (e.g., there is a small amount of available training data, small cheating traces, and cheating traces are easily confused with normal elements in the game screen, etc.), single-type binary classification models can be set up. Schematically, the type of the first game image is predicted through the multi-type binary classification model to output the first sub-classification result. For example, if the first sub-classification result is 0.4, it means the probability that there are anomaly elements in the first game image is 0.4. Since it is less than the threshold of 0.5, it indicates that there are no anomaly elements in the first game image. The type of the first game image is predicted through the single-type binary classification model to output the second sub-classification result. For example, if the second sub-classification result is 0.8, it means the probability that there are anomaly elements of the target anomaly element type in the first game image is 0.8. Since it is greater than the threshold of 0.5, it indicates that there are anomaly elements in the first game image. Then the second sub-classification result, that is, the first classification result, indicates that there are anomaly elements in the first game image. If the first sub-classification result is 0.8, it means the probability that there are anomaly elements in the first game image is 0.8. Since it is greater than the threshold of 0.5, it indicates that there are anomaly elements in the first game image. Then the first sub-classification result, that is, the first classification result, indicates that there are anomaly elements in the first game image.
[0097] Step 230, when the first classification result indicates that there are anomaly elements in the first game image, the type of the first game image is predicted through the secondary classification model to obtain the second classification result.
[0098] Among them, the second classification result is used to indicate the probability that the first game image belongs to n anomaly element types, where n is a positive integer.
[0099] Schematically, the probability that the first game image belongs to n anomaly element types is the probability that the anomaly elements existing in the first game image belong to n anomaly element types.
[0100] Optionally, the type recognition accuracy of the primary classification model for the first game image is less than the type recognition accuracy of the secondary classification model for the first game image.
[0101] In some embodiments, the n anomaly element types are element types that meet the preset significance requirements, and the secondary classification model includes sub-classification models corresponding to the n anomaly element types respectively. Optionally, the type of the first game image is predicted through the sub-classification models corresponding to the n anomaly element types respectively to obtain n sub-classification results as the second classification result.
[0102] Among them, the i-th sub-classification result is used to indicate the probability that the anomaly elements in the first game image belong to the i-th anomaly element type, where i ≤ n and i is a positive integer.
[0103] Schematically, the conditions for n abnormal element types to meet the preset significance requirements include at least one of the following conditions:
[0104] (1) The number of training images corresponding to the abnormal element type is greater than the preset number.
[0105] That is, there is more training data corresponding to the abnormal element type.
[0106] (2) The size of the abnormal elements existing in the training images corresponding to the abnormal element type is greater than the preset size.
[0107] That is, the cheating traces indicated by the abnormal element type are larger.
[0108] (3) The similarity between the abnormal elements indicated by the abnormal element type and the target scene elements in the game is less than the preset similarity.
[0109] That is, the cheating traces are not easily confused with the normal elements in the game screen.
[0110] Schematically, each abnormal element type corresponds to a sub-classification model. The sub-classification model also belongs to a binary classification model. The sub-classification model includes a graphic marker model (for predicting the presence of graphic marker elements in the input game image), a bone model (for predicting the presence of bone elements in the input game image), a health bar model (for predicting the presence of health bar elements in the input game image), a thermal perspective model (for predicting the presence of thermal perspective elements in the input game image), etc. The embodiments of the present application do not limit this.
[0111] Taking the graphic marker model as an example, the image features of the first game image are extracted through the graphic marker model, such as color features, texture features, shape features, edge features, etc.; then, the image features are analyzed through the graphic marker model to output a sub-classification result, for example: {0.8, 0.2}, where 0.8 represents the probability that there are graphic marker elements in the first game image is 0.8, which is greater than the threshold 0.5, indicating that there are graphic marker elements in the first game image.
[0112] Schematically, in the above embodiments, only n secondary classification models that meet the preset significance requirements are set to perform refined classification on the first game image. Among them, the abnormal element types that meet the preset significance requirements (i.e., cheating types) indicate that the abnormal elements are of types that are easy to identify and have a high recognition accuracy, so as to ensure the accuracy of subsequent automatic penalty and reduce the situation of misjudgment.
[0113] In some embodiments, the type prediction of the first game image can be combined with object operation data to improve the accuracy of the type prediction of the first game image.
[0114] Optionally, extract the image feature representation corresponding to the first game image through the i-th sub-classification model; extract the operation feature representation corresponding to the first operation data through the i-th sub-classification model, where the first operation data refers to the object operation data corresponding to the first game image; perform feature analysis on the image feature representation and the operation feature representation through the i-th sub-classification model to obtain the i-th sub-classification result.
[0115] Optionally, the object operation data includes reaction duration, attack accuracy, mouse operation data, keyboard operation data, screen touch data, etc., and the embodiments of the present application do not limit this.
[0116] Optionally, if the object operation data includes a keyboard key sequence; then the method for obtaining the i-th sub-classification result further includes: extracting the sequence feature representation corresponding to the keyboard key sequence through the i-th sub-classification model, where the sequence feature representation is used to indicate the regularity of the keyboard key sequence; analyzing the image feature representation through the i-th sub-classification model to obtain a candidate probability, where the candidate probability is used to indicate the probability that the abnormal element in the first game image belongs to the i-th abnormal element type; obtaining a weight coefficient based on the matching degree between the sequence feature representation and the operation rule feature corresponding to the i-th abnormal element type, where the weight coefficient is positively correlated with the matching degree; performing weighted calculation on the candidate probability through the weight coefficient to obtain the i-th sub-classification result.
[0117] Schematically, in the operations of a normal (i.e., not using cheating means) player, the key sequence of the player's keyboard will change according to different game situations. If the key sequence of the player's keyboard is highly repetitive or shows a certain regularity, it means that the player may be using a certain cheating program to cheat. Therefore, after identifying the sequence feature representation, that is, the regularity of the keyboard key sequence corresponding to the current first game image, obtain the operation rule feature corresponding to the i-th sub-classification model, that is, the operation rule usually shown by the cheating means indicated by the i-th sub-classification model, match the sequence feature representation and the operation rule feature, and judge their matching degree. The higher the matching degree, the more likely it is that the abnormal element in the first game image is the i-th abnormal element type. Detecting the cheating type of the first game image through the keyboard key sequence compliance greatly improves the detection accuracy of the secondary classification model for each cheating type, thereby further improving the accuracy of subsequent cheating penalties.
[0118] In some embodiments, similarity detection can be performed on the results output by the secondary classification model to determine whether there is a misjudgment situation in the first game image, thereby reducing the misjudgment situation in the cheating detection in the game.
[0119] Optionally, perform type prediction on the first game image through the i-th sub-classification model to obtain the i-th candidate classification result; in the case that the i-th candidate classification result indicates that there is an abnormal element of the i-th abnormal element type in the first game image, obtain a preset image library, where the preset image library includes multiple game images containing target elements, and the target element is an element whose similarity to the abnormal element of the i-th abnormal element type meets the similarity requirement; match the first game image with the preset image library to obtain a matching result, and the matching result is used to indicate the similarity between the first game image and the game images in the preset image library; determine the i-th sub-classification result based on the matching result.
[0120] Schematically, set up a preset image library, which can collect some normal game images of abnormal elements that were once misjudged as the abnormal elements of the i-th abnormal element type, game images screened and obtained that are similar to the abnormal elements of the i-th abnormal element type, etc. There are target elements in these images, and the similarity between the target element and the abnormal element is greater than the preset similarity, that is, the similarity is relatively high. Then, after the i-th sub-classification model outputs a classification result, if the classification result indicates that the first game image belongs to a cheating image, then the abnormal elements in the first game image can be matched with the target elements in each image in the preset image library. If the match is successful, it means that the similarity between the abnormal elements in the first game image and a certain target element is relatively high, then the first game image may have been misjudged, and the first game image can be sent to the reviewer for manual review; if the similarity between the abnormal elements in the first game image and the target elements in any image in the preset image set does not reach the preset similarity, it means that there is no misjudgment in the first game image, and then the cheating account corresponding to the first game image is penalized.
[0121] Schematically, after obtaining n sub-classification results, that is, the probabilities that the abnormal elements existing in the first game image belong to n abnormal element types, if there is at least one sub-classification result indicating that there is a corresponding abnormal element in the first game image, determine that the account corresponding to the first game image has a cheating behavior and penalize the account corresponding to the first game image; if all sub-classification results indicate that there is no corresponding abnormal element in the first game image, then it is considered that the account corresponding to the first game image has no cheating behavior. If all sub-classification results indicate that there is no corresponding abnormal element in the first game image, the first game image can be sent to the reviewer for further determination to avoid misjudgment and missed judgment.
[0122] In summary, the image classification method provided by the embodiment of the present application predicts the type of the game image through the primary classification model to obtain the existence of abnormal elements in the game image; if there are abnormal elements in the game image, the type of the game image is predicted through the secondary classification model to obtain the probability that the abnormal elements in the game image belong to n abnormal element types. Among them, the primary classification model can be used to screen out suspicious game images with cheating traces from a large number of game images, and the normal game images without cheating traces are filtered out, thereby reducing the number of game images that need to be further cheated. The secondary classification model can be used to perform refined detection of abnormal element types for suspicious game images, so as to determine whether the suspicious game image has a certain type of cheating trace. When it is determined that the suspicious game image has a certain type of cheating trace, the cheating account corresponding to the suspicious game image can be automatically punished, thereby reducing the number of game images that need to be manually reviewed and improving the efficiency of cheating detection in games.
[0123] For illustration, please refer to Figure 3 , which shows a schematic diagram of a two-stage cheating detection solution implemented by the image classification method provided in an embodiment of the present application, such as Figure 3 As shown, for the game screenshot 301 obtained in the game, a two-stage model is used to perform cheating detection.
[0124] The first-stage model (i.e. the first-level classification model mentioned above): includes a multi-type classification model and several exclusive classification models, which are mainly used to ensure a high level of cheating coverage while ensuring a small amount of review, with the detection idea of "rather make a wrong judgment than let it go". Among them, the multi-type classification model is a binary classification model that can identify multiple types of cheating. For cheating types that cannot be covered by the multi-type classification model, they can be identified through the corresponding exclusive classification model.
[0125] The game screenshot 301 is input into a multi-type classification model and several exclusive classification models. If any of the models determines that there are signs of cheating in the game screenshot 301, the game screenshot 301 is determined as a highly suspicious image 302, and detection is continued for the highly suspicious image 302.
[0126] The second stage model (i.e. the above-mentioned secondary classification model): includes graphic labeling model, skeleton model, health bar model, thermal perspective model, etc. It is mainly used to further reduce the amount of review. Some screenshots can be automatically punished in real time, with the detection idea of "better to miss than to kill by mistake".
[0127] Input the highly suspicious image 302 output by the first-stage model into refined models such as a graphic marking model, a bone model, a blood bar model, and a thermal energy perspective model. If the highly suspicious image 302 belongs to any of these types, directly impose a penalty, that is, impose a penalty on the account corresponding to the highly suspicious image 302; if the highly suspicious image 302 does not belong to any of these types, conduct manual review, that is, send the highly suspicious image 302 to the corresponding reviewer for further review.
[0128] Next, introduce the training method of the classification model.
[0129] Figure 4 It is a flowchart of an image classification method provided by an embodiment of the present application. Taking the application of this method in a server as shown in Figure 1 as an example for illustration, the method is as follows in steps 410 to 440. Steps 410 to 440 can be executed before the above-mentioned step 210.
[0130] Step 410, obtain a first data set.
[0131] The first data set includes a plurality of first sample game images, and the first sample game images are labeled with a first first-level label or a second first-level label.
[0132] Among them, the first first-level label indicates that there are abnormal elements in the first sample game image, and the abnormal elements are elements generated by using cheating means in the game, and the second first-level label indicates that the first sample game image is an image that meets the element requirements.
[0133] Schematically, the abnormal element is the element indicating the cheating trace in the game image.
[0134] Optionally, if there are no abnormal elements in the first sample game image, it is determined that the first sample game image meets the element requirements. Schematically, the first sample game image can be implemented as a normal scene image in the game; the first sample game image can also be implemented as a solid color image, a preset texture image, a noise image, etc.; the first sample game image can also be a normal scene image with target normal elements in the game, where the target normal element is an image similar to the abnormal element.
[0135] Schematically, the first first-level label can be implemented as 1, and the second first-level label can be implemented as 0. In this application, after obtaining a plurality of first sample game images, the plurality of first sample game images are labeled according to the presence or absence of abnormal elements in the plurality of first sample game images. Among them, the first sample game image with abnormal elements can be labeled with the label "1"; the first sample game image without abnormal elements can be labeled with the label "0"; the plurality of labeled first sample game images constitute the first data set.
[0136] Step 420: Train the first classification model based on the first dataset to obtain a first-level classification model.
[0137] The first-level classification model is used to predict the presence of abnormal elements in the input game image.
[0138] Optionally, extract the first image feature representation from the first sample game image through the first classification model; perform type prediction on the first image feature representation through the first classification model to obtain a first prediction result, where the first prediction result is used to indicate the presence of abnormal elements in the first classification model; train the first classification model based on the difference between the first prediction result and the first-level label annotated for the first sample game image to obtain a first-level classification model.
[0139] Schematically, extract the first image features of the first sample game image through the first classification model, such as color features, texture features, shape features, edge features, etc.; then, perform feature analysis on the first image features through the first classification model and output a first prediction result, for example: {0.7, 0.3}, where 0.7 represents the probability that there are abnormal elements in the first sample game image (i.e., the first sample game image has cheating means) is 0.7, and 0.3 represents the probability that there are no abnormal elements in the first sample game image (i.e., the first sample game image has no cheating means) is 0.3; calculate a first loss based on the difference between the first prediction result and the first-level label annotated for the first sample game image, and the first loss can be implemented as cross-entropy loss, mean square error loss, etc., which is not limited in the embodiments of the present application; finally, update the model parameters of the first classification model based on the first loss, and then continue to train the first classification model based on the first sample game images in the first dataset until the training times are reached or the calculated first loss is less than or equal to the preset loss value, and stop training. At this time, the first classification model obtained by training is the first-level classification model.
[0140] Optionally, the first-level classification model includes at least one of a multi-type first-level classification model and a single-type first-level classification model. Schematically, the multi-type first-level classification model can identify the inclusion of multiple types of abnormal elements in the first game image, and the single-type first-level classification model can identify the inclusion of a specified type of abnormal element in the first game image.
[0141] Step 430: Obtain a second dataset.
[0142] The second dataset includes multiple second sample game images.
[0143] Among them, the second sample game images are labeled with first-level and second-level labels, and the first-level and second-level labels indicate the types of abnormal elements to which the second sample game images belong. Multiple second sample game images correspond to n types of abnormal elements, where n is a positive integer.
[0144] Schematically, the type of abnormal element to which the second sample game image belongs is the type of abnormal element existing in the second sample game image, and different types of abnormal elements represent different cheating means. Optionally, for the description of the type of abnormal element, reference can be made to step 220, which will not be elaborated here.
[0145] Step 440: Train the second classification model based on the second data set to obtain a secondary classification model.
[0146] Among them, the secondary classification model is used to predict the probabilities that the input game image belongs to n types of abnormal elements respectively.
[0147] Optionally, train n second classification models respectively based on the second data set to obtain n sub-classification models as the secondary classification model. The i-th sub-classification model is used to predict the probability that the input game image belongs to the i-th type of abnormal element, where i ≤ n and i is a positive integer.
[0148] Schematically, each type of abnormal element corresponds to a sub-classification model. The sub-classification model also belongs to a binary classification model. The sub-classification model includes a graphic marking model, a bone model, a health bar model, a thermal perspective model, etc., which are not limited in the embodiments of the present application.
[0149] Taking the graphic marking model as an example for illustration, extract the second image features of the second sample game image through the second classification model, such as color features, texture features, shape features, edge features, etc.; then, perform feature analysis on the second image features through the second classification model to output a second prediction result, for example: {0.8, 0.2}, where 0.8 represents the probability that there is a graphic marking element in the second sample game image is 0.8, and 0.2 represents the probability that there is no graphic marking element in the second sample game image is 0.2; calculate a second loss based on the difference between the second prediction result and the second-level label annotated for the second sample game image. The second loss can be implemented as a cross-entropy loss, a mean square error loss, etc.; finally, update the model parameters of the second classification model based on the second loss, and then continue to train the second classification model based on the second sample game images in the second data set until the number of training times is reached or the calculated second loss is less than or equal to a preset loss value, and stop training. At this time, the trained second classification model is the graphic marking model.
[0150] It should be noted that the above steps 430 and 440 can be executed before steps 410 and 420, after steps 410 and 420, or simultaneously with steps 410 and 420, and are not limited here.
[0151] In summary, for the training method of the classification model provided in the embodiments of the present application, the construction method of the first classification model is relatively simple, and the trained first-level classification model can cover most cheating types. The second classification model is more refined, and the trained second-level classification model has a high prediction accuracy for cheating types.
[0152] In some embodiments, when training the classification model, a new target image containing cheating traces can be generated through a diffusion model, and the trained classification model can be fine-tuned with the target image. Figure 5 It is a flowchart of another image classification method provided by the embodiments of the present application. Taking the application of this method to a Figure 1 server shown as an example, the method includes the following steps 510 to 540, and steps 510 to 540 can be executed before step 210.
[0153] Step 510, obtain a first data set.
[0154] The first data set includes a plurality of first sample game images.
[0155] The first sample game images are labeled with a first first-level label or a second first-level label. The first first-level label indicates that the first sample game image has abnormal elements, and the abnormal elements are elements generated by using cheating means in the game. The second first-level label indicates that the first sample game image is an image that meets the element requirements.
[0156] Optionally, obtain a plurality of first sample images and a plurality of second sample images. The plurality of first sample images indicate game images with abnormal elements, and the plurality of second sample images indicate game images without predicted elements; construct a first data set through the plurality of first sample images and the plurality of second sample images, and the number of preset element types corresponding to the plurality of first sample game images in the first data set meets the preset quantity requirements.
[0157] Schematically, obtain a plurality of cheating game images (i.e., first sample images) and a plurality of normal game images (i.e., second sample images), where the cheating game images represent game images with abnormal elements; the normal game images represent sample images without abnormal elements; construct a first data set based on the plurality of cheating game images and the plurality of normal game images.
[0158] The number of preset element types corresponding to the above-mentioned first sample game image meets the preset quantity requirement, including that the number of preset element types corresponding to the first sample game image is greater than the preset quantity, which means that as many cheating types as possible are included in the constructed first dataset, thereby improving the type coverage rate of the first-level classification model obtained by training.
[0159] Optionally, different types of abnormal elements correspond to cheating game images of different cheating types.
[0160] First, introduce the types of cheating game images.
[0161] Schematically, please refer to Figure 6 , which shows a classification schematic diagram of cheating game images. As Figure 6 shown, cheating game images present a long-tailed distribution. Among them, several major categories where cheating traces are obvious and common are: box cheating type, the box 601 shown in FIG. 610 is the box cheating trace; bone cheating type, the bone 602 shown in FIG. 620 is the bone cheating trace; health bar cheating type, the health bar 603 shown in FIG. 630 is the health bar cheating trace; thermal energy perspective cheating type, the thermal energy perspective element 604 shown in FIG. 640 is the thermal energy perspective cheating trace. Other minor categories are collectively referred to as other cheating types, which are not limited in the embodiments of the present application.
[0162] Secondly, explain the generation method of cheating game images.
[0163] Schematically, for different cheating types, different generation methods are adopted. The generation method of cheating game images includes at least one of the following methods:
[0164] 1. Draw abnormal elements on the game scene image through a drawing program; use the game scene image with abnormal elements drawn as the first sample image.
[0165] Schematically, the method of drawing abnormal elements to construct cheating game images is applicable to cheating types with relatively simple cheating traces, such as the box cheating type. By the above drawing method, box cheating elements are quickly constructed, improving the training efficiency of the model.
[0166] Please refer to Figure 7 , which shows a classification schematic diagram of the construction method of cheating game images. As Figure 7 shown, for the box cheating type 701, various boxes of different colors and thicknesses can be automatically drawn through a drawing program, and then the drawn box and the normal scene image in the game can be combined to obtain the cheating game image of the box cheating type.
[0167] 2. Obtain a template game image containing abnormal elements; perform matte extraction on the template game image to obtain an element template corresponding to the abnormal element; perform transformation processing on the element template to obtain a transformed element template, and the transformation processing includes at least one of size transformation processing, shape transformation processing, and color transformation processing; combine the transformed element template with the game scene image to obtain a first sample image.
[0168] Schematically, for cheating types with relatively complex cheating traces, such as bone cheating types, etc., a method of matte extraction and texture mapping processing can be used to automatically generate cheating game images. Schematically, please refer to Figure 7 , for the bone cheating type 702, blood bar cheating type 703, thermal energy perspective cheating type 704, and other cheating types, matte extraction can be performed on the cheating areas therein, and then the cheating traces obtained by matte extraction can be pasted into the game scene image to obtain cheating game images of the corresponding types. Through the above abnormal element generation method, relatively complex training data can be automatically constructed, and the amount of complex training data is increased through transformation operations, improving the training data acquisition efficiency while also improving the training effect of the model.
[0169] Optionally, for the bone cheating type and blood bar cheating type, stick figures can also be drawn where there are bone cheating traces and blood bar cheating traces, and then the stick figures and the cheating traces are matte-extracted together. Subsequently, the stick figures and the cheating traces can be pasted into the game scene image together to obtain a cheating game image.
[0170] Schematically, taking the bone cheating trace as an example for illustration, schematically, please refer to Figure 8 , which shows a schematic diagram of the construction of a cheating image. As Figure 8 shown, for the game screenshot 800, matte extraction is performed on the bone cheating trace 801 therein to obtain a cheating trace template 802. The size and color of the cheating trace template 802 are automatically scaled through a program to obtain cheating trace templates of different sizes and colors. The obtained cheating trace templates are pasted into the game scene image, generally in the area near the center of the image, so as to generate a cheating game image.
[0171] In some embodiments, to enrich the scene diversity of cheating game images of various cheating types in the first dataset, cheating game images can be automatically generated through a diffusion model.
[0172] Optionally, obtain a third dataset, where the third dataset includes multiple sample game images containing abnormal elements; train a first diffusion model through the multiple sample game images to obtain a second diffusion model; process a preset noise image through the second diffusion model to obtain a cheating game image.
[0173] Schematically, the sample game images in the third dataset can be images generated by at least one of the above-mentioned methods for generating cheating game images.
[0174] Among them, the diffusion model is a generative model. Specifically, the diffusion model defines a Markov chain of diffusion steps. By continuously adding random noise to the image and then learning the reverse diffusion process, the required image can be generated. In the forward diffusion process, noise is gradually added to the input image, making the image gradually blurred. In the reverse recovery process, the original image is learned to be recovered from the image with a large amount of random noise.
[0175] Schematically, the second diffusion model can be used to process a preset noise image to generate a cheating game image containing abnormal elements. For the generated cheating game images, they can be grouped according to the game background therein, and then several images are determined from each group, and these several images are used as cheating game images.
[0176] Please refer to Figure 9 , which shows a schematic diagram of a cheating game image generated based on a diffusion model. Figure 910 is a cheating game image containing a box element; Figure 920 is a cheating game image containing a bone element.
[0177] Then, explain the types of normal game images.
[0178] Schematically, please refer to Figure 10 , which shows a classification schematic diagram of normal game images. As Figure 10 shown, the cheating game images include: normal in-game scene diagram 1001, solid color diagram, wave diagram, noise diagram and other unknown diagrams 1002, normal in-game diagram with similar cheating traces 1003, in-game scene diagram with only partial cheating traces 1004.
[0179] Finally, explain the generation method of normal game images.
[0180] Schematically, for different types of normal game images, different generation methods are adopted. The generation methods of normal game images include at least one of the following methods:
[0181] 1. Obtain a screenshot of the game screen in the game that does not contain cheating traces.
[0182] Schematically, please refer to Figure 11 , which shows a classification schematic diagram of the generation method of normal game images. As Figure 11 shown, for the normal in-game scene diagram 1101, it can be obtained by randomly intercepting a local part of the game screen that does not contain cheating traces.
[0183] 2. Program automatic construction.
[0184] like Figure 11 As shown, unknown images 1102 such as pure color images (white, gray, red, etc.), wave images, noise images, etc. can be obtained by automatically drawing through a program.
[0185] 3. Draw the target abnormal element; combine the target abnormal element with the game scene image to obtain a normal game image.
[0186] The target abnormal element includes an element similar to the abnormal element, or the target abnormal element is an incomplete abnormal element, such as a half-frame, half-skeleton element, etc.
[0187] Schematically, the method of drawing target abnormal elements to construct a normal game image is suitable for cheating types in which the target abnormal elements are relatively simple, such as boxes and circles.
[0188] Please refer to Figure 11 For a normal image 1103 similar to cheating traces in the game, the program can automatically construct single and double lines, circles, etc. of various colors, and then combine the single and double lines, circles and the normal scene image in the game to obtain a normal game image. For a scene image 1104 with only partial cheating traces in the game (only half a frame, partial skeleton, etc.), the program can automatically construct a half frame, etc., and then combine the half frame with the normal scene image in the game to obtain a normal game image.
[0189] Please refer to Figure 12 , which shows a schematic diagram of generating a normal game image, Figure 12 It is a scene diagram 1200 similar to cheating traces in the game automatically constructed by a program, wherein the double lines 1201 are traces similar to box cheating traces drawn by the program.
[0190] 4. Obtain a fourth game image containing the target abnormal element; perform cutout processing on the fourth game image to obtain the target abnormal element; and combine the target abnormal element with the game scene image to obtain a normal game image.
[0191] Optionally, the target abnormal element is transformed, and the transformed target abnormal element is combined with the game scene image to obtain a normal game image. The transformation process includes at least one of size transformation process, shape transformation process, color transformation process, etc.
[0192] For example, if the target abnormal elements are more complex, such as bones, etc., the cutout and texture processing methods can be used to automatically generate normal game images. For example, please refer to Figure 11, for the normal in-game image 1103 with similar cheating traces, game images containing similar cheating traces can be obtained, the similar cheating traces in them can be cropped, and the similar cheating traces can be combined with other in-game scene images to obtain normal game images. For the in-game scene image 1104 with only partial cheating traces, game images containing cheating traces can be obtained, the cheating traces in them can be cropped, the cheating traces can be intercepted, and the intercepted cheating traces can be combined with other in-game scene images to obtain normal game images.
[0193] Schematically, after obtaining multiple cheating game images and multiple normal game images; label the multiple cheating game images with the first-level labels, and add the labeled multiple cheating game images to the first dataset; obtain the images of the target type in the multiple normal game images, that is: in-game normal scene images, solid color images, preset texture images, noise images and other unknown images, in-game scene images with similar cheating traces, label these images with the second-level labels, and add the labeled multiple normal game images to the first dataset.
[0194] When constructing the first dataset, the types and quantities of cheating game images should be as many as possible, and the types of normal game images can only include in-game normal scene images, solid color images, preset texture images, noise images and other unknown images, in-game scene images with similar cheating traces, so that the trained first classification model can cover as many cheating types as possible and improve the coverage rate of the first classification model for cheating types.
[0195] Step 521, train the first classification model based on the first dataset to obtain the first candidate classification model.
[0196] Among them, the first candidate classification model is used to predict the presence of abnormal elements in the input game image.
[0197] The method of training the first candidate classification model can refer to the method of training the first-level classification model in step 420, which will not be elaborated here.
[0198] Optionally, the first candidate classification model includes at least one of the multi-type first candidate classification model and the single-type first candidate classification model. Schematically, the multi-type first candidate classification model can identify the inclusion of multiple types of abnormal elements in the first game image, and the single-type first candidate classification model can identify the inclusion of a specified type of abnormal element in the first game image.
[0199] Step 522, process the first noise image through the target diffusion model to obtain the first target game image.
[0200] The target diffusion model is used to generate game images containing abnormal elements, and the first target game image is a game image containing abnormal elements.
[0201] Schematically, please refer to Figure 13 , which shows a schematic diagram of the training process of a classification model. Cheat type images 1302 (i.e., cheat game images) such as squares and skeletons are obtained from the training samples 1301 (which can be the first data set here). The DDPM (Diffusion-Dequantization Probabilistic Model, i.e., the diffusion model) is trained with the cheat type images such as squares and skeletons to obtain the DDPM generation model 1303 that can generate game images containing cheat traces such as squares and skeletons. The random noise image is processed by the DDPM generation model 1303 to obtain the cheat image 1304, and the cheat image 1304 contains at least one of the cheat traces such as squares and skeletons.
[0202] Step 523, perform type prediction on the first target game image through the first candidate classification model to obtain the first predicted classification result.
[0203] Among them, the first predicted classification result is used to indicate the prediction result of the first candidate classification model on the presence of abnormal elements in the first target game image.
[0204] Schematically, the trained classification model 1305 (i.e., the above-mentioned first classification model) can be attacked through the cheat image 1304, that is, the classification model 1305 is used to predict the cheat image 1304 to determine whether the cheat image 1304 contains abnormal elements.
[0205] Step 524, when the first predicted classification result does not conform to the presence situation of the abnormal elements corresponding to the first target game image, train the first candidate classification model with the first target game image to obtain the first-level classification model.
[0206] Schematically, if the prediction result of the classification model 1305 for the cheat image 1304 is different from the real result, for example, the prediction result indicates that the cheat image 1304 does not contain abnormal elements, but actually the cheat image 1304 contains abnormal elements. It means that the cheat image 1304 is not covered by the classification model 1305, then the (uncovered) cheat image can be labeled, that is, the first-level label is labeled and added to the training data set.
[0207] Optionally, the DDPM generation model 1303 will generate multiple cheat images, predict the multiple cheat images through the classification model 1305, screen out the cheat images not covered by the classification model 1305, and then add all the obtained uncovered cheat images to the training data set.
[0208] Finally, the classification model 1305 is fine-tuned using the newly added data in the training dataset. Fine-tuning the classification model 1305 can continuously improve the prediction ability of the classification model. This process can be iterated 2 or 3 times, and finally a first-level classification model is obtained.
[0209] Schematically, for the trained classification model, the diffusion model is used to generate additional samples to attack the classification model, thereby optimizing the trained classification model and improving the accuracy of the finally trained classification model.
[0210] Step 530: Obtain a second dataset.
[0211] The second dataset includes multiple second-sample game images.
[0212] The second-sample game images are labeled with first and second-level labels, which indicate the types of abnormal elements to which the second-sample game images belong. The multiple second-sample game images correspond to n types of abnormal elements, where n is a positive integer.
[0213] Optionally, the second dataset is constructed from the above-mentioned multiple first-sample images, and the preset element types corresponding to the multiple second-sample game images in the second dataset meet the preset significance requirements.
[0214] In some embodiments, the second dataset further includes multiple third-sample game images.
[0215] The third-sample game images are labeled with second and second-level labels, which indicate the normal image types to which the third-sample game images belong.
[0216] Schematically, multiple cheating game images and multiple normal game images are obtained. Among them, the cheating game images represent game images with abnormal elements; the normal game images represent sample images without abnormal elements. Images with obvious cheating traces in the multiple cheating game images (for example, images of box cheating type, bone cheating type, blood bar cheating type, thermal perspective cheating type, etc.) are labeled with first and second-level labels, and the labeled multiple cheating game images are added to the second dataset; multiple normal game images are obtained, these images are labeled with second and second-level labels, and the labeled multiple normal game images are added to the second dataset.
[0217] When constructing the second dataset, the types and quantities of the third-sample game images should be as many and comprehensive as possible. The 4 types of normal game images mentioned in step 510 above need to be added, while the second-sample game images are more biased towards cheating game images with obvious cheating traces.
[0218] Step 540: Train a second classification model based on the second dataset to obtain a second-level classification model.
[0219] Among them, the secondary classification model is used to respectively predict the probabilities that the input game image belongs to n abnormal element types.
[0220] In some embodiments, the secondary classification model includes sub-classification models corresponding to n abnormal element types respectively. Optionally, type prediction is performed on the first game image through the sub-classification models corresponding to n abnormal element types respectively, and n sub-classification results are obtained as the second classification result.
[0221] Among them, the i-th sub-classification result is used to indicate the probability that the abnormal element in the first game image belongs to the i-th abnormal element type, where i ≤ n and i is a positive integer.
[0222] Schematically, binary classification models are respectively established for cheating types with obvious cheating traces, that is, the one vs all binary classification model. In one vs all, each category is taken as a category alone, and other categories are combined into another category, and a sub-classification model is trained to distinguish the current category from other categories.
[0223] In some embodiments, due to the small processing volume, for the sub-classification model, the image resolution used for training the sub-classification model can be increased, thereby improving the refinement degree of the trained sub-classification model.
[0224] In some embodiments, for the secondary classification model, corresponding game images can also be generated through a diffusion model, and the secondary classification model is fine-tuned through the game images.
[0225] Optionally, the second candidate classification model is trained based on the second data set, and the second candidate classification model is used to predict the presence of abnormal elements in the input game image; the second noise image is processed through the target diffusion model to obtain a second target game image, and the second target game image is a game image containing abnormal elements; type prediction is performed on the second target game image through the second candidate classification model to obtain a second predicted classification result, where the second predicted classification result is used to indicate the prediction result of the second candidate classification model on the presence of abnormal elements in the second target game image; in response to the second predicted classification result not conforming to the element presence situation corresponding to the second target game image, the second candidate classification model is trained through the second target game image labeled with the first secondary label to obtain the secondary classification model.
[0226] Schematically, the process of training the secondary classification model described above can refer to the steps of training the primary classification model in steps 521 to 524 (that is Figure 13 the training process in), which will not be elaborated here.
[0227] In some embodiments, for the first-level classification model and the second-level classification model trained according to the embodiments of the present application, during the iterative operation phase, in addition to the above-mentioned sample generation method, online data can also be used to accumulate new training data for iterative training of the first-level classification model and the second-level classification model.
[0228] Schematically, please refer to Figure 14 , which shows a schematic diagram of the iterative operation of a classification model. For the black-determined screenshot 1402 output by the cheating detection model 1401 (including the first-level classification model and the second-level classification model), that is, the game image containing abnormal elements output by the first-level classification model, if it is directly determined that there is cheating behavior (i.e., the cheating image determined by the second-level classification model), or if it is determined that there is cheating behavior through manual review, it will be marked as a cheating screenshot and the cheating account will be punished.
[0229] For screenshots for which cheating behavior has not been determined, query the strategy query atlas to check whether there are cheating traces (i.e., filling in the gaps) in the screenshot and what the type of the cheating trace is; the queried and marked screenshots can be accumulated as new samples. For the above-mentioned screenshots reviewed manually, if the manual review result is different from the model prediction result (i.e., error correction), manual annotation will be performed, that is, it will be marked whether there are cheating traces in the screenshot and what the type of the cheating trace is; the manually marked screenshots can be accumulated as new samples; in addition, during the operation process, the model usually needs to be tested, and the data to be tested during the test can also be accumulated as new samples. For the accumulated new samples, they will be added to the sample library. Among them, the samples for filling in the gaps and error correction can all be used in the training process of the first-level classification model; for the samples for filling in the gaps, after manually marking the cheating type, they can be used as cheating game images for the second-level classification model, and the normal sample images among them can all be used in the second stage.
[0230] At the same time, the difference set of the cheating samples for which the first-level classification model minus the second-level classification model predicts and determines that there is cheating behavior can be found, recommended for marking plus manual review to further improve the cheating coverage of the second-level classification model.
[0231] In summary, the two-stage cheating detection scheme and the efficient sample acquisition method provided in the present application can greatly improve the modeling efficiency and reduce the cost of iterative operation. At the same time, the two-stage detection scheme is relatively flexible and can adjust the accuracy and coverage of the scheme according to business requirements. In addition, the two-stage detection scheme can also be classified by the platform side and the business side. The first-stage model is directly provided by the platform and automatically iterated, and the second stage is handed over to the business-side personnel for refined modeling. Finally, the two-stage detection scheme can ensure a high cheating coverage, partially automatically punish, and suppress cheating in real time, with excellent cheating detection effects. In short, the method provided in the present application is flexible, efficient, low-cost, excellent in effect and general, and can be applied to most game screenshot cheating detections.
[0232] Please refer to Figure 15 , which shows a structural block diagram of an image classification device provided by an exemplary embodiment of the present application. The device includes the following modules:
[0233] The first acquisition module 1510 is configured to acquire a first game image to be classified;
[0234] The first prediction module 1520 is configured to perform type prediction on the first game image through a first-level classification model to obtain a first classification result, where the first classification result is used to indicate the presence of abnormal elements in the first game image, and the abnormal elements are elements generated by using cheating means in the game;
[0235] The second prediction module 1530 is configured to, when the first classification result indicates the presence of the abnormal elements in the first game image, perform type prediction on the first game image through a second-level classification model to obtain a second classification result, where the second classification result is used to indicate the probability that the first game image belongs to n abnormal element types, and n is a positive integer.
[0236] In some embodiments, please refer to Figure 16 , the first-level classification model includes a first first-level classification model and a second first-level classification model. The first first-level classification model is a multi-type binary classification model, and the second first-level classification model is a single-type binary classification model; the first prediction module 1520 is configured to:
[0237] Perform type prediction on the first game image through the first first-level classification model to obtain a first sub-classification result, where the first sub-classification result is used to indicate the presence of m abnormal elements in the first game image, and the m abnormal elements respectively correspond to abnormal element types, and m is an integer greater than n;
[0238] When the first sub-classification result indicates the absence of the abnormal elements in the first game image, perform type prediction on the first game image through the second first-level classification model to obtain a second sub-classification result, and use the second sub-classification result as the first classification result, where the second sub-classification result is used to indicate the presence of abnormal elements of the target abnormal element type in the first game image;
[0239] When the first sub-classification result indicates the presence of the abnormal elements in the first game image, use the first sub-classification result as the first classification result.
[0240] In some embodiments, the target abnormal element type is an element type other than the m abnormal element types, and the target abnormal element type meets at least one of the following conditions:
[0241] The number of training images corresponding to the target abnormal element type is less than a preset number;
[0242] The size of the abnormal elements existing in the training images corresponding to the target abnormal element type is less than a preset size;
[0243] The similarity between the abnormal elements indicated by the target abnormal element type and the target scene elements in the game is greater than a preset similarity.
[0244] In some embodiments, the n abnormal element types are element types that meet the preset saliency requirements, and the secondary classification model includes sub-classification models corresponding to the n abnormal element types respectively; the second prediction module 1530 is configured to:
[0245] Perform type prediction on the first game image through n sub-classification models respectively to obtain n sub-classification results as the second classification results, where the i-th sub-classification result is used to indicate the probability that the abnormal element in the first game image belongs to the i-th abnormal element type, i ≤ n and i is a positive integer.
[0246] In some embodiments, the second prediction module 1530 is configured to:
[0247] Extract an image feature representation corresponding to the first game image through the i-th sub-classification model;
[0248] Extract an operation feature representation corresponding to the first operation data through the i-th sub-classification model, where the first operation data refers to the object operation data corresponding to the first game image;
[0249] Perform feature analysis on the image feature representation and the operation feature representation through the i-th sub-classification model to obtain the i-th sub-classification result.
[0250] In some embodiments, the object operation data includes a keyboard key sequence; the second prediction module 1530 is configured to:
[0251] Extract a sequence feature representation corresponding to the keyboard key sequence through the i-th sub-classification model, where the sequence feature representation is used to indicate the regularity of the keyboard key sequence;
[0252] Analyze the image feature representation through the i-th sub-classification model to obtain a candidate probability, where the candidate probability is used to indicate the probability that the abnormal element in the first game image belongs to the i-th abnormal element type;
[0253] Based on the matching degree between the sequence feature representation and the operation rule features corresponding to the i-th abnormal element type, a weight coefficient is obtained, and the weight coefficient has a positive correlation with the matching degree;
[0254] The weighted calculation is performed on the candidate probability through the weight coefficient to obtain the i-th sub-classification result.
[0255] In some embodiments, the second prediction module 1530 is configured to:
[0256] Perform type prediction on the first game image through the i-th sub-classification model to obtain the i-th candidate classification result;
[0257] In the case that the i-th candidate classification result indicates that there is an abnormal element of the i-th abnormal element type in the first game image, a preset image library is obtained. The preset image library includes a plurality of game images containing target elements, and the target elements are elements whose similarity to the abnormal elements of the i-th abnormal element type meets the similarity requirement;
[0258] Match the first game image with the preset image library to obtain a matching result, and the matching result is used to indicate the similarity between the first game image and the game images in the preset image library;
[0259] Determine the i-th sub-classification result based on the matching result.
[0260] In some embodiments, the device further includes:
[0261] The second acquisition module 1540 is configured to acquire a first data set, and the first data set includes a plurality of first sample game images, and the first sample game images are labeled with a first first-level label or a second first-level label. The first first-level label indicates that the first sample game image has the abnormal element, and the second first-level label indicates that the first sample game image is an image that meets the element requirements;
[0262] The first training module 1550 is configured to train a first classification model based on the first data set to obtain the first-level classification model;
[0263] The second acquisition module 1540 is configured to acquire a second data set, and the second data set includes a plurality of second sample game images, and the second sample game images are labeled with a first second-level label, and the first second-level label indicates the abnormal element type to which the second sample game image belongs. The plurality of second sample game images correspond to the n abnormal element types;
[0264] The second training module 1560 is configured to train the second classification model based on the second data set to obtain the secondary classification model.
[0265] In some embodiments, the second acquisition module 1540 is configured to:
[0266] Acquire a plurality of first sample images and a plurality of second sample images, where the plurality of first sample images are game images indicating the existence of the abnormal element, and the plurality of second sample images are game images indicating the non-existence of the abnormal element;
[0267] Construct the first data set through the plurality of first sample images and the plurality of second sample images, where the quantity of the preset element types corresponding to the plurality of first sample game images in the first data set meets the preset quantity requirement;
[0268] Construct the second data set through the plurality of first sample images, where the preset element types corresponding to the plurality of second sample game images in the second data set meet the preset significance requirement.
[0269] In some embodiments, the second acquisition module 1540 is configured to:
[0270] Draw the abnormal element on the game scene image through a drawing program; use the game scene image with the abnormal element drawn as the first sample image;
[0271] Or,
[0272] Perform matte extraction on the game image containing the abnormal element to obtain an element template corresponding to the abnormal element; perform transformation processing on the element template, where the transformation processing includes at least one of size transformation processing, shape transformation processing, and color transformation processing; combine the transformed element template with the game scene image to obtain the first sample image.
[0273] In some embodiments, the first training module 1550 is configured to:
[0274] Train the first classification model based on the first data set to obtain a first candidate classification model, where the first candidate classification model is used to predict the existence of the abnormal element in the input game image;
[0275] Process a first noise image through a target diffusion model to obtain a first target game image, where the target diffusion model is used to generate a game image containing the abnormal element;
[0276] Performing type prediction on the first target game image through the first candidate classification model to obtain a first predicted classification result, where the first predicted classification result is used to indicate the prediction result of the first candidate classification model on the presence of the abnormal element in the first target game image;
[0277] When the first predicted classification result does not conform to the presence of the abnormal element corresponding to the first target game image, training the first candidate classification model with the first target game image to obtain the first-level classification model.
[0278] In summary, the image classification device provided in the embodiments of the present application performs type prediction on game images through the first-level classification model to obtain the presence of abnormal elements in the game images; if there are abnormal elements in the game images, then performing type prediction on the game images through the second-level classification model to obtain the probabilities that the abnormal elements in the game images belong to n abnormal element types. Among them, through the first-level classification model, suspicious game images with cheating traces can be screened out from a large number of game images, filtering out normal game images without cheating traces, and reducing the number of game images that need to be further detected for cheating; through the second-level classification model, refined detection of the types of abnormal elements can be performed on suspicious game images, so as to determine whether there is a certain type of cheating trace in the suspicious game images. In the case of determining that there is a certain type of cheating trace in the suspicious game images, the cheating accounts corresponding to the suspicious game images can be automatically punished, thereby reducing the number of game images that need to be manually reviewed and improving the efficiency of cheating detection for games.
[0279] It should be noted that: for the image classification device provided in the above embodiments, only the above division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image classification device and the image classification method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be elaborated here.
[0280] Figure 17The structural block diagram of a computer device 1700 provided by an exemplary embodiment of the present application is shown. The computer device 1700 may be: a smart phone, a tablet computer, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a notebook computer, or a desktop computer. The computer device 1700 may also be referred to by other names such as a user device, a portable computer device, a laptop computer device, a desktop computer device, etc.
[0281] Generally, the computer device 1700 includes: a processor 1701 and a memory 1702.
[0282] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1701 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the Central Processing Unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1701 may be integrated with a Graphics Processing Unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an Artificial Intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0283] The memory 1702 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1702 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1701 to implement the image classification method provided in the method embodiments of the present application.
[0284] Illustratively, the computer device 1700 further includes other components. Those skilled in the art can understand that Figure 17 the structure shown in does not constitute a limitation on the computer device 1700, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0285] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable storage medium, which can be the computer-readable storage medium included in the memory in the above embodiments; it can also exist alone and be a computer-readable storage medium not assembled into the computer device. The computer-readable storage medium stores at least one instruction, at least one segment of program, a code set or an instruction set, and the at least one instruction, the at least one segment of program, the code set or the instruction set are loaded and executed by the processor to implement any one of the image classification methods in the above embodiments.
[0286] Optionally, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), solid state drives (SSD, Solid State Drives), or optical discs, etc. Among them, the random access memory may include resistive random access memory (ReRAM, Resistance Random Access Memory) and dynamic random access memory (DRAM, Dynamic Random Access Memory). The serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0287] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be read-only memory, magnetic disk or optical disc, etc. The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An image classification method, characterized in that, The method includes: Obtaining a first game image to be classified; Performing type prediction on the first game image through a first-level classification model to obtain a first classification result, where the first classification result is used to indicate the presence of abnormal elements in the first game image, and the abnormal elements are elements generated by using cheating means in the game; When the first classification result indicates the presence of the abnormal elements in the first game image, performing type prediction on the first game image through a second-level classification model to obtain a second classification result, where the second classification result is used to indicate the probability that the first game image belongs to n abnormal element types, and n is a positive integer.
2. The method according to claim 1, wherein The first-level classification model includes a first first-level classification model and a second first-level classification model. The first first-level classification model is a multi-type binary classification model, and the second first-level classification model is a single-type binary classification model; The performing type prediction on the first game image through the first-level classification model to obtain a first classification result includes: Performing type prediction on the first game image through the first first-level classification model to obtain a first sub-classification result, where the first sub-classification result is used to indicate the presence of m abnormal elements in the first game image, and the m abnormal elements respectively correspond to abnormal element types, and m is an integer greater than n; When the first sub-classification result indicates the absence of the abnormal elements in the first game image, performing type prediction on the first game image through the second first-level classification model to obtain a second sub-classification result, and taking the second sub-classification result as the first classification result, where the second sub-classification result is used to indicate the presence of abnormal elements of the target abnormal element type in the first game image; When the first sub-classification result indicates the presence of the abnormal elements in the first game image, taking the first sub-classification result as the first classification result.
3. The method according to claim 2, wherein The target abnormal element type is an element type other than the m abnormal element types, and the target abnormal element type meets at least one of the following conditions: The number of training images corresponding to the target abnormal element type is less than a preset number; The size of the abnormal elements existing in the training images corresponding to the target abnormal element type is less than a preset size; The similarity between the abnormal elements indicated by the target abnormal element type and the target scene elements in the game is greater than a preset similarity.
4. The method according to any one of claims 1 to 3, characterized in that, The n abnormal element types are element types that meet the preset significance requirements, and the second-level classification model includes sub-classification models corresponding to the n abnormal element types respectively; The performing type prediction on the first game image through the second-level classification model to obtain a second classification result includes: Performing type prediction on the first game image through n sub-classification models respectively to obtain n sub-classification results as the second classification result, where the i-th sub-classification result is used to indicate the probability that the abnormal elements in the first game image belong to the i-th abnormal element type, i ≤ n and i is a positive integer.
5. The method according to claim 4, wherein Performing type prediction on the first game image through sub-classification models corresponding to the n abnormal element types respectively to obtain n sub-classification results as the second classification result includes: Extracting an image feature representation corresponding to the first game image through the i-th sub-classification model; Extracting an operation feature representation corresponding to the first operation data through the i-th sub-classification model, where the first operation data refers to object operation data corresponding to the first game image; Performing feature analysis on the image feature representation and the operation feature representation through the i-th sub-classification model to obtain the i-th sub-classification result.
6. The method according to claim 5, wherein The object operation data includes a keyboard key sequence; The extracting an operation feature representation corresponding to the first operation data through the i-th sub-classification model includes: Extracting a sequence feature representation corresponding to the keyboard key sequence through the i-th sub-classification model, where the sequence feature representation is used to indicate the regularity of the keyboard key sequence; The performing feature analysis on the image feature representation and the operation feature representation through the i-th sub-classification model to obtain the i-th sub-classification result includes: Analyzing the image feature representation through the i-th sub-classification model to obtain a candidate probability, where the candidate probability is used to indicate the probability that the abnormal element in the first game image belongs to the i-th abnormal element type; Obtaining a weight coefficient based on the matching degree between the sequence feature representation and the operation rule feature corresponding to the i-th abnormal element type, where the weight coefficient has a positive correlation with the matching degree; Performing weighted calculation on the candidate probability through the weight coefficient to obtain the i-th sub-classification result.
7. The method according to claim 4, wherein Performing type prediction on the first game image through sub-classification models corresponding to the n abnormal element types respectively to obtain n sub-classification results as the second classification result includes: Performing type prediction on the first game image through the i-th sub-classification model to obtain the i-th candidate classification result; In the case that the i-th candidate classification result indicates that there is an abnormal element of the i-th abnormal element type in the first game image, obtaining a preset image library, where the preset image library includes a plurality of game images containing target elements, and the target elements are elements whose similarity with the abnormal elements of the i-th abnormal element type meets the similarity requirement; Matching the first game image with the preset image library to obtain a matching result, where the matching result is used to indicate the similarity between the first game image and the game images in the preset image library; Determining the i-th sub-classification result based on the matching result.
8. The method according to any one of claims 1 to 3, characterized in that Before obtaining the first game image to be classified, it further includes: Obtaining a first data set, where the first data set includes a plurality of first sample game images, and the first sample game images are labeled with a first first-level label or a second first-level label, where the first first-level label indicates that the first sample game image has the abnormal element, and the second first-level label indicates that the first sample game image is an image meeting the element requirement; Train a first classification model based on the first data set to obtain the first-level classification model; Obtain a second data set, where the second data set includes a plurality of second sample game images, the second sample game images are labeled with a first second-level label, the first second-level label indicates the type of abnormal element to which the second sample game image belongs, and the plurality of second sample game images correspond to the n types of abnormal elements; Train a second classification model based on the second data set to obtain the second-level classification model.
9. The method according to claim 8, wherein The obtaining of the first data set includes: Obtain a plurality of first sample images and a plurality of second sample images, the plurality of first sample images indicate game images with the abnormal element, and the plurality of second sample images indicate game images without the abnormal element; Construct the first data set through the plurality of first sample images and the plurality of second sample images, and the number of preset element types corresponding to the plurality of first sample game images in the first data set meets the preset quantity requirement; The obtaining of the second data set includes: Construct the second data set through the plurality of first sample images, and the preset element types corresponding to the plurality of second sample game images in the second data set meet the preset significance requirement.
10. The method according to claim 9, wherein The obtaining of the plurality of first sample images includes: Draw the abnormal element on the game scene image through a drawing program; use the game scene image with the abnormal element drawn as the first sample image; Or, Perform matte extraction on the game image containing the abnormal element to obtain an element template corresponding to the abnormal element; perform transformation processing on the element template to obtain a transformed element template, and the transformation processing includes at least one of size transformation processing, shape transformation processing, and color transformation processing; combine the transformed element template with the game scene image to obtain the first sample image.
11. The method according to claim 8, wherein The training of the first classification model based on the first data set to obtain the first-level classification model includes: Train the first classification model based on the first data set to obtain a first candidate classification model, and the first candidate classification model is used to predict the presence of the abnormal element in the input game image; Process a first noise image through a target diffusion model to obtain a first target game image, and the target diffusion model is used to generate a game image containing the abnormal element; Perform type prediction on the first target game image through the first candidate classification model to obtain a first prediction classification result, and the first prediction classification result is used to indicate the prediction result of the first candidate classification model on the presence of the abnormal element in the first target game image; When the first prediction classification result does not conform to the presence of the abnormal element corresponding to the first target game image, train the first candidate classification model through the first target game image to obtain the first-level classification model.
12. An image classification device, characterized in that, The device includes: A first acquisition module, configured to acquire a first game image to be classified; The first prediction module is configured to perform type prediction on the first game image through a first-level classification model to obtain a first classification result, where the first classification result is used to indicate the presence of abnormal elements in the first game image, and the abnormal elements are elements generated by using cheating means in the game; The second prediction module is configured to, when the first classification result indicates the presence of the abnormal elements in the first game image, perform type prediction on the first game image through a second-level classification model to obtain a second classification result, where the second classification result is used to indicate the probability that the first game image belongs to n abnormal element types, and n is a positive integer.
13. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the image classification method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, At least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by the processor to implement the image classification method according to any one of claims 1 to 11.
15. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by a processor, it implements the image classification method according to any one of claims 1 to 11.