A method and device for allocating resource data in a game

By collecting high-dimensional data in the game, building behavior prediction models and dynamically adjusting resource allocation strategies, the problem of inefficient allocation of existing game resources is solved, and more efficient and personalized resource allocation is achieved, and player satisfaction and game experience is improved.

CN119318801BActive Publication Date: 2025-03-21CHONGQING YOUNI BETTER NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411394001.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-03-21
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

Existing games are difficult to deal with complex and changeable game environments in terms of resource data allocation, resulting in low resource utilization efficiency, unable to meet the personalized needs of players, and it is difficult to maintain the fairness and sustainability of the game under limited resource conditions.

Method used

By collecting high-dimensional data in the game, using attention mechanism to extract feature data, combining the user-side and the server-side to jointly build a behavior prediction model, dynamically adjust resource allocation strategies based on reward functions, and monitoring the resource allocation effect in real time for iterative optimization.

Benefits of technology

It improves resource utilization efficiency, meets players' personalized needs, maintains the fairness and sustainability of the game, and improves player satisfaction and game experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119318801B_ABST
    Figure CN119318801B_ABST
Patent Text Reader

Abstract

The present invention proposes a method and device for distributing in-game resource data, the method comprising: collecting high-dimensional data and game status data in the game, and extracting feature data from the high-dimensional data using an attention mechanism; jointly building a behavior prediction model based on the user end and the server end, inputting feature data into the behavior prediction model, and obtaining the player's behavior data; using a reward function to calculate the player's reward value based on the game status data and the behavior data; dynamically adjusting the in-game resource allocation strategy according to the reward value; real-time monitoring of the effect of in-game resource allocation, and iteratively optimizing the behavior prediction model according to the monitoring results. The present invention innovatively introduces reward values ​​as a basis for allocation, and achieves precise delivery of in-game resources through sorting and priority setting. This strategy not only improves the efficiency of resource use, but also stimulates the enthusiasm and participation of players, and improves player satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource allocation, and in particular to a method and device for allocating resource data within a game. Background Art

[0002] In the rapidly developing electronic game industry, the management and allocation of in-game resource data is the cornerstone for supporting the game economy, promoting player growth and interaction, and maintaining game balance. These resources, including but not limited to gold coins, experience points, rare equipment, special items, skill points, and character levels, are key elements for players to pursue goals, challenge themselves, and compete and cooperate with other players in the game world.

[0003] However, most current games face many challenges and deficiencies in resource data allocation. First, with the increasing richness of game content and the continuous expansion of the player group, traditional resource allocation mechanisms often find it difficult to cope with complex and changing game environments, resulting in inefficient resource utilization. This inefficiency is not only reflected in the singleness and lack of flexibility of resource allocation, but also in the neglect of players' personalized needs. Secondly, the contradiction between the limited nature of game resources and the unlimited nature of player needs is becoming increasingly prominent. How to meet the diverse needs of players under limited resource conditions while maintaining the fairness and sustainability of the game has become an urgent problem for game developers. Existing resource allocation methods often find it difficult to find the best balance between the two, resulting in serious waste of resources or uneven distribution, which in turn affects the player's gaming experience and the long-term development of the game. In addition, with the continuous advancement of game technology and the continuous improvement of players' requirements for gaming experience, traditional resource allocation mechanisms have been unable to meet the needs of modern games. Players expect to get a more personalized and intelligent resource allocation experience based on their own game style and strategy. However, existing systems often lack sufficient intelligence and dynamism, and cannot respond to changes in player needs in a timely manner, resulting in inefficient resource allocation and reduced player satisfaction. Summary of the invention

[0004] The present invention aims to solve the technical problem of reduced player satisfaction in the prior art, and in particular innovatively proposes a method and device for allocating in-game resource data.

[0005] In order to achieve the above-mentioned object of the present invention, the present invention provides a method for distributing resource data in a game, the method comprising a server end and a user end, the server end and the user end being in communication connection; the method comprising:

[0006] S1. Collect high-dimensional data and game status data in the game, and use the attention mechanism to extract feature data from the high-dimensional data;

[0007] S2, constructing a behavior prediction model based on the user end and the server end, inputting the feature data into the behavior prediction model, and obtaining the player's behavior data;

[0008] S3, based on the game state data and behavior data, using a reward function to calculate the player's reward value;

[0009] S4. Dynamically adjust the allocation strategy of in-game resources according to the reward value;

[0010] S5. Monitor the effect of resource allocation within the game in real time, and iteratively optimize the behavior prediction model according to the monitoring results.

[0011] As an optional embodiment of the present invention, optionally, the reward function is:

[0012]

[0013]

[0014]

[0015]

[0016]

[0017]

[0018] in, Represents the reward value, , , , and All represent weights, Indicates immediate reward, represents long-term rewards, Indicates strategy diversity, Indicates game balance. Indicates that the game goal has been achieved. Indicates The amount of resources obtained by each task, Indicates the weight of the resource. Indicates Number of enemies defeated in each mission, represents the enemy's weight, Indicates The task completion rate of each task, represents the weight of the task, represents the predicted future time step, Indicates The predicted winning rate for time steps is represents the weight of predicting the winning rate, Indicates The resource accumulation rate for each time step, represents the weight of resource accumulation rate, Indicates The risk exposure at each time step is represents the weight of risk exposure, represents the logarithmic function, represents the total number of strategies, No. strategy, Represents a policy set, Indicates The frequency of using a strategy, represents the standard deviation of strength, Win rate difference index, Indicates goals, represents the target set, Indicates The achievement of a goal, Indicates The weight of a target.

[0019] As an optional embodiment of the present invention, optionally, in step S4, dynamically adjusting the allocation strategy of in-game resources according to the reward value includes:

[0020] S401, sorting the reward values, and determining the priority of resource allocation based on the sorting result;

[0021] S402: Allocate game resources to the players based on the priority until the resources are fully allocated or a preset allocation threshold is reached.

[0022] As an optional embodiment of the present invention, optionally, in step S2, jointly building a behavior prediction model based on the user end and the server end includes:

[0023] S201, obtaining the behavior data of the player at the user end;

[0024] S202, establishing a local behavior prediction model, and initializing the local behavior prediction model;

[0025] S203, training the local behavior prediction model using the behavior data, obtaining local parameter information of the local behavior prediction model, and sending the local parameter information to the server;

[0026] S204, the server fuses the local parameter information with the global parameter information of the server to build a behavior prediction model;

[0027] S205, using the cross entropy loss function to evaluate the behavior prediction model, and determining whether the cross entropy loss function has converged;

[0028] If yes, then stop updating the behavior prediction model;

[0029] If not, repeat steps S201 to S204, re-establish the local behavior prediction model according to the newly acquired behavior data of the user-side player, upload the local behavior prediction model parameters to the server for re-aggregation, and re-construct the behavior prediction model until the cross entropy loss function converges;

[0030] S206: Return the behavior prediction model to the user end to predict the player's future behavior.

[0031] As an optional embodiment of the present invention, optionally, the expression of the cross entropy loss function is:

[0032]

[0033] in, represents the loss value, represents the total number of samples, Indicates samples, represents the number of behavior categories, Indicates Behavior categories, Indicates The true value of the samples, Indicates The predicted value of a sample.

[0034] As an optional embodiment of the present invention, optionally, extracting feature data from the high-dimensional data using an attention mechanism in step S1 includes:

[0035] S101, constructing an attention mechanism network model, and initializing the attention mechanism network model;

[0036] S102, inputting the high-dimensional data into the attention mechanism network model, processing the high-dimensional data using the attention mechanism network model, and obtaining key feature data in the high-dimensional data;

[0037] S103: Perform dimensionality reduction processing on the key feature data to obtain feature data.

[0038] As an optional embodiment of the present invention, optionally, iteratively optimizing the behavior prediction model in step S5 includes:

[0039] S501, collecting feedback data from players in the game, and evaluating the behavior prediction model based on the feedback data to obtain an evaluation score;

[0040] S502: Determine whether the evaluation score is within a threshold range;

[0041] If yes, there is no need to optimize the behavior prediction model;

[0042] If not, the behavior prediction model is optimized.

[0043] As an optional embodiment of the present invention, optionally, iteratively optimizing the behavior prediction model in step S5 further includes:

[0044] S503: analyzing the behavior prediction model based on the feedback data, obtaining an optimization target of the behavior prediction model, and adjusting parameters of the behavior prediction model based on the optimization target;

[0045] S504, based on the behavior data of the players in the current time period collected by the user end, the local behavior prediction model of the user end is retrained using the behavior data of the players in the current time period, and steps S202 to S206 are repeated to obtain an optimized behavior prediction model.

[0046] As an optional embodiment of the present invention, optionally, collecting high-dimensional data in the game in step S1 includes:

[0047] S101, obtaining the player's behavior log, transaction data, social interaction data, and game process data;

[0048] S102, standardizing the behavior log, transaction data, social interaction data, and game process data respectively to obtain high-dimensional data.

[0049] The beneficial effects of the present invention are as follows: the present invention collects high-dimensional data in the game and uses the attention mechanism to extract the key features of the data, thereby effectively reducing the complexity of data processing and improving the accuracy of behavior prediction. At the same time, the present invention combines the collaborative work of the user end and the server end to jointly build and optimize the behavior prediction model, ensuring that the model can adapt to the dynamic changes of the players in real time, and providing powerful decision-making support for game operators. In terms of resource allocation strategy, the present invention innovatively introduces reward value as the basis for allocation, and realizes the precise delivery of resources in the game through sorting and priority setting. This strategy not only improves the efficiency of resource utilization, but also stimulates the enthusiasm and participation of players, and improves the satisfaction of players.

[0050] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0052] Figure 1 It is a flow chart of a method for allocating in-game resource data in embodiment 1 of the present invention. DETAILED DESCRIPTION

[0053] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0054] Example 1

[0055] like Figure 1 As shown, a method for distributing resource data in a game, the method comprising a server end and a user end, the server end and the user end being in communication connection; the method comprising:

[0056] S1. Collect high-dimensional data and game status data in the game, and use the attention mechanism to extract feature data from the high-dimensional data;

[0057] It should be noted that when collecting high-dimensional data in the game in step S1, this embodiment fully considers the diversity and integrity of the data. Specifically, the high-dimensional data includes players' behavior logs, transaction data, social interaction data, and game process data. The high-dimensional data of this embodiment can comprehensively characterize the players' behavioral habits. These data undergo strict data cleaning and preprocessing steps, including noise removal, missing value filling, and normalization to ensure the quality and consistency of the data. When using the attention mechanism to extract feature data, this embodiment adopts a multi-level attention network structure. First, the internal dependencies of the data are captured through the self-attention layer to identify key time series features; then, the cross-attention layer is combined with the game state data to further screen out features that are highly correlated with the current game state. The combination of this dual attention mechanism not only enhances the model's ability to capture important information, but also improves the richness and accuracy of feature representation.

[0058] S2, constructing a behavior prediction model based on the user end and the server end, inputting the feature data into the behavior prediction model, and obtaining the player's behavior data;

