Game image and animation intelligent generation method, system and device and medium

Through deep learning algorithms and GAN models, game images and animations are intelligently generated, which solves the problems of traditional tools' complexity and insufficient creative support, and achieves efficient and personalized creation and cross-device compatibility, improving game development and animation production. Efficiency and quality.

CN119295607APending Publication Date: 2025-01-10GUANGZHOU SANQIJICAI NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411417350.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Traditional graphic editing tools and animation software have high learning curves and complex operation processes, which are difficult to meet the creative needs of non-professional game developers and small independent studios. It lacks intelligent creative assistance and automatic optimization functions, resulting in low creative efficiency and quality. .

Method used

Deep learning algorithms are used to extract and recognize user design requirements data features and styles, use pre-trained GAN models to generate target game images and animations, and display them adaptively based on user equipment data, simplify development and production processes, and improve creative efficiency and quality. .

Benefits of technology

It realizes intelligent generation of game images and animations, lowers the technical threshold, improves the accuracy and personalization of generated content, ensures the best results on different devices, and improves user experience and creative efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295607A_ABST
    Figure CN119295607A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent generation method, system and device for game images and animations and a medium, and the method specifically comprises the steps: obtaining user design demand data, carrying out the feature extraction and style recognition of the user design demand data through a deep learning algorithm, and obtaining the key feature data of the game images and animations; obtaining specified style parameters, and based on the specified style parameters, analyzing the game image and animation key feature data according to a pre-trained GAN model to generate a target game image and animation; acquiring user equipment data of current user equipment, and adaptively displaying the target game image and animation on the current user equipment according to the user equipment data. According to the method, the process of game development and animation production is simplified, the technical threshold is reduced, and the creation efficiency and quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of animation production technology, and in particular to a method, system, device and medium for intelligently generating game images and animations. Background Art

[0002] Graphics editing tools and animation software play a vital role in game development and animation production. These tools are usually highly complex and powerful, supporting game developers and animators to create high-quality visual effects and animations. However, with the continuous development of technology, the use of these traditional tools also faces some challenges.

[0003] First, traditional graphics editing tools and animation software usually have a steep learning curve and complex operation process. For non-professional game developers and small independent studios, mastering these tools takes a lot of time and effort, and it is easy to encounter various technical difficulties during use. This not only increases development costs, but also reduces development efficiency.

[0004] Secondly, although some graphic editing tools and animation software try to reduce the difficulty of use by simplifying the operation process, they are often limited in function. These simplified tools usually cannot provide the same level of creative support and detail processing capabilities as professional tools, making it difficult to meet a wider range of creative needs. This limits the innovation and development of game and animation works.

[0005] In addition, in the existing market, these graphic editing tools and animation software rarely integrate advanced artificial intelligence technology to optimize the image and animation creation process. Although artificial intelligence technology has made significant progress in many fields, its application in game development and animation production is still relatively limited. Traditional tools usually rely on manual operation and preset templates, lacking intelligent creation assistance and automatic optimization functions. This results in a lot of time and resources being spent on repeated adjustments and optimizations during the creation process, reducing the efficiency and quality of creation. Summary of the invention

[0006] The purpose of the present invention is to provide a method, system, device and medium for intelligent generation of game images and animations, which uses a deep learning algorithm to extract features and identify styles of user design requirement data, uses a pre-trained GAN model to generate target game images and animations, and adaptively displays them according to user device data. This not only simplifies the process of game development and animation production, lowers the technical threshold, but also improves the creation efficiency and quality, so as to solve at least one of the above-mentioned prior art problems.

[0007] In a first aspect, the present invention provides a method for intelligently generating game images and animations, the method specifically comprising:

[0008] Obtain user design requirement data, perform feature extraction and style recognition on the user design requirement data through a deep learning algorithm, and obtain key feature data of game images and animations;

[0009] Acquire specified style parameters, and based on the specified style parameters, parse the key feature data of the game image and animation according to the pre-trained GAN model to generate target game images and animations;

[0010] The user device data of the current user device is obtained, and the target game image and animation are adaptively displayed on the current user device according to the user device data.

[0011] In a second aspect, the present invention provides an intelligent generation system for game images and animations, the system specifically comprising:

[0012] The first generation module is used to obtain user design requirement data, perform feature extraction and style recognition on the user design requirement data through a deep learning algorithm, and obtain key feature data of game images and animations;

[0013] A second generation module is used to obtain specified style parameters, and based on the specified style parameters, parse the key feature data of the game image and animation according to the pre-trained GAN model to generate target game images and animations;

[0014] The third generation module is used to obtain user device data of the current user device, and adaptively display the target game image and animation on the current user device according to the user device data.

[0015] In a third aspect, the present invention provides a computer device comprising: a memory and a processor and a computer program stored in the memory, and when the computer program is executed on the processor, it implements the intelligent generation method of game images and animations as described in any of the above methods.

[0016] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for intelligently generating game images and animations as described in any one of the above methods.

