Game level generation recommendation method, system, equipment and medium

By generating dynamic user portraits through multimodal data collection and multi-task learning networks, combined with generative adversarial networks and dynamic equilibrium models, the shortcomings of traditional game level design and recommendation systems are addressed, personalized, real-time level generation and recommendation are achieved, and the player experience and adaptability of game content are improved.

CN120617962APending Publication Date: 2025-09-12广州三七极耀网络科技有限公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510578626.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Traditional game level design and recommendation systems are unable to quickly respond to player needs, lack in-depth user portraits and dynamic adjustment mechanisms, resulting in serious content homogeneity, inability to meet players' personalized needs, and inability to capture players' dynamic changes in real time, affecting the gaming experience.

Method used

Multimodal data is acquired through tracking technology, and dynamic user portrait vectors are generated using a multi-task learning network. Combined with a dual-channel generative adversarial network and a difficulty-skill dynamic balance model, personalized levels are generated. Spectral clustering algorithms are used to segment player types and dynamically adjust level parameters to match player status.

Benefits of technology

It achieves efficient, personalized, and real-time game level generation and recommendation, improves player satisfaction and retention rate, reduces content recommendation deviation rate, and improves level generation efficiency and matching degree.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120617962A_ABST
    Figure CN120617962A_ABST
Patent Text Reader

Abstract

The invention discloses a game level generation recommendation method, system, device and medium, and the method specifically comprises the steps: carrying out the combined modeling of multi-modal data through a multi-task learning network, and generating a dynamic user portrait vector, the main task of the multi-task learning network is used for predicting the skill level of a player, and the auxiliary task of the multi-task learning network is used for predicting the skill level of the player; auxiliary tasks of the multi-task learning network are used for classifying interest labels and analyzing emotional tendencies; inputting the dynamic user portrait vector into a dual-channel generative adversarial network, generating a candidate level set, and screening initial recommended levels through a playability evaluation algorithm; and calculating the matching degree between the skill score of the user and the level challenge degree in real time according to a difficulty-skill dynamic balance model, and dynamically adjusting the level parameters of the initial recommendation level through the matching degree to obtain a first recommendation level. According to the method, key problems in traditional game level design and recommendation are effectively solved, and efficient, personalized and real-time game level generation and recommendation with optimized user experience are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, system, device and medium for generating and recommending game levels. Background Art

[0002] With the booming gaming industry, players are demanding higher levels of content richness, personalization, and real-time performance. While traditional manual design methods ensure artistic quality and creative depth in game levels, they are limited by human resources and design cycles, making it difficult to satisfy players' constant desire for massive amounts of fresh content. Furthermore, faced with an increasingly diverse player base with vastly varying gaming preferences, skill levels, and emotional inclinations, traditional level recommendation systems, lacking in-depth user profiling and dynamic adjustment mechanisms, often fail to accurately match player needs, limiting the user experience.

[0003] First of all, the manual level design process is cumbersome and takes a lot of time and energy from conception to final realization. It is difficult to respond quickly to market changes and player needs, which limits the iteration speed of game content.

[0004] Secondly, traditional recommendation systems are mostly based on preset rules or simple user behavior statistics, and lack a comprehensive analysis of players' deep interests, emotions, and social relationships, resulting in serious homogeneity of recommended content and an inability to meet players' personalized needs.

[0005] Furthermore, in a dynamically changing gaming environment, players' skill levels and preferences may change over time. However, existing recommendation systems often fail to capture these changes in real time, resulting in recommendations that are out of sync with the player's current state, impacting the gaming experience.

[0006] Finally, because the recommendation system cannot accurately understand the motivations and emotional tendencies behind player behavior, the recommended content may deviate from player expectations, causing frustration or boredom, which in turn affects player retention and willingness to pay. Summary of the Invention

[0007] The purpose of the present invention is to provide a game level generation and recommendation method, system, device and medium, which effectively solves the key problems in traditional game level design and recommendation, and realizes efficient, personalized, real-time and user experience optimized game level generation and recommendation, so as to solve at least one of the above-mentioned existing technical problems.

[0008] In a first aspect, the present invention provides a method for generating a game level recommendation, the method specifically comprising:

[0009] Through tracking technology, users' explicit interaction data, implicit emotional data, and social graph data are obtained to form multimodal data;

[0010] Multimodal data is jointly modeled through a multi-task learning network to generate dynamic user portrait vectors. The main task of the multi-task learning network is to predict the player's skill level, and the auxiliary tasks of the multi-task learning network are to classify interest tags and analyze emotional tendencies.

[0011] The dynamic user portrait vector is input into a two-channel generative adversarial network to generate a set of candidate levels, and the initial recommended levels are screened through a playability evaluation algorithm.

[0012] Establish a difficulty-skill dynamic balance model, calculate the matching degree between the user's skill score and the level challenge in real time based on the difficulty-skill dynamic balance model, and dynamically adjust the level parameters of the initial recommended level based on the matching degree to obtain the first recommended level;

[0013] According to the spectral clustering algorithm, users are divided into core players, casual players and players at risk of churn to obtain user classification results. Based on the user classification results, differentiated server computing resources are allocated to each player's level generation request.

[0014] In a second aspect, the present invention provides a game level generation recommendation system, the system specifically comprising:

[0015] The first generation and recommendation module is used to obtain users' explicit interaction data, implicit emotion data, and social graph data through tracking technology to form multimodal data;

[0016] The second generation recommendation module is used to jointly model multimodal data through a multi-task learning network to generate a dynamic user portrait vector. The main task of the multi-task learning network is to predict the player's skill level, and the auxiliary task of the multi-task learning network is to classify interest tags and analyze emotional tendencies.

[0017] The third generation and recommendation module is used to input the dynamic user portrait vector into the dual-channel generative adversarial network to generate a set of candidate levels and screen the initial recommended levels through the playability evaluation algorithm;

[0018] The fourth generation recommendation module is used to establish a difficulty-skill dynamic balance model, calculate the matching degree between the user's skill score and the level challenge in real time based on the difficulty-skill dynamic balance model, and dynamically adjust the level parameters of the initial recommended level based on the matching degree to obtain the first recommended level;

[0019] The fifth generation recommendation module is used to divide users into core players, casual players and players at risk of churn according to the spectral clustering algorithm, obtain user classification results, and allocate differentiated server computing resources to each player's level generation request based on the user classification results.

[0020] 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, wherein when the computer program is executed on the processor, the game level generation recommendation method described in any one of the above methods is implemented.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the game level generation recommendation method as described in any one of the above methods is implemented.

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

[0023] 1. It effectively solves the key problems in traditional game level design and recommendation, and realizes efficient, personalized, real-time and user experience-optimized game level generation and recommendation.

[0024] 2. Use generative adversarial networks to automatically generate levels, significantly shortening the design cycle and quickly responding to player needs.

[0025] 3. Build dynamic user portraits through multi-task learning networks, accurately capture players' interests, emotions, and social characteristics, and achieve personalized level recommendations.

[0026] 4. Establish a dynamic balance model between difficulty and skills, and adjust level parameters in real time to ensure that the recommended content is highly matched with the player's current status.

[0027] 5. Combining spectral clustering algorithms to segment players and allocate differentiated computing resources to different types of players further improves recommendation quality and game fluency, thereby significantly improving player satisfaction and retention rate.

[0028] 6. By integrating explicit interactions, implicit emotions and social graph data, we have achieved full-dimensional modeling of user portraits, breaking through the limitations of the single data source of traditional recommendation systems.

[0029] 7. By capturing operational events, emotional tendencies, and social relationship maps in real time, a dynamically updated user behavior gene library is constructed, which improves the timeliness of matching recommended content with the user's current status and reduces the deviation rate of content recommendations.

[0030] 8. Through the U-Net generator and dual-channel discriminator architecture, combined with adversarial training and playability constraints, the efficiency of level content generation, the invalid level filtering rate and the first-time pass rate of generated levels are improved.

[0031] 9. Based on the weighted calculation of skill scores based on players' historical behaviors and combined with a dynamic challenge matching formula, millisecond-level adaptive adjustment of level parameters is achieved, improving the coverage of players' challenge / skill ratio experience range.

[0032] 10. The error rate in calculating skill-challenge matching has been reduced by weighted normalization modeling of clearance time, number of failures, operation accuracy, and level parameters.

[0033] 11. Through multi-dimensional behavioral feature extraction and adaptive kernel function clustering, the accuracy of player group segmentation and computing resource utilization are improved, and the delay in level generation task matching is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. 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 creative work.

[0035] Figure 1 This is a flowchart of a method for generating game level recommendations provided by one embodiment of the present invention;

[0036] Figure 2 This is a structural diagram of a game level generation recommendation system provided by one embodiment of the present invention;

[0037] Figure 3 It is a structural diagram of a computer device provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0038] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may 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 avoid obscuring the description of the present application with unnecessary detail.

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

[0040] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0041] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" 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 "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0042] 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.

[0043] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0044] In the embodiments 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 The following is a flow chart showing the method for generating game level recommendations disclosed in the first embodiment of the present invention, which is described in detail as follows:

[0045] S101, obtain the user's explicit interaction data, implicit emotion data and social graph data through tracking technology to form multimodal data.

[0046] In this embodiment, in order to build a comprehensive and accurate user profile during game level generation and recommendation, it is necessary to obtain multi-dimensional data covering user behavior, emotions, and social relationships. Tracking technology, as an effective data collection method, can accurately record various user operations and status information during the game in real time, laying the foundation for the subsequent generation of multimodal data.

[0047] Specifically, tracking points are set up on various functional modules and interactive elements of the game interface to record user clicks, swipes, and long presses on interface elements such as buttons, menus, and options. For example, on the level selection interface, the number of times a user clicks a level button, along with the timestamp and the time spent on the interface before and after the click, are recorded to analyze user attention and initial interest in different levels.

[0048] During gameplay, we collect user action data, including character movement (e.g., direction, distance, and speed), skill release behavior (e.g., skill type, release timing, and release frequency), and item usage (e.g., item type, quantity, and usage scenarios). This data can be used to understand a user's gaming style, strategic preferences, and operational proficiency.

[0049] For each level, set up tracking points to record user challenge behavior data. For example, the time the user entered the level, the number of deaths within the level, the time it took to complete the level, and the method of completion (normal completion, using a resurrection item, etc.). This data can reflect the user's performance in different levels and their perception of challenge difficulty.

[0050] Records user adjustments to game settings, such as graphics quality (low, medium, high), sound effects (on / off, volume), and control methods (keyboard, mouse, controller, etc.). This data can reflect users' personalized gaming experiences and help us understand their gaming behavior under different hardware environments and personal preferences.

[0051] When designing game characters, add rich expression and action feedback mechanisms to the characters, and set tracking points to record the triggering of these feedbacks. For example, when the user character successfully completes a difficult operation, record the character's cheering and celebratory expressions and actions; when the character suffers significant damage or fails, record the character's frustrated and angry expressions and actions. By analyzing this expression and action data, you can initially determine the user's emotional state during the game. Furthermore, for games that allow players to customize their character's expressions and actions, record the frequency and scenarios in which players select and use specific expressions and actions to further explore the user's potential emotional tendencies.

[0052] If the game provides text input functions such as chatting and leaving messages, set up tracking points to record the text content entered by users. Use natural language processing technology to perform sentiment analysis on the text to determine the user's emotional attitude (positive, negative, neutral) and emotion type (joy, anger, sadness, etc.). For example, when a user frequently uses positive words in a chat (such as "great" and "super fun"), it may indicate that the user is in a happy emotional state; while using negative words (such as "too difficult" and "I don't want to play anymore") may indicate that the user is encountering difficulties or feeling dissatisfied.

[0053] For games that support voice communication, speech recognition technology converts speech into text and processes it using sentiment analysis methods similar to text input. Furthermore, voice characteristics such as pitch, speaking speed, and volume can be combined for auxiliary analysis to more comprehensively capture user emotions.

[0054] Record user game time data, including single session duration, daily total game time, and weekly total game time. Also, analyze changes in user behavior patterns across different game durations. For example, shorter game sessions may indicate a trial or exploration phase, leading to curiosity. However, prolonged game play with decreased frequency and increased errors may indicate fatigue or boredom. This correlation analysis can indirectly infer users' implicit emotional states.

[0055] Record user actions such as adding, deleting, and grouping friends. When a user adds a friend, record the method of adding the friend (such as through in-game search, system recommendation, playing together, etc.), the time of adding the friend, and the frequency of interaction after adding the friend (such as the number of chats, the number of team games). By analyzing the process of establishing and developing friendships, we can understand the formation and expansion of the user's social circle. At the same time, for changes in friendships (such as deleting a friend), record the time and possible reasons for the deletion operation (inferred through user feedback or behavioral analysis) to gain a deeper understanding of the dynamic changes in users' social relationships.

[0056] Record relevant data on users' participation in team games, including team member information, number of team formations, team game duration, and team task completion status. Analyze interaction patterns between team members, such as role division, communication frequency, and collaborative effectiveness, to assess the closeness of social relationships and the degree of cooperation between users. If various social activities are held within the game (such as guild battles, team dungeons, and social parties), set up tracking points to record user participation in these activities, including the number of times they participate, their contributions to the activities, and their interactions with other players. This data can be used to understand users' participation in social activities and their social influence. Record users' gift giving and receiving behavior in the game, including the type and quantity of gifts given, the recipients, and feedback after receiving the gifts. Gift giving behavior reflects the emotional connection and closeness of social relationships between users. By analyzing this data, we can enrich users' social graph information.

[0057] The collected explicit interaction data, implicit sentiment data, and social graph data are cleaned and preprocessed separately. Duplicate, erroneous, and noisy data are removed, missing data is properly filled (e.g., using the mean or median for numerical data, and the mode for categorical data), and the data is standardized (e.g., unifying data of different dimensions into the same range) to facilitate subsequent data fusion and analysis.

[0058] A unique identifier is created for each user, and data from different sources is linked based on the user identifier. For example, data on a user's actions in a certain level can be linked to their emotions during that level, as well as their social interactions related to that level. This allows for the construction of a user-centric, multimodal data set that comprehensively reflects the user's behavioral, emotional, and social characteristics within the game.