[0059] It should be noted that when jointly constructing the behavior prediction model in step S2, this embodiment adopts a distributed collaborative learning strategy. The user end collects the real-time behavior data of the player in the game, including operation records, game selection, interaction mode, etc., uses the collected data to build a local behavior prediction model, and trains the local behavior prediction model to obtain the local parameter information of the local behavior prediction model, and then sends the local parameter information of the local behavior prediction model to the server end, and the server then fuses the local parameter information and the global parameter information, and uses the fused data to build a behavior prediction model, and uses the behavior prediction model to predict the player's behavior data in real time; when training the local behavior prediction model, a gradient descent method or other optimization algorithm is used to adjust the parameters of the local behavior prediction model by minimizing the loss function to improve the prediction accuracy of the model. During the training process, the user end continuously inputs new behavior data into the local behavior prediction model for training, and feeds back the training results to the server end, and the server end updates and optimizes the global model based on these feedbacks and global data. This collaborative learning method enables the model to adapt to the player's behavior changes more quickly and improves the real-time and accuracy of the prediction.

[0060] S3, based on the game state data and behavior data, using a reward function to calculate the player's reward value;

[0061] It should be noted that when the reward function is used to calculate the player's reward value in step S3, this embodiment innovatively designs a multi-dimensional and multi-level reward mechanism. This mechanism not only takes into account the player's game performance, such as the number of kills, assists, survival time and other indicators that directly reflect the level of game skills, but also incorporates factors that indirectly affect the game experience, such as instant rewards, strategy diversity, and resource utilization. Specifically, the reward function consists of multiple sub-functions, each of which corresponds to a specific reward dimension. The sub-functions are combined into the final reward function by weighted summation to comprehensively evaluate the player's overall performance.

[0062] In the reward calculation process, the present invention also introduces a dynamic adjustment strategy. That is, as the game progresses and the player's behavior changes, the weight coefficient in the reward function can be dynamically adjusted to adapt to the game needs and goals at different stages. For example, in the early stages of the game, in order to encourage players to actively explore and try, the weight of skill rewards can be relatively high. In addition, in order to ensure the fairness and accuracy of the reward calculation, the present invention also adopts a series of data verification and correction measures. First, by comparing historical data and real-time data, the reward function is verified to ensure its consistency and stability in different game scenarios and player groups. Secondly, for abnormal data or abnormal behavior that may occur, the present invention designs a corresponding filtering and correction mechanism to prevent its interference and influence on the reward calculation. Finally, through this series of measures, the present embodiment realizes accurate and fair calculation of player reward values, providing strong support for subsequent resource allocation.

[0063] S4. Dynamically adjust the allocation strategy of in-game resources according to the reward value;

[0064] It should be noted that when dynamically adjusting the allocation strategy of in-game resources in step S4, this embodiment comprehensively considers factors of multiple dimensions to ensure the accuracy and efficiency of resource delivery. Specifically, the system will intelligently formulate a personalized resource allocation plan based on the player's reward value, combined with its current game status, historical performance and personal preferences. First, the system will analyze the player's reward value in real time to identify high-value players and potential growth players. For high-value players, the system will give priority to allocating rare resources or advanced equipment to further stimulate their enthusiasm and loyalty; for potential growth players, it will provide appropriate guidance and support to help them grow quickly and improve the game experience; secondly, the system will also consider the overall supply and demand of in-game resources. In the case of scarce resources, the system will give priority to ensuring the smooth progress of key tasks and activities to ensure the overall balance and stability of the game. At the same time, optimize the resource allocation process, reduce resource waste and redundancy, and improve the efficiency of resource use. In addition, this embodiment also introduces a feedback mechanism that allows players to provide feedback and evaluation on resource allocation results. The system will collect and analyze these feedback data and continuously optimize the resource allocation strategy to better meet the needs and expectations of players. This dynamically adjusted and continuously optimized resource allocation strategy not only improves player satisfaction and loyalty, but also promotes the long-term development and prosperity of the game.

[0065] S5. Monitor the effect of resource allocation within the game in real time, and iteratively optimize the behavior prediction model according to the monitoring results.

[0066] It should be noted that in step S5, this embodiment pays special attention to the real-time monitoring and feedback loop of the resource allocation effect in the game. In order to ensure the effectiveness and adaptability of the resource allocation strategy, this embodiment uses a monitoring system, which can capture the actual effect of resource allocation in the game in real time, including but not limited to key indicators such as player behavior changes, game activity, and player satisfaction. Specifically, this embodiment uses big data analysis technology to deeply mine and analyze game data to reveal the intrinsic connection between resource allocation strategy and player behavior. By analyzing these data, this embodiment can accurately evaluate the effect of resource allocation strategy and quickly identify possible problems or bottlenecks. Once it is found that the resource allocation strategy has deficiencies or needs to be improved, the iterative optimization process will be started immediately. This process includes but is not limited to retraining the behavior prediction model, optimizing feature selection, and adjusting the reward function. Through continuous iteration and optimization, this embodiment can ensure that the behavior prediction model is always kept in the best state to accurately predict player behavior and optimize the resource allocation strategy. In addition, this embodiment also focuses on interaction and communication with players. By collecting feedback and suggestions from players, it is possible to have a deeper understanding of the needs and expectations of players, thereby providing strong support for the improvement of resource allocation strategy.

[0067] In summary, in the specific application of Example 1, this method can significantly improve the utilization rate of in-game resources and the game experience of players. By collecting rich high-dimensional data and game status data, and using the attention mechanism to extract key features, the accuracy of the behavior prediction model has been greatly improved. Furthermore, based on a multi-dimensional and multi-level reward mechanism, the system can comprehensively evaluate the comprehensive performance of the players and formulate personalized resource allocation plans accordingly. Finally, by dynamically adjusting the resource allocation strategy and optimizing the feedback mechanism, the resources in the game are more accurately and efficiently delivered, and the enthusiasm and participation of the players are also improved.