[0017] Compared with the prior art, the present invention has at least one of the following technical effects:

[0018] 1. The present invention uses a deep learning algorithm to extract features and identify styles of user design requirement data, uses a pre-trained GAN model to generate target game images and animations, and displays them adaptively according to user device data. This not only simplifies the process of game development and animation production, lowers the technical threshold, but also improves creation efficiency and quality.

[0019] 2. The present invention realizes the intelligent generation of game images and animations, and can efficiently and accurately generate game images and animations that conform to a specified style according to the user's design requirements.

[0020] 3. The present invention uses a deep learning algorithm to perform feature extraction and style recognition on user design requirement data, thereby improving the accuracy and personalization of generated content.

[0021] 4. The present invention performs adaptive display according to user device data, ensuring that game images and animations can present the best effect on different devices, thereby improving user experience.

[0022] 5. The present invention can efficiently extract the key features of game images by constructing a game image dataset and setting a reasonable CNN model network structure.

[0023] 6. The mean square error loss function can measure the error between the feature vector output by the RNN model and the labeled data, thereby guiding the model to continuously optimize the feature extraction capability. The cross entropy loss function can measure the difference between the category probability distribution output by the RNN model and the true category label, thereby guiding the model to continuously improve the accuracy of style recognition.

[0024] 7. Regarding the network structure of the GAN model, the multi-scale generator network can gradually generate high-quality game images and animations. From outlines to details to the generation of animation frames, all have been carefully designed and optimized; the hierarchical discriminator network can evaluate the generated game images and animations from three dimensions: global, local, and temporal, to ensure the authenticity and style consistency of the generated content; the collaborative work of components such as the conditional input module, feature matching loss module, style consistency module, and action controller further improves the generation ability and flexibility of the GAN model.

[0025] 8. The present invention determines the element size and element spacing according to the screen size and resolution, which can ensure that the game images and animations can maintain clear display effects on different devices; uses LOD technology to determine the accuracy of different areas according to hardware performance and computing resources, which can reduce the burden on the device while ensuring the display effect; determines the image quality and animation frame rate according to the device power and device temperature, which can extend the device usage time and protect the device from overheating damage. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 It is a flowchart of a method for intelligently generating game images and animations provided by an embodiment of the present invention;

[0028] Figure 2 It is a structural schematic diagram of a GAN model provided by an embodiment of the present invention;

[0029] Figure 3 It is a schematic diagram of the structure of a system for intelligently generating game images and animations provided by an embodiment of the present invention;

[0030] Figure 4 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0032] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0033] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0034] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0035] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0036] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0037] In the embodiment of the present application, the execution subject of the process includes a terminal device, which includes but is not limited to: a server, a computer, a smart phone, a tablet computer, and other devices capable of executing the method disclosed in the present application. Figure 1 A flowchart of a method for intelligently generating game images and animations disclosed in an embodiment of the present invention is shown, and the details are as follows:

[0038] S101, obtaining user design requirement data, performing feature extraction and style recognition on the user design requirement data through a deep learning algorithm, and obtaining key feature data of game images and animations.

[0039] In this embodiment, first, design requirement data is collected from the user. This data may include text descriptions, sketches, reference images, etc. For example, the user may want to design a medieval castle that also includes magic elements and dynamic battle scenes. Next, the collected data is preprocessed. This includes steps such as image scaling, format conversion, and noise removal to ensure the consistency and quality of the data. For text descriptions, natural language processing technology can be used for preprocessing such as word segmentation and part-of-speech tagging.

[0040] Use deep learning algorithms to extract features from the preprocessed data. In this example, a convolutional neural network (CNN) can be used to extract image features. CNN can automatically learn local features and texture information in images, making it very suitable for image feature extraction. For animation data, a recurrent neural network (RNN) or its variants, such as a long short-term memory network (LSTM), can be used to capture temporal dependencies in sequence data. These networks can process the associations between frames to extract key features of animation.

[0041] While extracting features, style recognition can also be performed. This can be achieved by training a style classifier that can recognize features of different styles, such as medieval style, modern style, cartoon style, etc. To train the style classifier, a large number of game images and animations of known styles can be used as training data. Through supervised learning, the classifier can learn the difference between different styles and perform accurate style recognition on new data.

[0042] After extracting features and identifying styles, key feature data of game images and animations can be generated. This data can include key information such as shape, color, texture, animation trajectory, etc. For example, for the design of a castle, features such as the castle outline, the shape of the tower, and the texture of the wall can be extracted; for the design of magic elements, features such as the color, light effect, and motion trajectory of the magic can be extracted; for the design of battle scenes, features such as the character's movements, the shape of the weapon, and the battle effect can be extracted.

[0043] Finally, the generated key feature data is applied to the design of game graphics and animations. This can be achieved through tools such as rendering engines and animation software. At the same time, the design can be optimized and adjusted based on user feedback and actual needs.