[0059] During data fusion, feature engineering can be used to extract valuable features from data of different modalities. For example, features such as operation frequency and level completion rate can be extracted from explicit interaction data; features such as sentiment tendency score and emotional fluctuation amplitude can be extracted from implicit sentiment data; and features such as number of friends and social activity can be extracted from social graph data. These features can be integrated and fused to form a comprehensive user feature vector, providing rich data support for subsequent user profile generation and level recommendations.

[0060] Regularly check the integrity of collected multimodal data to see if any data modalities are missing or if data collection is incomplete. For example, check that all users' explicit interaction data, implicit sentiment data, and social graph data have been successfully collected, and calculate the missing rate for each type of data. If the data missing rate is high, analyze the cause and adjust the tracking strategy or data collection process in a timely manner.

[0061] Assess the accuracy of collected data through manual sampling or comparison with other reliable data sources. For example, sentiment analysis results from text input and voice communication can be manually reviewed to determine their accuracy. Recordings of in-game actions can be compared with actual gameplay to verify their accuracy. Based on these evaluation results, optimize and improve data collection and analysis algorithms to enhance data accuracy.

[0062] Analyze the contribution of collected multimodal data to user profile generation and level recommendations. For example, by comparing the differences in recommendation effectiveness between user profiles generated using different data modalities, evaluate the effectiveness of each data modality. If it is found that certain data modalities do not significantly improve recommendation effectiveness, consider adjusting the data collection focus or improving data processing methods to improve data utilization efficiency and recommendation system performance.

[0063] In this embodiment, the user's explicit interaction data, implicit emotional data, and social graph data are comprehensively collected using tracking technology to form multimodal data, providing a rich, accurate, and comprehensive user information basis for the game level generation recommendation method, which helps to improve the accuracy of user portraits and the quality of level recommendations, and meet players' needs for rich, personalized, and real-time game content.

[0064] S102, jointly modeling multimodal data through a multi-task learning network to generate a dynamic user portrait vector, wherein the main task of the multi-task learning network is used to predict the player's skill level, and the auxiliary tasks of the multi-task learning network are used to classify interest tags and analyze emotional tendencies.

[0065] In this embodiment, in the context of game level generation and recommendation, single-dimensional user data is insufficient to fully characterize player characteristics. Multimodal data, comprised of explicit interaction data, implicit sentiment data, and social graph data, contains rich information. However, complex relationships exist between these modalities, necessitating effective integration and mining. Multi-task learning networks can simultaneously process multiple related tasks, leveraging shared information between tasks to improve model performance. Therefore, they are employed to jointly model multimodal data, generating dynamic user profile vectors that accurately reflect the player's current state and needs, providing a precise basis for subsequent level generation and recommendation.

[0066] Specifically, the constructed multi-task learning network consists of an input layer, a shared feature extraction layer, a task-specific layer, and an output layer. The input layer receives multimodal data, the shared feature extraction layer extracts common features from different modal data, the task-specific layer further extracts personalized features for different tasks, and the output layer outputs player skill level prediction results, interest tag classification results, and sentiment analysis results. These results are combined to generate a dynamic user profile vector.

[0067] The input layer preprocesses the collected explicit interaction data, implicit emotion data, and social graph data separately. Explicit interaction data, such as operation frequency and level completion time, is organized by time series or operation type; implicit emotion data, such as sentiment tendency scores and emotional fluctuation amplitude, is normalized; and social graph data, such as number of friends and social activity, is converted into numerical features. The preprocessed data from different modalities is concatenated into a unified vector according to preset rules and serves as the input for the multi-task learning network. For example, the explicit interaction data vector, implicit emotion data vector, and social graph data vector are concatenated end-to-end to form a comprehensive multimodal input vector. To ensure effective alignment and fusion of the different modal data in subsequent processing, some guiding information is added to the input layer. For example, specific markers are inserted into the multimodal input vector to identify the starting position and boundaries of the different modal data, helping the model better understand the data structure. Furthermore, different modal data can be assigned different weights based on their importance and relevance, allowing for weighted processing during the concatenation process to highlight the influence of key modal data.

[0068] The shared feature extraction layer consists of multiple feature extraction modules, each of which employs a deep learning model architecture, such as a convolutional neural network (CNN), a recurrent neural network (RNN), or its variants (e.g., long short-term memory (LSTM) and gated recurrent unit (GRU)). Appropriate models are selected based on the characteristics of the data modality. For time series data in explicit interaction data, RNNs or their variants are used to capture temporal dependencies. For non-time series data in implicit sentiment data and social graph data, CNNs are used to extract local features. After each feature extraction module extracts features from different modalities, the extracted features are fused. This fusion is achieved using methods such as concatenation, weighted summation, or an attention mechanism. The concatenation method is simple and straightforward, directly concatenating feature vectors from different modalities. The weighted summation method assigns different weights to each modality and then adds them together. The attention mechanism automatically learns the importance of different modal features in different scenarios and dynamically adjusts the weights of each modality. Through multimodal feature fusion, a shared feature vector is generated that comprehensively reflects information from different modalities.

[0069] The main task branch network of the task-specific layer is used to select features related to the player's skill level from the shared feature vector, such as operational proficiency, level pass rate, and challenge difficulty adaptation. These features are further processed, such as feature transformation and dimensionality reduction, to highlight information related to skill level prediction. Regression models (such as linear regression and decision tree regression) or classification models (such as logistic regression and support vector machine classification) are used to predict the player's skill level. If the skill level is quantifiable, a regression model is used to predict the specific value; if the skill level is divided into different levels, a classification model is used to divide the levels. During the model training process, training data with skill level labels is used to optimize the model parameters by minimizing the error between the predicted value and the true value (such as mean square error and cross entropy loss).

[0070] The first auxiliary task branch network of the task-specific layer is used to establish a set of interest tag systems based on the game type and characteristics, covering multiple dimensions such as gameplay (such as role-playing, strategy competition), game themes (such as fantasy, science fiction), and game elements (such as puzzle solving, combat). Multiple specific interest tags are set under each dimension to form a multi-level interest tag tree. The correlation between shared feature vectors and different interest tags is analyzed, and features that have an important impact on the classification of interest tags are selected. An interest tag classification model is constructed using classification algorithms (such as decision trees, random forests, and neural network classifiers). During the training process, a multi-label classification method is adopted to allow a user to have multiple interest tags at the same time. The accuracy of interest tag classification is improved by optimizing the loss function of the classification model (such as Hamming loss and ranking loss for multi-label classification).

[0071] The second auxiliary task branch network in the task-specific layer is used to classify sentiment into three categories: positive, negative, and neutral. Different sentiments are defined in detail based on the game scenario and user behavior. For example, positive sentiment may be manifested by frequent use of positive vocabulary, rapid level completion, and active participation in social interactions; negative sentiment may be manifested by frequent complaining, abandoning challenges after repeated failures, and reduced social activity. User data with sentiment annotated data is collected as samples for training the sentiment analysis model. Sentiment-related features are extracted from the shared feature vector, such as the frequency of sentiment vocabulary in text input, changes in voice tone during speech communication, and changes in in-game behavior patterns. The sentiment analysis model is constructed using natural language processing techniques (such as sentiment lexicon matching and sentiment semantic analysis) and machine learning algorithms (such as Naive Bayes, Support Vector Machines, and deep learning sentiment analysis models). During model training, the accuracy and recall of sentiment analysis are improved by adjusting model parameters and optimizing the loss function.

[0072] The output layer integrates the output results of the primary task (player skill level prediction), auxiliary task one (interest tag classification), and auxiliary task two (sentiment analysis). The player skill level prediction result is a specific numerical value or level, the interest tag classification result is a collection of multiple interest tags, and the sentiment analysis result is a category of positive, negative, or neutral. These results are encoded, such as normalizing the skill level value, converting the interest tag collection into a binary vector (each tag corresponds to a dimension, with presence as 1 and absence as 0), and converting the sentiment categories into a one-hot encoding. The encoded multi-task results are concatenated to form a dynamic user profile vector. This vector integrates the player's current skill level, interest preferences, and sentiment, comprehensively reflecting their in-game status and needs. To ensure the timeliness and accuracy of the dynamic user profile vector, the parameters of the multi-task learning network are regularly updated, and the dynamic user profile vector is regenerated based on the latest multimodal data. For example, model updates and user profile vector generation can be triggered at fixed intervals (e.g., daily or weekly) or when significant changes in user behavior occur (e.g., completing difficult levels multiple times in a row or frequently switching interest tags).

[0073] The multi-task learning network is trained using a multi-task joint training approach. During training, the loss functions of the main task and auxiliary tasks are optimized simultaneously, allowing the model to learn shared information and personalized features between different tasks. A gradient descent algorithm (such as stochastic gradient descent or the Adam optimizer) is used to update model parameters, and hyperparameters such as the learning rate and batch size are adjusted based on performance on the validation set. Through multiple iterative training, the model achieves good performance on each task. Because the importance and difficulty of different tasks may vary, the weight of each task can be adjusted according to actual conditions during training. For example, if player skill level prediction has a greater impact on level recommendations, the weight of the main task can be appropriately increased; if the accuracy of interest tag classification needs to be improved, the weight of auxiliary task 1 can be increased. By dynamically adjusting task weights, the learning progress and performance of different tasks are balanced, improving the overall effectiveness of the multi-task learning network.

[0074] For the primary task (player skill level prediction), we used metrics like mean squared error (MSE) and mean absolute error (MAE) to evaluate the accuracy of predictions. For auxiliary task one (interest tag classification), we used metrics like accuracy, recall, and F1 score to evaluate classification performance. For auxiliary task two (sentiment analysis), we used metrics like accuracy and confusion matrix to evaluate analysis results. We also considered the overall performance of the multi-task learning network, including metrics like the correlation between tasks and the model's generalization ability.

[0075] Based on the model evaluation results, various optimization strategies are used to improve the multi-task learning network. For example, if the model's performance on a particular task is found to be poor, features relevant to that task can be added or the model structure can be adjusted for that task. If the model exhibits overfitting, regularization methods (such as L1 regularization and L2 regularization), dropout techniques, or increasing the amount of training data can be used to alleviate the problem. If the model converges slowly, different optimization algorithms can be tried or hyperparameters such as the learning rate can be adjusted. By continuously optimizing the model, the multi-task learning network's ability to jointly model multimodal data and the quality of its generation of dynamic user profile vectors can be improved.

[0076] In this embodiment, a multi-task learning network is used to jointly model multimodal data and generate dynamic user portrait vectors, which effectively solves the problem of traditional recommendation systems lacking in-depth user portraits and dynamic adjustment mechanisms. It provides a more accurate and personalized basis for game level generation and recommendation, and helps to improve players' gaming experience and the market competitiveness of game products.

[0077] S103: Input the dynamic user portrait vector into a dual-channel generative adversarial network to generate a set of candidate levels, and filter the initial recommended levels through a playability evaluation algorithm.

[0078] In this embodiment, in the game level generation and recommendation scenario, traditional manually designed levels are difficult to quickly respond to players' demand for massive, personalized content, and traditional recommendation systems lack a deep understanding of players' dynamic changes, resulting in a low match between recommended levels and players' actual needs. The dynamic user portrait vector integrates multi-dimensional information such as player skill level, interest preferences, and emotional tendencies, and can accurately portray the player's current status. The dual-channel generative adversarial network (GAN) has powerful data generation capabilities and can generate diverse candidate levels that fit player characteristics based on dynamic user portrait vectors. At the same time, the playability evaluation algorithm can screen the generated candidate levels to ensure that the initial recommended levels are both in line with the player's ability and attractive, thereby improving the player's gaming experience and retention rate.

[0079] Specifically, this dual-channel generative adversarial network consists of a generator and a discriminator. Both the generator and the discriminator employ a dual-channel design to fully exploit the information from different types of features in the dynamic user profile vector and generate high-quality candidate levels. The generator is responsible for generating level feature representations based on the input dynamic user profile vector, thereby constructing candidate levels. The discriminator is responsible for determining the authenticity of the generated level feature representations versus the real level feature representations, providing optimization guidance for the generator.

[0080] The generator's skill-interest pipeline focuses on features within the dynamic user profile vector that are relevant to the player's skill level and interests. Features are extracted from the vector, reflecting the player's skill level, preferred gameplay types (e.g., role-playing, competitive strategy), preferred game themes (e.g., fantasy, sci-fi), and preferred elements (e.g., puzzle, combat). A multi-layer perceptron (MLP) is used to deeply extract and fuse these features, exploring potential correlations between skills and interests. For example, highly skilled players may be more interested in levels featuring complex strategies and challenging combat. This pipeline learns these correlations, laying the foundation for generating levels tailored to the player's skills and interests.

[0081] The generator's emotion-social channel focuses on features in the dynamic user portrait vector related to the player's emotional tendencies and social relationships. It extracts features such as the player's current emotional state (positive, negative, or neutral), social activity, and friend interaction preferences. It also uses a multi-layer perceptron to process emotional and social features, analyzing the impact of these emotions and social behaviors on level requirements. For example, a player in a positive emotional state may prefer a relaxing and fun level, while a highly socially active player may prefer a level that includes multiplayer collaboration or competitive elements. Through this channel, the generator can generate level features that meet the player's emotional and social needs.

[0082] The features extracted from the skill-interest channel and the emotion-social channel are fused. By concatenating or weighted summing the information from both channels, the generated level features meet both the player's skill and interest requirements and their emotional and social expectations. The fused features are passed through a series of fully connected layers and activation functions to gradually generate key level feature representations, such as level terrain layout, monster distribution, and mission objectives. Finally, these feature representations are converted into specific candidate levels. For example, a specific decoder is used to map the feature vectors into detailed information such as the level map, character configuration, and game rules, forming a preliminary set of candidate levels.

[0083] The skill-interest discriminator's skill-interest discriminant branch determines whether the generated level features meet the requirements of the dynamic user profile vector in terms of skill level and interest preferences. Features related to skills and interests are extracted from the generated level features and compared with the corresponding features in the dynamic user profile vector. For example, this branch checks whether the level difficulty matches the player's skill level, and whether the level's gameplay and theme match the player's interests and preferences. This comparison and analysis provides a basis for the discriminant branch's results.