[0068] As an optional embodiment of the present invention, optionally, the reward function is:

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075] in, Indicates the reward value;

[0076] , , , and All represent weights;

[0077] Indicates immediate reward;

[0078] Indicates long-term rewards;

[0079] Indicates strategic diversity;

[0080] Indicates game balance;

[0081] Indicates that the game goal has been achieved;

[0082] Indicates The amount of resources obtained for each task;

[0083] Indicates the weight of the resource;

[0084] Indicates Number of enemies defeated in each mission;

[0085] Indicates The weight of an enemy;

[0086] Indicates The degree of task completion of each task;

[0087] Indicates the weight of the task;

[0088] represents the future time step of the forecast;

[0089] Indicates Predicted win rate for time steps;

[0090] Represents the weight of the predicted winning rate;

[0091] Indicates The resource accumulation rate for each time step;

[0092] The weight representing the resource accumulation rate;

[0093] Indicates The risk exposure of each time step;

[0094] The weight representing the risk exposure;

[0095] represents the logarithmic function;

[0096] represents the total number of strategies;

[0097] No. strategy;

[0098] Represents a policy set;

[0099] Indicates The frequency of use of each strategy;

[0100] represents the standard deviation of strength;

[0101] Win rate differential index;

[0102] Indicates goals;

[0103] represents the target set;

[0104] Indicates The degree of achievement of the goals;

[0105] Indicates The weight of a target.

[0106] It should be noted that the weight parameter in the above formula is , , , and It can be dynamically adjusted according to the actual game needs and player preferences. For example, if the game designer wants to emphasize immediate feedback and the player's short-term sense of achievement, then (The weight of immediate rewards) can be set relatively high; if the game pursues long-term strategic planning and in-depth experience, then (The weight of long-term rewards) may account for a larger proportion.

[0107] Strategic Diversity The introduction of is to prevent players from using too single or repeated strategies in the game, thereby increasing the fun and challenge of the game. It calculates the frequency of use of each strategy in the strategy set. And the total number of strategies To measure.

[0108] Game Balance It is a key factor in ensuring that all players compete in a fair environment. Game balance Mainly consider the strength standard deviation Win rate difference index To evaluate the strength distribution and win rate differences between players in the game. The larger the strength standard deviation, the more obvious the strength gap between players, which may lead to a situation where the strong are always strong and the weak are always weak, affecting the fairness and playability of the game. Therefore, game designers will try to reduce the strength standard deviation by adjusting the game mechanism, optimizing the matching algorithm, etc., so that players can compete at a similar strength level. Win rate difference index It further measures the difference in winning rates between different strategies or players. If some strategies or players have a high winning rate for a long time, while other strategies or players find it difficult to win, this will lead to the simplification of game strategies and the homogenization of player experience. In order to maintain the diversity and challenge of the game, game designers will pay attention to the winning rate difference index and balance the winning rate differences between different strategies by adjusting the effectiveness of the strategy or adjusting the game parameters. For example, enhance the effect of weak strategies or weaken overly strong strategies to ensure that each strategy can play its role in the appropriate situation, thereby enriching the player's strategy selection and game experience.

[0109] Game goal achieved The evaluation is based on the player's completion of specific goals during the game. These goals include defeating a certain number of enemies, completing specific tasks, reaching a certain game progress, etc. By setting different weights for each goal and achievement , the game system can accurately evaluate the player’s contribution and achievements in the game process.

[0110] In addition, indicators such as resource acquisition, number of enemies defeated, and task completion serve as the basis for task evaluation and directly reflect the player's performance and effort in the game. These indicators not only affect the calculation of immediate rewards, but may also indirectly affect the player's long-term benefits and gaming experience by affecting parameters such as the predicted win rate and resource accumulation in future time steps.

[0111] In summary, this embodiment achieves precise control and optimization of the in-game resource allocation strategy by constructing a complex and sophisticated reward function, taking into account multiple aspects such as immediate rewards, long-term planning, strategy diversity, game balance, and goal achievement. This design not only increases the fun and challenge of the game, but also promotes fair competition and interactive communication among players.

[0112] As an optional embodiment of the present invention, optionally, in step S4, dynamically adjusting the allocation strategy of in-game resources according to the reward value includes:

[0113] S401, sorting the reward values, and determining the priority of resource allocation based on the sorting result;

[0114] It should be noted that in step S401, the sorting process can be performed according to the reward value to ensure that players or strategies with high reward values ​​can obtain game resources first. This priority setting not only motivates players to actively perform, but also promotes the effective use of in-game resources. By dynamically adjusting the resource allocation strategy, the game system can respond to the player's performance and changes in the game environment in real time to maintain the vitality and attractiveness of the game.

[0115] S402: Allocate game resources to the players based on the priority until the resources are fully allocated or a preset allocation threshold is reached.

[0116] It should be noted that in step S402, when allocating resources, the system will also consider the current needs of the players and the staged goals of the game process. For example, in the early stage of the game, players may need more basic resources to build a base or improve the character's ability, so the system will give priority to allocating such resources; in the later stage of the game, as the player's strength increases and the difficulty of the game increases, the system will allocate more advanced resources or special props to support players to carry out more in-depth strategic layout and challenge more difficult tasks. In addition, in order to avoid unfairness in the resource allocation process, the system will also set restrictions (allocation thresholds) and monitoring mechanisms. For example, for some rare resources or high-value props, the system will set an upper limit to prevent individual players from obtaining a large amount of resources through improper means, affecting the balance of the game. At the same time, the system will also monitor the player's game behavior in real time, and will take corresponding punishment measures for violations or cheating to maintain the fairness and healthy ecology of the game. In the process of resource allocation, the system will also make dynamic adjustments based on player feedback and changes in game data. If a resource or strategy is generally popular among players and has significant effects, the system may increase the supply of the resource or improve the effectiveness of the strategy; on the contrary, if a resource or strategy is ignored by players or has poor effects, the system may reduce its supply or make corresponding optimization adjustments. This dynamic adjustment mechanism based on data and player feedback helps ensure that the game is always in the best state and provides players with the best gaming experience.