[0044] In this embodiment, the deep learning algorithm can automatically learn and extract key features from images and animations, greatly improving the automation and efficiency of the design process. Through the trained model and algorithm, the key features of the user's design requirements can be accurately extracted and style recognition can be performed to meet the user's expectations and needs.

[0045] In some embodiments, in the above step S101, the user design requirement data includes a user design sketch; and the step of extracting features and identifying styles of the user design requirement data by using a deep learning algorithm specifically includes:

[0046] Performing feature extraction on the user design sketch according to the pre-trained CNN model to obtain a first feature set and a second feature set, wherein the first feature set includes edge features, texture features, and shape features, and the second feature set includes character type, clothing type, and decoration type;

[0047] The first feature set and the second feature set are encoded, and the encoded first feature set and the second feature set are input into a pre-trained RNN model for style recognition to obtain the style type of the user design sketch.

[0048] In this embodiment, a pre-trained convolutional neural network (CNN) model is used to extract features from the user's design sketch. The edge features, texture features, and shape features of the sketch are extracted through the first few convolutional layers and pooling layers of the CNN, and these features can reflect the basic form and detail information of the sketch. The fully connected layer or subsequent high-level feature extraction layer of the CNN is used to extract features related to the character type, clothing type, and decoration type, which are usually closely related to the semantic content of the sketch.

[0049] The extracted first feature set and the second feature set are encoded for subsequent processing. The encoding can be done by vectorization, converting each feature set into a feature vector of fixed length. Then, the encoded first feature set and the second feature set are fused. This can be achieved by concatenation, weighted summation, etc., to generate a comprehensive feature vector containing rich information.

[0050] The fused feature vector is input into a pre-trained recurrent neural network (RNN) model for style recognition. This RNN model has been trained on a sketch dataset containing multiple style types and has the ability to classify styles. The RNN model can capture the temporal dependencies in the feature vector (although the feature vector may not be truly temporal in this scenario, RNN can still be used to process such serialized feature data) and judge the style type of the sketch based on these relationships. Finally, the RNN model outputs the style type of the user's design sketch. This type can be one of the predefined labels, such as "classical style", "modern style", "cartoon style", etc.

[0051] In this embodiment, feature extraction by using a pre-trained CNN model can make full use of the prior knowledge learned by the model on a large amount of image data to improve the accuracy and robustness of feature extraction. Style recognition by using a pre-trained RNN model can capture the complex relationship in the feature vector and improve the accuracy and generalization ability of style recognition. Dividing the features into a first feature set and a second feature set, and extracting and encoding them separately, helps to achieve refined classification of features and deeper semantic understanding.

[0052] Specifically, the pre-training steps of the CNN model and the RNN model specifically include:

[0053] Acquire original game image data, draw and annotate the edges, textures and shapes of the original game image data, add corresponding labels to the drawn and annotated areas, and add category labels to the characters or environments in the original game image data, wherein the category labels include character types, clothing types and decoration types, to form a game image data set;

[0054] Setting a network structure of a CNN model, wherein the network structure of the CNN model includes a shallow convolution layer, a deep convolution layer, a pooling layer, and a fully connected layer, wherein the shallow convolution layer is used to extract edges, textures, and shapes of game images, the deep convolution layer is used to extract the category style of the characters or environments of the game images, the pooling layer is used to reduce the dimension of the feature map, and the fully connected layer is used to map the features to the output category;

[0055] Inputting the game image dataset into the CNN model for training, and outputting a third feature set and a fourth feature set;

[0056] After encoding the third feature set, the feature set is input into the RNN model for training, and the loss function value of the mean square error loss function is calculated by a forward propagation algorithm;

[0057] After encoding the fourth feature set, the feature set is input into the RNN model for training, and the loss function value of the cross entropy loss function is calculated by the forward propagation algorithm.

[0058] In this embodiment, for example, the original image data of a role-playing game is obtained, and these images contain various characters, environments, clothing, decorations and other elements. The edges, textures and shapes of these images are carefully drawn and annotated, for example, the outline of the character, the shape of the weapon, the texture of the environment, etc. are annotated. Corresponding labels are added to the annotated areas, such as "weapon", "character outline", "tree texture", etc. At the same time, category labels are added to the characters or environments in the image, such as "warrior character", "mage character", "forest environment", "urban environment", etc., and the character type (such as warrior, mage), clothing type (such as armor, robe) and decoration type (such as helmet, necklace) are further subdivided. After the above processing, a game image data set containing rich annotation information is formed.

[0059] Set the network structure of the CNN model, including shallow convolutional layers, deep convolutional layers, pooling layers, and fully connected layers.

[0060] Shallow convolutional layers: Use smaller convolution kernels and fewer convolutional layers to extract low-level features such as edges, textures, and shapes in the image.

[0061] Deep convolutional layers: Use larger convolution kernels and more convolutional layers to extract high-level features such as the category style of the characters or environments in the image.

[0062] Pooling layer: A pooling layer is set after the convolutional layer to reduce the dimension of the feature map, reduce the amount of computation, and prevent overfitting.