[0084] The emotion-social discrimination branch of the discriminator is responsible for evaluating the plausibility of the generated level features in terms of emotional tendencies and social relationships. It extracts emotional and social information from the level features and compares them with the emotional and social features in the dynamic user profile vector. This determines whether the level stimulates positive emotions in players and meets their social interaction needs. For example, it analyzes whether the level incorporates elements suitable for multiplayer collaboration or competition, as expected by socially active players.

[0085] The results of the two discriminant branches are combined to produce a final discriminant result, which determines whether the generated level features are authentic (derived from real level data) or generated by the generator. If the discriminant result is false, feedback is provided to the generator to guide it in adjusting parameters and optimizing the generated level features to make them closer to realistic levels that meet player needs. Through adversarial training between the generator and the discriminator, the generator's ability to generate high-quality candidate levels is continuously improved.

[0086] We collected a large amount of real-world level data and extracted the characteristic representations of each level, including information such as level terrain, monster types and numbers, mission difficulty, gameplay type, and thematic elements, to form a dataset of real-world level features. We also prepared a dataset of dynamic player user portrait vectors corresponding to these levels, ensuring that the dataset included player samples with different skill levels, interests, emotional tendencies, and social relationships. We divided the dataset into training, validation, and test sets for model training, tuning, and evaluation.

[0087] The generator and discriminator are trained using an alternating training approach. In each iteration, the discriminator's parameters are fixed and the generator is trained. The generator generates level features based on the dynamic user profile vector and inputs the generated level features and the real level features into the discriminator, which then outputs the discrimination result. Based on the discriminator's feedback, the generator's loss function (such as binary cross-entropy loss) is calculated, and the generator's parameters are updated through the backpropagation algorithm, making the generator's generated level features more difficult for the discriminator to distinguish. Then, the generator's parameters are fixed and the discriminator is trained. The generated level features and the real level features are input into the discriminator, the discriminator's loss function is calculated, and the discriminator's parameters are updated to improve the discriminator's ability to distinguish between real and generated levels. This alternating training process is repeated until the generator and discriminator reach a Nash equilibrium, meaning that the level features generated by the generator can deceive the discriminator with a high probability, and the discriminator can distinguish between real and generated level features with a high accuracy.

[0088] The new dynamic user profile vector is fed into the generator of the trained two-channel generative adversarial network. The generator processes the skill-interest and emotion-social features through the two-channel feature extraction module. After feature fusion and the level generation module, a series of candidate level feature representations are generated. These feature representations are then converted into specific candidate levels, forming a candidate level set. Each candidate level has unique terrain, monster distribution, mission objectives, and gameplay mechanics, taking into account the player's skill level, interests, emotional tendencies, and social needs.

[0089] Constructing a playability evaluation metric system specifically includes the following: 1. Assessing the degree of match between the difficulty of candidate levels and the player's current skill level. This involves analyzing factors such as monster strength, mission complexity, and operational requirements within the level, and comparing them with the player's skill score recorded in the dynamic user profile vector. For example, the difference or ratio between the level difficulty coefficient and the player's skill score is calculated. The smaller the difference or the closer the ratio is to 1, the higher the skill match. 2. Measuring the degree to which the gameplay, theme, and elements of the candidate level align with the player's interests and preferences. The gameplay type, theme category, and element information in the level features are matched with the interest tags in the dynamic user profile vector. The number of matching interest tags is counted and a matching score is calculated. The more matching interest tags, the higher the interest fit. 3. Examining whether the candidate level can inspire positive emotions in players. Factors such as the level's plot setting, reward mechanism, and the balance between challenge and achievement are analyzed to determine their potential impact on player emotions. For example, a well-designed reward system that provides timely and generous rewards for completing specific tasks or achieving certain achievements can stimulate a sense of accomplishment and enjoyment in players. Through expert evaluation or small-scale user testing, score the candidate levels' performance in terms of emotional stimulation. The higher the score, the better the emotional stimulation. 4. Evaluate whether the candidate levels provide opportunities for social interaction among players. Check whether the levels include multiplayer collaborative tasks, competitive battle modes, social sharing functions, etc. Score the candidate levels based on the richness of social interaction elements and the rationality of the design. The more social interaction elements and the more reasonable the design, the higher the social interactivity score. 5. Pay attention to the smoothness of the candidate levels during game operation, including screen loading speed, operation response delay, and the consistency of level scene switching. Through actual testing or simulated operation, record the level's running data on different devices, such as frame rate and loading time, and score according to the preset smoothness standards. The higher the smoothness score, the better the level's technical implementation and the better the gaming experience it can provide players.

[0090] For each generated candidate level, relevant evaluation data is collected. For example, information such as skill requirements, gameplay type, and thematic elements is extracted from the level design documents. Technical indicators related to level fluency are obtained through simulation runs. An expert team is then organized to evaluate and score the levels' performance in terms of emotional stimulation and social interaction. The collected data is preprocessed, such as through data cleaning and normalization, to ensure that data from different indicators are comparable on the same scale. Weights are assigned to each playability evaluation metric based on its importance. For example, for a game focused on personal experience, skill fit and interest compatibility may be given higher weights; whereas for a game emphasizing social interaction, social interaction may receive a higher weight. The scores for each candidate level on each metric are multiplied by the corresponding weights, and the weighted sum is calculated to obtain the overall playability score for that candidate level. The candidate level set is sorted based on their overall playability scores. Several candidate levels with the highest overall scores are selected as the initial recommended levels. The number of levels screened can be adjusted based on actual needs and server resources; for example, the 5-10 levels with the highest overall scores can be selected as the initial recommended levels. These initially recommended levels perform relatively well in terms of skill matching, interest compatibility, emotional stimulation, social interactivity and level fluency, and can better meet the needs of players and provide players with a high-quality gaming experience.

[0091] In this embodiment, the dynamic user portrait vector is input into the dual-channel generative adversarial network to generate a set of candidate levels, and the initial recommended levels are screened through a playability evaluation algorithm. This can effectively improve the quality and personalization of game level recommendations, enhance the player's gaming experience and retention rate, and provide strong technical support for the development of the game industry.

[0092] S104, establishing a difficulty-skill dynamic balance model, calculating the matching degree between the user's skill score and the level challenge in real time based on the difficulty-skill dynamic balance model, and dynamically adjusting the level parameters of the initial recommended level based on the matching degree to obtain the first recommended level.

[0093] In this embodiment, during the game level recommendation process, although the initial recommended levels have been screened through a dual-channel generative adversarial network and playability evaluation algorithm, the player's skill level will continue to change during the game, and the challenge level of the level itself may not fully match the player's current state due to design or environmental factors. If the level parameters cannot be adjusted in real time to maintain a dynamic balance between difficulty and skill, players may feel frustrated if the level is too difficult, or bored if the level is too easy, which in turn affects the gaming experience and retention rate. Therefore, establishing a difficulty-skill dynamic balance model and dynamically adjusting level parameters based on the match between the player's skill score and the level challenge level is crucial to providing a high-quality, personalized gaming experience.

[0094] Specifically, during gameplay, tracking technology is used to continuously collect data related to player skills. This data includes, but is not limited to, the player's level completion time, mission completion accuracy, number of operational errors, and frequency of special skill usage. For example, in role-playing games, metrics such as attack accuracy, success rate in dodging enemy attacks, and timing of using powerful skills in combat levels are recorded. In strategy games, data on player performance in resource allocation, tactical planning, and decision-making is collected. The collected data is cleaned to remove outliers and noise, and normalized to ensure that data from different metrics are compared and analyzed on the same scale. For each level, data reflecting its challenge level is collected. Level challenge is influenced by multiple factors, such as the number, strength, and distribution of enemies in the level, the complexity of the mission objectives, the difficulty of terrain obstacles, and the time limit. For action-adventure games, for example, statistics are collected on enemy types, attack methods, health points, and defense in the level to assess the operational skills and strategic thinking required to achieve the mission objectives, and to measure the degree to which terrain obstacles restrict the player's actions and the urgency of the time limit. Likewise, this data is cleaned and normalized to ensure an accurate measurement of the challenge of each level.

[0095] Based on collected user skill data, a multi-dimensional, comprehensive skill scoring system is constructed. This system quantitatively evaluates player skills across multiple dimensions, including operational ability, strategic thinking, and reaction speed. For example, operational ability can be measured by the player's accuracy and fluency in continuous operational tasks; strategic thinking can be assessed by the player's resource management and tactical selection in complex levels; and reaction speed is determined by the player's reaction time to unexpected situations. Each evaluation dimension is assigned a corresponding weight, which can be adjusted based on the game type and player group characteristics. The scores for each dimension are combined to form a player's skill score, which dynamically reflects the player's skill level changes during the game.

[0096] The challenge of a level is quantified using the Analytic Hierarchy Process (AHP) or expert evaluation method. The various factors that influence the challenge of a level are broken down into multiple levels, and the weight of each factor is determined through expert scoring or pairwise comparison. For example, the challenge of a level is broken down into first-level indicators such as enemy factors, mission factors, terrain factors, and time factors. This is further broken down into second-level indicators such as the enemy's attack power, defense power, and number; the difficulty and diversity of mission objectives; the complexity and distribution of terrain obstacles; and the degree of looseness of time limits. Weights are assigned to each factor based on its impact on the challenge of the level, and the scores of each factor are combined to obtain a quantitative value for the challenge of the level. This quantitative value can comprehensively and objectively reflect the difficulty of the level.

[0097] Define a method for calculating the degree of match between a player's skill score and the quantified value of the level's challenge. Matching can be determined using either the relative difference method or the similarity method. The relative difference method measures matching by calculating the ratio of the difference between the skill score and the quantified value of the challenge to a certain baseline value (such as their average or maximum value). The smaller the difference, the higher the match. The similarity method uses methods such as cosine similarity and the Pearson correlation coefficient to calculate the similarity between the skill score vector and the challenge vector. The higher the similarity, the better the match. By calculating matching in real time, we can accurately understand the relationship between the player's current skill level and the level's challenge.

[0098] During game play, a real-time data update module is established to periodically collect the latest player skill data and current level status data (e.g., every minute or after completing a key mission milestone). For player skill data, evaluation metrics for dimensions such as operational ability, strategic thinking, and reaction speed are promptly updated. For level status data, dynamic monitoring is performed on enemy numbers and strength changes, progress toward mission objectives, damage to terrain obstacles, and the remaining time before the time limit. This real-time data update ensures that the difficulty-skill dynamic balance model can calculate matchability based on the latest information. First, the updated player skill scores and level challenge quantification values ​​are input into the matchability calculation module. The skill scores and challenge quantification values ​​are presented as structured data, containing specific values ​​for each evaluation dimension. These input skill scores and challenge quantification values ​​are then processed according to a predefined matchability calculation method. If the relative difference method is used, the difference between the skill score and challenge quantification values ​​is calculated and divided by a baseline value to obtain the matchability. If the similarity calculation method is used, the skill score vector and challenge vector are input into the corresponding similarity calculation algorithm to obtain the matchability value. The matching value is usually expressed as a percentage or a number between 0 and 1. The closer the value is to 1 (or 100%), the higher the matching degree. Finally, the calculated matching value is output to the decision module. The decision module determines the matching status of the current level and the player's skill level based on the preset matching threshold range. For example, the matching threshold is set between 0.8 and 1.2. When the matching value is within this range, it is considered that the level difficulty is basically matched with the player's skill level; when the matching value is lower than 0.8, it indicates that the level difficulty is too high; when the matching value is higher than 1.2, it indicates that the level difficulty is too low.

[0099] When the matching value is lower than the preset threshold, that is, the level difficulty is too high, the enemy's attack power, defense power or health value can be reduced, the number of enemies can be reduced, or the enemy's attack frequency and attack method can be adjusted to make it easier for players to defeat. For example, in a role-playing game, the enemy's attack damage can be reduced by 20%, the health value can be reduced by 30%, and the number of enemies appearing at the same time can be reduced; the task objectives can be simplified to reduce the difficulty and requirements of completing the task. For example, a task that originally required multiple complex steps to be completed can be split into multiple simple sub-tasks, or the number of items required to complete the task can be reduced; the complexity and number of terrain obstacles can be reduced to provide players with a smoother path of action. For example, in an adventure game, some traps or obstacles that hinder the player's progress can be removed, or the terrain's restrictions on the player's movement speed can be reduced; the level time limit can be appropriately extended to give players more time to complete the task. For example, the level time limit that originally took 10 minutes to complete can be extended to 15 minutes.

[0100] When the matching value is higher than the preset threshold, that is, the level difficulty is too low, the enemy's attack power, defense power or health value can be enhanced, the number of enemies can be increased, or more powerful enemy types can be introduced to increase the enemy's attack frequency and the variability of attack methods. For example, in strategy games, the enemy's defense power can be increased by 30%, and some enemies with special skills can be added; the complexity and difficulty of the task objectives can be increased, and the requirements for completing the task can be improved. For example, in puzzle games, the difficulty and number of puzzles can be increased, or players can be required to complete puzzle tasks in a shorter time; the complexity and number of terrain obstacles can be increased to limit the player's space for action and increase the challenge for the player during the movement process. For example, in racing games, more tortuous tracks and obstacles can be set up to increase the player's requirements for vehicle control; the time limit of the level can be appropriately shortened to increase the player's sense of urgency. For example, the time limit of the level originally completed in 15 minutes can be shortened to 12 minutes.

[0101] Based on the match determination output by the decision module, the corresponding parameter adjustment instructions are generated. These instructions clearly specify the type of level parameter to be adjusted (e.g., enemies, missions, terrain, or time), the direction of adjustment (increase or decrease), and the magnitude of the adjustment (specific value or percentage). For example, the instruction might read "Reduce the attack power of enemies in the level by 20% and their number by 30%."

[0102] The generated parameter adjustment instructions are sent to the level parameter adjustment module in the game server. This module modifies the corresponding level parameters in real time based on the instructions. During the adjustment process, smooth and stable parameter changes are ensured to avoid game abnormalities caused by sudden parameter changes. For example, when adjusting enemy attack power, a gradual transition is used to allow players to adapt to the change in difficulty.

[0103] After parameter adjustments are completed, continuously monitor player performance and feedback to evaluate the effectiveness of the adjustments. Observe whether metrics such as level completion time, mission completion rate, and number of operational errors have improved, as well as whether players' subjective assessments of level difficulty have become more reasonable. If the adjustments are unsatisfactory, further fine-tune the parameters based on the evaluation results until a dynamic balance between difficulty and skill is achieved.

