A data processing method and system for a game opening animation
Patent Information
- Application Number
- CN202510425691.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2026-10-16
AI Technical Summary
一方面,功能较为单一,大多数只是基于简单的统计数据来选择开场动画,无法深入挖掘玩家的个性化偏好,例如单一地根据玩家的在线时长来决定开场动画,而不能精准预测玩家对不同风格动画的喜好,无法满足玩家日益增长的个性化需求
[0007] The beneficial effects of this invention are as follows: It provides a data processing method and system for game opening animations. Through multi-source data collection, message queue buffering, distributed computing, and machine learning model training, it realizes personalized push of game opening animations based on player data, significantly improves the processing efficiency and accuracy of player data, and can dynamically recommend the most suitable opening animation based on player behavior, consumption, and social data, thereby enhancing the player experience and game appeal.
Smart Images

Figure CN122912478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of game design and development and data processing, and in particular to a data processing method and system for game opening animations. Background Technology
[0002] Existing game opening animation data processing technologies typically employ relatively simple data processing methods. Generally, the same opening animation is shown to all players, or a limited number of opening animations are shown after players are simply categorized based on a small amount of basic data (such as player level, game time, etc.).
[0003] This approach presents numerous technical challenges. Firstly, its functionality is relatively limited, mostly relying on simple statistical data to select opening animations. It fails to delve into players' personalized preferences, such as solely determining the opening animation based on online time, rather than accurately predicting player preferences for different animation styles, thus failing to meet players' growing demand for personalization. Secondly, it suffers from poor scalability. When game genres change or new personalization dimensions need to be added, existing technology struggles to adapt and adjust quickly, failing to adequately fit different game types and limiting the game's application and promotion in various scenarios. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a data processing method and system for game opening animations, which can personalize the game opening animation based on player data, and significantly improve the processing efficiency and accuracy of player data.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A data processing method for a game opening animation, including the following steps: S1. Real-time collection of player behavior data, consumption data, and social data through a multi-source data acquisition module; S2. Use a message queue to buffer the collected data and transmit it in partitions according to preset topics; S3. A distributed computing framework is used to perform parallel computing on the data transmitted between partitions, and the calculated data is stored in a distributed database. S4. Based on transfer learning and reinforcement learning algorithms, train and test the data in the distributed database to obtain a player preference prediction model, and use the player preference prediction model to output an opening animation recommendation list.
[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A data processing system for a game opening animation includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the data processing method for a game opening animation as described above.
[0007] The beneficial effects of this invention are as follows: It provides a data processing method and system for game opening animations. Through multi-source data collection, message queue buffering, distributed computing, and machine learning model training, it realizes personalized push of game opening animations based on player data, significantly improves the processing efficiency and accuracy of player data, and can dynamically recommend the most suitable opening animation based on player behavior, consumption, and social data, thereby enhancing the player experience and game appeal. Attached Figure Description
[0008] Figure 1 This is an overall flowchart of a data processing method for a game opening animation according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a data processing system for a game opening animation according to an embodiment of the present invention.
[0009] Label Explanation: 1. A data processing system for a game opening animation; 2. A memory; 3. A processor. Detailed Implementation
[0010] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0011] Please refer to Figure 1 A data processing method for a game opening animation, comprising the following steps: S1. Real-time collection of player behavior data, consumption data, and social data through a multi-source data acquisition module; S2. Use a message queue to buffer the collected data and transmit it in partitions according to preset topics; S3. A distributed computing framework is used to perform parallel computing on the data transmitted between partitions, and the calculated data is stored in a distributed database. S4. Based on transfer learning and reinforcement learning algorithms, train and test the data in the distributed database to obtain a player preference prediction model, and use the player preference prediction model to output an opening animation recommendation list.
[0012] As can be seen from the above description, the beneficial effects of the present invention are as follows: It provides a data processing method for game opening animations, which realizes personalized push of game opening animations based on player data through multi-source data collection, message queue buffering, distributed computing and machine learning model training, significantly improving the processing efficiency and accuracy of player data, and can dynamically recommend the most matching opening animation based on player behavior, consumption and social data, thereby enhancing the player experience and game attractiveness.
[0013] Further, step S1 specifically includes: S11. Embed a software development kit in the game client, use the software development kit to monitor the player's operation behavior in real time and record the operation frequency and timestamp, and use the software development kit to obtain and record the player's level progress data and dwell time from the game's internal database to obtain the player's behavior data. The operation behavior includes clicking skill operation, swiping skill operation and releasing skill operation. S12. Regularly retrieve player behavior and spending data in the current game and cross-platform games through third-party data analysis platform interfaces; S13. Obtain players' social data by using web crawlers and their preset crawling rules to collect posts, comments, likes, and shares.
[0014] As described above, by using the game client's software development kit, third-party data interfaces, and web crawler technology, multi-dimensional data of players is comprehensively collected. This multi-source data collection method ensures the richness and real-time nature of the data, providing a solid foundation for improving subsequent data processing efficiency and recommending personalized opening animations.
[0015] Further, step S2 specifically includes: S21. Install a message queue cluster on the game server and configure the distributed coordination service and server node parameters of the message queue cluster. The server node parameters include the port number and log storage path. S22. The producer client of the message queue cluster creates different preset topic partitions and sends the collected data to the corresponding topic partitions respectively. The topic partitions include random partitions and partitions divided by player ID.
[0016] As described above, using a message queue cluster to achieve data buffering and partitioned transmission effectively solves the data transmission problem in high-concurrency scenarios; in particular, random partitioning and partitioning by player ID further optimize data transmission efficiency, ensuring the timeliness and reliability of data processing.
[0017] Furthermore, the step between step S2 and step S3 also includes: S23. Clean the collected data, specifically as follows: Consumer clients of the message queue cluster subscribe to the topic partitions and pull the corresponding data. Obtain the data format of the pulled data, assign a corresponding regular expression to the pulled data according to the data format, use the regular expression to validate the pulled data, and if the validation fails, mark or discard the pulled data.
[0018] As described above, the quality of multi-source player data is improved by performing format validation on the collected data. The regular expression format validation method ensures the standardization and accuracy of the data, providing high-quality data input for subsequent data-based analysis and calculation to train the opening animation prediction model.
[0019] Further, step S3 specifically includes: S31. Install a distributed file system on the game server and write the cleaned data into the distributed file system according to the predetermined directory structure; S32. Configure the management node and worker nodes of the distributed computing system on the game server. The management node is used to issue data processing tasks, and the worker nodes are used to execute data processing tasks. S33. Based on the data processing task issued by the management node, read data from the distributed file system and send it in parallel to the corresponding working node, whereby the working node performs data calculations in parallel. S34. After each of the working nodes has finished processing the computing task, an aggregation operation is used to summarize the data on each of the working nodes and store it in the distributed database.
[0020] As described above, using a distributed file system and a distributed computing framework for data processing significantly improves computing efficiency and storage capacity; the division of labor and cooperation between management nodes and worker nodes enables parallel processing of data processing tasks, shortening data processing time.
[0021] Furthermore, step S33 also includes a dynamic load balancing data processing task, specifically: The load metrics of each working node are collected periodically using the operating system's command-line tools or monitoring tools, and the load metrics are stored in the game database. The load metrics include CPU utilization, memory usage, and network bandwidth. When the management node issues a new data processing task, it reads the load index of each working node from the game database, and uses a task scheduling algorithm to allocate the new data processing task to the working node with the lowest load index for execution based on the load status of the load index.
[0022] As described above, the dynamic load balancing algorithm avoids performance bottlenecks caused by overload of some nodes by monitoring node load indicators in real time and allocating tasks accordingly. This intelligent scheduling mechanism significantly improves the stability and resource utilization of the system.
[0023] Further, step S4 specifically includes: S41. Extracting features from the data stored in the distributed database, including: If the data stored in the distributed database is player behavior data, then the operation frequency feature, game duration feature, and level completion rate feature are extracted. If the data stored in the distributed database is the player's consumption data, then the recharge amount feature and consumption frequency feature are extracted; If the data stored in the distributed database is the player's social data, then the features of the number of friends and the frequency of team formation are extracted. S42. Divide the extracted features into training set, validation set and test set according to a preset ratio, and pre-train to obtain the initial prediction model; S43. Obtain an existing prediction model from a cross-game platform and load a weight file using a transfer learning algorithm. Transfer the weight file to the initial prediction model, initialize the model parameters of the initial prediction model, and obtain an initial preference prediction model by verifying and training the initial prediction model. S44. Dynamically adjust and optimize the model parameters of the initial preference prediction model based on the reinforcement learning algorithm to obtain the player preference prediction model; S45. In response to game data update operations or new player login operations, input the features extracted from player behavior data, consumption data and social data into the player preference prediction model, and output the player preference prediction result; S46. Based on the player preference prediction results, match the corresponding opening animation from the game animation resource library and generate a recommended list of opening animations.
[0024] As described above, training the player preference prediction model by combining transfer learning and reinforcement learning algorithms reduces training time and data requirements while enabling dynamic adjustment and optimization of model parameters. Feature extraction and recommendation list generation further improve the accuracy and personalization of the opening animation recommendations.
[0025] Furthermore, step S1 also includes: A homomorphic encryption library is installed on the game server to encrypt the collected data, and a key management system is used to periodically generate new encryption keys, which are then sent to the message queue and the distributed database.
[0026] As described above, the application of homomorphic encryption technology ensures the security of player data during transmission and processing, effectively preventing the risk of data leakage; at the same time, the regular updates of the key management system further enhance data protection capabilities.
[0027] Furthermore, after step S4, the method further includes: S5. Using an adaptive plug-in architecture, select the corresponding opening animation from the game animation resource library based on the opening animation recommendation list, and play the opening animation through the game client push interface.
[0028] As described above, the adaptive plug-in architecture supports the rapid integration of new animation types or data dimensions, improving the system's flexibility and scalability; meanwhile, the game client push interface ensures the smoothness and real-time performance of animation playback.
[0029] Please refer to Figure 2 A data processing system for a game opening animation includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the data processing method for a game opening animation as described above.
[0030] As can be seen from the above description, the beneficial effects of the present invention are as follows: Based on the same technical concept, and in conjunction with the above-mentioned data processing method for game opening animations, a data processing system for game opening animations is provided. Through multi-source data collection, message queue buffering, distributed computing, and machine learning model training, personalized push notifications of game opening animations based on player data are realized, significantly improving the processing efficiency and accuracy of player data. It can dynamically recommend the most suitable opening animation based on player behavior, consumption, and social data, thereby enhancing the player experience and the game's attractiveness.
[0031] The present invention provides a data processing method and system for game opening animations, which is mainly applied in the scenario of generating game opening animations. The following is a detailed description with reference to specific embodiments: Please refer to Figure 1 Embodiment 1 of the present invention is as follows: A data processing method for game opening animation, such as Figure 1 As shown, the steps include: S1. Real-time collection of player behavior data, consumption data, and social data through a multi-source data acquisition module, specifically: S11. Embed the Software Development Kit (SDK) in the game client, use the SDK's API interface to monitor the player's actions in real time and record the frequency and timestamps of the actions, and read the game's internal database through the API interface to obtain and record the player's level progress data and dwell time, thereby obtaining the player's behavior data, including click skill actions, swipe skill actions, and release skill actions.
[0032] S12. Periodically retrieve player behavior and spending data in the current game and cross-platform games through a third-party data analysis platform interface. In this embodiment, the SDK or API interface provided by the third-party platform can be called by signing a data cooperation agreement, and the periodic retrieval of player behavior and spending data in the current game and cross-platform games can be achieved according to the specified interface parameters and request format.
[0033] S13. Use web crawlers and their preset crawling rules to obtain players' posts, comments, likes, and shares to obtain players' social data.
[0034] This involves comprehensively collecting multi-dimensional player data through the game client's SDK, third-party data interfaces, and web crawler technology. This multi-source data collection method ensures the richness and real-time nature of the data, providing a solid foundation for improving subsequent data processing efficiency and recommending personalized opening animations.
[0035] S2. Use a message queue to buffer the collected data and transmit it in partitions according to preset topics.
[0036] S3. A distributed computing framework is used to perform parallel computing on the data transmitted between partitions, and the calculated data is stored in a distributed database.
[0037] S4. Based on transfer learning and reinforcement learning algorithms, train and test the data in the distributed database to obtain a player preference prediction model, and use the player preference prediction model to output the opening animation recommendation list.
[0038] In this embodiment, personalized game opening animations based on player data are achieved through multi-source data collection, message queue buffering, distributed computing, and machine learning model training. This significantly improves the processing efficiency and accuracy of player data and can dynamically recommend the most suitable opening animation based on player behavior, consumption, and social data, thereby enhancing the player experience and game appeal.
[0039] In this embodiment, step S1 further includes: Install a homomorphic encryption library on the game server to encrypt the collected data, and use a key management system to periodically generate new encryption keys, which are then sent to a message queue and a distributed database.
[0040] Specifically, in this embodiment, the homomorphic encryption library can be the SEAL (Simple Encrypted Arithmetic Library), which is a homomorphic encryption library developed by Microsoft Research that allows direct computation on encrypted data without prior decryption. Furthermore, after installing the SEAL library on the game server, its parameters can be further configured, such as the encryption scheme, key length, and polynomial degree.
[0041] Then, during the multi-source data collection phase for players, the encryption interface of the SEAL library is used to encrypt the collected behavioral data, consumption data, and social data. For example, in C++, the Ciphertext class of the SEAL library is used to encrypt sensitive player data; during the model training process in step S4, the homomorphic encryption algorithm provided by the SEAL library is also used to perform matrix operations and other operations on the encrypted data, such as calculating the encrypted weights and input data during the forward and backward propagation of the neural network.
[0042] Similarly, in this embodiment, the partition transmission in step S2 and the parallel data computation processing in step S3 are both performed in an encrypted state.
[0043] In addition, key management systems can use HashiCorp Vault to securely store and manage keys. HashiCorp Vault is a tool for secret management, data encryption, and identity access management (IAM). It is designed to help organizations securely store, manage, and strictly control access to sensitive information such as tokens, passwords, certificates, and API keys, and ensure that all related data and operations can be smoothly switched to the new key when keys are updated.
[0044] In distributed databases, access control lists (ACLs) can be used to implement key access. For example, in the distributed file system HDFS, the `chmod` (Change Mode) and `chown` (Change Owner) commands are used to set access permissions for different users or user groups to data files; similarly, in the distributed NoSQL database Cassandra, the `GRANT` (to grant access permissions to database objects to users or roles) and `REVOKE` (to remove previously granted permissions) statements are used to set access permissions for different roles to tables and data.
[0045] The application of homomorphic encryption technology ensures the security of player data during transmission and processing, effectively preventing the risk of data leakage; at the same time, the regular updates of the key management system further enhance data protection capabilities.
[0046] In addition, in this embodiment, step S4 is followed by: S5. Using an adaptive plug-in architecture, select the corresponding opening animation from the game animation resource library based on the opening animation recommendation list, and play the opening animation through the game client push interface.
[0047] The adaptive plug-in architecture is implemented as follows: Using object-oriented programming principles, design the plugin interface for an animation resource library management system. For example, in Java, define an interface `AnimationPlugin`, which includes methods for loading animations and retrieving animation information. When a new type of animation needs to be added or adapted to a new game, develop corresponding plugin classes that implement the `AnimationPlugin` interface, and then integrate the plugins into the animation resource library management system.
[0048] In terms of animation selection, the adaptive plug-in architecture can predict player preferences and choose the most suitable opening animation from the animation resource library. For example, by querying the index table of the animation resource library, appropriate animations can be selected based on conditions such as predicted scores and animation types.
[0049] Besides the conventional approach of defining interfaces using object-oriented programming principles, the following methods can also be used to implement an adaptive plug-in architecture: 1. Plug-in Implementation Based on Microservice Architecture: The animation resource library management system is broken down into multiple independent microservices, each responsible for specific functions, such as animation loading services and animation information management services. Lightweight communication mechanisms, such as RESTful APIs or message queues (like Kafka), are used to achieve communication and collaboration between microservices. When new types of animations need to be added or new games need to be adapted, new microservice modules are developed, and services are registered and discovered through a registry center (such as Eureka or Consul). The advantage of this approach is that each microservice can be developed, deployed, and extended independently, reducing system coupling and improving development efficiency and system maintainability. For example, when a game needs to support a new 3D animation format, only one microservice specifically handling that format needs to be developed and integrated into the system through the registry center. Other microservices do not need to undergo large-scale modifications to support the new animation type, while improving system scalability and compatibility.
[0050] 2. Implement a dynamic plugin mechanism using scripting languages: Introduce scripting languages (such as Python and Lua) into the system to implement plugin functionality. Provide a specific API for the scripting language to interact with the animation resource library management system. Developers can write script files to implement functions such as loading new animations and retrieving information. When a new type of animation needs to be added or adapted to a new game, the corresponding script plugin is directly written and deployed to the system's designated directory. The system dynamically loads these script plugins at runtime, parses and executes the code within them. This approach offers high flexibility and dynamism, allowing for the rapid addition of new features without recompiling the entire system. For example, during game operation, if a special style of opening animation needs to be added to a specific event, developers can quickly write a Python script plugin to support the new animation, rapidly responding to business needs while reducing development and deployment complexity and improving system adaptability.
[0051] 3. Configuration File-Driven Plugin Architecture: A configuration file-driven plugin architecture is designed, using specific configuration files (such as XML and JSON) to describe plugin functionality, dependencies, and interaction with the animation resource library management system. When adding new animation types or adapting to new games, a new configuration file is created, detailing the plugin's parameters. The system reads the configuration file at startup and loads the corresponding plugin module based on the configuration information. The advantages of this approach are more intuitive and convenient plugin addition and management, requiring less code modification, lowering the technical barrier, and allowing non-technical personnel to participate in plugin configuration and management to some extent. For example, the game operations team can easily add new animation resources, specify their loading methods and related information, and quickly update the game's opening animation content by modifying the JSON configuration file, improving the system's scalability and usability.
[0052] Adaptive plug-in architecture has unique advantages. In the field of game opening animation data processing, it can more efficiently support the addition of new animation types and the adaptation of new games, improve the system's scalability, compatibility and flexibility, provide game developers and operators with more powerful tools, and enhance the game's attractiveness and competitiveness.
[0053] The game client push interface can use network communication protocols (such as TCP / IP) to send relevant information about the selected opening animation (such as the animation file path, playback parameters, etc.) to the game client. After receiving the push information, the game client downloads the animation file from the local cache or server according to the animation file path, and plays the opening animation using the animation playback interface provided by the game engine.
[0054] In this embodiment, the adaptive plug-in architecture supports the rapid integration of new animation types or data dimensions, improving the system's flexibility and scalability; meanwhile, the game client push interface ensures the smoothness and real-time performance of animation playback.
[0055] Embodiment 2 of the present invention is as follows: A data processing method for a game opening animation, based on the above embodiment one, specifically includes step S2 as follows: S21. Install a message queue cluster, such as a Kafka cluster, on the game server, and configure the distributed coordination service (Zookeeper) and server node (broker) parameters of the message queue cluster. The server node parameters include the port number and log storage path.
[0056] S22. The producer client of the message queue cluster creates different topic partitions and sends the collected data to the corresponding topic partitions. The topic partitions include random partitions and partitions by player ID. For example, in Python, the confluent-kafka library is used to write producer code that serializes the collected player behavior data and sends it to the "player_behavior_topic" topic.
[0057] This approach utilizes message queue clusters to buffer and partition data, effectively solving data transmission problems in high-concurrency scenarios. Random partitioning and partitioning by player ID further optimize data transmission efficiency, ensuring the timeliness and reliability of data processing.
[0058] In this embodiment, the step between step S2 and step S3 further includes: S23. Clean the collected data, including format validation and handling of outliers and missing values, specifically as follows: Use a message queue cluster's consumer client to subscribe to topic partitions and pull the corresponding data. For example, in Python, you can use the consumer interface of the confluent-kafka library, configure parameters such as consumer group ID and auto-commit offset, and read data from Kafka.
[0059] The process involves retrieving the data format from the retrieved data, assigning a corresponding regular expression based on the format, and then using the regular expression to validate the retrieved data. If the validation fails, the retrieved data is marked or discarded. For example, for date formats such as "YYYY-MM-DD", the regular expression "^\d{4}-\d{2}-\d{2}" is used for validation. In Python, the `re` module is used for regular expression matching to mark or discard data that does not conform to the format.
[0060] For numerical data, such as players' recharge amounts, outliers are identified and handled using the 3σ principle. First, the mean μ and standard deviation σ of the data are calculated. If a data point x satisfies |x-μ|>3σ, it is determined to be an outlier. For outliers, if the data is obviously erroneous (such as a negative recharge amount), it can be deleted directly; if it may be real but extreme data, it is corrected or marked.
[0061] For numerical data, such as players' game time, if missing values exist, they can be filled using the mean or median, depending on the data distribution. For example, in Python, the `fillna()` method of the pandas library can be used for this purpose. For categorical data, such as players' game device types, if missing values exist, they can be filled using the mode.
[0062] This involves data cleaning of the collected multi-source player data, including format validation, outlier and missing value handling, to improve the quality of the multi-source data. The regular expression format validation method, the 3σ principle outlier handling method, and the missing value handling method of filling in the mean, median or mode ensure the standardization and accuracy of the data, providing high-quality data input for subsequent data-based analysis and calculation to train the opening animation prediction model.
[0063] In this embodiment, step S3 specifically includes: S31. Install the HDFS distributed file system on the game server. Specifically, install the Hadoop Distributed File System on the game server, configure the parameters of the NameNode (responsible for managing the file system namespace) and DataNode (responsible for storing actual data blocks), such as data storage path and number of replicas, and then use the Hadoop Java API or Python's HDFS library to write the cleaned data to HDFS according to the specified directory structure. For example, partition player behavior data by date and store it in the directory " / user / data / cleaned / behavior / year=2024 / month=01 / day=01".
[0064] S32. Install the distributed computing framework Spark on the game server and configure Spark's management node and worker nodes. The management node is responsible for issuing data processing tasks, and the worker nodes are responsible for executing data processing tasks. Set Spark's running parameters, such as memory allocation and parallelism.
[0065] S33. Based on data processing tasks issued by the management node, data is read from the HDFS distributed file system and sent in parallel to the corresponding worker nodes for parallel data computation. For example, in Spark applications, SparkContext or SparkSession is used to read cleaned data from HDFS through the Hadoop file system interface, such as reading CSV format data from HDFS as a DataFrame, and then performing data aggregation, filtering, and other operations.
[0066] S34. After each worker node has completed its computation task, Spark aggregation operations (such as reduceByKey, groupByKey, etc.) are used to summarize the data scattered across the worker nodes and store it in a distributed database (such as Cassandra). In Cassandra, a suitable table structure is designed according to the characteristics of the data, such as partitioning by player ID and storing various types of player data in the corresponding tables. The Java driver of Cassandra or the cassandra-driver library of Python is used for data writing operations.
[0067] This involves using a distributed file system and a distributed computing framework for data processing, which significantly improves computing efficiency and storage capacity. The division of labor and cooperation between management nodes and worker nodes enables parallel processing of data processing tasks, shortening data processing time.
[0068] In this embodiment, the message queue buffer is not simply for distributed data processing. It utilizes the Kafka message queue to send collected data to the corresponding topics according to a specified partitioning strategy. This not only facilitates subsequent distributed processing but also acts as a buffer between data collection and processing, decoupling the data collection and processing processes and improving system stability and scalability. For example, in high-concurrency collection scenarios, Kafka can temporarily store large amounts of data, preventing data loss and allowing subsequent processing modules to process data at their own pace.
[0069] Meanwhile, the message queue buffer is closely related to step S3 below, which stores data in the distributed file system. The message queue buffer is a temporary storage and distribution step after data collection, while storing data in the distributed file system is a step for long-term storage and management after data cleaning. Data in the message queue is written to the distributed file system only after it has been cleaned. The former provides the latter with data to be processed, while the latter performs persistent storage of the processed data.
[0070] Distributed file systems (such as HDFS) store data based on partitions. When data is written to HDFS, it is stored according to a specified directory structure, such as partitioning player behavior data by date and storing it in the directory " / user / data / cleaned / behavior / year=2024 / month=01 / day=01". This partitioned storage method helps improve data storage and retrieval efficiency, facilitating subsequent data analysis and processing. For example, partitioning by date allows for quick location and querying of data within a specific time period, facilitating phased data analysis and providing accurate data support for game operations. Moreover, when dealing with large amounts of data, partitioned storage can reduce the amount of data in a single directory, reducing file management complexity.
[0071] In addition, step S33 also includes a dynamic load balancing data processing task, specifically: Use the operating system's command-line tools (such as top, htop) or monitoring tools (such as Prometheus + Grafana) to periodically collect load metrics from each worker node and store the load metrics in the game database (such as InfluxDB). Load metrics include CPU utilization, memory usage, and network bandwidth.
[0072] When the management node issues a new data processing task, it reads the load metrics of each worker node from the game database. Based on the load metrics, it uses a task scheduling algorithm (such as the least load first algorithm) to assign the new data processing task to the worker node with the lowest load metric for execution. In Spark, this functionality can be achieved through a custom scheduler.
[0073] The dynamic load balancing algorithm avoids performance bottlenecks caused by overload of some nodes by monitoring node load indicators in real time and allocating tasks accordingly. This intelligent scheduling mechanism significantly improves the stability and resource utilization of the system.
[0074] Embodiment 3 of the present invention is as follows: A data processing method for a game opening animation, based on the above-described embodiment two, specifically includes step S4 as follows: S41. Extract features from data stored in a distributed database, including: If the distributed database stores player behavior data, then operation frequency features, game duration features, and level completion rate features are extracted; if the distributed database stores player spending data, then recharge amount features and spending frequency features are extracted; if the distributed database stores player social data, then friend quantity features and team frequency features are extracted. In this embodiment, the pandas and numpy libraries in Python can be used for data feature extraction and organization.
[0075] S42. Divide the extracted features into training, validation, and test sets according to a preset ratio, and pre-train to obtain an initial prediction model. For example, the division can be done using the `train_test_split` function from the scikit-learn library, with the features divided into 70%, 15%, and 15% proportions.
[0076] S43. Obtain existing prediction models from cross-game platforms and load weight files using transfer learning algorithms, then transfer the weight files to the initial prediction model. For example, in the field of image recognition, transfer the parameters of some layers of a pre-trained convolutional neural network (CNN) model to the player preference prediction model. In Python, use deep learning frameworks (such as TensorFlow or PyTorch) to load the weight files of pre-trained models and transfer the corresponding parameters to the new model.
[0077] Then, the model parameters of the initial prediction model are initialized, and the initial preference prediction model is obtained by validating and training the initial prediction model. For example, in a neural network model, the number of neurons in the input and output layers is adjusted to suit the task of predicting player preferences.
[0078] S44. Based on reinforcement learning algorithm, dynamically adjust and optimize the model parameters of the initial preference prediction model to obtain the player preference prediction model.
[0079] Real-time interaction data between players and the game can be used as reward signals. For example, if a player watches the push notification's opening animation and stays for more than a certain threshold, a positive reward is given; if a player skips the animation or immediately closes the game after watching it, a negative reward is given.
[0080] Then, reinforcement learning algorithms (such as policy gradient algorithms) are used to dynamically adjust model parameters based on reward signals through backpropagation. For example, in Python, deep learning frameworks (such as TensorFlow or PyTorch) are used to implement reinforcement learning algorithms to train and optimize the model.
[0081] In this embodiment, the specific process of dynamically adjusting the model parameters using the reinforcement learning algorithm with the policy gradient algorithm combined with the backpropagation algorithm is as follows: 1. Environment and State Definition: The interaction between the player and the game is considered an environment, and the player's behavior and various scene information of the game constitute the environment's state. For example, the player's behavior of watching the opening animation (whether they watch it, the duration of their viewing, etc.), the player's level progress in the game, and the status of item acquisition are all part of the state. Through this state information, the model can perceive the player's current situation in the game.
[0082] 2. Reward Signal Setting: Real-time interaction data between players and the game is used as the reward signal. If a player watches the pushed opening animation and stays for more than a certain threshold, a positive reward is given, indicating that the player has some interest in the opening animation and the model's prediction is relatively accurate. If the player skips the animation or immediately closes the game after watching it, a negative reward is given, indicating that the currently pushed opening animation does not meet the player's preferences. This reward signal setting can directly reflect the player's liking for the opening animation, providing a clear direction for model optimization.
[0083] 3. Policy Gradient Algorithm Execution: The policy gradient algorithm aims to optimize the model's policy, specifically the probability distribution of choosing an action (in this scenario, the action can be understood as choosing the opening animation to be pushed) based on the current state. It adjusts the policy network parameters by calculating the gradient between the action probability output by the policy network and the reward signal. Specifically, based on the current state input to the policy network, the probability distribution of each possible action (different opening animations) is obtained. An action is selected and executed, the resulting reward signal is observed, and then the gradient between the reward signal and the action probability is calculated. This gradient indicates how to adjust the policy network parameters to increase the likelihood of obtaining higher rewards in the future.
[0084] 4. Application of Backpropagation Algorithm: After the policy gradient algorithm calculates the gradient, the backpropagation algorithm is used to propagate the gradient back to each layer of the model. Based on the chain rule, backpropagation calculates the gradient of the model output with respect to each parameter, allowing the model to update its parameters based on these gradients. In a neural network model, starting from the output layer, the gradients of the weights and biases of each layer are calculated progressively based on the gradient obtained from the policy gradient algorithm, and these parameters are updated accordingly. For example, for a multilayer perceptron model, backpropagation will sequentially calculate the gradients of the hidden layers and the input layer, allowing the model to adjust its parameters in a more optimal direction in each iteration, thereby more accurately predicting player preferences.
[0085] Through the above process, the model can continuously learn players' behavior patterns and preferences, dynamically adjust parameters to optimize the opening animation push strategy, improve the accuracy of push notifications, meet players' personalized needs, and enhance players' gaming experience.
[0086] In addition to the above-mentioned method based on policy gradient algorithm combined with backpropagation algorithm, the following methods can also be used to enhance the model: 1. Model Enhancement Based on Evolutionary Algorithms: Introducing evolutionary algorithms, such as genetic algorithms. The model parameters are treated as the genes of an individual, and the model is optimized by simulating selection, crossover, and mutation operations in the natural evolutionary process. First, a set of initial model parameters is randomly generated, forming an initial population. Then, a fitness value is assigned to each individual based on the model's performance in predicting player preferences (e.g., prediction accuracy, degree of matching with actual player behavior). Finally, individuals with high fitness are selected for crossover operations, simulating gene recombination in biological heredity to generate new combinations of model parameters. Simultaneously, mutation operations are performed on some individuals with a certain probability, introducing new genetic features and preventing the algorithm from getting trapped in local optima. After multiple generations of evolution, the model parameters are gradually optimized, improving the model's ability to predict player preferences. The advantages of this approach are that it does not require gradient calculation, has no strict limitations on the model's structure and complexity, can search for optimal solutions in a wider model space, increases model diversity and adaptability, and may discover better solutions that are difficult to find using traditional gradient descent methods. It is particularly suitable for complex, highly nonlinear models.
[0087] 2. Model Reinforcement Based on Multi-Agent Collaboration: Multiple agents are constructed, each representing an independent model or a part of a model. These agents learn and make decisions independently through interaction with the environment, but also optimize overall performance through information sharing and collaboration. For example, one agent focuses on learning players' long-term preferences, while another focuses on short-term behavioral changes. They complement and improve each other by exchanging their learning outcomes (such as learned player preference features and behavioral patterns). When an agent discovers a player's preference in a specific scenario, it can share this information with other agents, allowing them to consider this factor when making predictions. Through this collaborative approach, the model can capture player preference information more comprehensively and accurately, improving the reliability and stability of predictions. Moreover, multi-agent systems have good scalability. When new functions need to be added or new game scenarios need to be adapted, new agents can be easily added without causing excessive impact on the existing system, enhancing the model's flexibility and adaptability.
[0088] In addition, this embodiment provides a specific example of using a reinforcement learning algorithm (policy gradient algorithm) combined with a backpropagation algorithm to dynamically adjust model parameters as follows: 1. Define states, actions, and rewards State: The model collects multi-dimensional player data as state information. This includes not only basic in-game behavioral data (such as the frequency and timestamps of clicks, swipes, and skill releases), level progress, and dwell time, but also information on player experiences and preferences obtained from game community platforms, as well as behavioral and consumption data from third-party data analytics platforms in other related games or applications. This rich state information comprehensively reflects player characteristics and behavioral patterns.
[0089] Action: Action refers to the behavior of the model in selecting and pushing opening animations to the player. The model selects different opening animations from the animation resource library as "actions" for output.
[0090] Rewards: Reward signals are closely related to player and game interactions. If a player watches the push notification's opening animation and stays for more than a certain threshold, a positive reward is given, such as +1 point; if a player skips the animation or immediately closes the game after watching, a negative reward is given, such as -1 point. Reward signals directly reflect the player's preference for the push notification's opening animation, guiding the model to adjust in a direction that better aligns with player preferences.
[0091] 2. Application of the policy gradient algorithm Policy Network: The model constructs a policy network that takes the current state information as input and outputs a probability distribution of choosing different opening animations. For example, the policy network might output that the probability of choosing animation A is 0.3, the probability of choosing animation B is 0.5, and the probability of choosing animation C is 0.2.
[0092] Action selection: Based on the probability distribution output by the policy network, the model randomly selects an opening animation to push to the player. This random selection method allows the model to strike a balance between exploring new animations and utilizing known good choices, avoiding the model getting trapped in local optima too early.
[0093] Gradient Calculation: After the player interacts with the intro animation and receives a reward, the model uses the policy gradient algorithm to calculate the gradient. The core idea of the policy gradient algorithm is to calculate the gradient between the action probability output by the policy network and the reward signal, in order to determine how to adjust the parameters of the policy network to increase the probability of choosing actions that will yield higher rewards in the future. Specifically, based on the action chosen in the current state and its corresponding reward, the gradient with respect to the policy network parameters is calculated using the policy gradient formula. For example, if animation B is chosen and a positive reward is received, the parameters in the policy network related to the probability of choosing animation B will be adjusted in the direction of increasing that probability.
[0094] 3. The role of the backpropagation algorithm Gradient propagation: The backpropagation algorithm, based on the chain rule, propagates the gradient calculated by the policy gradient algorithm from the output layer back to each layer of the model. In the neural network model, the parameters (weights and biases) of each layer are updated according to the backpropagated gradients. For example, starting from the output layer, the gradient of the parameters of the previous layer (hidden layer) is calculated based on the gradient of the output layer parameters obtained by the policy gradient algorithm, and then propagates forward sequentially until the input layer.
[0095] Parameter Update: Based on the gradient obtained from backpropagation, the model updates its parameters using gradient descent or its variants (such as Adagrad, Adadelta, etc.). Taking simple gradient descent as an example, the parameter update formula is: New parameter = Old parameter - Learning rate × Gradient. The learning rate is a hyperparameter that controls the step size of each parameter update, avoiding either too rapid updates leading to model instability or too slow updates leading to low training efficiency. Through continuous backpropagation and parameter updates, the model's parameters are gradually optimized to better fit player preferences.
[0096] 4. Continuous iterative optimization Multiple interactions and updates: As players continue to interact with the game, the model continuously collects new state, action, and reward information, repeatedly performing the policy gradient calculation and backpropagation parameter update process described above. Each update makes the model more adaptable to changes in player preferences, gradually improving the accuracy of the opening animation push.
[0097] Dynamic adjustment and adaptation: This method of dynamically adjusting parameters allows the model to adapt to changes in player behavior in real time. For example, if players show greater interest in a certain type of opening animation over a period of time, the model will increase the probability of pushing such animations by adjusting parameters; conversely, if players gradually lose interest in certain animations, the model will reduce the number of animations pushed accordingly.
[0098] Compared with traditional model training methods, the above-mentioned model parameter adjustment methods can be more closely integrated with the actual feedback of players in the game for optimization, effectively improving the model's prediction accuracy of player preferences.
[0099] S45. In response to game data updates or new player logins, input features extracted from player behavior, spending, and social data into the player preference prediction model and output the player preference prediction results. For example, in Python, the `predict` method of a trained neural network model can be used to predict player preferences.
[0100] S46. Based on the player preference prediction results, match the corresponding opening animation from the game animation resource library and generate a recommended list of opening animations. For example, the top 5 animations can be selected as the recommended list by sorting them from highest to lowest prediction score.
[0101] In this embodiment, the player preference prediction model is trained by combining transfer learning and reinforcement learning algorithms, which reduces training time and data requirements while enabling dynamic adjustment and optimization of model parameters. Feature extraction and recommendation list generation further improve the accuracy and personalization of the opening animation recommendations.
[0102] Please refer to Figure 2 Embodiment four of the present invention is as follows: A data processing system 1 for a game opening animation includes a memory 2, a processor 3, and a computer program stored on the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, it completes the steps in the data processing method for a game opening animation in any of the embodiments 1 to 3 described above.
[0103] In summary, the data processing method and system for game opening animations provided by this invention firstly significantly enhances the player's gaming experience, meets players' personalized needs, and increases players' affinity and loyalty to the game; secondly, by precisely pushing opening animations, it can more effectively attract players' attention, improving the game's attractiveness and retention rate. Furthermore, the comprehensive optimization of data processing efficiency, data security, and system scalability provides solid support for the diversified development of games. Through efficient collection, cleaning, analysis, and mining of large amounts of personalized player data, it enables the pushing of different opening animations to different players. During the data collection phase, multiple data collection channels are used to extensively collect multi-dimensional information such as player behavior data, consumption data, and social data.
[0104] In the data processing stage, in addition to using distributed computing technology to improve processing speed, an intelligent dynamic load balancing algorithm is also introduced. This algorithm can monitor the load of each computing node in real time and automatically distribute data processing tasks to nodes with lighter loads, avoiding reduced processing efficiency due to overload of some nodes, further improving the overall data processing speed, and ensuring that the game's opening animation is pushed out in a very short time, meeting the stringent real-time requirements of the game.
[0105] In terms of machine learning algorithm application, a combination of transfer learning and reinforcement learning is adopted. Transfer learning can transfer the knowledge of models trained in other related games or fields to the current game scene, quickly initialize the player preference model, and reduce training time and data requirements. Reinforcement learning, on the other hand, dynamically adjusts the model parameters based on the real-time interaction feedback between the player and the game, continuously optimizing the prediction of player preferences, so that the opening animation push is more in line with the player's ever-changing preferences.
[0106] To ensure data security, homomorphic encryption technology is used to encrypt the collected player data. Calculations and analysis are performed on the data while it is encrypted, ensuring the security of player data throughout the entire processing, effectively preventing the risk of data leakage, and protecting player privacy.
[0107] Simultaneously, an adaptive plug-in architecture is designed. When the game type changes or new personalized data dimensions need to be added, corresponding plug-ins can be developed and quickly integrated into the existing system without large-scale modifications to the overall architecture. This greatly improves the system's scalability and compatibility, enabling easy adaptation to different types of games and new personalized data dimensions.
[0108] The beneficial effects of this invention are as follows: First, it greatly enhances the player's gaming experience, satisfies players' personalized needs, and increases players' affinity and loyalty to the game. Second, by precisely pushing opening animations, it can more effectively attract players' attention, improving the game's appeal and retention rate. Furthermore, the comprehensive optimization of data processing efficiency, data security, and system scalability provides solid support for the diversified development of games. The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A data processing method for a game opening animation, characterized in that, Including the following steps: S1. Real-time collection of player behavior data, consumption data, and social data through a multi-source data acquisition module; S2. Use a message queue to buffer the collected data and transmit it in partitions according to preset topics; S3. A distributed computing framework is used to perform parallel computing on the data transmitted between partitions, and the calculated data is stored in a distributed database. S4. Based on transfer learning and reinforcement learning algorithms, train and test the data in the distributed database to obtain a player preference prediction model, and use the player preference prediction model to output an opening animation recommendation list.
2. The data processing method for a game opening animation according to claim 1, characterized in that, Step S1 specifically involves: S11. Embed a software development kit in the game client, use the software development kit to monitor the player's operation behavior in real time and record the operation frequency and timestamp, and use the software development kit to obtain and record the player's level progress data and dwell time from the game's internal database to obtain the player's behavior data. The operation behavior includes clicking skill operation, swiping skill operation and releasing skill operation. S12. Regularly retrieve player behavior and spending data in the current game and cross-platform games through third-party data analysis platform interfaces; S13. Obtain players' social data by using web crawlers and their preset crawling rules to collect posts, comments, likes, and shares.
3. The data processing method for a game opening animation according to claim 1, characterized in that, Step S2 specifically involves: S21. Install a message queue cluster on the game server and configure the distributed coordination service and server node parameters of the message queue cluster. The server node parameters include the port number and log storage path. S22. The producer client of the message queue cluster creates different preset topic partitions and sends the collected data to the corresponding topic partitions respectively. The topic partitions include random partitions and partitions divided by player ID.
4. The data processing method for a game opening animation according to claim 3, characterized in that, Between step S2 and step S3, the following is also included: S23. Clean the collected data, specifically as follows: Consumer clients of the message queue cluster subscribe to the topic partitions and pull the corresponding data. Obtain the data format of the pulled data, assign a corresponding regular expression to the pulled data according to the data format, use the regular expression to validate the pulled data, and if the validation fails, mark or discard the pulled data.
5. The data processing method for a game opening animation according to claim 4, characterized in that, Step S3 specifically involves: S31. Install a distributed file system on the game server and write the cleaned data into the distributed file system according to the predetermined directory structure; S32. Configure the management node and worker nodes of the distributed computing system on the game server. The management node is used to issue data processing tasks, and the worker nodes are used to execute data processing tasks. S33. Based on the data processing task issued by the management node, read data from the distributed file system and send it in parallel to the corresponding working node, whereby the working node performs data calculations in parallel. S34. After each of the working nodes has finished processing the computing task, an aggregation operation is used to summarize the data on each of the working nodes and store it in the distributed database.
6. The data processing method for a game opening animation according to claim 5, characterized in that, Step S33 also includes a dynamic load balancing data processing task, specifically: The load metrics of each working node are collected periodically using the operating system's command-line tools or monitoring tools, and the load metrics are stored in the game database. The load metrics include CPU utilization, memory usage, and network bandwidth. When the management node issues a new data processing task, it reads the load index of each working node from the game database, and uses a task scheduling algorithm to allocate the new data processing task to the working node with the lowest load index for execution based on the load status of the load index.
7. The data processing method for a game opening animation according to claim 1, characterized in that, Step S4 specifically involves: S41. Extracting features from the data stored in the distributed database, including: If the data stored in the distributed database is player behavior data, then the operation frequency feature, game duration feature, and level completion rate feature are extracted. If the data stored in the distributed database is the player's consumption data, then the recharge amount feature and consumption frequency feature are extracted; If the data stored in the distributed database is the player's social data, then the features of the number of friends and the frequency of team formation are extracted. S42. Divide the extracted features into training set, validation set and test set according to a preset ratio, and pre-train to obtain the initial prediction model; S43. Obtain an existing prediction model from a cross-game platform and load a weight file using a transfer learning algorithm. Transfer the weight file to the initial prediction model, initialize the model parameters of the initial prediction model, and obtain an initial preference prediction model by verifying and training the initial prediction model. S44. Dynamically adjust and optimize the model parameters of the initial preference prediction model based on the reinforcement learning algorithm to obtain the player preference prediction model; S45. In response to game data update operations or new player login operations, input the features extracted from player behavior data, consumption data and social data into the player preference prediction model, and output the player preference prediction result; S46. Based on the player preference prediction results, match the corresponding opening animation from the game animation resource library and generate a recommended list of opening animations.
8. The data processing method for a game opening animation according to claim 1, characterized in that, Step S1 also includes: A homomorphic encryption library is installed on the game server to encrypt the collected data, and a key management system is used to periodically generate new encryption keys, which are then sent to the message queue and the distributed database.
9. The data processing method for a game opening animation according to claim 7, characterized in that, The process following step S4 also includes: S5. Using an adaptive plug-in architecture, select the corresponding opening animation from the game animation resource library based on the opening animation recommendation list, and play the opening animation through the game client push interface.
10. A data processing system for a game opening animation, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the data processing method for a game opening animation as described in any one of claims 1 to 9.