[0063] Fully connected layer: Connect the output of the pooling layer to a fully connected layer to map the features to output categories.

[0064] The game image dataset is input into the CNN model for training, and the model parameters are optimized through the back propagation algorithm so that the model can accurately extract features in the image. During the training process, the third feature set (including low-level features) and the fourth feature set (including high-level features) are output.

[0065] After encoding the third feature set, it is input into the RNN model for training. The RNN model uses the forward propagation algorithm to calculate the value of the mean square error loss function to evaluate the model's ability to predict low-level feature sequences. After encoding the fourth feature set, it is also input into the RNN model for training. This time, the cross entropy loss function is used to evaluate the model's ability to classify high-level feature sequences. Through multiple iterative training, the parameters of the RNN model are optimized so that it can accurately capture the temporal dependencies in the image sequence and effectively predict and classify low-level and high-level features.

[0066] In this embodiment, the CNN model can extract low-level and high-level features in the image respectively through the combination of shallow convolutional layers and deep convolutional layers, which are of great significance for subsequent classification and recognition tasks. The RNN model can capture the temporal dependencies in the image sequence through its special loop structure, which is particularly useful for processing image data with time order (such as video frames). By combining the advantages of CNN and RNN models, effective processing and analysis of game image data is achieved. This technology not only improves the ability of feature extraction and temporal dependency capture, but also realizes multi-task processing, and has broad application prospects.

[0067] Furthermore, the mean square error loss function satisfies

[0068]

[0069] Among them, MSE represents the mean square error loss function value, n represents the number of features in the third feature set, represents the continuous numeric vector corresponding to the third feature set, The representation is a quantitative representation of edge features, texture features and shape features extracted from the labeled data.

[0070] In this embodiment, the mean square error loss function is typically used for regression tasks, i.e., tasks of predicting continuous values. In this process, the third feature set contains features extracted from the CNN model related to the edges, textures, and shapes of the game images, which are typically continuous numerical representations. Therefore, when these features are input into the RNN model for training, the MSE loss function is used to evaluate the difference between the predicted value and the true value. The mean square error loss function is used to evaluate the performance of the RNN model when processing continuous numerical features (such as edges, textures, and shapes), and is implemented by calculating the average of the squares of the differences between the predicted value and the true value. During the training process, the RNN model will try to adjust its parameters to minimize the MSE loss function value so that the predicted value is closer to the true value.

[0071] Furthermore, the cross entropy loss function satisfies

[0072]

[0073] Among them, H(q,p) represents the cross entropy loss function value, C represents the total number of categories, q i Represents the probability of the i-th category in the true category label, p i represents the probability of the i-th category in the predicted probability distribution.

[0074] In this embodiment, the cross entropy loss function is typically used for classification tasks, i.e., tasks that predict discrete category labels. In this process, the fourth feature set includes features extracted from the CNN model that are related to the category style of the characters or environments in the game image. After these features are processed by the RNN model, the output is the probability distribution of the category label. Therefore, the cross entropy loss function is used to evaluate the difference between the predicted probability distribution and the true category label. The cross entropy loss function is used to evaluate the performance of the RNN model when processing discrete category labels (such as character type, clothing type, and decoration type), and is achieved by calculating the cross entropy between the predicted probability distribution and the true category label. During the training process, the RNN model will try to adjust its parameters to minimize the cross entropy loss function value, so that the predicted probability distribution is closer to the probability distribution of the true category label.

[0075] S102, obtaining designated style parameters, and based on the designated style parameters, analyzing the key feature data of the game image and animation according to a pre-trained GAN model to generate a target game image and animation.

[0076] In this embodiment, first, it is necessary to obtain the specified style parameters from the user or system configuration. These parameters describe the style characteristics of the game images and animations that the user wants to generate. For example, the user may specify a specific art style (such as oil painting, watercolor, pixel art, etc.), or a specific animation style (such as Disney style, Hayao Miyazaki style, etc.). Style parameters can exist in various forms, such as text descriptions, numerical parameters, reference images, etc. For text descriptions, natural language processing technology can be used to parse and understand; for numerical parameters, they can be directly used for subsequent calculations; for reference images, image processing technology can be used to extract their style characteristics.

[0077] Next, load a pre-trained Generative Adversarial Network (GAN) model. This model has been trained to convert key feature data of game images and animations into target images and animations with a specific style. GAN models usually consist of two parts: the generator and the discriminator. The task of the generator is to generate fake data that is as close to the real data as possible, while the task of the discriminator is to distinguish between the real data and the fake data generated by the generator. During the training process, these two parts compete with each other until the generator is able to generate high-quality fake data and the discriminator can no longer distinguish them.

[0078] The key feature data of game images and animations are input into the generator of the pre-trained GAN model. The generator will generate game images and animations with the target style based on these key feature data and the specified style parameters. In this process, the generator will use its style conversion ability learned during training to convert the key feature data into target images and animations with the specified style. At the same time, the discriminator will also evaluate the generated images and animations to ensure that their quality and style meet the user's expectations.