[0104] After real-time calculation of the difficulty-skill dynamic balance model and dynamic adjustment of level parameters, the initially recommended level is optimized to a level that better matches the player's current skill level and game requirements, namely the first recommended level. The first recommended level achieves a high level of difficulty and skill matching, providing players with a challenging but not overly difficult gaming experience, effectively improving player engagement and retention. At the same time, relevant information about the first recommended level (such as level name, difficulty level, adjusted parameters, etc.) is stored in the game database to provide a reference for subsequent level recommendations and player data analysis.

[0105] In this embodiment, the accuracy and personalization of game level recommendations can be effectively improved, the player's gaming experience and retention rate can be enhanced, and strong technical support can be provided for the development of the gaming industry.

[0106] S105 , dividing users into core players, casual players, and players at risk of churn according to a spectral clustering algorithm, obtaining user classification results, and allocating differentiated server computing resources to each player's level generation request based on the user classification results.

[0107] In this embodiment, during game operations, different types of players exhibit significant differences in their consumption patterns, levels of activity, and server resource requirements. Core players typically invest significant time and energy in deep game engagement, frequently engaging in activities such as level challenges and social interactions, placing high demands on server resource response speed and stability. Casual players, on the other hand, experience the game in fragmented time, play less frequently and for shorter durations, and have relatively stable resource requirements. Players at risk of churn may gradually decrease their engagement due to poor gaming experience or shifting interests, but timely identification and targeted measures may help retain these players. Traditional, one-size-fits-all server resource allocation methods fail to meet the personalized needs of various player types, potentially limiting the experience for core players, wasting resources for casual players, and lacking effective attention for players at risk of churn. Therefore, using spectral clustering algorithms to accurately classify users and allocate differentiated server computing resources based on the classification results is crucial for improving the overall player experience, optimizing server resource utilization, and increasing player retention.

[0108] Specifically, through the game's built-in data collection system, various types of player behavior data are collected in-game, including: recording player login time, login frequency, and single login duration. For example, statistics are collected on the number of times a player logs into the game each day, the length of time a player remains in the game after each login, and changes in login activity during specific time periods (such as weekdays and weekends). The number of levels a player challenges, their completion rate, average completion time, and level difficulty preferences are collected. Players' performance and engagement in different level types (such as story levels, challenge levels, and competitive levels) are analyzed to understand their preferences for level difficulty and gameplay. Players' social behavior in-game is recorded, such as the number of friends, frequency of interaction (including private chats, team formation, and participation in guild activities), and social contribution value (such as tasks undertaken and resources provided in the guild). This data can reflect the player's level of activity and influence in the game's social environment. Players' payment amounts, payment frequency, and types of paid items (such as game items, virtual currency, and membership services) are collected. By analyzing payment data, players' spending power and preferences can be understood, and their level of engagement with the game can be determined. Collect feedback proactively provided by players during gameplay, such as responses to in-game surveys, customer service feedback, and discussions in player communities. This feedback directly reflects players' satisfaction, needs, and opinions about the game, providing important reference for player categorization. For example, a player expressing dissatisfaction with a particular gameplay style in a survey, or discussing their opinions on level difficulty in the community, may reveal their underlying gaming behavior and potential categorization.

[0109] The spectral clustering algorithm is a clustering method based on graph theory. It treats data points as nodes in a graph and the similarities between data points as the weights of the edges between nodes. By constructing a similarity matrix and calculating the eigenvectors of its Laplacian matrix, the data points are mapped to a low-dimensional space, where clustering is then performed. Spectral clustering has the advantages of being able to handle non-convex data distributions and being robust to noisy data, making it suitable for complex data scenarios such as player classification.

[0110] Select an appropriate similarity measurement method to calculate the similarity between players. Common similarity measurement methods include cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. In this embodiment, considering the multidimensionality and complexity of player behavior data, cosine similarity is used to measure the similarity between players. Cosine similarity reflects the degree of similarity between two players by calculating the cosine value of the angle between their behavior feature vectors. The value range is between [-1,1]. The closer the value is to 1, the more similar the two players are. According to the selected similarity measurement method, the similarity between all players is calculated and a similarity matrix is ​​constructed. Construct a degree matrix. The degree matrix is ​​a diagonal matrix whose diagonal elements represent the sum of the weights of the edges related to any player, that is, the sum of the similarities of any player with all other players. Based on the similarity matrix and the degree matrix, calculate the Laplace matrix.

[0111] To evaluate the classification performance of the spectral clustering algorithm, appropriate evaluation metrics are selected, such as the Silhouette Coefficient and the Davidson-Bouldin Index. The Silhouette Coefficient combines intra-class cohesion and inter-class separation, ranging from -1 to 1. Larger values ​​indicate better clustering. The Davidson-Bouldin Index measures the ratio of intra-class distance to inter-class distance, with smaller values ​​indicating better clustering. Based on the evaluation metrics, the parameters of the spectral clustering algorithm are adjusted and optimized. For example, adjustments are made to the similarity measurement method, feature selection strategy, and the number of cluster categories k to improve classification accuracy and stability. Furthermore, based on game business knowledge and expert experience, the classification results are manually reviewed and revised to ensure they meet actual business needs.

[0112] When a core player initiates a level generation request, the server prioritizes allocating available computing resources to ensure that the request is processed promptly. For example, in the resource scheduling queue, the core player's request is given a higher priority, and server resources are allocated first. The server's computing resource scale is dynamically adjusted based on the real-time online number of core players and resource usage. When the number of core players increases or resource usage approaches the threshold, a backup server is automatically started or the computing resources of the existing server are increased to meet the needs of core players. A certain proportion of server computing resources is reserved for core players to ensure that core players can still obtain stable resource support during peak hours or sudden traffic. For example, 30% of the CPU cores and 40% of the memory capacity are reserved specifically for core players.

[0113] While ensuring the resource needs of core players, server computing resources are rationally allocated to casual players. Based on the real-time server load, the resource allocation ratio for casual player requests is dynamically adjusted to ensure efficient utilization of server resources. Resource reuse technology is employed to improve server resource utilization. For example, when multiple casual players simultaneously initiate level generation requests, resource virtualization and task scheduling technologies are used to rationally allocate and share server resources, reducing idle resources. To prevent casual players from excessively occupying server resources, certain restrictions are imposed on their resource usage. For example, maximum CPU usage and memory usage are set for each casual player's level generation request to ensure fair distribution of server resources.

[0114] In terms of resource allocation, we moderately prioritize players at risk of churn, providing slightly higher resource support than regular casual players. For example, when server resources are limited, we prioritize ensuring that their level generation requests are processed promptly, improving their gaming experience and satisfaction. Based on their historical behavioral data and analysis of churn reasons, we provide them with personalized resource allocation plans. For example, for players at increased risk of churn due to excessive level difficulty, we allocate more resources during level generation to optimize the level difficulty adjustment algorithm, providing levels more appropriate to their skill level. For players at increased risk of churn due to insufficient social interaction, we allocate resources to enhance social feature recommendations and matchmaking, fostering interaction with other players. We monitor resource usage by players at risk of churn in real time, dynamically adjusting resource allocation strategies based on changes in their gaming behavior and retention. If players at risk of churn gradually regain activity, we can appropriately increase resource allocation. If players continue to churn, we reduce resource investment and reallocate resources to more valuable player groups.

[0115] In this embodiment, a spectral clustering algorithm is used to accurately classify users, and differentiated server computing resources are allocated based on the classification results. This can effectively meet the personalized needs of different types of players, improve server resource utilization, enhance player retention and satisfaction, and provide strong support for the long-term and stable operation of the game.

[0116] In some embodiments, in step S101 above, obtaining the user's explicit interaction data, implicit emotion data, and social graph data through tracking technology to form multimodal data specifically includes:

[0117] The tracking SDK deployed on the game client captures the user's explicit interaction data in real time, including operation events and preference events;

[0118] Based on explicit interaction data, sentiment analysis of user comments is performed using a pre-trained BERT multi-task model to generate implicit sentiment data.

[0119] Constructing a social relationship graph based on the user's social interaction records, dividing the user community into groups using a community detection algorithm, and extracting a social graph feature vector;

[0120] Perform weighted fusion of explicit interaction data, implicit emotion data, and social graph data to generate multimodal data.

[0121] In this embodiment, a tracking SDK designed specifically for the game client is integrated into the game application. The SDK must be lightweight and have low performance loss to ensure that it does not significantly affect the normal operation of the game. During the integration process, we work closely with the game development team to adapt and optimize the game according to different platforms (such as iOS, Android, PC, etc.) and development frameworks (such as Unity, Unreal Engine, etc.) to ensure that the SDK can run stably in various environments.

[0122] Set tracking points at key interaction nodes in the game client to fully cover user operations and preferences. Specific tracking points include but are not limited to the following:

[0123] 1. Game operation interface: Set tracking points on key operation interfaces such as the login interface, main menu interface, level selection interface, and game settings interface to record user clicks, swipes, input, and other operations. For example, record the login method selected by the user when logging into the game (such as account and password login, third-party platform quick login), and the image quality, sound effects, and other parameters adjusted in the game settings.

[0124] 2. Core Gameplay: During level challenges, user action events are captured in real time. This includes actions such as character movement, attacks, skill releases, and item usage, as well as information such as the timestamp and object of the action. For example, the frequency and timing of a player's use of a skill in a specific level, as well as the skill's impact on game progress, are recorded.

[0125] 3. Preference Selection: Set tracking points in the game where users make preference choices, such as character selection, game mode selection, and skin or item purchases. Record the user's selection results and the context of the selection, such as the time of selection and previous related actions. For example, record the character class and appearance selected by the player when creating a character, and whether the player referred to other players' recommendations or in-game prompts during the selection process.

[0126] The tracking SDK captures explicit interaction data in real time when users perform operations and stores the data in a local cache. To ensure the integrity and accuracy of the data, a data verification mechanism is used to perform preliminary verification of the collected data, such as checking whether the data format is correct and whether key fields are missing. Data that does not meet the requirements is marked or discarded to prevent invalid data from entering subsequent processes. A reasonable data transmission strategy is formulated based on network conditions and game business needs. When the network conditions are good, real-time transmission is used to send data in the local cache to the server in a timely manner. When the network is unstable or in a weak network environment, batch transmission or breakpoint resumption mechanism is used to temporarily store the data locally and then transmit it after the network is restored to ensure that data is not lost. At the same time, the transmitted data is encrypted to ensure the security and privacy of user data.

[0127] A user comment entry is set up in the game client to facilitate players to express their opinions and feelings about the game at any time during the game. The comment entry can be set up in locations such as the game end interface, level evaluation interface, and community forum to guide players to actively participate in comments. At the same time, in order to increase the enthusiasm of players to comment, a corresponding incentive mechanism can be set up, such as giving players who post high-quality comments certain game rewards (such as virtual currency, props, experience points, etc.). The comment data posted by players is collected in real time through the embedding technology, including the text content of the comment, the comment time, and the context information of the comment (such as the level of the comment, the game mode, etc.). The collected comment data is stored in a dedicated database to prepare for subsequent sentiment analysis.

[0128] A BERT multi-task model, pre-trained on general and gaming-related text data, was selected. Trained on a large amount of text data, this model possesses strong semantic understanding capabilities and can simultaneously handle multiple sentiment analysis tasks. The pre-trained model was deployed to the server and optimized and adapted to ensure efficient operation in gaming scenarios. The collected user review text was pre-processed, including removing special characters, punctuation, stop words, and converting the text to lowercase to improve model input quality. Furthermore, word segmentation was performed on the text, breaking continuous text sequences into meaningful lexical units to facilitate semantic understanding. The pre-processed text was input into the BERT multi-task model, which extracted features from the text using its multi-layer Transformer architecture. The BERT model captures contextual semantic information in the text, converting each word into a vector representation rich in semantic information. The BERT multi-task model was used to simultaneously perform multiple sentiment analysis tasks, such as sentiment polarity classification (positive, negative, neutral), sentiment intensity assessment, and sentiment cause identification. The model's different output layers generate analysis results for each task. For example, for a comment like "This level is too difficult! I've tried many times and still haven't passed it. I'm so frustrated," the model can analyze its sentiment as negative with high intensity, and identify the cause as the excessive difficulty of the level. The results of multi-task sentiment analysis are integrated to generate a comprehensive sentiment analysis report. This information, including sentiment polarity, intensity, and causes, is correlated and aggregated to form a comprehensive description of the user's comment sentiment. This integrated implicit sentiment data is stored in a database and correlated with explicit interaction data.

[0129] Set up tracking points in the social function modules of the game client (such as the friend system, guild system, chat system, etc.) to capture users' social interaction records in real time. This includes behaviors such as adding and deleting friends, sending and receiving chat messages, inviting and accepting teams, and participating in guild activities. Record detailed information such as the time of social interactions, the objects of interaction, and the content of interactions (such as the specific text of chat messages). Store the collected social interaction records in a dedicated social data storage system and manage them using an appropriate database structure. For example, use a graph database to store social relationship data to more intuitively represent the social connections and relationship strengths between users. At the same time, regularly back up and maintain social data to ensure data security and integrity.

[0130] Based on the collected social interaction records, a social relationship graph between users is constructed. Each user is represented as a node in the graph, and social relationships between users (such as friendships and guild memberships) are represented as edges between nodes. Edge weights can be set based on factors such as the frequency and intimacy of social interactions. For example, the more frequent the chats and the more frequent the team-up between friends, the greater the edge weight, indicating a closer social relationship between the two.

[0131] Use appropriate community detection algorithms to partition the social graph and group users with close social connections into the same community. Common community detection algorithms include the Lou Vain algorithm and the Label Propagation algorithm. These algorithms automatically discover community structures based on the connectivity patterns and edge weights between nodes in the social graph. For example, the Lou Vain algorithm iteratively optimizes the modularity function to assign nodes to different communities, ensuring that nodes within the same community are closely connected and nodes between different communities are sparsely connected.

[0132] Feature extraction is performed on the divided user communities to generate social graph feature vectors. Community features can include community size (number of users within the community), community density (the ratio of the actual number of connections within the community to the maximum number of possible connections), and community centrality (a measure of the influence and importance of certain users within the community). Features such as the average social activity and shared preferences of users within the community can also be extracted. The extracted community feature vectors are standardized to facilitate subsequent integration with other data.