[0117] In general, this embodiment achieves precise control and optimization of in-game resource allocation by constructing a reward function that comprehensively considers multiple aspects such as immediate rewards, long-term planning, strategy diversity, game balance, and goal achievement, and combines it with a dynamically adjusted in-game resource allocation strategy. This design not only improves the fun and challenge of the game, but also promotes fair competition and interactive communication between players, providing players with a richer and more diverse gaming experience.

[0118] As an optional embodiment of the present invention, optionally, in step S2, jointly building a behavior prediction model based on the user end and the server end includes:

[0119] S201, obtaining the behavior data of the player at the user end;

[0120] It should be noted that the behavior data obtained in step S201 includes but is not limited to the player's operation records, in-game interactions, task completion, resource usage, game time, etc. These data are the basis for building a behavior prediction model. By deeply mining and analyzing these data, we can gain insight into the player's gaming habits, preferences, and potential needs. The behavior data here refers to a continuous sequence of player behavior data over a period of time, covering the various activity trajectories of the player in the game.

[0121] S202, establishing a local behavior prediction model, and initializing the local behavior prediction model;

[0122] It should be noted that the local behavior prediction model established in step S202 predicts the behavior of players at a specific time or situation. The model uses a machine learning algorithm to train and learn the player's past behavior data to identify the player's behavior patterns and rules in different situations. The model initialization process includes setting the initial parameters of the model, selecting a suitable algorithm framework, etc., to ensure that the model can accurately and efficiently make predictions.

[0123] S203, training the local behavior prediction model using the behavior data, obtaining local parameter information of the local behavior prediction model, and sending the local parameter information to the server;

[0124] It should be noted that the training process in step S203 is based on big data and machine learning algorithms. During the training process, the model will continuously try to predict the player's next behavior and compare it with the actual behavior. The model parameters are adjusted through the back propagation algorithm to reduce the prediction error. When the model shows good generalization ability on the validation set, the training process ends, and the local parameter information obtained at this time will be sent to the server for use by the global behavior prediction model.

[0125] S204, the server fuses the local parameter information with the global parameter information of the server to build a behavior prediction model;

[0126] It should be noted that in step S204, the server aggregates and fuses the local parameter information from multiple user terminals, and combines the global parameter information held by the server itself, such as the overall trend of the game, version update content, holiday activities, etc., to jointly build a more comprehensive and accurate behavior prediction model. This process is similar to the integrated learning method in machine learning, which improves the accuracy and robustness of the overall prediction by combining the prediction results of multiple local behavior prediction models. The constructed behavior prediction model can more accurately predict the behavior of players in different situations, including but not limited to task selection, resource acquisition, combat strategy, etc. This prediction capability not only helps the game system to better understand and meet the needs of players, but also provides strong support for resource allocation, advertising push, event planning, etc. in the game. In addition, the server will regularly receive new behavior data from the user terminal to update and optimize the behavior prediction model. With the continuous changes in player behavior and the continuous updating of game content, the behavior prediction model also needs to continuously learn and evolve to maintain the accuracy and effectiveness of its prediction. This continuous iteration mechanism ensures that the game system can always keep up with the needs of players and changes in the game environment, and provide players with a more high-quality and personalized game experience.

[0127] S205, using the cross entropy loss function to evaluate the behavior prediction model, and determining whether the cross entropy loss function has converged;

[0128] If yes, then stop updating the behavior prediction model;

[0129] If not, repeat steps S201 to S204, re-establish the local behavior prediction model according to the newly acquired behavior data of the user-side player, upload the local behavior prediction model parameters to the server for re-aggregation, and re-construct the behavior prediction model until the cross entropy loss function converges;

[0130] It should be noted that in step S205, this embodiment uses the cross entropy loss function as a criterion for evaluating the performance of the behavior prediction model. The cross entropy loss function is a method for measuring the difference between the predicted probability distribution and the true probability distribution. The smaller its value, the more accurate the model prediction. Through continuous iteration and optimization, this embodiment expects that the cross entropy loss function can gradually converge to a lower value, which indicates that the behavior prediction model of this embodiment has high prediction accuracy and stability. When judging whether the cross entropy loss function converges, this embodiment will set a reasonable threshold or observe its changing trend. If the value of the loss function still fluctuates greatly or fails to decrease significantly after multiple iterations, it is considered that the model has not converged and needs to continue to be optimized. On the contrary, if the value of the loss function tends to be stable after multiple iterations and is lower than the set threshold, it is considered that the model has converged, and the update can be stopped and put into practical application.

[0131] S206: Return the behavior prediction model to the user end to predict the player's future behavior.

[0132] Once the behavior prediction model reaches a convergence state, this embodiment applies it to the game system to achieve more accurate and personalized resource allocation, advertising push and activity planning. By predicting the player's behavior patterns and needs, it is possible to provide players with game content and services that are more in line with their interests and preferences, thereby improving player satisfaction and loyalty.

[0133] As an optional embodiment of the present invention, optionally, the expression of the cross entropy loss function is:

[0134]

[0135] in, represents the loss value;

[0136] represents the total number of samples;

[0137] Indicates samples;

[0138] Indicates the number of behavior categories;