[0079] Finally, the generated target game images and animations are post-processed and optimized. This can include steps such as color correction, detail enhancement, and animation smoothness adjustment to ensure that the final game images and animations meet the specified style parameters and have good visual effects and user experience.

[0080] In this embodiment, by loading different pre-trained GAN models and using different style parameters, game images and animations with various styles can be generated to meet the different needs and preferences of users. The pre-trained GAN model has learned a large number of style features and conversion rules during the training process, so it can generate high-quality target game images and animations with realistic visual effects and smooth animation effects.

[0081] In some embodiments, in the above step S102, Figure 2As shown, the GAN model includes a multi-scale generator network, a hierarchical discriminator network, a conditional input module, a feature matching loss module, a style consistency module and an action controller;

[0082] The multi-scale generator network includes a contour generation subnetwork, a detail enhancement subnetwork and an animation generation subnetwork, wherein the contour generation subnetwork is used to perform image segmentation on the edges, textures and shapes of the game image by adopting a U-Net architecture, the detail enhancement subnetwork is used to perform high-level feature extraction on the output result of the contour generation subnetwork using a plurality of residual blocks, and the animation generation subnetwork is used to analyze the output result of the detail enhancement subnetwork using a spatiotemporal convolutional network structure and output a plurality of continuous animation frames;

[0083] The hierarchical discriminator network includes a global discriminator, a local discriminator and a temporal discriminator. The global discriminator is used to evaluate the authenticity and style consistency of game images and animations using a global convolutional network structure. The local discriminator is used to evaluate the true probability value of each key area of ​​the game images and animations using a Patch-GAN structure. The temporal discriminator is used to evaluate the true probability value of the game animation sequence using a 3D convolutional structure.

[0084] The conditional input module is used to dynamically adjust the feature maps of each stage in the multi-scale generator network using a self-attention mechanism;

[0085] The feature matching loss module is used to calculate the difference between the generated images and animations of the multi-scale generator network and the real images and animations using a loss function;

[0086] The style consistency module is used to use the AdaIN layer to ensure that the generated images and animations of the multi-scale generator network are consistent with the required style of the specified style parameters;

[0087] The motion controller is used to generate continuous posture parameters using an LSTM network, and the posture parameters are used to control key frame generation in the animation generation subnetwork.

[0088] In this embodiment, the outline generation subnetwork adopts the U-Net architecture, which is a deep learning model commonly used for image segmentation. It includes a downsampling path (encoder) and an upsampling path (decoder), as well as jump connections, which help preserve the detail information in the input image. The output of the outline generation subnetwork is a basic, low-resolution character or scene outline, which is the basis for subsequent detail enhancement and animation generation.

[0089] The detail enhancement subnetwork receives the output of the contour generation subnetwork as input and extracts its high-level features. The detail enhancement subnetwork uses multiple residual blocks stacked to build the network body, each of which contains a convolutional layer, a ReLU activation function, and a skip connection. This structure helps learn complex textures and details in the image. To increase the receptive field, a dilated convolution (also called an expanded convolution) is used to capture a wider range of contextual information. This helps generate finer and coherent details. The output of the detail enhancement subnetwork is a high-resolution image with rich textures and details.

[0090] The animation generation subnetwork adopts a spatiotemporal convolutional network structure, which can simultaneously capture the spatial and temporal dependencies in the image sequence, which helps to generate coherent and smooth animations. The animation generation subnetwork receives the output of the detail enhancement subnetwork as a static image input, and may combine additional motion parameters or pose information. The output of the animation generation subnetwork is a character animation sequence, including multiple consecutive action frames.

[0091] The global discriminator uses a fully convolutional network structure and can process input images of any size. It evaluates the authenticity and style consistency of the overall image / animation. The global discriminator outputs a scalar value indicating the probability that the input image / animation is real data.

[0092] The local discriminator uses the Patch-GAN structure, which focuses on key areas in the image / animation, such as character faces, weapons, etc. Each discriminator outputs a feature map of the same size as the input image, where each pixel value represents the probability that the corresponding image block at that position is real data. The local discriminator outputs a feature map, where each pixel value represents the probability that the corresponding image block is real data.

[0093] The temporal discriminator uses a 3D convolutional structure to process animation sequences, which can capture the temporal dependencies in the sequence. The temporal discriminator outputs a scalar value representing the probability that the input animation sequence is real data.

[0094] The conditional input module uses a self-attention mechanism to dynamically adjust the feature maps of each stage in the generator network. This helps the generator generate diverse results based on user-specified information such as style, action type, etc. The user-specified conditional information (such as style label, action type, etc.) is first encoded into a vector or feature map. This encoded conditional information is then injected into each stage of the generator network and fused with the existing feature maps.