[0133] Ensure that explicit interaction data, implicit sentiment data, and social graph data can be accurately linked to the same user. During data collection, each user is assigned a unique user identifier (such as a user ID) and this identifier is maintained consistently throughout data storage and processing. Using user identifiers, data from different sources can be matched and linked to form a user-centric data set.

[0134] Because different types of data may be collected at different time points, timestamp alignment is performed to ensure data accuracy and consistency. Explicit interaction data, implicit sentiment data, and social graph data are sorted chronologically to ensure that the analysis accurately reflects the user's various behaviors and states within the same time period. For example, when analyzing a user's gaming experience within a specific time period, the user's operational behavior, sentimental feedback, and social interactions within that time period can be simultaneously captured.

[0135] Based on the game's business needs and the importance of the data, determine the weights of explicit interaction data, implicit sentiment data, and social graph data within the multimodal data. Expert evaluation, data analysis, or machine learning algorithms can be used to determine these weights. For example, an evaluation team consisting of game operations experts, data analysts, and psychology experts can assess the importance of different data types based on their experience and expertise, and then determine weights based on these opinions. Alternatively, historical data can be analyzed to examine the correlation between different data types and key business metrics such as user retention and monetization, and weights can be determined based on this correlation. Furthermore, machine learning algorithms (such as decision trees and neural networks) can be used to train and optimize the data, automatically learning the weights for different data types. After determining the weights, perform a weighted fusion of explicit interaction data, implicit sentiment data, and social graph data. Represent each data type as a vector, and linearly combine the vectors based on the weights to generate a multimodal data vector.

[0136] In this embodiment, the user's explicit interaction data, implicit emotion data, and social graph data are obtained through tracking technology, and weighted fusion is performed to generate multimodal data, which can provide the game with more comprehensive and in-depth user insights and assist in the refined operation and sustainable development of the game.

[0137] In some embodiments, in step S102 above, the multi-task learning network includes a shared fully connected layer, a main task branch network, an auxiliary task branch network, and a multi-task joint loss function; the multi-modal data is jointly modeled by the multi-task learning network to generate a dynamic user profile vector, specifically including:

[0138] Based on multimodal data, high-level abstract features are extracted through shared fully connected layers;

[0139] Based on high-level abstract features, the main task branch network predicts the player's skill score, while the auxiliary task branch network outputs the probability distribution of interest tags and sentiment tendency scores respectively;

[0140] Combine high-level abstract features, player skill scores, interest tag probability distribution, and sentiment tendency scores to generate an initial dynamic user portrait vector.

[0141] Optimizing network parameters according to a multi-task joint loss function to obtain an optimization result, wherein the multi-task joint loss function is obtained by dynamically weighted summing skill prediction loss, interest classification loss, and sentiment analysis loss;

[0142] Based on the optimization results, the parameters of the shared fully connected layer, the main task branch network, and the auxiliary task branch network are adjusted through the online update mechanism to update the initial dynamic user portrait vector and obtain the target dynamic user portrait vector.

[0143] In this embodiment, the shared fully connected layer is the core part of the multi-task learning network, which is used to perform preliminary feature extraction and integration of multimodal data. A multi-layer fully connected neural network is designed, and each fully connected layer contains a certain number of neurons. Nonlinear factors are introduced through activation functions (such as ReLU functions) to enhance the expression ability of the network. The shared fully connected layer receives multimodal data as input. These multimodal data include the feature vectors of the explicit interaction data, implicit emotional data and social graph data mentioned above after preprocessing and fusion. The shared fully connected layer gradually extracts high-level abstract features by performing linear transformation and nonlinear activation on these input data. These features capture the commonality and correlation information between different modal data, and provide basic feature representation for subsequent main tasks and auxiliary tasks.

[0144] The main task branch network focuses on predicting player skill scores, aiming to quantify a player's in-game operational capabilities and technical proficiency. The network structure is designed accordingly based on the game type and characteristics. For example, for competitive games, the main task branch network can employ multiple fully connected layers, combined with an attention mechanism, to focus on the impact of key in-game actions (such as skill release timing and tactical decision-making) on ​​the skill score. By analyzing data such as the player's operation sequence and battle results, the network predicts the player's skill level in the current game environment and outputs a skill score to assess the player's gaming ability.

[0145] The interest tag prediction branch of the auxiliary task branch network outputs the probability distribution of players' interest tags, helping to understand their preferences for different aspects of the game. A network structure based on fully connected layers and a softmax function is designed to further process the high-level abstract features extracted by the shared fully connected layer. By analyzing players' gaming behaviors (such as frequently played levels, character types, and game modes), the probability of players belonging to different interest tags (such as adventure, strategy, competitive, and casual) is predicted, generating a probability distribution vector that intuitively displays the player's preferences across various interest dimensions.

[0146] The sentiment analysis branch of the auxiliary task branch network outputs a player's sentiment score, reflecting their emotional state during gameplay. Combining natural language processing technology and sentiment analysis methods, a network structure consisting of a fully connected layer and a sentiment classification module is designed. A comprehensive analysis and judgment of sentiment features extracted from textual data such as player comments, as well as sentiment features reflected in game operations (such as emotional fluctuations after operating errors), is performed to output a sentiment score. The score range can be set according to actual conditions (e.g., -1 to 1, with -1 indicating extremely negative sentiment and 1 indicating extremely positive sentiment), which is used to measure the player's emotional state during gameplay.

[0147] The multi-task joint loss function is derived by dynamically weighting the skill prediction loss, interest classification loss, and sentiment analysis loss. The skill prediction loss can use the mean squared error loss function to measure the difference between the predicted player skill score and the actual skill score. The interest classification loss uses the cross-entropy loss function to assess the difference between the predicted interest tag probability distribution and the actual tag distribution. The sentiment analysis loss also uses the cross-entropy loss function or another loss function suitable for sentiment classification to calculate the error between the predicted sentiment tendency score and the actual sentiment tendency. The weights of each loss function are dynamically adjusted based on the importance of different tasks in game operations. For example, in the early stages of the game, when the focus is on cultivating player interests, the interest classification loss can be given a relatively high weight. However, in the competitive stage, when predicting player skill scores is more important, the skill prediction loss can be appropriately weighted. Through dynamic weighted summation, a comprehensive multi-task joint loss function is derived to guide network parameter optimization.

[0148] Initialize the parameters of the shared fully connected layer, the main task branch network, and the auxiliary task branch network. Use random initialization methods, such as Xavier initialization or He initialization. Based on the input and output dimensions and activation function types of the network layers, set appropriate initial parameter values ​​to ensure stable network operation and a certain degree of exploration capability during the initial training phase. Collect a large amount of multimodal data samples, including player game play records, comment data, and social interaction records, and annotate them with corresponding skill scores, interest tags, and sentiment information. Perform data preprocessing, such as data cleaning, feature extraction, and normalization, to convert the data into a format suitable for network input. Divide the processed data into training, validation, and test sets. The training set is used to learn network parameters, the validation set is used to adjust network hyperparameters and monitor training progress, and the test set is used to evaluate network model performance. Select an appropriate deep learning framework (such as TensorFlow or PyTorch) to establish the training environment. Configure high-performance computing resources, such as GPU servers, to accelerate network training. Set training-related hyperparameters, such as learning rate, batch size, number of iterations, etc., and adjust and optimize them according to actual conditions to ensure that the network can converge within a reasonable time and achieve good performance.

[0149] The preprocessed multimodal data is input into the constructed multi-task learning network. The data first passes through a shared fully connected layer, where high-level abstract features are extracted through layer-by-layer linear transformations and nonlinear activations. During processing, the shared fully connected layer automatically learns the associations and commonalities between the different modal data, integrating the dispersed multimodal information into representative feature representations. These high-level abstract features encompass comprehensive information about players' in-game behavior patterns, interests, and emotional states, providing a foundation for subsequent primary and auxiliary tasks. During training, the high-level abstract features extracted by the shared fully connected layer are visualized and monitored. Dimensionality reduction techniques (such as principal component analysis and t-SNE) can be used to map high-dimensional features to a lower-dimensional space. Visual charts can be used to display how the features change at different stages of training. This allows observation of whether the features effectively distinguish different player groups and whether representative feature patterns gradually form as training progresses. If feature extraction is unsatisfactory, the structure or parameters of the shared fully connected layer can be adjusted to optimize the feature extraction process.

[0150] Based on the high-level abstract features extracted by the shared fully connected layer, these features are input into the main task branch network. Based on the pre-set network structure and algorithm, the main task branch network predicts the player's skill score. During the prediction process, the network comprehensively considers multiple factors, including the player's operating habits, combat performance, and level pass rate. Through further processing and calculations in the fully connected layer, a skill score is output. This skill score reflects the player's operational capabilities and technical level in the current gaming environment and is a key indicator for evaluating a player's gaming proficiency.

[0151] High-level abstract features are input into the interest tag prediction branch network, which processes the features through a fully connected layer and a softmax function, outputting a probability distribution of the player's interest in different interest tags. For example, for adventure games, the network might predict a higher probability of players interested in exploring new maps and challenging difficult levels, while having a lower probability of interested in casual gameplay (such as fishing and collecting). This probability distribution of interest tags provides an intuitive understanding of players' in-game interests and provides a basis for personalized game recommendations.

[0152] After receiving high-level abstract features, the sentiment analysis branch network combines natural language processing technology and sentiment analysis methods to determine the player's emotional state. The network analyzes information such as the player's in-game behavior (e.g., frequent mistakes may indicate negative emotions) and commentary (e.g., positive or negative expressions) and outputs a sentiment score. This score reflects the player's emotional changes during the game in real time, helping game operators to promptly identify player dissatisfaction or positive emotions and take appropriate measures to adjust.

[0153] The high-level abstract features extracted by the shared fully connected layer, the player skill scores predicted by the main task branch network, the interest tag probability distribution output by the interest tag prediction branch, and the sentiment propensity scores output by the sentiment analysis branch are concatenated. This concatenation can be achieved using a simple vector concatenation method, combining different features in a specific order into a longer vector. This concatenated vector contains multiple aspects of the player's in-game information, covering dimensions such as operational ability, interests, and emotional state, forming the initial dynamic user profile vector. The initial dynamic user profile vector is normalized to ensure that the values ​​of different features in the vector have the same dimension and distribution range, facilitating subsequent analysis and application. Z-score normalization can be used to subtract the mean from each eigenvalue of the vector and divide it by the standard deviation to ensure that the eigenvalues ​​follow a standard normal distribution. If the vector dimension is too high, it may affect computational efficiency and the effectiveness of subsequent analysis. Dimensionality reduction techniques (such as principal component analysis) can be used to reduce the vector dimension while retaining key information, resulting in a more concise and efficient initial dynamic user profile vector.

[0154] Network parameters are optimized based on a multi-task joint loss function. During training, backpropagation and gradient descent optimization methods (such as stochastic gradient descent and the Adam optimizer) are used to adjust the parameters of the shared fully connected layer, the main task branch network, and the auxiliary task branch network based on the results of the multi-task joint loss function. Through continuous iterative optimization, the network is better fitted to the training data, reducing the skill prediction loss, interest classification loss, and sentiment analysis loss, thereby improving network performance on various tasks. During training, the network model is regularly evaluated using the validation set. Metrics such as the skill prediction accuracy, interest classification accuracy, and sentiment analysis accuracy of the model on the validation set are calculated. Based on the evaluation results, network hyperparameters such as the learning rate, batch size, and weight decay coefficient are adjusted. If the model performs poorly on a particular task, the weight of the loss function for that task can be appropriately increased to guide the network to focus on learning that task. By continuously adjusting hyperparameters, the network achieves optimal balance and performance across various tasks. To adapt to the dynamic changes in player behavior during gameplay, an online update mechanism is established. When new multimodal data is input, it is promptly fed into the network for forward and backward propagation, updating network parameters. During the online update process, mini-batch gradient descent can be employed, using only a small amount of new data for parameter updates at a time. This avoids large-scale retraining of the entire network and improves update efficiency. Through this online update mechanism, the network can capture player behavioral changes and emotional fluctuations in real time, dynamically adjusting the parameters of the shared fully connected layer, the main task branch network, and the auxiliary task branch network. This updates the initial dynamic user profile vector and generates a more accurate and timely target dynamic user profile vector. After optimizing the network parameters through the online update mechanism, the initial dynamic user profile vector is regenerated based on the latest network parameters and multimodal data. It then undergoes normalization and dimensionality reduction to produce the target dynamic user profile vector. This vector reflects the player's current gaming characteristics, including operational skills, interests, preferences, and emotional state, with high accuracy and timeliness. The target dynamic user profile vector can be widely applied in all aspects of gaming. For example, in game level difficulty adjustment, the level difficulty is dynamically adjusted according to the player's skill score and emotional tendency score, allowing players to enjoy the game in an environment that is challenging but not too difficult; in the personalized recommendation system, the probability distribution of the player's interest tags is combined to recommend suitable game content, props or social activities to the player, thereby improving the player's participation and satisfaction; in player retention analysis, by monitoring the changing trend of the target dynamic user portrait vector, players who may churn are promptly identified, and targeted retention measures are taken, such as issuing rewards, pushing personalized messages, etc., to improve player retention rate.

[0155] In this embodiment, a multi-task learning network is used to jointly model multimodal data and generate dynamic user portrait vectors, which can comprehensively and deeply characterize player characteristics and provide strong support for the refined operation and sustainable development of the game.

[0156] In some embodiments, in step S103 above, the dual-channel generative adversarial network includes a generator, a discriminator, and a multi-objective loss function; inputting the dynamic user profile vector into the dual-channel generative adversarial network to generate a set of candidate levels, and screening the initial recommended levels using a playability evaluation algorithm specifically includes:

[0157] Based on the dynamic user portrait vector, the basic noise is sampled through the standard Gaussian distribution and the noise distribution is modulated to obtain a random noise vector;

[0158] The dynamic user portrait vector and the random noise vector are concatenated as the generator input, and the candidate level feature matrix is ​​generated through the generator's U-Net structure;