[0139] Indicates Behavior categories;

[0140] Indicates The true value of samples;

[0141] Indicates The predicted value of a sample.

[0142] As an optional embodiment of the present invention, optionally, extracting feature data from the high-dimensional data using an attention mechanism in step S1 includes:

[0143] S101, constructing an attention mechanism network model, and initializing the attention mechanism network model;

[0144] It should be noted that the construction and initialization of the attention mechanism network model in step S101 is an important step in extracting key features from high-dimensional data. In this process, the present embodiment first needs to select a suitable attention mechanism network architecture, which can effectively capture and strengthen the key information in the data while suppressing irrelevant information. Common attention mechanisms include self-attention and multi-head attention. After the attention mechanism network model is constructed, it needs to be initialized. Initialization is a key link in neural network training, which determines the starting point and convergence speed of model training. Reasonable initialization strategy can accelerate the convergence of the model and improve the performance of the model. Common initialization methods include random initialization, pre-training initialization, etc. In this embodiment, a suitable initialization method can be selected according to the specific application scenario and data characteristics.

[0145] S102, inputting the high-dimensional data into the attention mechanism network model, processing the high-dimensional data using the attention mechanism network model, and obtaining key feature data in the high-dimensional data;

[0146] It should be noted that in step S102, after initialization, the attention mechanism network model is ready for the task of feature extraction. During the feature extraction process, the model will use the attention mechanism to automatically identify and focus on the key features in the data, which are usually closely related to the player's behavior patterns and preferences. Through this process, feature representations useful for behavior prediction can be extracted from high-dimensional data, providing strong support for subsequent behavior prediction model training. It should be emphasized that the construction and initialization of the attention mechanism network model is only the first step in feature extraction. In practical applications, it is also necessary to continuously adjust and optimize the network structure and parameter settings according to the specific situation of the data and the performance of the model to further improve the effect of feature extraction and the performance of the prediction model. At the same time, it is also necessary to prevent the occurrence of problems such as overfitting and underfitting to ensure that the model has good generalization ability and robustness.

[0147] S103: Perform dimensionality reduction processing on the key feature data to obtain feature data.

[0148] It should be noted that in step S103, since directly processing high-dimensional data will lead to computational complexity and overfitting problems, after extracting the key feature data, this embodiment further performs dimensionality reduction processing. Dimensionality reduction is a commonly used technique in data preprocessing, which aims to reduce the dimension of the data, reduce the amount of calculation, and retain important information in the data as much as possible. In the process of dimensionality reduction of feature data, this embodiment adopts a variety of methods, including but not limited to principal component analysis (PCA), linear discriminant analysis (LDA), and autoencoder in deep learning. The feature data after dimensionality reduction not only reduces the computational complexity, but also helps to improve the generalization ability and robustness of the behavior prediction model. In the subsequent behavior prediction model training, these dimensionality-reduced feature data will be used as input to learn the mapping relationship between player behavior patterns and prediction results.

[0149] As an optional embodiment of the present invention, optionally, iteratively optimizing the behavior prediction model in step S5 includes:

[0150] S501, collecting feedback data from players in the game, and evaluating the behavior prediction model based on the feedback data to obtain an evaluation score;

[0151] It should be noted that in step S501, in order to continuously improve the accuracy and adaptability of the behavior prediction model, this embodiment dynamically evaluates the model by collecting real-time feedback data from players during the game. This embodiment uses evaluation indicators such as recall, precision, and F1 score to comprehensively measure the performance of the model in predicting player behavior. Specifically, the recall rate reflects the proportion of players' actual behaviors that the model can correctly predict, while the precision rate measures the accuracy of the model's prediction, that is, the proportion of samples predicted as positive examples that are actually positive examples. The F1 score is the harmonic average of the recall rate and the precision rate, which comprehensively considers the importance of both. The behavior prediction model is comprehensively evaluated based on the recall rate, precision rate, and F1 score to obtain an evaluation score.

[0152] S502: Determine whether the evaluation score is within a threshold range;

[0153] If yes, there is no need to optimize the behavior prediction model;

[0154] If not, the behavior prediction model is optimized.

[0155] It should be noted that in step S502, this embodiment determines whether the performance of the behavior prediction model meets the requirements by setting a reasonable evaluation score threshold. If the evaluation score is within the threshold range, it means that the performance of the model has reached or exceeded the expected target, and no further optimization is required at this time. This helps to save computing resources and time costs and improve the efficiency of model application. However, if the evaluation score is not within the threshold range, it means that the performance of the model needs to be improved, and the model needs to be optimized at this time. The optimization process of this embodiment includes reconstructing the local behavior prediction model at the user end, retraining the local behavior prediction model, and sending the retrained local behavior prediction model parameters to the server end, and the server end retrains the behavior prediction model until the behavior prediction model meets expectations; it is also possible to adjust the model structure, optimize parameter settings, increase the amount of training data, and other strategies to improve the prediction accuracy and generalization ability of the model. When optimizing the behavior prediction model, this embodiment can also adopt a variety of strategies. First, you can try to adjust the hyperparameters of the model, such as learning rate, batch size, number of iterations, etc., to find a better combination of parameters. Secondly, you can consider introducing regularization terms to prevent overfitting, such as L1 regularization, L2 regularization, or Dropout. In addition, you can also try to use different optimization algorithms, such as stochastic gradient descent (SGD), Adam, etc., to find an optimization method that is more suitable for the current data set. At the same time, increasing the amount of training data is also an effective way to improve model performance, which can be achieved through data enhancement, collecting more diverse samples, etc.