[0095] The feature matching loss module compares the feature maps of the intermediate layers of the generator and the discriminator to capture the subtle differences between the generated images and the real images. The difference between the feature maps is calculated using L2 loss or L1 loss and used as a regularization term during training. The feature matching loss module helps generate more stable and detailed results, reducing the risk of mode collapse and overfitting.

[0096] The style consistency module uses AdaIN layers to ensure that the generated images and animations are consistent with the specified game style. The AdaIN layer adapts to different styles by dynamically adjusting the mean and variance of instance normalization. First, the style consistency module encodes the specified style image into a style vector. This style vector is then injected into each stage of the generator network to adjust the style of the generated image through the AdaIN layer.

[0097] The motion controller uses an LSTM network to generate continuous pose parameters, which are used to control the keyframe generation in the animation generation subnetwork. The motion controller receives a user-specified sequence of actions or keyframes as input and outputs a continuous sequence of pose parameters, which are used to generate smooth and realistic animations. By adjusting the parameters and training strategy of the LSTM network, the smoothness and realism of the generated animation can be ensured.

[0098] In this embodiment, this specifically designed GAN structure combines multiple modules such as multi-scale generation, hierarchical discrimination, conditional input, feature matching loss, style consistency and action controller, which can generate high-quality and diverse game images and animations while meeting the user-specified style and action requirements.

[0099] S103, obtaining user device data of the current user device, and adaptively displaying the target game image and animation on the current user device according to the user device data.

[0100] In this embodiment, first, the system needs to obtain detailed information about the current user's device, including but not limited to the device's screen resolution, screen size, operating system type and version, hardware performance (such as CPU, GPU model and performance), memory size, storage device type and capacity, network connection type and speed, etc. This information can be obtained in a variety of ways, such as: device API, many operating systems provide API interfaces that allow applications to query the device's hardware and software information; network detection, by analyzing the type and speed of the network connection, the device's network performance can be indirectly evaluated; user input, in some cases, the user can manually enter device information or select a preset device configuration.

[0101] Based on the acquired user device data, the system needs to formulate a set of adaptive display strategies, including but not limited to:

[0102] Resolution adaptation: Adjust the resolution and size of game images and animations according to the screen resolution and size of the device to ensure clear display on the screen.

[0103] Performance optimization: Adjust the rendering quality, frame rate and other parameters of game images and animations according to the hardware performance of the device to balance visual effects and performance consumption.

[0104] Interaction adaptation: Optimize the user interface and interaction method according to the device's operating system and screen size to ensure that the game's operating experience is consistent and comfortable on different devices.

[0105] Network optimization: Adjust the loading strategy and compression method of game data based on the device's network connection type and speed to reduce network latency and data usage.

[0106] Apply the developed adaptive display strategy to the display process of the target game images and animations, including but not limited to:

[0107] Dynamic adjustment: When the game is running, the display strategy is dynamically adjusted according to the real-time status of the device (such as power, temperature, network status, etc.).

[0108] Cache Management: Intelligently manage the cache of game data based on the device's storage space and performance to increase loading speed and reduce storage usage.

[0109] User feedback: Collect user feedback on adaptive display effects, and continuously optimize and improve display strategies.

[0110] Finally, the system needs to monitor the effect of adaptive display, including user satisfaction, game fluency, resource utilization, etc. Based on the monitoring results, the display strategy is continuously optimized to improve user experience.

[0111] In this embodiment, an adaptive display strategy is used to ensure that game images and animations can be displayed with the best effect on different devices, thereby improving the user's visual and interactive experience. According to the hardware performance and network connection status of the device, the loading and rendering strategy of game resources is intelligently adjusted to reduce unnecessary resource consumption and waste. Through dynamic adjustment and intelligent adaptation, it is ensured that the game can run stably on various devices and operating systems, and the compatibility and coverage of the game are improved. Good adaptive display effects can improve user satisfaction and loyalty to the game, and promote long-term retention and activity of users.

[0112] In some embodiments, in the above step S103, the user device data includes screen size, resolution, hardware performance, computing resources, device power and device temperature, and the adaptive display of the target game image and animation on the current user device according to the user device data specifically includes:

[0113] Determine, according to the screen size and the resolution, the element size and element spacing of the target game image and animation on the current user device;

[0114] Determine the accuracy of the target game image and animation in different areas of the current user device using LOD technology according to the hardware performance and the computing resources;

[0115] The image quality and animation frame rate of the target game image and animation on the current user device are determined according to the device power and the device temperature.

[0116] In this embodiment, the game system or application obtains the screen size (such as width, height) and resolution (such as pixel density, DPI, etc.) of the current user device. Based on the screen size and resolution, the game system or application calculates the appropriate size of each element (such as characters, props, UI interface elements, etc.) in the target game image and animation, and scales the element size in the design draft according to a certain ratio to adapt to the screen size and resolution of different devices. After calculating the element size, the game system or application also needs to determine the spacing between elements to ensure that the game interface can maintain a good layout and readability on different devices. This technology improves the compatibility and readability of the game interface on different devices, ensuring that the game elements can maintain the appropriate size and spacing at different screen sizes and resolutions, thereby enhancing the player's gaming experience.