[0159] Based on the candidate level feature matrix, the discriminator's dual-channel processing module calculates the authenticity probability and playability score respectively. The authenticity probability is obtained by detecting the candidate level feature matrix through the CNN network, and the playability score is obtained by Monte Carlo tree search simulation of player path statistical coverage, path length, and number of loops.

[0160] Optimizing generator parameters according to a multi-objective loss function, wherein the multi-objective loss function includes an adversarial loss, a diversity constraint, and a difficulty gradient loss;

[0161] Based on the authenticity probability and playability score, the initial recommended level is determined from the candidate level feature matrix.

[0162] In this embodiment, the generator adopts the U-Net structure, which is a classic encoder-decoder architecture that performs well in fields such as image generation and semantic segmentation. Its encoder part gradually downsamples the input data through a series of convolutional layers and pooling layers to extract feature information at different scales; the decoder part gradually restores the resolution of the feature map through deconvolution layers and upsampling operations, and finally generates an output that matches the input dimension. This structure can effectively integrate features at different levels to generate a level feature matrix with rich details and reasonable structure. The input of the generator is the splicing result of the dynamic user portrait vector and the random noise vector. The dynamic user portrait vector contains information such as the player's skill level, interest preferences, and emotional state. The random noise vector introduces randomness into the generation process to ensure the diversity of the generated levels. Through the splicing operation, the player's personalized characteristics are combined with random factors, allowing the generator to generate differentiated levels based on the characteristics of different players.

[0163] The discriminator is designed as a dual-channel processing module, respectively used to calculate the authenticity probability and playability score of the candidate level feature matrix. This dual-channel design enables the discriminator to simultaneously focus on the visual realism and playability of the level, providing more comprehensive feedback to the generator. The authenticity probability calculation channel utilizes a convolutional neural network (CNN) architecture, which has powerful feature extraction capabilities in image recognition. Through multiple layers of convolutional, pooling, and fully connected layers, it extracts and classifies the candidate level feature matrix, outputting a authenticity probability value between 0 and 1. This value indicates the probability that the discriminator considers the candidate level to be a real level (either manually designed or high-quality generated). The closer the value is to 1, the more realistic the discriminator considers the level. The playability score calculation channel, based on the Monte Carlo Tree Search (MCTS) algorithm, simulates the player's behavior path within the game level, calculates metrics such as path coverage, path length, and number of loops, and then weights these metrics based on preset weights to obtain the candidate level's playability score. The coverage metric reflects the proportion of the level that players can explore, the path length reflects the number of steps or time required to complete the level, and the number of loops measures whether there are invalid paths within the level that cause players to repeat actions. By comprehensively considering these factors, the playability score can provide a relatively comprehensive assessment of the level's fun, challenge, and flow.

[0164] The adversarial loss is the core loss term in generative adversarial networks (GANs). It measures the difference between the candidate level feature matrices generated by the generator and the real level feature matrices. The goal of the generator is to generate as realistic a level feature matrix as possible, making it difficult for the discriminator to distinguish between real and fake. The goal of the discriminator is to accurately determine whether the input level feature matrix is ​​real or generated. Through the adversarial game between the generator and the discriminator, the generator is encouraged to continuously improve the quality of the generated levels. To ensure that the generator can generate a variety of levels and avoid mode collapse (i.e., the generator only generates a few types of levels), a diversity constraint loss term is introduced. This loss term analyzes the similarity between the feature matrices of different candidate levels generated by the generator, encouraging the generator to generate levels with different features and structures. For example, the Euclidean distance or cosine similarity between different level feature matrices can be calculated. When the similarity is too high, the generator is penalized to encourage it to explore more of the generation space. Considering the differences in player skill levels, the generated levels should have a certain difficulty gradient to meet the needs of players of different levels. The difficulty gradient loss term constrains the difficulty of generated levels based on the player's skill score in the dynamic user profile vector. For example, for players with higher skill levels, the generated levels should be more challenging, with more complex level layouts and stronger enemies. For players with lower skill levels, relatively simpler levels should be generated, with fewer obstacles and more direct paths. This loss term guides the generator to produce levels that match the player's skill level, improving the player's gaming experience.

[0165] Initialize the network parameters of the generator and discriminator. Random initialization methods, such as Xavier initialization or He initialization, can be used. Based on the input and output dimensions of the network layers and the activation function types, appropriately set initial parameter values ​​to ensure stable network operation and a certain degree of exploration capability during the initial training phase. Collect a large amount of real-world game level data, including level layout information, enemy distribution, and item locations, and convert it into a feature matrix suitable for network input. Also, label each level with a corresponding authenticity label (real or generated; levels generated in the early stages of training can be generated using other simple methods as negative samples) and playability evaluation metrics (such as coverage, path length, and number of loops estimated through manual testing or simple rules). Divide the processed data into training, validation, and test sets. The training set is used to learn network parameters, the validation set is used to adjust network hyperparameters and monitor training progress, and the test set is used to evaluate network model performance. Select an appropriate deep learning framework (such as TensorFlow or PyTorch) to build the training environment. Configure high-performance computing resources, such as GPU servers, to accelerate network training. Set training-related hyperparameters, such as learning rate, batch size, number of iterations, etc., and adjust and optimize them according to actual conditions to ensure that the network can converge within a reasonable time and achieve good performance.

[0166] Based on the dynamic user profile vector, basic noise is sampled from a standard Gaussian distribution. The standard Gaussian distribution has zero mean and unit variance, and the noise data obtained by sampling provides initial randomness for the generation process. The sampling process can be implemented using a random number generation algorithm, ensuring that the noise data obtained from each sampling is independent and random. The sampled basic noise is modulated based on the player characteristics contained in the dynamic user profile vector. For example, if the dynamic user profile vector indicates that the player prefers complex and varied levels, the variance of the noise can be appropriately increased to ensure that the levels generated by the generator have more random variation. If the player prefers simple and straightforward levels, the variance of the noise can be reduced to ensure a relatively stable level structure. By modulating the noise distribution, the generated random noise vector can be better adapted to the needs of different players.

[0167] The dynamic user profile vector is concatenated with the modulated random noise vector to form the generator's input vector. This concatenation can be achieved using a simple vector concatenation method, combining the two vectors in a specific order to form a longer vector. This concatenated vector incorporates the player's personalized characteristics and random factors, providing comprehensive information for the generator to generate candidate levels. The concatenated input vector is fed into the generator's U-Net architecture. Downsampling in the encoder gradually extracts feature information at different scales. The convolutional and pooling layers in the encoder effectively capture local and global features in the input vector, converting high-dimensional input data into a low-dimensional feature representation. Upsampling and deconvolution in the decoder gradually restore the resolution of the feature maps. Skip connections are then made with the corresponding feature maps from the encoder to fuse feature information at different levels. Finally, the generator outputs a candidate level feature matrix, which contains key information such as the level layout and element distribution, representing the two-dimensional structure of the level in matrix form.

[0168] The candidate level feature matrix output by the generator is input into the discriminator's authenticity probability calculation channel. The CNN network in this channel extracts features from the feature matrix and, through multiple convolutional and pooling layers, gradually extracts features that reflect the level's authenticity. The convolutional layer slides the convolution kernel across the feature map to extract features from local regions. The pooling layer downsamples the convolutional layer output, reducing the dimensionality of the feature map while retaining important feature information. Finally, a fully connected layer maps the extracted features to a probability value, representing the discriminator's likelihood that the candidate level is a real level.

[0169] The candidate level feature matrix is ​​input into the discriminator's playability score calculation pipeline. A Monte Carlo tree search algorithm is used to simulate the player's behavior path within the game level. Specifically, the candidate level feature matrix is ​​used to initialize the player's initial position, state, and other information within the game level to form an initial state. Starting from this initial state, the Monte Carlo tree search algorithm is used to simulate the path. At each decision step, the algorithm selects an action to try based on the current state and possible actions, and then advances to the next state. This process is repeated until a termination condition is met (such as the player reaching the end of the level, failing, or reaching the maximum number of simulated steps). During the simulation, metrics such as the player's path coverage, path length, and number of loops are calculated. Coverage can be calculated by recording the ratio of the level areas visited by the player to the entire level area; path length is the number of steps taken from the player's initial position to the final position; and loop count is the number of times the player repeatedly passes through the same location or path during the simulation. The coverage, path length, and loop count are weighted and summed according to preset weights to obtain the candidate level's playability score. The weights can be adjusted according to actual needs and game characteristics. For example, if you focus more on the exploration of the level, you can appropriately increase the weight of the coverage rate; if you focus more on the challenge of the level, you can increase the weight of the path length.

[0170] According to the multi-objective loss function, the loss value of the generator in the current iteration is calculated. The adversarial loss, diversity constraint, and difficulty gradient loss are weighted and summed according to certain weights to obtain the total loss of the generator. These loss terms evaluate the generation quality of the generator from different angles, prompting the generator to consider both the authenticity of the level and the diversity of the level and the skill level of the player when generating the level. Using the backpropagation algorithm and gradient descent optimization method (such as stochastic gradient descent, Adam optimizer, etc.), the gradient of the generator network parameters is calculated based on the calculated loss value, and the parameters are updated in the opposite direction of the gradient. Through continuous iterative optimization, the generator can gradually learn how to generate a candidate level feature matrix that better meets the requirements and reduce the value of the multi-objective loss function.

[0171] Based on the authenticity probability and playability score output by the discriminator, a comprehensive evaluation is performed on the generated candidate level feature matrix. A comprehensive evaluation metric can be set, such as a weighted sum of the authenticity probability and playability score, to obtain a comprehensive score for each candidate level. The weighting can be adjusted based on actual needs. If the authenticity of the level is more important, the authenticity probability can be appropriately weighted; if the level's fun factor is more important, the playability score can be weighted more. The candidate levels are ranked based on the comprehensive score, and several with the highest scores are selected as initial recommended levels. These initial recommended levels are both highly authentic, providing a good visual experience for players, and highly playable, meeting their gaming needs. The selected initial recommended levels are then provided to players for them to experience in-game.

[0172] In this embodiment, a dual-channel generative adversarial network is used to generate a set of candidate levels, and the initial recommended levels are screened through a playability evaluation algorithm. This can generate diverse levels based on the player's personalized characteristics, improve the player's gaming experience and participation, and provide an innovative and efficient solution for game level design.

[0173] In some embodiments, in step S104, establishing a difficulty-skill dynamic balance model, calculating the matching degree between the user's skill score and the level challenge in real time based on the difficulty-skill dynamic balance model, and dynamically adjusting the level parameters of the initially recommended level based on the matching degree to obtain the first recommended level specifically includes:

[0174] Based on the user's historical behavior data, the user's skill score is updated in real time through weighted calculation. The user's historical behavior data includes clearance time, number of failures, and operation accuracy;

[0175] Calculating an initial challenge level based on level parameters of the initial recommended level, wherein the level parameters include enemy strength, trap density, and resource scarcity;

[0176] Based on the user's skill score and initial challenge, the current skill-challenge matching is calculated in real time using the matching formula;

[0177] When the current skill-challenge match is lower than the preset match threshold, the challenge of the subsequent levels will be reduced according to the preset attenuation step. When the current skill-challenge match is higher than the preset match threshold, the challenge will be increased according to the preset enhancement step.

[0178] The adjusted challenge level is reverse-mapped to specific level parameters to generate the first recommended level.

[0179] In this embodiment, during the game, the system collects historical user behavior data in real time, primarily including level completion time, number of failures, and operation accuracy. Level completion time refers to the actual length of time it takes a user to complete a level, starting with the user entering the level and ending with a successful level completion. Failures refer to the cumulative number of times a user fails a level due to various reasons (e.g., depleted health points, uncompleted tasks, etc.) while attempting to complete the level. Operation accuracy reflects the accuracy of a user's in-game operations, such as the percentage of targets hit in shooting games or the percentage of correct operations in puzzle games. This data can be recorded using the game's built-in statistics module and stored in a database for subsequent analysis.

[0180] Based on collected historical user behavior data, a weighted calculation method is used to update the user's skill score in real time. Specifically, different types of data are assigned corresponding weights to reflect their varying degrees of influence on the user's skill level. For example, a fast completion time generally indicates a high level of skill and can be given a higher weight. A high number of failures may indicate a lack of skill and can be given an appropriate weight to reflect its negative impact on the skill score. High operational accuracy directly reflects the user's operational ability and is also given an appropriate weight. According to a preset weighting system, each data point is weighted and summed to obtain the user's current skill score. The weights can be adjusted and optimized based on the game type, level characteristics, and actual testing results to ensure that the skill score accurately reflects the user's actual skill level. For example, for a competitive game that emphasizes operational skill, operational accuracy can be given a higher weight. For a strategic puzzle game, the completion time and number of failures, reflecting decision-making ability, can be appropriately weighted.

[0181] Updated user skill scores are stored in a user-specific skill profile. This profile records skill score changes over time, facilitating long-term analysis and trend forecasting. The skill profile can be designed as a database table, containing fields such as user ID, skill score, and update time, for easy querying and management. To ensure the real-time and accuracy of user skill scores, a reasonable update cycle should be set. This update cycle can be adjusted based on the game's pace and user behavior. For example, in fast-paced competitive games, a shorter update cycle can be used, such as after completing a level or after a certain amount of gameplay time. In strategic, slower-paced puzzle games, a longer update cycle can be used, such as after completing several levels or at a fixed time daily. A reasonable update cycle ensures timely reflection of changes in user skill levels while avoiding the waste of system resources caused by overly frequent updates.

[0182] During the game level design phase, a series of pre-set parameters are set for each level. These parameters are important for measuring the challenge level. These parameters primarily include enemy strength, trap density, and resource scarcity. Enemy strength can be reflected through attributes such as health, attack power, defense, and movement speed. For example, enemies with high health and high attack power make the level more challenging. Trap density refers to the number and density of traps in a level. A large number of traps and dense distribution of traps increase the difficulty of clearing the level. Resource scarcity reflects the abundance of resources available to players in the level (such as weapons, props, health-restoring items, etc.). The scarcer the resources, the greater the survival pressure faced by the player in the level, and the higher the challenge. When the game starts or a level is loaded, the system reads these parameter information for the initially recommended level from the level configuration file.