[0156] It is worth noting that during the optimization process, it is necessary to continuously monitor the performance changes of the model to ensure that the optimization direction is correct and effective. The performance of the model on different data sets can be evaluated through methods such as cross-validation to gain a more comprehensive understanding of the performance of the model. In addition, it is also necessary to avoid falling into the local optimal solution. You can try to use different initialization methods, change the model structure, or introduce new features to jump out of the local optimal solution and find the global optimal solution.

[0157] Finally, the optimized behavior prediction model needs to be evaluated and verified again to ensure that its performance has been significantly improved. The evaluation process can repeat the above steps S501 and S502, using the same evaluation indicators and thresholds to determine whether the performance of the model meets the requirements. If the evaluation score is still not within the threshold range, it is necessary to continue the optimization iteration; if the evaluation score has reached or exceeded the threshold range, it means that the model has been optimized and can be applied to actual game behavior prediction.

[0158] As an optional embodiment of the present invention, optionally, iteratively optimizing the behavior prediction model in step S5 further includes:

[0159] S503: analyzing the behavior prediction model based on the feedback data, obtaining an optimization target of the behavior prediction model, and adjusting parameters of the behavior prediction model based on the optimization target;

[0160] It should be noted that in step S503, this embodiment not only focuses on the evaluation score of the model, but also deeply analyzes the player feedback data to identify potential problem points and optimization space in the behavior prediction model. By analyzing the difference between the actual behavior pattern of the player and the model prediction result, it is possible to more accurately locate in which specific scenarios the model performs poorly, thereby establishing specific optimization goals. After clarifying the optimization goal, this embodiment specifically adjusts the parameters of the behavior prediction model. These parameters include weights and biases in the neural network, etc. Adjusting these parameters is intended to make the model better adapt to the data distribution and improve its prediction accuracy in specific scenarios.

[0161] In addition, the model is improved by combining domain knowledge. For example, if the model performs poorly in predicting player purchase behavior, more features related to player purchase decisions can be considered, such as historical purchase records, in-game virtual item holdings, and players' social interactions in the game. These features help the model to more comprehensively understand players' purchase motivations and behavior patterns.

[0162] In addition to parameter adjustment and feature optimization, we also explore different model architectures or algorithms to further improve the performance of the behavior prediction model. For example, we can try to integrate multiple machine learning algorithms and use their respective advantages to improve the accuracy of the overall prediction. Alternatively, we can try to use more advanced deep learning models, such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), etc., to better capture the time series characteristics of player behavior.

[0163] In summary, in the process of iteratively optimizing the behavior prediction model in step S5, this embodiment comprehensively considers multiple aspects such as model evaluation, parameter adjustment, feature optimization, and algorithm improvement. Through continuous trial and error and adjustment, the behavior prediction model is intended to more accurately predict the player's behavior pattern and provide more valuable decision support for game operators.

[0164] S504, based on the behavior data of the players in the current time period collected by the user end, the local behavior prediction model of the user end is retrained using the behavior data of the players in the current time period, and steps S202 to S206 are repeated to obtain an optimized behavior prediction model.

[0165] It should be noted that in step S504, this embodiment emphasizes the importance of continuous optimization and real-time adaptation. In the dynamic environment of the game, the behavior patterns of players may change over time, version updates, promotion activities and other factors. Therefore, relying solely on one-time model optimization is not enough to cope with these changes. In order to maintain the accuracy and timeliness of the behavior prediction model, this embodiment proposes an iterative training strategy based on real-time data feedback from the user end.

[0166] In step S504, the local behavior prediction model is retrained using the player behavior data of the current time period collected in real time by the user end. The advantage of this is that new trends and new patterns of player behavior can be captured in a timely manner, so that the model can be quickly adjusted to adapt to these changes. The retraining process can follow the same steps as before (S202 to S206). Through this cyclic process, the model can be continuously fine-tuned and optimized to maintain the continuous improvement of its prediction performance. In addition, this embodiment also emphasizes the collaborative work between the user end and the server end. The user end is responsible for real-time collection and pre-processing of player behavior data, and sending these data to the server end for further analysis and training. The server end is responsible for performing complex model training and optimization tasks, and sending the optimized model parameters back to the user end for updating. This collaborative working mode not only improves the efficiency of data processing, but also realizes real-time updating and iterative optimization of the model.

[0167] It is worth noting that in the process of real-time data-driven iterative model optimization, attention should also be paid to data privacy and security issues. In order to ensure that players' personal data is not leaked or abused, strict data encryption and access control measures need to be taken. At the same time, relevant security standards and specifications must also be followed during data transmission and storage.

[0168] As an optional embodiment of the present invention, optionally, collecting high-dimensional data in the game in step S1 includes:

[0169] S101, obtaining the player's behavior log, transaction data, social interaction data, and game process data;

[0170] S102, standardizing the behavior log, transaction data, social interaction data, and game process data respectively to obtain high-dimensional data.

[0171] Example 2

[0172] A computer device comprising:

[0173] processor;

[0174] a memory for storing processor-executable instructions;

[0175] Wherein, the processor is configured to implement a method for allocating in-game resource data in Example 1 when executing the executable instructions.

[0176] It should be noted that the computer device includes: a processor, a memory, and the computer device may also include one or more of a multimedia component, an input / output (I / O) interface, and a communication component.

[0177] Among them, the processor is used to control the overall operation of the computer device to complete all or part of the steps in the above-mentioned big data-based factory equipment automated testing method.

[0178] The memory is used to store various types of data to support operations on the computer device, which data may include, for example, instructions for any application or method operating on the computer device, as well as application-related data; the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0179] The multimedia component may include a screen and an audio component, wherein the screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals; for example, the audio component may include a microphone for receiving external audio signals, and the received audio signals may be further stored in a memory or sent via a communication component; the audio component also includes at least one speaker for outputting audio signals.