[0117] The game system or application evaluates the hardware performance (such as CPU, GPU, memory, etc.) of the current user device during operation. Based on the hardware performance evaluation results, the game system or application determines the LOD levels of the target game images and animations in different areas (such as near view, mid-view, and far view). The higher the LOD level, the higher the image and animation accuracy in the area, and more computing resources are required; the lower the LOD level, the lower the image and animation accuracy in the area, and the fewer computing resources are required. During the game operation, the game system or application renders and optimizes the target game images and animations to varying degrees according to the determined LOD level. For example, a high LOD level is used in the near view area to present more detailed images and animations; a low LOD level is used in the far view area to reduce the consumption of computing resources. This technology improves the running efficiency and stability of the game on devices with different hardware performance. By applying different levels of LOD technology in different areas, the reasonable allocation and utilization of computing resources is achieved, thereby improving the overall performance and fluency of the game.

[0118] The game system or application continuously monitors the power and temperature status of the current user's device during operation. According to the changes in the power and temperature status of the device, the game system or application dynamically adjusts the image quality and animation frame rate of the target game image and animation. For example, when the device power is low or the temperature is high, the game system or application will automatically reduce the image quality and animation frame rate to reduce the energy consumption and heat generation of the device; when the device power is sufficient and the temperature is moderate, the image quality and animation frame rate will be improved to enhance the visual effects and smoothness of the game. This technology extends the battery life and service life of the device, and by dynamically adjusting the image quality and animation frame rate, it achieves effective control of the device's energy consumption and heat generation, thereby improving the player's gaming experience and the efficiency of device use.

[0119] In this embodiment, the game system or application can dynamically adjust parameters such as element size, element spacing, precision, image quality, and animation frame rate of the target game image and animation according to the screen size, resolution, hardware performance, computing resources, power, and temperature of different user devices. This not only improves the compatibility and running efficiency of the game on different devices, but also optimizes the player's gaming experience and the efficiency of device use.

[0120] Reference Figure 3 An embodiment of the present invention provides a system 3 for intelligently generating game images and animations, and the system 3 specifically includes:

[0121] The first generation module 301 is used to obtain user design requirement data, perform feature extraction and style recognition on the user design requirement data through a deep learning algorithm, and obtain key feature data of game images and animations;

[0122] The second generation module 302 is used to obtain specified style parameters, and based on the specified style parameters, parse the game image and animation key feature data according to the pre-trained GAN model to generate target game images and animations;

[0123] The third generation module 303 is used to obtain user device data of the current user device, and adaptively display the target game image and animation on the current user device according to the user device data.

[0124] It is understandable that if Figure 1 The contents of the embodiment of the intelligent generation method of game images and animations shown in the figure are applicable to the embodiment of the intelligent generation system of game images and animations. The functions specifically implemented by the embodiment of the intelligent generation system of game images and animations are similar to those of the embodiment of the intelligent generation method of game images and animations shown in the figure. Figure 1 The embodiment of the intelligent generation method of game images and animations shown in FIG. 1 is the same as that of FIG. 1 , and the beneficial effects achieved are the same as those of FIG. Figure 1 The beneficial effects achieved by the embodiment of the intelligent generation method of game images and animations shown are also the same.

[0125] It should be noted that the information interaction, execution process and other contents between the above-mentioned systems are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0126] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0127] Reference Figure 4 The embodiment of the present invention further provides a computer device 4, comprising: a memory 402 and a processor 401 and a computer program 403 stored in the memory 402. When the computer program 403 is executed on the processor 401, the intelligent generation method of game images and animations as described in any one of the above methods is implemented.

[0128] The computer device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 It is only an example of the computer device 4 and does not constitute a limitation on the computer device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0129] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0130] In some embodiments, the memory 402 may be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 402 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Further, the memory 402 may also include both an internal storage unit and an external storage device of the computer device 4. The memory 402 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as the program code of the computer program, etc. The memory 402 may also be used to temporarily store data that has been output or is to be output.

[0131] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for intelligently generating game images and animations as described in any one of the above methods is implemented.

[0132] In this embodiment, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0134] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0135] In the embodiments disclosed in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

Claims

1. A method for intelligently generating game images and animations, characterized in that: The method specifically comprises: Obtain user design requirement data, perform feature extraction and style recognition on the user design requirement data through a deep learning algorithm, and obtain key feature data of game images and animations; Acquire specified style parameters, and based on the specified style parameters, parse the key feature data of the game image and animation according to the pre-trained GAN model to generate target game images and animations; The user device data of the current user device is obtained, and the target game image and animation are adaptively displayed on the current user device according to the user device data.