[0183] Based on the collected initial recommended level parameters, a comprehensive evaluation method is used to calculate the initial challenge level. Specifically, a corresponding difficulty coefficient is assigned to each level parameter. This coefficient can be adjusted based on the game developer's experience, actual testing results, and player feedback. For example, enemy strength can be calculated based on a comprehensive difficulty value derived from various enemy attributes and used as the difficulty coefficient. Trap density can be determined based on the number and distribution of traps, combined with factors such as the damage level of the traps. Resource scarcity can be determined based on the quantity and difficulty of obtaining resources. The difficulty coefficients of each parameter are then weighted and summed to determine the initial challenge level of the initial recommended level. These weights can be set based on the level type and design goals. For example, in a level emphasizing combat, the weight of enemy strength can be appropriately increased; in a level emphasizing exploration and puzzle-solving, the weights of trap density and resource scarcity can be increased.

[0184] To measure the degree of match between a user's skill score and the level's challenge, a matching formula is designed. This formula should fully consider the relative relationship between skill score and challenge. When the two are close, the matching is high; when they differ significantly, the matching is low. For example, a relative difference calculation method can be used, using the difference or ratio between skill score and challenge as the basis for matching, and incorporating certain adjustment factors to make the matching results more in line with actual needs.

[0185] During the game, the system obtains the current user's skill score and the initial challenge of the initial recommended level in real time, substitutes it into the preset matching formula for calculation, and obtains the current skill-challenge matching. The calculation process can be implemented through the game's built-in calculation module, which regularly (such as every frame or every certain time interval) reads relevant data from the user's skill profile and level configuration file and performs calculation operations. The calculation result is presented in the form of a numerical value or percentage, which intuitively reflects the matching of the user's current skill level and the level challenge. For example, a matching degree of 80% means that the user's skills are relatively matched with the level challenge, and the player may have a better experience during the game; a matching degree below 50% may indicate that the level difficulty is too high or too low and needs to be adjusted.

[0186] Based on gameplay testing and player feedback, a reasonable preset match threshold is set. This threshold is used to determine whether the current skill-challenge match is within an appropriate range. When the match falls below the threshold, the level difficulty is considered too high or too low and requires adjustment. When the match rises above the threshold, adjustments can be temporarily suspended, but changes in the match are continuously monitored. At the same time, corresponding adjustment strategies are developed, including decay and boost steps. The decay step reduces the challenge of subsequent levels when the match falls below the threshold, while the boost step increases the challenge when the match rises above the threshold. The step size can be adjusted based on the game type and player acceptance. For example, in fast-paced games, the step size can be increased to quickly adjust the level difficulty. In games that emphasize strategy and exploration, the step size can be reduced to avoid drastic difficulty adjustments that affect the player experience.

[0187] When the current skill-challenge match calculated in real time falls below the preset match threshold, the system reduces the challenge of subsequent levels according to a preset attenuation step size. This adjustment is based on the correspondence between level parameters such as enemy strength, trap density, and resource scarcity and the challenge level, and then attenuates each parameter individually. For example, reducing enemy strength can be achieved by reducing enemy health, attack power, and other attributes; reducing trap density can be achieved by reducing the number of traps or adjusting their distribution; and increasing resource scarcity can be achieved by increasing the number of resources or making them easier to obtain. When the match exceeds the preset match threshold, the challenge level is increased according to a preset enhancement step size. The adjustment method is the opposite of the attenuation process, that is, appropriately increasing enemy strength, increasing trap density, or reducing resource scarcity.

[0188] The adjusted challenge level is reverse-mapped to specific level parameters. This process can be achieved through a pre-established mapping relationship table between level parameters and challenge levels, which records the range of level parameter values ​​corresponding to different challenge levels. Based on the adjusted challenge value, the system searches the mapping relationship table for the corresponding level parameter range, and determines the specific level parameter values ​​based on the design features and actual needs of the current level. For example, if the enemy strength corresponding to the adjusted challenge level should be within a certain range, the enemy's specific health value, attack power and other attribute values ​​are determined based on the enemy type and level environment; for trap density and resource scarcity, corresponding adjustments are also made according to the mapping relationship. Finally, the first recommended level is generated based on the adjusted level parameters. The difficulty of this level is more consistent with the user's current skill level, and can provide players with a more suitable gaming experience.

[0189] In this embodiment, the problem of mismatch between level difficulty and player skills can be effectively solved, the player's game satisfaction and retention rate can be improved, and a scientific and efficient dynamic adjustment method for game level design can be provided.

[0190] Furthermore, the matching formula satisfies

[0191]

[0192] c t =β1·e str +β2·d trap +β3·(1-r res )

[0193] Among them, Score represents the current skill-challenge matching degree, s represents the user skill score, and c t Indicates the dynamic challenge of the current level t, t base Indicates the preset standard clearance time, t pass Indicates the actual clearance time, N fail Indicates the number of failures, a prec represents the operation accuracy, α1, α2 and α3 represent the weight coefficients of clearance time, number of failures and operation accuracy respectively, e str Indicates the enemy strength, d trap represents the trap density, r res represents resource scarcity, β1, β2, and β3 represent the weight coefficients of enemy strength, trap density, and resource scarcity, respectively.

[0194] In some embodiments, in step S105, the user classification results are obtained by classifying users into core players, casual players, and players at risk of churn according to the spectral clustering algorithm, and differentiated server computing resources are allocated to each player's level generation request based on the user classification results, specifically including:

[0195] Collect multi-dimensional user behavior data and construct a behavioral feature vector including login frequency, online time, payment amount, social interaction and churn risk indicators;

[0196] Based on the behavioral feature vector, the user similarity matrix is ​​calculated using an adaptive Gaussian kernel function, and the similarity metric is optimized in combination with the local scale parameter;

[0197] Based on the user similarity matrix, the first K eigenvectors are extracted through the eigendecomposition of the normalized Laplace matrix to construct a low-dimensional embedding space;

[0198] Based on the low-dimensional embedding space, the k-means algorithm is used to divide users into core players, casual players, and players at risk of churn, and obtain user classification results;

[0199] Based on the user classification results, high-performance computing cluster resources are allocated to level generation requests from core players, elastic resources from edge nodes are allocated to level generation requests from casual players, and bidding instances from the shared resource pool are allocated to level generation requests from players at risk of churn.

[0200] In this embodiment, the game server log records the timestamp information of each player's game login. During the data collection phase, a fixed time window (such as a week or a month) is set, and the number of player logins within this time window is counted. For example, daily login records are extracted from the server log, categorized and aggregated by player ID, and the total number of logins for each player within the time window is calculated. The specific time of each login is also recorded to facilitate subsequent analysis of the distribution of player logins over different time periods.

[0201] The timer starts when a player logs in and ends when they log out, accurately recording the player's online time for each session. The data collection system receives real-time notifications of players logging in and out, storing each session's online time in a database. To prevent data anomalies from affecting analysis results, data on online time that is too short (e.g., less than 1 minute) or too long (e.g., over 24 hours) is validated and filtered. Furthermore, the player's total online time within the time window and the average online time per session are recorded.

[0202] The game payment system records every player's payment transaction, including transaction time, amount, and paid items. The data collection module regularly extracts this data from the payment system database, aggregates it by player ID, and calculates the player's total payment amount, number of payments, and average payment amount within the time window. Furthermore, it analyzes players' payment preferences, such as item purchases and membership activation, to provide more comprehensive information for subsequent user classification.

[0203] The in-game social system records various interactions between players, such as adding friends, private chats, team games, and participation in guild activities. Through the social system's data interface, players' social interaction data is collected over a certain period of time. Statistics are collected to measure the number of friends added, the number of private chats initiated, the number of team games participated in, and the player's activity in the guild (such as the number of speeches and participation in guild missions).

[0204] A churn risk indicator is constructed by combining multi-dimensional data such as player login frequency, online time, payment behavior, and social interaction. For example, if a player's login frequency suddenly drops significantly, online time decreases significantly, payment behavior stops, and social interaction decreases, the player is considered to have a high churn risk. By setting a series of rules and thresholds, a player's churn risk is quantitatively assessed and a churn risk indicator value is generated.

[0205] The collected multi-dimensional data, including login frequency, online time, payment amount, social interaction, and churn risk indicators, is standardized to eliminate the influence of different data dimensions. For example, the Z-score standardization method is used to convert the data of each dimension into a standard normal distribution with a mean of 0 and a standard deviation of 1. Then, the standardized data of each dimension is combined into a feature vector in a certain order. Each player has a corresponding feature vector. This feature vector comprehensively describes the player's behavioral characteristics in the game, providing basic data for subsequent user similarity calculation and classification.

[0206] The Gaussian kernel function is a commonly used similarity metric that determines the similarity between two data points by calculating the distance between them in feature space. In this embodiment, an adaptive Gaussian kernel function is used to calculate user similarity. This has the advantage of automatically adjusting the kernel function's bandwidth parameter based on the local characteristics of the data, thereby more accurately reflecting the similarity between users.

[0207] For each user, the bandwidth parameter of the Gaussian kernel function is adaptively adjusted based on the data distribution surrounding their feature vector. Specifically, a local density-based estimation method is used to calculate the local density of each user's feature vector in the feature space. A higher local density indicates a denser data point population around the user. In this case, the bandwidth parameter should be appropriately reduced to highlight local details. Conversely, if the local density is lower, the bandwidth parameter should be increased to account for a wider data distribution. This approach enables similarity calculations to better adapt to the data characteristics of different users.

[0208] Using an adaptively adjusted Gaussian kernel function, we calculate the similarity between any two user feature vectors. Similarity values ​​range from [0, 1], with larger values ​​indicating greater similarity between the two users. The similarity values ​​between all users are combined into a symmetric similarity matrix, where rows and columns correspond to different users, and each element in the matrix represents the similarity between the two users.

[0209] To further optimize the similarity metric, a local scale parameter is introduced. The local scale parameter can reflect the degree of change of user feature vectors in different directions. By properly setting the local scale parameter, the similarities and differences between users can be more accurately captured.

[0210] Using local structure analysis methods, such as Local Linear Embedding (LLE) or Laplacian Eigenmaps (LE), the local neighborhood structure of user feature vectors in feature space is analyzed. The local scale parameter is determined by calculating the geometric relationship between each user feature vector and the other feature vectors in its neighborhood. For example, for each user, the k nearest neighbors are found within their neighborhood. The average distance between these neighbors and the gradient of the feature vector in different directions are calculated. Based on this information, the magnitude and direction of the local scale parameter are determined.

[0211] The determined local scale parameter is incorporated into the similarity calculation process to optimize the initial similarity matrix. By adjusting the local scale parameter, the weights of similarity in different directions can be changed, making the similarity metric more consistent with the actual data distribution. The optimized similarity matrix can more accurately reflect the true similarity relationships between users, providing a more reliable foundation for subsequent spectral clustering analysis.

[0212] A degree matrix is ​​constructed based on the user similarity matrix. The degree matrix is ​​a diagonal matrix whose diagonal elements represent the sum of the similarities between each user and other users, that is, the i-th diagonal element of the degree matrix is ​​the sum of all elements in the i-th row of the similarity matrix. Then, the degree matrix and the similarity matrix are used to calculate the Laplace matrix, which is equal to the degree matrix minus the similarity matrix. In order to eliminate the impact of the degree differences of different users on subsequent analysis, the Laplace matrix is ​​normalized. Commonly used normalization methods include symmetric normalization and random walk normalization. In this embodiment, a symmetric normalization method is adopted, that is, the Laplace matrix is ​​transformed to obtain a normalized Laplace matrix. The normalized Laplace matrix can better reflect the relative relationship between users and make the subsequent feature decomposition process more stable.

[0213] Use an appropriate numerical algorithm to perform eigendecomposition on the normalized Laplacian matrix. Commonly used algorithms in practice include the power iteration method and the QR algorithm. The power iteration method is suitable for calculating the maximum eigenvalue and corresponding eigenvector of a matrix, approximating the eigenvalue and eigenvector through multiple iterations. The QR algorithm can calculate all eigenvalues ​​and eigenvectors of a matrix at once. Select an appropriate eigendecomposition algorithm based on the size of the matrix and the computational requirements.

[0214] After performing eigendecomposition on the normalized Laplace matrix, a set of eigenvalues ​​and corresponding eigenvectors is obtained. The eigenvalues ​​are sorted from largest to smallest, and the eigenvectors corresponding to the first K eigenvalues ​​are selected. The value of K can be determined using a variety of methods, such as the elbow rule and the silhouette coefficient method. The elbow rule plots the cumulative contribution rate of the eigenvalues ​​against the K value to find the K value corresponding to the inflection point of the curve; the silhouette coefficient method calculates the silhouette coefficient of the clustering results under different K values ​​and selects the K value with the largest silhouette coefficient.

[0215] The first K selected eigenvectors are combined column by column into a matrix, where each row corresponds to a user and each column corresponds to a eigenvector. This matrix forms a low-dimensional embedding space, which maps the original high-dimensional behavioral eigenvectors into a low-dimensional space while preserving the similarities between users. In this low-dimensional embedding space, the relative positions between users more intuitively reflect the similarities and differences in their gaming behaviors, facilitating subsequent user classification.

[0216] Based on the game's operational objectives and business needs, and in conjunction with the K value determination method mentioned above, users are divided into three categories: core players, casual players, and players at risk of churn, with K = 3. This classification method meets the need for differentiated services for different player types while avoiding overly complex classifications that can lead to management difficulties. Initial cluster centers are selected using random selection or a method based on specific heuristics. For example, a simple statistical analysis can be performed on user data in a low-dimensional embedding space, such as calculating the mean and standard deviation for each feature dimension. Then, a number of candidate points are randomly generated along each feature dimension, and three distant points are selected as initial cluster centers. The choice of initial cluster centers affects the convergence speed of the k-means algorithm and the final clustering results. Therefore, it is important to ensure that the initial cluster centers are representative of the different user categories.

[0217] Assign each user in the low-dimensional embedding space to the category represented by the initial cluster center closest to them. Calculate the Euclidean distance between each user and the three initial cluster centers, and determine the category to which the user belongs based on the distance. For example, if the user has the smallest distance to the first cluster center, assign them to the first category.

[0218] For each category, the mean vector of all users in that category is calculated and used as the new cluster center. Each dimension of the mean vector is equal to the average value of the corresponding dimension features of all users in that category. By continuously iteratively updating the cluster centers, the features of users within the same category become increasingly similar, while the features of users in different categories become increasingly different.