[0180] The I / O interface provides an interface between the processor and other interface modules, which may be a keyboard, a mouse, buttons, etc.; these buttons may be virtual buttons or physical buttons.

[0181] The communication component is used for wired or wireless communication between the computer device and other devices; wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G or 5G, or a combination of one or more of them, so the corresponding communication component may include: Wi-Fi module, Bluetooth module, NFC module, mobile phone communication module.

[0182] As a preferred solution of this embodiment, the computer device can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned big data-based factory equipment automation testing method.

[0183] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A method for distributing resource data in a game, the method comprising a server end and a user end, the server end and the user end being in communication connection; characterized in that: The method comprises: S1. Collect high-dimensional data and game status data in the game, and use the attention mechanism to extract feature data from the high-dimensional data; S2, constructing a behavior prediction model based on the player behavior data of the user end and the server end, inputting the feature data into the behavior prediction model, and obtaining the player's behavior data; S3, based on the game state data and behavior data, using a reward function to calculate the player's reward value; S4. Dynamically adjust the allocation strategy of in-game resources according to the reward value; S5. Monitor the effect of resource allocation in the game in real time, and iteratively optimize the behavior prediction model according to the monitoring results; Collecting high-dimensional data in the game in step S1 includes: S101, obtaining the player's behavior log, transaction data, social interaction data, and game process data; S102, standardizing the behavior log, transaction data, social interaction data, and game process data respectively to obtain high-dimensional data; Extracting feature data from the high-dimensional data using the attention mechanism in step S1 includes: S101, constructing an attention mechanism network model, and initializing the attention mechanism network model; S102, inputting the high-dimensional data into the attention mechanism network model, processing the high-dimensional data using the attention mechanism network model, and obtaining key feature data in the high-dimensional data; S103: Perform dimensionality reduction processing on the key feature data to obtain feature data.

2. A method for allocating in-game resource data as claimed in claim 1, characterized in that: The reward function is: in, Represents the reward value, , , , and All represent weights, Indicates immediate reward, represents long-term rewards, Indicates strategy diversity, Indicates game balance. Indicates that the game goal has been achieved. Indicates The amount of resources obtained by each task, Indicates the weight of the resource. Indicates Number of enemies defeated in each mission, represents the enemy's weight, Indicates The task completion rate of each task, represents the weight of the task, represents the predicted future time step, Indicates The predicted winning rate for time steps is represents the weight of predicting the winning rate, Indicates The resource accumulation rate for each time step, represents the weight of resource accumulation rate, Indicates The risk exposure at each time step is represents the weight of risk exposure, represents the logarithmic function, represents the total number of strategies, No. strategy, Represents a policy set, Indicates The frequency of using a strategy, represents the standard deviation of strength, Win rate difference index, Indicates goals, represents the target set, Indicates The degree of achievement of a goal, Indicates The weight of a target.

3. A method for allocating in-game resource data as claimed in claim 2, characterized in that: In step S4, dynamically adjusting the allocation strategy of in-game resources according to the reward value includes: S401, sorting the reward values, and determining the priority of resource allocation based on the sorting result; S402: Allocate game resources to the players based on the priority until the resources are fully allocated or a preset allocation threshold is reached.

4. A method for allocating in-game resource data as claimed in claim 1, characterized in that: In step S2, constructing a behavior prediction model based on the user end and the server end includes: S201, obtaining the behavior data of the player at the user end; S202, establishing a local behavior prediction model, and initializing the local behavior prediction model; S203, training the local behavior prediction model using the behavior data, obtaining local parameter information of the local behavior prediction model, and sending the local parameter information to the server; S204, the server fuses the local parameter information with the global parameter information of the server to build a behavior prediction model; S205, using the cross entropy loss function to evaluate the behavior prediction model, and determining whether the cross entropy loss function has converged; If yes, then stop updating the behavior prediction model; If not, repeat steps S201 to S204, re-establish the local behavior prediction model according to the newly acquired behavior data of the user-side player, upload the local behavior prediction model parameters to the server for re-aggregation, and re-construct the behavior prediction model until the cross entropy loss function converges; S206: Return the behavior prediction model to the user end to predict the player's future behavior.

5. A method for allocating in-game resource data as claimed in claim 4, characterized in that: The expression of the cross entropy loss function is: in, represents the loss value, represents the total number of samples, Indicates samples, represents the number of behavior categories, Indicates Behavior categories, Indicates The true value of the samples, Indicates The predicted value of a sample.

6. A method for allocating in-game resource data as claimed in claim 4, characterized in that: In step S5, iteratively optimizing the behavior prediction model includes: S501, collecting feedback data from players in the game, and evaluating the behavior prediction model based on the feedback data to obtain an evaluation score; S502: Determine whether the evaluation score is within a threshold range; If yes, there is no need to optimize the behavior prediction model; If not, the behavior prediction model is optimized.

7. A method for allocating in-game resource data as claimed in claim 6, characterized in that: The iterative optimization of the behavior prediction model in step S5 further includes: S503: analyzing the behavior prediction model based on the feedback data, obtaining an optimization target of the behavior prediction model, and adjusting parameters of the behavior prediction model based on the optimization target; S504, based on the behavior data of the players in the current time period collected by the user end, the local behavior prediction model of the user end is retrained using the behavior data of the players in the current time period, and steps S202 to S206 are repeated to obtain an optimized behavior prediction model.

8. A computer device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement a method for allocating in-game resource data as described in any one of claims 1 to 7 when executing the executable instructions.

Citation Information

Patent Citations

  • Machine learning driven resource allocation

    CN111249724A

  • Game prop display method and device, storage medium and computer equipment

    CN118179019A