2. The method according to claim 1, characterized in that The user design requirement data includes a user design sketch; and the performing feature extraction and style recognition on the user design requirement data by using a deep learning algorithm specifically includes: Performing feature extraction on the user design sketch according to the pre-trained CNN model to obtain a first feature set and a second feature set, wherein the first feature set includes edge features, texture features, and shape features, and the second feature set includes character type, clothing type, and decoration type; The first feature set and the second feature set are encoded, and the encoded first feature set and the second feature set are input into a pre-trained RNN model for style recognition to obtain the style type of the user design sketch.

3. The method according to claim 2, characterized in that The pre-training steps of the CNN model and the RNN model specifically include: Acquire original game image data, draw and annotate the edges, textures and shapes of the original game image data, add corresponding labels to the drawn and annotated areas, and add category labels to the characters or environments in the original game image data, wherein the category labels include character types, clothing types and decoration types, to form a game image data set; Setting a network structure of a CNN model, wherein the network structure of the CNN model includes a shallow convolution layer, a deep convolution layer, a pooling layer, and a fully connected layer, wherein the shallow convolution layer is used to extract edges, textures, and shapes of game images, the deep convolution layer is used to extract the category style of the characters or environments of the game images, the pooling layer is used to reduce the dimension of the feature map, and the fully connected layer is used to map the features to the output category; Inputting the game image dataset into the CNN model for training, and outputting a third feature set and a fourth feature set; After encoding the third feature set, the feature set is input into the RNN model for training, and the loss function value of the mean square error loss function is calculated by a forward propagation algorithm; After encoding the fourth feature set, the feature set is input into the RNN model for training, and the loss function value of the cross entropy loss function is calculated by the forward propagation algorithm.

4. The method according to claim 3, characterized in that The mean square error loss function satisfies Among them, MSE represents the mean square error loss function value, n represents the number of features in the third feature set, represents the continuous numeric vector corresponding to the third feature set, The representation is a quantitative representation of edge features, texture features and shape features extracted from the labeled data.

5. The method according to claim 3, characterized in that: The cross entropy loss function satisfies Among them, H(q,p) represents the cross entropy loss function value, C represents the total number of categories, q i Represents the probability of the i-th category in the true category label, p i represents the probability of the i-th category in the predicted probability distribution.

6. The method according to any one of claims 1 to 5, characterized in that The GAN model includes a multi-scale generator network, a hierarchical discriminator network, a conditional input module, a feature matching loss module, a style consistency module and an action controller; The multi-scale generator network includes a contour generation subnetwork, a detail enhancement subnetwork and an animation generation subnetwork, wherein the contour generation subnetwork is used to perform image segmentation on the edges, textures and shapes of the game image by adopting a U-Net architecture, the detail enhancement subnetwork is used to perform high-level feature extraction on the output result of the contour generation subnetwork using a plurality of residual blocks, and the animation generation subnetwork is used to analyze the output result of the detail enhancement subnetwork using a spatiotemporal convolutional network structure and output a plurality of continuous animation frames; The hierarchical discriminator network includes a global discriminator, a local discriminator and a temporal discriminator. The global discriminator is used to evaluate the authenticity and style consistency of game images and animations using a global convolutional network structure. The local discriminator is used to evaluate the true probability value of each key area of ​​the game images and animations using a Patch-GAN structure. The temporal discriminator is used to evaluate the true probability value of the game animation sequence using a 3D convolutional structure. The conditional input module is used to dynamically adjust the feature maps of each stage in the multi-scale generator network using a self-attention mechanism; The feature matching loss module is used to calculate the difference between the generated images and animations of the multi-scale generator network and the real images and animations using a loss function; The style consistency module is used to use the AdaIN layer to ensure that the generated images and animations of the multi-scale generator network are consistent with the required style of the specified style parameters; The motion controller is used to generate continuous posture parameters using an LSTM network, and the posture parameters are used to control key frame generation in the animation generation subnetwork.

7. The method according to any one of claims 1 to 5, characterized in that The user device data includes screen size, resolution, hardware performance, computing resources, device power and device temperature. The adaptive display of the target game image and animation on the current user device according to the user device data specifically includes: Determine, according to the screen size and the resolution, the element size and element spacing of the target game image and animation on the current user device; Determine the accuracy of the target game image and animation in different areas of the current user device using LOD technology according to the hardware performance and the computing resources; The image quality and animation frame rate of the target game image and animation on the current user device are determined according to the device power and the device temperature.

8. An intelligent generation system for game images and animations, characterized in that: The system specifically comprises: The first generation module is used to obtain user design requirement data, perform feature extraction and style recognition on the user design requirement data through a deep learning algorithm, and obtain key feature data of game images and animations; A second generation module is used to obtain specified style parameters, and based on the specified style parameters, parse the key feature data of the game image and animation according to the pre-trained GAN model to generate target game images and animations; The third generation module is used to obtain user device data of the current user device, and adaptively display the target game image and animation on the current user device according to the user device data.

9. A computer device, characterized in that: include: A memory and a processor and a computer program stored in the memory, when the computer program is executed on the processor, implements the intelligent generation method of game images and animations as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the intelligent generation method of game images and animations as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Adaptive control method, device and system for animation effect

    CN121233213A