[0219] A convergence threshold is set. When the change in cluster center between two consecutive iterations is less than this threshold, the algorithm is considered converged and the iteration process ends. At this point, the three cluster centers obtained represent the typical characteristics of core players, casual players, and players at risk of churn, respectively. The category to which each user belongs is the classification result for that user.

[0220] The user classification results are evaluated using a variety of evaluation metrics, such as the silhouette coefficient and the Davies-Bouldin index. The silhouette coefficient combines the degree of intra-class cohesion and the degree of inter-class separation, and its value range is [-1, 1]. A larger value indicates a better classification result. The Davies-Bouldin index evaluates classification quality by calculating the ratio of the intra-class distance to the inter-class distance. A smaller value indicates a better classification result.

[0221] If the evaluation indicators show that the classification results are not ideal, you can optimize the classification process. For example, you can adjust the method for selecting the initial cluster centers, try different K values, or use other clustering algorithms (such as hierarchical clustering and DBSCAN) for comparative analysis. Through repeated attempts and optimization, you can obtain more accurate and reasonable user classification results.

[0222] High-performance computing cluster resources are allocated to core players' level generation requests. When a core player initiates a level generation request, the system routes the request to an available node in the high-performance computing cluster for processing. During resource allocation, the resource needs of core players are prioritized, and sufficient computing resources and bandwidth are allocated to them to ensure that the level generation process is completed quickly, reducing player wait time and providing a high-quality gaming experience. High-performance computing clusters are typically composed of multiple high-performance servers with powerful computing power, high-speed network bandwidth, and large-scale storage capacity. Equipped with advanced processors, large-capacity memory, and high-speed solid-state drives, these servers can quickly handle complex computing tasks, ensuring the real-time and smooth operation of operations such as game level generation.

[0223] Elastic edge node resources are allocated to casual players' level generation requests. The system dynamically allocates resources based on edge node load and the volume of casual player requests. When edge node resources are sufficient, requests are prioritized for processing at edge nodes closer to the players, reducing network latency. When edge node load is high, resource allocation is automatically scaled to ensure timely processing of casual players' requests and meet their fragmented gaming needs. Elastic edge node resources refer to server resources deployed at the edge of the network, characterized by proximity to users and low latency. Edge nodes can dynamically adjust resource allocation based on actual demand, enabling rapid response and service when casual players initiate level generation requests. Furthermore, edge node resource costs are relatively low, making them suitable for processing casual player requests that require less real-time performance and require relatively low computational effort.

[0224] Spot instances from the shared resource pool are allocated to level generation requests from players at risk of churn. Since players at risk of churn have relatively low game investment and engagement, they don't require high resource stability or real-time performance. Using spot instances can meet their basic needs while reducing resource costs. The system monitors the market price and resource availability of spot instances in real time. When a suitable spot instance becomes available, it allocates the level generation request from players at risk of churn to that instance. If resources are reclaimed, the system promptly migrates the request to another available spot instance, ensuring players can continue playing. Spot instances in the shared resource pool are a pay-as-you-go server resource allocation method. Server resources in the resource pool are shared by multiple users, who bid for resource access. Spot instances offer relatively low prices, but resource stability may be affected. Resources may be reclaimed when the market price exceeds the user's bid price.

[0225] In this embodiment, the utilization rate of server resources can be effectively improved, the personalized needs of different types of players can be met, the game experience and satisfaction of players can be enhanced, and strong support can be provided for the long-term stable operation of the game.

[0226] Reference Figure 2 An embodiment of the present invention provides a game level generation recommendation system 2, wherein the system 2 specifically includes:

[0227] The first recommendation generation module 201 is used to obtain the user's explicit interaction data, implicit emotion data and social graph data through the embedding technology to form multimodal data;

[0228] A second generation and recommendation module 202 is configured to jointly model multimodal data using a multi-task learning network to generate a dynamic user portrait vector, wherein the primary task of the multi-task learning network is to predict the player's skill level, and the auxiliary tasks of the multi-task learning network are to classify interest tags and analyze sentiment tendencies;

[0229] The third generation and recommendation module 203 is used to input the dynamic user portrait vector into the dual-channel generative adversarial network to generate a set of candidate levels and screen the initial recommended levels through the playability evaluation algorithm;

[0230] The fourth generation and recommendation module 204 is configured to establish a difficulty-skill dynamic balance model, calculate the matching degree between the user's skill score and the level challenge level in real time based on the difficulty-skill dynamic balance model, and dynamically adjust the level parameters of the initially recommended level based on the matching degree to obtain a first recommended level;

[0231] The fifth generation recommendation module 205 is used to classify users into core players, casual players, and players at risk of churn according to the spectral clustering algorithm, obtain user classification results, and allocate differentiated server computing resources to each player's level generation request based on the user classification results.

[0232] It is understandable that if Figure 1 The contents of the game level generation recommendation method embodiment shown in the figure are applicable to the game level generation recommendation system embodiment. The functions specifically implemented by the game level generation recommendation system embodiment are similar to those in the example above. Figure 1 The game level generation recommendation method embodiment shown is the same as that shown in FIG. Figure 1 The beneficial effects achieved by the game level generation recommendation method embodiment shown are also the same.

[0233] 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.

[0234] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and 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 into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into 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, and will not be repeated here.

[0235] Reference Figure 3The embodiment of the present invention further provides a computer device 3, comprising: a memory 302, a processor 301, and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, the game level generation recommendation method described in any one of the above methods is implemented.

[0236] The computer device 3 may be a desktop computer, a notebook computer, a PDA, a cloud server or other computing devices. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that Figure 3 This is merely an example of the computer device 3 and does not constitute a limitation on the computer device 3 . The computer device 3 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device 3 may also include input and output devices, network access devices, etc.

[0237] The processor 301 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, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

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

[0239] 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 game level generation recommendation method described in any one of the above methods is implemented.

[0240] In this embodiment, if the integrated unit is implemented as 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 process of the above-mentioned method embodiment by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which 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 capable of carrying computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, mobile hard drive, magnetic disk, or optical disk. In some jurisdictions, based on legislation and patent practice, computer-readable media cannot be electric carrier signals or telecommunication signals.

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

[0242] Those skilled 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 beyond the scope of this application.

[0243] 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 merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, 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.

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

Claims

1. A method for generating and recommending game levels, characterized in that: The method specifically includes: Through tracking technology, users' explicit interaction data, implicit emotional data, and social graph data are obtained to form multimodal data; Multimodal data is jointly modeled through a multi-task learning network to generate dynamic user portrait vectors. The main task of the multi-task learning network is to predict the player's skill level, and the auxiliary tasks of the multi-task learning network are to classify interest tags and analyze emotional tendencies. The dynamic user portrait vector is input into a two-channel generative adversarial network to generate a set of candidate levels, and the initial recommended levels are screened through a playability evaluation algorithm. Establish a difficulty-skill dynamic balance model, calculate the matching degree between the user's skill score and the level challenge in real time based on the difficulty-skill dynamic balance model, and dynamically adjust the level parameters of the initial recommended level based on the matching degree to obtain the first recommended level; According to the spectral clustering algorithm, users are divided into core players, casual players and players at risk of churn to obtain user classification results. Based on the user classification results, differentiated server computing resources are allocated to each player's level generation request.

2. The method according to claim 1, characterized in that The user's explicit interaction data, implicit emotion data, and social graph data are obtained through the embedding technology to form multimodal data, which specifically includes: The tracking SDK deployed on the game client captures the user's explicit interaction data in real time, including operation events and preference events; Based on explicit interaction data, sentiment analysis of user comments is performed using a pre-trained BERT multi-task model to generate implicit sentiment data. Constructing a social relationship graph based on the user's social interaction records, dividing the user community into groups using a community detection algorithm, and extracting a social graph feature vector; Perform weighted fusion of explicit interaction data, implicit emotion data, and social graph data to generate multimodal data.

3. The method according to claim 1, characterized in that The multi-task learning network includes a shared fully connected layer, a main task branch network, an auxiliary task branch network, and a multi-task joint loss function; the multi-modal data is jointly modeled through the multi-task learning network to generate a dynamic user portrait vector, specifically including: Based on multimodal data, high-level abstract features are extracted through shared fully connected layers; Based on high-level abstract features, the main task branch network predicts the player's skill score, while the auxiliary task branch network outputs the probability distribution of interest tags and sentiment tendency scores respectively; Combine high-level abstract features, player skill scores, interest tag probability distribution, and sentiment tendency scores to generate an initial dynamic user portrait vector. Optimizing network parameters according to a multi-task joint loss function to obtain an optimization result, wherein the multi-task joint loss function is obtained by dynamically weighted summing skill prediction loss, interest classification loss, and sentiment analysis loss; Based on the optimization results, the parameters of the shared fully connected layer, the main task branch network, and the auxiliary task branch network are adjusted through the online update mechanism to update the initial dynamic user portrait vector and obtain the target dynamic user portrait vector.

4. The method according to claim 1, wherein The dual-channel generative adversarial network includes a generator, a discriminator, and a multi-objective loss function. The dynamic user portrait vector is input into the dual-channel generative adversarial network to generate a set of candidate levels, and the initial recommended levels are screened by a playability evaluation algorithm, specifically including: Based on the dynamic user portrait vector, the basic noise is sampled through the standard Gaussian distribution and the noise distribution is modulated to obtain a random noise vector; The dynamic user portrait vector and the random noise vector are concatenated as the generator input, and the candidate level feature matrix is ​​generated through the generator's U-Net structure; Based on the candidate level feature matrix, the discriminator's dual-channel processing module calculates the authenticity probability and playability score respectively. The authenticity probability is obtained by detecting the candidate level feature matrix through the CNN network, and the playability score is obtained by Monte Carlo tree search simulation of player path statistical coverage, path length, and number of loops. Optimizing generator parameters according to a multi-objective loss function, wherein the multi-objective loss function includes an adversarial loss, a diversity constraint, and a difficulty gradient loss; Based on the authenticity probability and playability score, the initial recommended level is determined from the candidate level feature matrix.

5. The method according to claim 1, wherein The method of establishing a dynamic balance model between difficulty and skill, calculating the matching degree between the user's skill score and the level challenge in real time based on the dynamic balance model between difficulty and skill, and dynamically adjusting the level parameters of the initially recommended level based on the matching degree to obtain the first recommended level, specifically includes: Based on the user's historical behavior data, the user's skill score is updated in real time through weighted calculation. The user's historical behavior data includes clearance time, number of failures, and operation accuracy; Calculating an initial challenge level based on level parameters of the initial recommended level, wherein the level parameters include enemy strength, trap density, and resource scarcity; Based on the user's skill score and initial challenge, the current skill-challenge matching is calculated in real time using the matching formula; When the current skill-challenge match is lower than the preset match threshold, the challenge of the subsequent levels will be reduced according to the preset attenuation step. When the current skill-challenge match is higher than the preset match threshold, the challenge will be increased according to the preset enhancement step. The adjusted challenge level is reverse-mapped to specific level parameters to generate the first recommended level.

6. The method according to claim 5, characterized in that The matching degree formula satisfies c t =β1·e str +β2·d trap +β3·(1-r res ) Among them, Score represents the current skill-challenge matching degree, s represents the user skill score, and c t Indicates the dynamic challenge of the current level t, t base Indicates the preset standard clearance time, t pass Indicates the actual clearance time, N fail Indicates the number of failures, a prec represents the operation accuracy, α1, α2 and α3 represent the weight coefficients of clearance time, number of failures and operation accuracy respectively, e str Indicates the enemy strength, d trap represents the trap density, r res represents resource scarcity, β1, β2, and β3 represent the weight coefficients of enemy strength, trap density, and resource scarcity, respectively.

7. The method according to any one of claims 1 to 6, characterized in that The method of dividing users into core players, casual players, and players at risk of churn according to the spectral clustering algorithm to obtain user classification results, and allocating differentiated server computing resources to each player's level generation request based on the user classification results, specifically includes: Collect multi-dimensional user behavior data and construct a behavioral feature vector including login frequency, online time, payment amount, social interaction and churn risk indicators; Based on the behavioral feature vector, the user similarity matrix is ​​calculated using an adaptive Gaussian kernel function, and the similarity metric is optimized in combination with the local scale parameter; Based on the user similarity matrix, the first K eigenvectors are extracted through the eigendecomposition of the normalized Laplace matrix to construct a low-dimensional embedding space; Based on the low-dimensional embedding space, the k-means algorithm is used to divide users into core players, casual players, and players at risk of churn, and obtain user classification results; Based on the user classification results, high-performance computing cluster resources are allocated to level generation requests from core players, elastic resources from edge nodes are allocated to level generation requests from casual players, and bidding instances from the shared resource pool are allocated to level generation requests from players at risk of churn.

8. A game level generation recommendation system, characterized in that: The system specifically includes: The first generation and recommendation module is used to obtain users' explicit interaction data, implicit emotion data, and social graph data through tracking technology to form multimodal data; The second generation recommendation module is used to jointly model multimodal data through a multi-task learning network to generate a dynamic user portrait vector. The main task of the multi-task learning network is to predict the player's skill level, and the auxiliary task of the multi-task learning network is to classify interest tags and analyze emotional tendencies. The third generation and recommendation module is used to input the dynamic user portrait vector into the dual-channel generative adversarial network to generate a set of candidate levels and screen the initial recommended levels through the playability evaluation algorithm; The fourth generation recommendation module is used to establish a difficulty-skill dynamic balance model, calculate the matching degree between the user's skill score and the level challenge in real time based on the difficulty-skill dynamic balance model, and dynamically adjust the level parameters of the initial recommended level based on the matching degree to obtain the first recommended level; The fifth generation recommendation module is used to divide users into core players, casual players and players at risk of churn according to the spectral clustering algorithm, obtain user classification results, and allocate differentiated server computing resources to each player's level generation request based on the user classification results.

9. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory, which, when executed on the processor, implements the game level generation recommendation method according to 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 game level generation recommendation method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Game map recommendation method and device and storage medium

    CN121490402A

  • Method and device for recommending game map, and storage medium

    CN121490402B

  • Mobile game advertisement strategy dynamic optimization method based on dual fatigue model

    CN121810349A

  • Mobile game advertisement strategy dynamic optimization method based on double fatigue degree model

    CN121810349B