Game concurrent processing method and system based on distributed architecture

By combining deep learning and consistent hashing algorithms with multi-level state synchronization strategies, we solve the concurrency conflicts and load balancing problems in distributed gaming environments, achieving efficient concurrent game processing and a stable gaming experience.

CN120762902APending Publication Date: 2025-10-10SUZHOU TANGREN DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510909624.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Existing game concurrency processing solutions based on distributed architecture perform poorly in terms of state consistency, concurrency conflict handling, and dynamic load balancing. They are unable to cope with high concurrency challenges, resulting in response delays, service crashes, and data consistency issues.

Method used

Through deep learning neural networks, the concurrent load peak in the future time window is predicted, the processing capacity weight matrix of distributed nodes is dynamically calculated, the consistent hashing algorithm is used to distribute game instances, and a multi-level state synchronization strategy and conflict detection rule base are adopted, combined with health monitoring and failover mechanisms to achieve load balancing and state consistency.

Benefits of technology

It improves the system's concurrent processing capabilities, reduces the average response time of game operations, reduces game lag, improves system availability and resource utilization, reduces hardware costs, and ensures the stability and efficiency of game services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762902A_ABST
    Figure CN120762902A_ABST
Patent Text Reader

Abstract

The invention provides a game concurrent processing method and system based on a distributed architecture. The method comprises the steps that a load prediction result is obtained based on historical game data and real-time player behaviors; calculating a processing capability weight matrix of each distributed node according to a result, and distributing game instances; extracting state data needing cross-node synchronization in the game instance; a multi-level state synchronization strategy is adopted according to the conflict risk and the business importance of the data; when a plurality of nodes modify the same state data, a solution strategy is adopted according to the hierarchy and the conflict type; a conflict resolution result is propagated through incremental updating, and state consistency is ensured; monitoring node performance, triggering a failover mechanism, and preferentially recovering core state data; a resource allocation strategy is dynamically adjusted, player operation is predicted, and data preloading is carried out in advance; a cross-node resource sharing pool is established, and resources are dynamically balanced. According to the method, the key technical problems of state consistency, concurrent conflict processing, dynamic load balancing and the like in a distributed game environment are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, and in particular to a game concurrent processing method and system based on a distributed architecture. Background Art

[0002] With the exponential growth of online game users, traditional single-server architectures face severe challenges in high concurrency. When dealing with millions of concurrent players, single-node servers are prone to response delays, service crashes, and data consistency issues. To overcome these shortcomings, distributed architectures, leveraging multi-node collaboration and dynamic resource scheduling, have become a core solution for the gaming industry. However, existing concurrent game processing solutions based on distributed architectures have not performed well in terms of state consistency, concurrency conflict resolution, and dynamic load balancing. Summary of the Invention

[0003] Based on the above problems, the present invention proposes a game concurrency processing method and system based on a distributed architecture. Through the present invention, a higher number of concurrent players than traditional solutions can be handled while maintaining a stable gaming experience; the average response time of game operations can be reduced, and the game freeze phenomenon caused by concurrency conflicts can be effectively reduced; the system availability can be improved, the recovery time of single point failures can be shortened, and the stability of game services can be greatly improved; the overall system resource utilization can be improved, and hardware costs can be reduced while improving service quality; and key technical problems such as state consistency, concurrency conflict processing and dynamic load balancing in a distributed gaming environment can be solved.

[0004] In view of this, one aspect of the present invention proposes a game concurrent processing method based on a distributed architecture, comprising:

[0005] Based on historical game data and real-time player behavior patterns, a deep learning neural network is used to predict the concurrent load peak in the future time window to obtain load prediction results.

[0006] Dynamically calculating the processing capacity weight matrix of each distributed node based on the load prediction result;

[0007] Based on the weight matrix, a consistent hashing algorithm is used to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead;

[0008] Based on the game instances assigned to each distributed node, identify and extract the state data that needs to be synchronized across nodes in each game instance, including player attributes, game object status, and scene environment information;

[0009] Based on the conflict risk and business importance of the state data in concurrent processing, it is divided into three synchronization levels: core state layer, interaction state layer, and environment state layer. A multi-level state synchronization strategy is adopted based on the characteristics of data at different levels and node distribution;

[0010] Based on the synchronization process of status data at different levels, a targeted conflict detection rule base is established;

[0011] When multiple distributed nodes modify the same state data at the same time, the corresponding resolution strategy is adopted according to the data level and conflict type;

[0012] Propagate the conflict resolution result to the first distributed node through incremental updates according to the multi-level state synchronization strategy, thereby ensuring state consistency and reducing network transmission overhead;

[0013] Establish a health monitoring system for distributed nodes to monitor the response time, error rate, and resource usage of each node in real time;

[0014] When a node failure or severe performance degradation is detected, the failover mechanism is triggered, including: first migrating the game instance on the failed node to the backup node, and then recovering the data through state snapshots and operation logs;

[0015] Adopt a progressive state reconstruction strategy, prioritize restoring the core state layer data, and then gradually restore the interactive state layer and environment state layer data to ensure rapid recovery of game services;

[0016] Dynamically adjust the resource allocation strategy of each node based on the complexity of the game scene and the density of players;

[0017] Analyze players' gaming behavior patterns through machine learning algorithms, predict players' next actions, and preload and preprocess data in advance;

[0018] Establish a cross-node resource sharing pool. When a node is short of resources, it can borrow idle resources from other nodes to achieve dynamic balance of resources.

[0019] Optionally, the step of predicting the concurrent load peak in a future time window by using a deep learning neural network based on historical game data and real-time player behavior patterns to obtain a load prediction result adopts an adaptive time-decay load prediction model, specifically including:

[0020] A load prediction model is established by analyzing historical game data through a multi-dimensional time series feature extraction algorithm. The load prediction value at the future time t is calculated using the following formula:

[0021]

[0022] Where the adaptive time weight function is:

[0023]

[0024] The dynamic behavior weight adjustment function is:

[0025]

[0026] Optionally, in the multi-level state synchronization strategy, a state layering weight dynamic adjustment algorithm based on information entropy is adopted, specifically including:

[0027] According to the change frequency and importance of the game state data, the synchronization priority weight of each level is dynamically calculated, and adjusted through the following information entropy weight formula:

[0028]

[0029] Wherein the weighted information entropy calculation formula of the key state layer is:

[0030]

[0031] The context correlation weight calculation is:

[0032]

[0033] The prediction accuracy adjustment factor is:

[0034]

[0035] Optionally, in the synchronization process based on different level state data, the step of establishing a targeted conflict detection rule library adopts a conflict risk assessment model based on fuzzy logic, specifically including:

[0036] A multi-dimensional conflict risk assessment system is established, and the risk level of the conflict operation is calculated through a fuzzy comprehensive evaluation method. The risk assessment value is calculated through the following formula:

[0037]

[0038] Wherein the time decay function of the conflict urgency is:

[0039]

[0040] The dynamic conflict weight adjustment factor is:

[0041]

[0042] The historical conflict experience weight is:

[0043]

[0044] The cross-level conflict correlation is:

[0045]

[0046] Optionally, the step of dynamically calculating a processing capability weight matrix of each distributed node according to the load prediction result includes:

[0047] Perform real-time performance monitoring on each distributed node in the cluster, collect basic performance indicators including node CPU utilization, memory usage, network latency, and geographic location coordinates, and cache and store these basic performance indicators according to a preset time window to provide a data basis for subsequent weight calculations;

[0048] Normalizing the collected basic performance indicators of each node to eliminate numerical differences between indicators of different dimensions, and setting a dynamic threshold range for each basic performance indicator based on the expected load intensity in the load forecast result to ensure accuracy and consistency of weight calculation, thereby obtaining a first performance indicator;

[0049] Based on the first performance indicator and in combination with the load distribution characteristics in the load forecast result, a comprehensive processing capacity weight is calculated for each node, and the importance ratio of CPU, memory, network and geographical location factors is dynamically adjusted according to the type and intensity of the predicted load during the weight calculation process;

[0050] The comprehensive processing capacity weights of each node are constructed into a distributed processing capacity weight matrix, and the weight matrix is ​​optimized and adjusted in the time dimension according to the time distribution characteristics of the load forecast results to ensure that the matrix can reflect the relative processing capacity of each node in the future time window;

[0051] The constructed weight matrix is ​​matched and verified with the load prediction results to check whether the weight distribution meets the expected load processing requirements. When it is detected that the weight distribution is unreasonable or the node performance changes significantly, the incremental update mechanism of the weight matrix is ​​triggered to ensure that the weight matrix is ​​always consistent with the actual system status.

[0052] Optionally, the step of using a consistent hashing algorithm based on the weight matrix to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead includes:

[0053] According to the weight value of each distributed node in the weight matrix, a number of virtual nodes proportional to its weight is allocated to each node on the consistent hash ring. Nodes with higher weights occupy more virtual node positions on the hash ring. At the same time, the mapping relationship between each virtual node and its corresponding physical node is recorded to provide a basic hash ring structure for subsequent game instance allocation;

[0054] Extract key feature information from the game instance to be assigned, including game type identifier, player geographic location, instance resource requirements, and relevance identifier. This key feature information is combined and encoded, and then calculated using a hash function to obtain a unique hash value for the game instance, ensuring that game instances with the same features are mapped to similar hash positions.

[0055] On the hash ring, starting from the position corresponding to the game instance hash value, search clockwise to locate the first virtual node position, determine the physical node corresponding to the virtual node as the candidate first distributed node, and at the same time check whether the current load status of the candidate node meets the load bearing capacity preset in the weight matrix;

[0056] For the determined first distributed node, the association between the game instance to be assigned and the existing game instances on the node is analyzed, and an estimated cross-node communication overhead is calculated. When the communication overhead exceeds a preset threshold, the next virtual node is searched clockwise on the hash ring, and the node matching and communication overhead verification process is repeated until the optimal first distributed node that meets the communication overhead minimization requirement is found.

[0057] The game instance is assigned to the determined first distributed node, and the current load status and available processing capacity of the node in the weight matrix are updated in real time. At the same time, the instance information and node association relationship of this assignment are recorded in the hash ring structure to provide a reference basis for subsequent allocation decisions of related game instances, ensuring the continuity and consistency of the entire allocation process.

[0058] Optionally, the step of identifying and extracting state data that needs to be synchronized across nodes in each game instance based on the game instances allocated to each distributed node includes:

[0059] The state data in each game instance is scanned and categorized into two types: local state data and cross-node state data based on preset data attribute tags. Cross-node state data includes player location information, public resource status, team collaboration data, and global event information.

[0060] Analyze the logical dependencies between the identified cross-node state data, establish a dependency graph for the state data, and identify data combinations with strong dependencies and data units that can be processed independently;

[0061] Based on the update frequency, impact scope, and business importance of the status data, each cross-node status data is assigned a synchronization priority weight, which is divided into three levels: high priority, medium priority, and low priority;

[0062] Based on network transmission efficiency requirements, the identified cross-node state data is granularly optimized and the associated fine-grained state data is merged into data packets suitable for network transmission while maintaining the logical integrity of the data.

[0063] Match the optimized cross-node state data with the established multi-level state synchronization strategy, automatically select the corresponding synchronization strategy based on the data characteristics, and establish a mapping relationship table from state data to synchronization strategy.

[0064] Optionally, the step of dynamically adjusting the resource allocation strategy of each node based on the complexity of the game scene and the player density includes:

[0065] Real-time collection of game scene complexity parameters and current online player density data on each node. Complexity parameters include the number of scene objects, interactive element density, physical calculation complexity, and rendering load intensity. Player density data includes the number of players in the node, player activity, and operation frequency.

[0066] Based on the collected scene parameters and player density data, a resource consumption prediction model for each node is established. This model calculates the resource requirements of CPU-intensive tasks, memory-intensive tasks, and network-intensive tasks respectively, forming a node resource demand profile;

[0067] Based on the resource demand profile of each node and the total amount of currently available resources, the CPU time slice quota, memory cache space quota, and network bandwidth quota of each node are dynamically calculated to ensure that high-load nodes receive more resource support.

[0068] Based on the urgency of resource scheduling, we prioritize adjusting CPU time slice allocation to ensure real-time game logic processing, then adjust memory cache strategies to optimize data access performance, and finally adjust network bandwidth allocation to ensure cross-node communication stability.

[0069] Monitor the changes in performance indicators of each node after resource adjustment, including response time, throughput, and resource utilization. Fine-tune and optimize the resource allocation strategy based on the monitoring results, and feed the optimization results back to the resource consumption prediction model to update the model parameters.

[0070] Optionally, the steps of analyzing the player's gaming behavior pattern using a machine learning algorithm, predicting the player's next action, and performing data preloading and computational preprocessing in advance include:

[0071] Collect the game operation sequence data of players at each node in real time, including movement trajectory, skill release, item use and interactive behavior, and extract time series features, spatial location features, operation frequency features and contextual association features to construct player behavior feature vectors;

[0072] Analyze player behavior feature vectors using an unsupervised clustering algorithm to identify different types of behavior patterns, including exploration, combat, social, and task-based patterns, and create personalized behavior pattern profiles for each player.

[0073] Based on the player's historical behavior data and current behavior pattern archive, a time series prediction algorithm is used to train an action prediction model. This model can predict the most likely action type and target location within a future time window based on the player's current state and recent action sequence.

[0074] Based on the output of the operation prediction model, we can identify in advance the game areas that players may visit, the game resources they may use, and the computing tasks that may be triggered. We can then preload the corresponding map data and resource files, and preprocess computing-intensive tasks such as physics calculations and collision detection.

[0075] Monitor the matching degree between predicted operations and actual player operations, calculate the prediction accuracy and the hit rate of resource preprocessing, adjust the parameter weights of the prediction model and the trigger threshold of the preprocessing strategy based on the feedback results, and improve the overall performance of the prediction system.

[0076] Another aspect of the present invention provides a game concurrent processing system based on a distributed architecture, which is used to execute a game concurrent processing method based on a distributed architecture, including: a central server and distributed nodes;

[0077] The central server is configured to:

[0078] Based on historical game data and real-time player behavior patterns, a deep learning neural network is used to predict the concurrent load peak in the future time window to obtain load prediction results.

[0079] Dynamically calculating the processing capacity weight matrix of each distributed node based on the load prediction result;

[0080] Based on the weight matrix, a consistent hashing algorithm is used to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead;

[0081] Based on the game instances assigned to each distributed node, identify and extract the state data that needs to be synchronized across nodes in each game instance, including player attributes, game object status, and scene environment information;

[0082] Based on the conflict risk and business importance of the state data in concurrent processing, it is divided into three synchronization levels: core state layer, interaction state layer, and environment state layer. A multi-level state synchronization strategy is adopted based on the characteristics of data at different levels and node distribution;

[0083] Based on the synchronization process of status data at different levels, a targeted conflict detection rule base is established;

[0084] When multiple distributed nodes modify the same state data at the same time, the corresponding resolution strategy is adopted according to the data level and conflict type;

[0085] Propagate the conflict resolution result to the first distributed node through incremental updates according to the multi-level state synchronization strategy, thereby ensuring state consistency and reducing network transmission overhead;

[0086] Establish a health monitoring system for distributed nodes to monitor the response time, error rate, and resource usage of each node in real time;

[0087] When a node failure or severe performance degradation is detected, the failover mechanism is triggered, including: first migrating the game instance on the failed node to the backup node, and then recovering the data through state snapshots and operation logs;

[0088] Adopt a progressive state reconstruction strategy, prioritize restoring the core state layer data, and then gradually restore the interactive state layer and environment state layer data to ensure rapid recovery of game services;

[0089] Dynamically adjust the resource allocation strategy of each node based on the complexity of the game scene and the density of players;

[0090] Analyze players' gaming behavior patterns through machine learning algorithms, predict players' next actions, and preload and preprocess data in advance;

[0091] Establish a cross-node resource sharing pool. When a node is short of resources, it can borrow idle resources from other nodes to achieve dynamic balance of resources.

[0092] By adopting the technical solution of the present invention, a game concurrent processing method and system based on a distributed architecture can handle a higher number of concurrent players than traditional solutions while maintaining a stable gaming experience through intelligent load prediction and a multi-level state synchronization mechanism; an adaptive conflict detection and resolution mechanism can be adopted to reduce the average response time of game operations and effectively reduce game freezes caused by concurrent conflicts; a dynamic fault tolerance and fault recovery mechanism can be used to improve system availability, shorten the recovery time of single-point failures, and greatly improve the stability of game services; performance optimization and resource scheduling strategies can be used to improve overall system resource utilization, reduce hardware costs, and improve service quality; key technical problems such as state consistency, concurrent conflict processing, and dynamic load balancing in a distributed gaming environment are solved, providing a complete technical solution for large-scale multiplayer online games. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 This is a flowchart of a method for concurrently processing games based on a distributed architecture provided by one embodiment of the present invention;

[0094] Figure 2 It is a schematic block diagram of a concurrent game processing system based on a distributed architecture provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0095] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0096] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0097] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0098] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0099] Refer to the following Figures 1 to 2 A method and system for concurrently processing games based on a distributed architecture is described below according to some embodiments of the present invention.

[0100] like Figure 1 As shown, one embodiment of the present invention provides a game concurrent processing method based on a distributed architecture, comprising:

[0101] Based on historical game data and real-time player behavior patterns, a deep learning neural network is used to predict the concurrent load peak in the future time window to obtain load prediction results.

[0102] Based on the load forecast results, dynamically calculate the processing capacity weight matrix of each distributed node, the weight matrix comprehensively considers the node CPU utilization, memory occupancy, network latency and geographical location factors;

[0103] Based on the weight matrix, a consistent hashing algorithm is used to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead;

[0104] Based on the game instances assigned to each distributed node, identify and extract the state data that needs to be synchronized across nodes in each game instance, including player attributes, game object status, scene environment information, etc.

[0105] According to the conflict risk and business importance of the state data in concurrent processing, it is divided into three synchronization layers: core state layer, interactive state layer and environmental state layer. According to the characteristics of data at different layers and the node distribution, a multi-level state synchronization strategy is adopted, including: a strong consistency synchronization strategy is adopted for core state layer data, and the strict consistency of key game logic is ensured by the Raft consensus algorithm; an eventual consistency strategy is adopted for interactive state layer data, and the vector clock mechanism is used to resolve concurrency conflicts, and the order of event execution is ensured by timestamp sorting; a weak consistency strategy is adopted for environmental state layer data, and short-term data inconsistency is allowed to improve response speed; among them, the core state layer contains key data such as player health, equipment attributes, and account balance; the interactive state layer contains real-time interactive data such as player location, action instructions, and chat messages; the environmental state layer contains auxiliary data such as weather effects, background music, and non-critical NPC status;

[0106] Based on the synchronization process of state data at different levels, a targeted conflict detection rule base is established. The conflict detection rule base defines corresponding detection algorithms according to the resource competition mode of the core state layer, the timing conflict mode of the interaction state layer, and the coverage conflict mode of the environment state layer;

[0107] When multiple distributed nodes modify the same state data simultaneously, corresponding resolution strategies are adopted based on the data layer and conflict type: for resource competition conflicts in the core state layer, an arbitration algorithm based on player priority weights and operation timestamps is used; for position collision conflicts in the interactive state layer, a physics engine-assisted spatial rearrangement algorithm is used in combination with geographic location factors.

[0108] Propagate the conflict resolution result to the first distributed node through incremental updates according to the multi-level state synchronization strategy, thereby ensuring state consistency and reducing network transmission overhead;

[0109] Establish a health monitoring system for distributed nodes to monitor the response time, error rate, and resource usage of each node in real time;

[0110] When a node failure or severe performance degradation is detected, the failover mechanism is triggered, including: first migrating the game instance on the failed node to the backup node, and then recovering the data through state snapshots and operation logs;

[0111] Adopt a progressive state reconstruction strategy, prioritize restoring the core state layer data, and then gradually restore the interactive state layer and environment state layer data to ensure rapid recovery of game services;

[0112] Dynamically adjust the resource allocation strategy of each node based on the complexity of the game scene and the player density, including CPU time slice allocation, memory cache strategy and network bandwidth allocation;

[0113] Analyze players' gaming behavior patterns through machine learning algorithms, predict players' next actions, and preload and preprocess data in advance;

[0114] Establish a cross-node resource sharing pool. When a node is short of resources, it can borrow idle resources from other nodes to achieve dynamic balance of resources.

[0115] By adopting the technical solution of this embodiment, through intelligent load prediction and multi-level state synchronization mechanism, the system can handle a higher number of concurrent players than traditional solutions while maintaining a stable gaming experience; by adopting an adaptive conflict detection and resolution mechanism, the average response time of game operations can be reduced, effectively reducing game freezes caused by concurrent conflicts; through dynamic fault tolerance and fault recovery mechanism, system availability is improved, the recovery time of single point failures is shortened, and the stability of game services is greatly improved; through performance optimization and resource scheduling strategies, the overall system resource utilization is improved, hardware costs are reduced, and service quality is improved; it solves key technical problems such as state consistency, concurrent conflict processing, and dynamic load balancing in distributed gaming environments, and provides a complete technical solution for large-scale multiplayer online games.

[0116] In some possible implementations of the present invention, the step of predicting the concurrent load peak in a future time window using a deep learning neural network based on historical game data and real-time player behavior patterns to obtain a load prediction result adopts an adaptive time-decay load prediction model, specifically including:

[0117] A load prediction model is established by analyzing historical game data through a multi-dimensional time series feature extraction algorithm. The load prediction value at the future time t is calculated using the following formula:

[0118]

[0119] where the adaptive time weight function is:

[0120]

[0121] The dynamic behavior weight adjustment function is:

[0122]

[0123] where:

[0124] L pred (t) represents the predicted load value at time t;

[0125] a is a historical data weight coefficient, with a value range of [0.3, 0.7], used to balance the influence degree of historical data on prediction;

[0126] M is the length of the historical time window, usually taking a value of 12-24 time units;

[0127] b is a time decay factor, with a value range of [0.85, 0.95], the weight of historical data farther away from the current time is smaller;

[0128] L hist (t-m) represents the actual load value at historical time (t-m);

[0129] ψ(m) is an adaptive time weight function that dynamically adjusts the weight according to the correlation of historical data;

[0130] is a time weight adjustment parameter, with a value range of [3, 8], controlling the weight decay speed;

[0131] v is a weight decay index, with a value range of [0.8, 1.5], affecting the nonlinearity degree of weight decay;

[0132] Ω is a periodic fluctuation amplitude coefficient, with a value range of [0.1, 0.4], capturing the influence of periodic changes on weight;

[0133] T cycle is the period length, usually 24 (hours) or 7 (days);

[0134] g is a player behavior pattern weight coefficient, with a value range of [0.2, 0.5];

[0135] N is the number of player behavior feature dimensions, usually including login frequency, game duration, interaction intensity, etc;

[0136] ω n is the base weight of the nth behavior feature, satisfying

[0137] P n(t) represents the value of the behavioral feature of the nth player at time t;

[0138] ρ n is the dynamic weight adjustment factor of the nth feature, which is adjusted based on the statistical distribution of the feature value;

[0139] is the sensitivity coefficient for abnormal behavior detection, with a value range of [0.5, 2.0], used to identify abnormal behavior patterns;

[0140] is the historical mean of the nth behavioral feature;

[0141] σ n is the standard deviation of the nth behavioral characteristic;

[0142] δ is the seasonal factor weight, ranging from [0.1, 0.3], which is used to capture periodic load changes;

[0143] S seasonal (t) represents the seasonal load component at time t, and the periodic characteristics are extracted by Fourier transform;

[0144] χ(t) is the seasonal intensity adjustment function, with a value range of [0.7, 1.3], which dynamically adjusts the seasonal factor according to the current time;

[0145] ∈ is the external event impact weight, ranging from [0.05, 0.25], which is used to consider the impact of emergencies on the load;

[0146] U is the number of external event types, including game updates, holidays, competitive games, etc.

[0147] ζ u is the influence coefficient of the u-th type external event, satisfying

[0148] E u (t) represents the impact intensity of the u-th external event at time t;

[0149] υ is the adaptive learning weight, ranging from [0.03 to 0.15], which is used to integrate online learning results;

[0150] A adapt (t) represents the adaptive adjustment term based on the most recent prediction error, which is updated by the online learning algorithm.

[0151] This embodiment dynamically adjusts the influence weight of historical data through a time decay mechanism, and combines real-time player behavior patterns and seasonal factors to achieve more accurate load forecasting, thereby preparing computing resources in advance and reducing the impact of sudden load changes on system performance.

[0152] In some possible implementations of the present invention, the multi-level state synchronization strategy adopts a state hierarchical weight dynamic adjustment algorithm based on information entropy, specifically including:

[0153] Based on the frequency and importance of game status data changes, the synchronization priority weights of each level are dynamically calculated and adjusted using the following information entropy weight formula:

[0154]

[0155] The calculation formula of the weighted information entropy of the key state layer is:

[0156]

[0157] The contextual relevance weight is calculated as:

[0158]

[0159] The forecast accuracy adjustment factor is:

[0160]

[0161] in:

[0162] represents the synchronization weight of the h-th state layer;

[0163] H h Represents the weighted information entropy value of the h-th layer state;

[0164] H max 、H min Respectively represent the maximum and minimum values ​​of information entropy in all state layers;

[0165] φ h is the entropy weight factor of the hth layer, ranging from [0.4, 0.8], used to balance the effects of entropy and frequency;

[0166] F h Indicates the update frequency of the h-th layer status (times / second);

[0167] F max 、F min Respectively represent the maximum and minimum update frequencies in all state layers;

[0168] Ψ h is the context relevance weight coefficient of the h-th layer, ranging from [0.1, 0.3];

[0169] is the context relevance index of the hth level, reflecting the degree of association with other levels;

[0170] Λh is the prediction adjustment weight coefficient of the h-th layer, with a value range of [0.05, 0.2];

[0171] is the forecast accuracy adjustment factor for the hth layer, which is dynamically adjusted based on historical forecast performance;

[0172] S h is the total number of state types of the h-th layer state;

[0173] represents the probability of the sth state appearing in the hth layer;

[0174] θ s is the importance correction factor of the sth state, with a value range of [0.5, 2.0], and the critical state takes the larger value;

[0175] ε s is the sensitivity coefficient of the change of the sth state, with a value range of [0.2, 1.5], which is used to identify the sensitivity of the state change;

[0176] V s is the current rate of change of the sth state;

[0177] is the mean value of the state change rate of the hth layer;

[0178] is the standardized parameter of the h-th layer state change, used for normalization processing;

[0179] Q is the number of other levels related to the hth level;

[0180] is the basic association weight of the qth related level, satisfying

[0181] Represents the distance measure between the h-th layer and the q-th layer in the spatial dimension;

[0182] τ spatial is the spatial distance attenuation parameter, with a value range of [0.5, 2.0];

[0183] T h 、T q Represent the timestamps of the hth layer and the qth layer respectively;

[0184] τ temporal is the time distance attenuation parameter, with a value range of [1.0,5.0];

[0185] κ is the sensitivity parameter for predictive regulation, with a value range of [2.0, 8.0];

[0186] ξh is the historical prediction accuracy of the h-th layer;

[0187] ξ threshold is the prediction accuracy threshold, usually ranging from 0.7 to 0.85;

[0188] is the prediction error of the hth layer;

[0189] E max is the maximum prediction error allowed by the system.

[0190] This embodiment quantifies the uncertainty and complexity of state data through information entropy, and dynamically adjusts the synchronization priority of each level in combination with the update frequency, thereby achieving more intelligent bandwidth allocation and synchronization strategy selection, and effectively improving the synchronization efficiency of key states.

[0191] In some possible implementations of the present invention, the step of establishing a targeted conflict detection rule base based on the synchronization process of state data at different levels adopts a conflict risk assessment model based on fuzzy logic, specifically including:

[0192] A multi-dimensional conflict risk assessment system is established, and the risk level of conflict operations is calculated using the fuzzy comprehensive evaluation method. The risk assessment value is calculated using the following formula:

[0193]

[0194] The time decay function of the conflict urgency is:

[0195]

[0196] The dynamic conflict weight adjustment factor is:

[0197]

[0198] The historical conflict experience weights are:

[0199]

[0200] The cross-level conflict correlation is:

[0201]

[0202] in:

[0203] R conflict Represents the comprehensive conflict risk assessment value, with a value range of [0,1];

[0204] D is the total number of risk assessment dimensions, including time urgency, resource scarcity, player influence, etc.

[0205] μ dis the weight coefficient of the d-th dimension, satisfying

[0206] C is the number of conflict types under this dimension;

[0207] ξ c is the basic weight of the cth conflict type, reflecting the severity of different conflict types;

[0208] represents the impact intensity index of the c-th conflict in the d-th dimension;

[0209] λ c is the time sensitivity coefficient of the c-th conflict, ranging from [0.1, 2.0];

[0210] τ c is the time interval from the occurrence of the cth conflict to the current moment;

[0211] η d is the nonlinear adjustment index of the d-th dimension, ranging from [0.8, 1.5];

[0212] is a dynamic conflict weight adjustment factor, which is adjusted based on historical conflict frequency and predicted probability;

[0213] Υ is the historical experience weight coefficient, ranging from [0.1 to 0.3], which is used to integrate historical conflict handling experience;

[0214] R history The historical conflict experience weight is adjusted based on the results of similar conflicts;

[0215] Φ is the cross-level association weight coefficient, ranging from [0.05, 0.2], taking into account the conflict associations between different status layers;

[0216] To quantify the mutual influence of conflicts between different status layers, we use the cross-level conflict correlation degree;

[0217] U urgency (t) represents the conflict urgency at time t;

[0218] U h is the initial urgency benchmark value;

[0219] t h The initial moment of conflict;

[0220] σ is a time scale parameter that controls the rate of urgency decrease;

[0221] k is the urgency decay index, ranging from [1.2, 2.5]. The larger the value, the faster the decay.

[0222] ω env is the environmental factor, with a value range of [0.1, 0.4], reflecting the adjustment of the game environment on the urgency;

[0223] T game is the internal game time period, such as day-night cycle, round period, etc.;

[0224] ψ load is the load influence coefficient, with a value range of [0.2, 0.8], the higher the current load, the greater the urgency;

[0225] L current is the current system load;

[0226] L max is the maximum system load;

[0227] α adjust is the frequency adjustment sensitivity coefficient, with a value range of [0.3, 1.0];

[0228] is the current occurrence frequency of the cth conflict;

[0229] is the mean value of conflict frequency in the dth dimension;

[0230] is the standard deviation of conflict frequency in the dth dimension;

[0231] β predict is the prediction probability weight coefficient, with a value range of [0.2, 0.6];

[0232] is the predicted occurrence probability of the cth conflict;

[0233] R is the number of historical similar conflict records;

[0234] π r is the processing success weight of the rth historical conflict, based on the processing effect;

[0235] t r is the occurrence time of the rth historical conflict;

[0236] τ memory is the memory decay time constant, with a value range of [100, 500], controlling the influence degree of historical experience;

[0237] is the similarity between the current conflict and the rth historical conflict, with a value range of [0, 1];

[0238] S max is the maximum similarity threshold, usually taking the value 1.0;

[0239] γ memory is the similarity weight index, with a value range of [1.0, 2.5], which controls the influence of similarity on the weight;

[0240] L is the total number of system state levels;

[0241] is the basic correlation coefficient between levels l1 and l2;

[0242] is the conflict association strength between levels l1 and l2;

[0243] Represent the depth levels of layers l1 and l2 respectively;

[0244] τ depth It is the depth difference attenuation parameter, with a value range of [1.0, 3.0], which controls the impact of layer depth difference on the correlation.

[0245] This embodiment uses fuzzy logic to handle the uncertainty and multidimensional characteristics of conflict risks, and combines the time decay mechanism to dynamically adjust the conflict handling priority, thereby achieving more accurate conflict risk quantification and more reasonable resource allocation strategies, significantly improving the efficiency and fairness of conflict resolution.

[0246] In some possible implementations of the present invention, the step of dynamically calculating the processing capacity weight matrix of each distributed node based on the load prediction result includes:

[0247] Perform real-time performance monitoring on each distributed node in the cluster, collect basic performance indicators including node CPU utilization, memory usage, network latency, and geographic location coordinates, and cache and store these basic performance indicators according to a preset time window to provide a data basis for subsequent weight calculations;

[0248] Normalizing the collected basic performance indicators of each node to eliminate numerical differences between indicators of different dimensions, and setting a dynamic threshold range for each basic performance indicator based on the expected load intensity in the load forecast result to ensure accuracy and consistency of weight calculation, thereby obtaining a first performance indicator;

[0249] Based on the first performance indicator and in combination with the load distribution characteristics in the load forecast result, a comprehensive processing capacity weight is calculated for each node, and the importance ratio of CPU, memory, network and geographical location factors is dynamically adjusted according to the type and intensity of the predicted load during the weight calculation process;

[0250] The comprehensive processing capacity weights of each node are constructed into a distributed processing capacity weight matrix, and the weight matrix is ​​optimized and adjusted in the time dimension according to the time distribution characteristics of the load forecast results to ensure that the matrix can reflect the relative processing capacity of each node in the future time window;

[0251] The constructed weight matrix is ​​matched and verified with the load prediction results to check whether the weight distribution meets the expected load processing requirements. When it is detected that the weight distribution is unreasonable or the node performance changes significantly, the incremental update mechanism of the weight matrix is ​​triggered to ensure that the weight matrix is ​​always consistent with the actual system status.

[0252] The solution of this embodiment, through comprehensive evaluation of multi-dimensional performance indicators and dynamic weight calculation, the system can more accurately identify the actual processing capacity of each node, avoid the load imbalance problem caused by traditional static weight allocation, and improve the overall resource utilization efficiency; dynamically adjust the weight matrix based on the load prediction results, so that the system can prepare node resources in advance for the upcoming load peak, avoid system response delays when the load suddenly changes, and shorten the load balancing response time; by comprehensively considering the geographical location of the nodes, game instances are preferentially allocated to nodes that are geographically closer to the players, effectively reducing network latency and improving the player's gaming experience; the real-time verification and incremental update mechanism of the weight matrix ensure that when the node performance degrades or fails, the system can quickly adjust the weight distribution, control the impact of the failure to a minimum, and improve the overall system availability; through standardized processing and dynamic threshold setting, resource waste and performance bottlenecks are avoided, and the optimal utilization of cluster resources is achieved, which improves overall resource utilization and reduces operating costs.

[0253] In some possible implementations of the present invention, the step of using a consistent hashing algorithm based on the weight matrix to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead includes:

[0254] According to the weight value of each distributed node in the weight matrix, a number of virtual nodes proportional to its weight is allocated to each node on the consistent hash ring. Nodes with higher weights occupy more virtual node positions on the hash ring. At the same time, the mapping relationship between each virtual node and its corresponding physical node is recorded to provide a basic hash ring structure for subsequent game instance allocation;

[0255] Extract key feature information from the game instance to be assigned, including game type identifier, player geographic location, instance resource requirements, and relevance identifier. This key feature information is combined and encoded, and then calculated using a hash function to obtain a unique hash value for the game instance, ensuring that game instances with the same features are mapped to similar hash positions.

[0256] On the hash ring, a first virtual node position is located by clockwise searching from a position corresponding to the game instance hash value, and a physical node corresponding to the virtual node is determined as a first candidate distributed node, while checking whether a current load state of the candidate node meets a preset load bearing capacity in the weight matrix;

[0257] For the determined first distributed node, the relevance of the to-be-distributed game instance and the existing game instance on the node is analyzed, and an estimated value of cross-node communication overhead is calculated, when the communication overhead exceeds a preset threshold, the next virtual node is searched clockwise on the hash ring, and the node matching and communication overhead verification process are repeated until an optimal first distributed node meeting the minimum communication overhead requirement is found;

[0258] The game instance is distributed to the determined first distributed node, and the current load state and available processing capacity of the node in the weight matrix are updated in real time, and the instance information and node association relationship of this distribution are recorded in the hash ring structure, providing a reference basis for the distribution decision of subsequent related game instances, ensuring the continuity and consistency of the entire distribution process.

[0259] The scheme of the embodiment realizes intelligent load balancing based on node processing capacity by a weight-aware virtual node distribution mechanism, in which high-weight nodes automatically bear more game instances, and low-weight nodes bear less load, avoiding performance bottlenecks caused by traditional uniform distribution and improving the overall load distribution uniformity; by game instance feature hashing and relevance analysis, game instances with high relevance are preferentially distributed to the same node or adjacent nodes, significantly reducing cross-node data synchronization and communication demand, reducing cross-node communication traffic, and reducing overall system network overhead; based on the consistent hash distribution mechanism, only a small amount of game instance distribution needs to be adjusted when the number of nodes increases or decreases, avoiding large-scale data migration, and the instance redistribution ratio is controlled at a low level when the node changes, significantly improving the scalability and stability of the system; in combination with real-time load state updating of the weight matrix, each node is ensured to operate within the optimal load range, avoiding resource waste and performance overload, maintaining the node resource utilization rate in the best interval, and improving the overall system throughput; by continuous maintenance of the hash ring structure and instance association relationship, game instances under the same conditions are always distributed to the same node, providing predictable and consistent distribution behavior, reducing distribution conflicts and repeated calculations, and shortening the distribution decision response time; in the game instance feature hashing process, the player geographic location information is integrated, and in combination with the node geographic factor in the weight matrix, the game instance is preferentially distributed to the high-weight node with the optimal geographic location, reducing the average network delay, and significantly improving the user experience quality.

[0260] In some possible implementations of the present invention, the step of identifying and extracting state data that needs to be synchronized across nodes in each game instance based on the game instances assigned to each distributed node includes:

[0261] The state data in each game instance is scanned and categorized into two types: local state data and cross-node state data based on preset data attribute tags. Cross-node state data includes player location information, public resource status, team collaboration data, and global event information.

[0262] Analyze the logical dependencies between the identified cross-node state data, establish a dependency graph for the state data, and identify data combinations with strong dependencies and data units that can be processed independently;

[0263] Based on the update frequency, impact scope, and business importance of the status data, each cross-node status data is assigned a synchronization priority weight, which is divided into three levels: high priority, medium priority, and low priority;

[0264] Based on network transmission efficiency requirements, the identified cross-node state data is granularly optimized and the associated fine-grained state data is merged into data packets suitable for network transmission while maintaining the logical integrity of the data.

[0265] Match the optimized cross-node state data with the established multi-level state synchronization strategy, automatically select the corresponding synchronization strategy based on the data characteristics, and establish a mapping relationship table from state data to synchronization strategy.

[0266] The solution of this embodiment can accurately identify the status data that really needs to be synchronized across nodes through systematic classification identification and dependency analysis, avoiding unnecessary network transmission overhead; based on priority evaluation and granularity optimization, differentiated synchronization processing is achieved, high-priority data is given priority transmission guarantee, and low-priority data is processed in batches, thereby improving the overall synchronization efficiency; through data granularity optimization and strategy matching, the number of data packets and the total transmission volume transmitted over the network are reduced, thereby reducing the network bandwidth occupancy rate; the established dependency graph and mapping relationship table provide a data basis for subsequent conflict detection and fault recovery, thereby improving the stability and maintainability of the entire distributed system.

[0267] In some possible implementations of the present invention, the step of dynamically adjusting the resource allocation strategy of each node based on the complexity of the game scene and the player density includes:

[0268] Real-time collection of game scene complexity parameters and current online player density data on each node. Complexity parameters include the number of scene objects, interactive element density, physical calculation complexity, and rendering load intensity. Player density data includes the number of players in the node, player activity, and operation frequency.

[0269] Based on the collected scene parameters and player density data, a resource consumption prediction model for each node is established. This model calculates the resource requirements of CPU-intensive tasks, memory-intensive tasks, and network-intensive tasks respectively, forming a node resource demand profile;

[0270] Based on the resource demand profile of each node and the total amount of currently available resources, the CPU time slice quota, memory cache space quota, and network bandwidth quota of each node are dynamically calculated to ensure that high-load nodes receive more resource support.

[0271] Based on the urgency of resource scheduling, we prioritize adjusting CPU time slice allocation to ensure real-time game logic processing, then adjust memory cache strategies to optimize data access performance, and finally adjust network bandwidth allocation to ensure cross-node communication stability.

[0272] Monitor the changes in performance indicators of each node after resource adjustment, including response time, throughput, and resource utilization. Fine-tune and optimize the resource allocation strategy based on the monitoring results, and feed the optimization results back to the resource consumption prediction model to update the model parameters.

[0273] The solution of this embodiment avoids over-allocation and under-allocation of resources through precise resource demand assessment and dynamic quota calculation, improves overall resource utilization, and effectively reduces hardware costs; the hierarchical resource scheduling mechanism ensures priority protection of key resources, reduces game response time, and significantly improves player experience, especially in high-concurrency scenarios where performance is more stable; the dynamic adjustment mechanism based on scene complexity and player density achieves more accurate load sharing, avoids the problem of some nodes being overloaded while others are idle, and improves the overall throughput of the system; through the feedback optimization mechanism and model parameter updates, the system can continuously learn and adapt to the resource demand characteristics of different game scenarios. As the running time increases, the accuracy and efficiency of resource allocation continue to improve.

[0274] In some possible implementations of the present invention, the steps of analyzing a player's gaming behavior pattern using a machine learning algorithm, predicting the player's next action, and performing data preloading and computational preprocessing in advance include:

[0275] Collect the game operation sequence data of players at each node in real time, including movement trajectory, skill release, item use and interactive behavior, and extract time series features, spatial location features, operation frequency features and contextual association features to construct player behavior feature vectors;

[0276] Analyze player behavior feature vectors using an unsupervised clustering algorithm to identify different types of behavior patterns, including exploration, combat, social, and task-based patterns, and create personalized behavior pattern profiles for each player.

[0277] Based on the player's historical behavior data and current behavior pattern archive, a time series prediction algorithm is used to train an action prediction model. This model can predict the most likely action type and target location within a future time window based on the player's current state and recent action sequence.

[0278] Based on the output of the operation prediction model, we can identify in advance the game areas that players may visit, the game resources they may use, and the computing tasks that may be triggered. We can then preload the corresponding map data and resource files, and preprocess computing-intensive tasks such as physics calculations and collision detection.

[0279] Monitor the matching degree between predicted operations and actual player operations, calculate the prediction accuracy and the hit rate of resource preprocessing, adjust the parameter weights of the prediction model and the trigger threshold of the preprocessing strategy based on the feedback results, and improve the overall performance of the prediction system.

[0280] The solution of this embodiment reduces the response delay of player operations through advance preloading and calculation preprocessing, especially when loading large scenes and performing complex calculations, the delay improvement effect is more obvious; accurate prediction based on personalized behavior patterns makes game operations smoother and more natural, reduces loading waiting time and lag, and significantly improves player satisfaction and retention rate; through prediction-driven resource preprocessing, it avoids system pressure peaks caused by temporary large-scale resource requests, reduces the peak load of CPU and memory, and makes the system run more smoothly; the advance preloading mechanism reduces the real-time data transmission demand during player operations, reduces the sudden occupation of network bandwidth, and improves the overall network transmission efficiency and stability; through continuous feedback optimization and model adjustment, the prediction system can continuously adapt to the changing trend of player behavior, and the prediction accuracy gradually improves with data accumulation, forming a virtuous intelligent optimization cycle.

[0281] See Figure 2 , another embodiment of the present invention provides a game concurrent processing system based on a distributed architecture, for executing a game concurrent processing method based on a distributed architecture, comprising: a central server and distributed nodes;

[0282] The central server is configured to:

[0283] Based on historical game data and real-time player behavior patterns, a deep learning neural network is used to predict the concurrent load peak in the future time window to obtain load prediction results.

[0284] Dynamically calculating the processing capacity weight matrix of each distributed node based on the load prediction result;

[0285] Based on the weight matrix, a consistent hashing algorithm is used to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead;

[0286] Based on the game instances assigned to each distributed node, identify and extract the state data that needs to be synchronized across nodes in each game instance, including player attributes, game object status, scene environment information, etc.

[0287] Based on the conflict risk and business importance of the state data in concurrent processing, it is divided into three synchronization levels: core state layer, interaction state layer, and environment state layer. A multi-level state synchronization strategy is adopted based on the characteristics of data at different levels and node distribution;

[0288] Based on the synchronization process of status data at different levels, a targeted conflict detection rule base is established;

[0289] When multiple distributed nodes modify the same state data at the same time, the corresponding resolution strategy is adopted according to the data level and conflict type;

[0290] Propagate the conflict resolution result to the first distributed node through incremental updates according to the multi-level state synchronization strategy, thereby ensuring state consistency and reducing network transmission overhead;

[0291] Establish a health monitoring system for distributed nodes to monitor the response time, error rate, and resource usage of each node in real time;

[0292] When a node failure or severe performance degradation is detected, the failover mechanism is triggered, including: first migrating the game instance on the failed node to the backup node, and then recovering the data through state snapshots and operation logs;

[0293] Adopt a progressive state reconstruction strategy, prioritize restoring the core state layer data, and then gradually restore the interactive state layer and environment state layer data to ensure rapid recovery of game services;

[0294] Dynamically adjust the resource allocation strategy of each node based on the complexity of the game scene and the density of players;

[0295] Analyze players' gaming behavior patterns through machine learning algorithms, predict players' next actions, and preload and preprocess data in advance;

[0296] Establish a cross-node resource sharing pool. When a node is short of resources, it can borrow idle resources from other nodes to achieve dynamic balance of resources.

[0297] It should be known that Figure 2 The block diagram of the game concurrent processing system based on a distributed architecture is for illustration only, and the number of modules shown does not limit the scope of protection of the present invention. The game concurrent processing system based on a distributed architecture provided in this embodiment can be used to execute the corresponding embodiments of the game concurrent processing method based on a distributed architecture. For the specific implementation process, please refer to the description of the various method embodiments, which will not be repeated here.

[0298] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

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

[0300] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

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

[0302] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0303] The integrated unit described above, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the above-mentioned method of each embodiment of the present application. The aforementioned memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0304] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0305] The embodiments of the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present application, the specific implementation manner and application range can be changed, and the above description of the embodiments should not be understood as a limitation of the present application.

[0306] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements without departing from the spirit and scope of the present application, and can make various changes and modifications, including the combination of different functions and implementation steps, including software and hardware implementation manners, which are all within the protection scope of the present application.

Claims

1. A game concurrent processing method based on a distributed architecture, characterized in that: include: Based on historical game data and real-time player behavior patterns, a deep learning neural network is used to predict the concurrent load peak in the future time window to obtain load prediction results. Dynamically calculating the processing capacity weight matrix of each distributed node based on the load prediction result; Based on the weight matrix, a consistent hashing algorithm is used to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead; Based on the game instances assigned to each distributed node, identify and extract the state data that needs to be synchronized across nodes in each game instance, including player attributes, game object status, and scene environment information; Based on the conflict risk and business importance of the state data in concurrent processing, it is divided into three synchronization levels: core state layer, interaction state layer, and environment state layer. A multi-level state synchronization strategy is adopted based on the characteristics of data at different levels and node distribution; Based on the synchronization process of status data at different levels, a targeted conflict detection rule base is established; When multiple distributed nodes modify the same state data at the same time, the corresponding resolution strategy is adopted according to the data level and conflict type; Propagate the conflict resolution result to the first distributed node through incremental updates according to the multi-level state synchronization strategy, thereby ensuring state consistency and reducing network transmission overhead; Establish a health monitoring system for distributed nodes to monitor the response time, error rate, and resource usage of each node in real time; When a node failure or severe performance degradation is detected, the failover mechanism is triggered, including: first migrating the game instance on the failed node to the backup node, and then recovering the data through state snapshots and operation logs; Adopt a progressive state reconstruction strategy, prioritize restoring the core state layer data, and then gradually restore the interactive state layer and environment state layer data to ensure rapid recovery of game services; Dynamically adjust the resource allocation strategy of each node based on the complexity of the game scene and the density of players; Analyze players' gaming behavior patterns through machine learning algorithms, predict players' next actions, and preload and preprocess data in advance; Establish a cross-node resource sharing pool. When a node is short of resources, it can borrow idle resources from other nodes to achieve dynamic balance of resources.

2. The game concurrent processing method based on distributed architecture according to claim 1, characterized in that: The step of predicting the concurrent load peak in a future time window by using a deep learning neural network based on historical game data and real-time player behavior patterns to obtain a load prediction result adopts an adaptive time-decay load prediction model, specifically including: A load prediction model is established by analyzing historical game data through a multi-dimensional time series feature extraction algorithm. The load prediction value at the future time t is calculated using the following formula: The adaptive time weight function is: The dynamic behavior weight adjustment function is:

3. The game concurrent processing method based on distributed architecture according to claim 2, characterized in that: The multi-level state synchronization strategy adopts a state layer weight dynamic adjustment algorithm based on information entropy, specifically including: Based on the frequency and importance of game status data changes, the synchronization priority weights of each level are dynamically calculated and adjusted using the following information entropy weight formula: The calculation formula of the weighted information entropy of the key state layer is: The contextual relevance weight is calculated as: The forecast accuracy adjustment factor is:

4. The game concurrent processing method based on distributed architecture according to claim 3 is characterized in that: In the step of establishing a targeted conflict detection rule base based on the synchronization process of state data at different levels, a conflict risk assessment model based on fuzzy logic is adopted, which specifically includes: A multi-dimensional conflict risk assessment system is established, and the risk level of conflict operations is calculated using the fuzzy comprehensive evaluation method. The risk assessment value is calculated using the following formula: The time decay function of the conflict urgency is: The dynamic conflict weight adjustment factor is: The historical conflict experience weights are: The cross-level conflict correlation is:

5. The game concurrent processing method based on distributed architecture according to claim 4 is characterized in that: The step of dynamically calculating the processing capacity weight matrix of each distributed node according to the load prediction result includes: Perform real-time performance monitoring on each distributed node in the cluster, collect basic performance indicators including node CPU utilization, memory usage, network latency, and geographic location coordinates, and cache and store these basic performance indicators according to a preset time window to provide a data basis for subsequent weight calculations; Normalizing the collected basic performance indicators of each node to eliminate numerical differences between indicators of different dimensions, and setting a dynamic threshold range for each basic performance indicator based on the expected load intensity in the load forecast result to ensure accuracy and consistency of weight calculation, thereby obtaining a first performance indicator; Based on the first performance indicator and in combination with the load distribution characteristics in the load forecast result, a comprehensive processing capacity weight is calculated for each node, and the importance ratio of CPU, memory, network and geographical location factors is dynamically adjusted according to the type and intensity of the predicted load during the weight calculation process; The comprehensive processing capacity weights of each node are constructed into a distributed processing capacity weight matrix, and the weight matrix is ​​optimized and adjusted in the time dimension according to the time distribution characteristics of the load forecast results to ensure that the matrix can reflect the relative processing capacity of each node in the future time window; The constructed weight matrix is ​​matched and verified with the load prediction results to check whether the weight distribution meets the expected load processing requirements. When it is detected that the weight distribution is unreasonable or the node performance changes significantly, the incremental update mechanism of the weight matrix is ​​triggered to ensure that the weight matrix is ​​always consistent with the actual system status.

6. The game concurrent processing method based on distributed architecture according to claim 5, characterized in that: The steps of using a consistent hashing algorithm based on the weight matrix to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead include: According to the weight value of each distributed node in the weight matrix, a number of virtual nodes proportional to its weight is allocated to each node on the consistent hash ring. Nodes with higher weights occupy more virtual node positions on the hash ring. At the same time, the mapping relationship between each virtual node and its corresponding physical node is recorded to provide a basic hash ring structure for subsequent game instance allocation; Extract key feature information from the game instance to be assigned, including game type identifier, player geographic location, instance resource requirements, and relevance identifier. This key feature information is combined and encoded, and then calculated using a hash function to obtain a unique hash value for the game instance, ensuring that game instances with the same features are mapped to similar hash positions. On the hash ring, starting from the position corresponding to the game instance hash value, search clockwise to locate the first virtual node position, determine the physical node corresponding to the virtual node as the candidate first distributed node, and at the same time check whether the current load status of the candidate node meets the load bearing capacity preset in the weight matrix; For the determined first distributed node, the association between the game instance to be assigned and the existing game instances on the node is analyzed, and an estimated cross-node communication overhead is calculated. When the communication overhead exceeds a preset threshold, the next virtual node is searched clockwise on the hash ring, and the node matching and communication overhead verification process is repeated until the optimal first distributed node that meets the communication overhead minimization requirement is found. The game instance is assigned to the determined first distributed node, and the current load status and available processing capacity of the node in the weight matrix are updated in real time. At the same time, the instance information and node association relationship of this assignment are recorded in the hash ring structure to provide a reference basis for subsequent allocation decisions of related game instances, ensuring the continuity and consistency of the entire allocation process.

7. The game concurrent processing method based on distributed architecture according to claim 6, characterized in that: The step of identifying and extracting state data that needs to be synchronized across nodes in each game instance based on the game instances assigned to each distributed node includes: The state data in each game instance is scanned and categorized into two types: local state data and cross-node state data based on preset data attribute tags. Cross-node state data includes player location information, public resource status, team collaboration data, and global event information. Analyze the logical dependencies between the identified cross-node state data, establish a dependency graph for the state data, and identify data combinations with strong dependencies and data units that can be processed independently; Based on the update frequency, impact scope, and business importance of the status data, each cross-node status data is assigned a synchronization priority weight, which is divided into three levels: high priority, medium priority, and low priority; Based on network transmission efficiency requirements, the identified cross-node state data is granularly optimized and the associated fine-grained state data is merged into data packets suitable for network transmission while maintaining the logical integrity of the data. Match the optimized cross-node state data with the established multi-level state synchronization strategy, automatically select the corresponding synchronization strategy based on the data characteristics, and establish a mapping relationship table from state data to synchronization strategy.

8. The game concurrent processing method based on distributed architecture according to claim 7, characterized in that: The step of dynamically adjusting the resource allocation strategy of each node based on the complexity of the game scene and the player density includes: Real-time collection of game scene complexity parameters and current online player density data on each node. Complexity parameters include the number of scene objects, interactive element density, physical calculation complexity, and rendering load intensity. Player density data includes the number of players in the node, player activity, and operation frequency. Based on the collected scene parameters and player density data, a resource consumption prediction model for each node is established. This model calculates the resource requirements of CPU-intensive tasks, memory-intensive tasks, and network-intensive tasks respectively, forming a node resource demand profile; Based on the resource demand profile of each node and the total amount of currently available resources, the CPU time slice quota, memory cache space quota, and network bandwidth quota of each node are dynamically calculated to ensure that high-load nodes receive more resource support. Based on the urgency of resource scheduling, we prioritize adjusting CPU time slice allocation to ensure real-time game logic processing, then adjust memory cache strategies to optimize data access performance, and finally adjust network bandwidth allocation to ensure cross-node communication stability. Monitor the changes in performance indicators of each node after resource adjustment, including response time, throughput, and resource utilization. Fine-tune and optimize the resource allocation strategy based on the monitoring results, and feed the optimization results back to the resource consumption prediction model to update the model parameters.

9. The game concurrent processing method based on distributed architecture according to claim 8, characterized in that: The steps of analyzing the player's gaming behavior pattern through a machine learning algorithm, predicting the player's next action, and performing data preloading and calculation preprocessing in advance include: Collect the game operation sequence data of players at each node in real time, including movement trajectory, skill release, item use and interactive behavior, and extract time series features, spatial location features, operation frequency features and contextual association features to construct player behavior feature vectors; Analyze player behavior feature vectors using an unsupervised clustering algorithm to identify different types of behavior patterns, including exploration, combat, social, and task-based patterns, and create personalized behavior pattern profiles for each player. Based on the player's historical behavior data and current behavior pattern archive, a time series prediction algorithm is used to train an action prediction model. This model can predict the most likely action type and target location within a future time window based on the player's current state and recent action sequence. Based on the output of the operation prediction model, we can identify in advance the game areas that players may visit, the game resources they may use, and the computing tasks that may be triggered. We can then preload the corresponding map data and resource files, and preprocess computing-intensive tasks such as physics calculations and collision detection. Monitor the matching degree between predicted operations and actual player operations, calculate the prediction accuracy and the hit rate of resource preprocessing, adjust the parameter weights of the prediction model and the trigger threshold of the preprocessing strategy based on the feedback results, and improve the overall performance of the prediction system.

10. A game concurrent processing system based on a distributed architecture, used to execute the game concurrent processing method based on a distributed architecture according to any one of claims 1 to 9, characterized in that: include: Central server and distributed nodes; The central server is configured to: Based on historical game data and real-time player behavior patterns, a deep learning neural network is used to predict the concurrent load peak in the future time window to obtain load prediction results. Dynamically calculating the processing capacity weight matrix of each distributed node based on the load prediction result; Based on the weight matrix, a consistent hashing algorithm is used to determine the corresponding first distributed node and intelligently allocate game instances to ensure load balancing while minimizing cross-node communication overhead; Based on the game instances assigned to each distributed node, identify and extract the state data that needs to be synchronized across nodes in each game instance, including player attributes, game object status, and scene environment information; Based on the conflict risk and business importance of the state data in concurrent processing, it is divided into three synchronization levels: core state layer, interaction state layer, and environment state layer. A multi-level state synchronization strategy is adopted based on the characteristics of data at different levels and node distribution; Based on the synchronization process of status data at different levels, a targeted conflict detection rule base is established; When multiple distributed nodes modify the same state data at the same time, the corresponding resolution strategy is adopted according to the data level and conflict type; Propagate the conflict resolution result to the first distributed node through incremental updates according to the multi-level state synchronization strategy, thereby ensuring state consistency and reducing network transmission overhead; Establish a health monitoring system for distributed nodes to monitor the response time, error rate, and resource usage of each node in real time; When a node failure or severe performance degradation is detected, the failover mechanism is triggered, including: first migrating the game instance on the failed node to the backup node, and then recovering the data through state snapshots and operation logs; Adopt a progressive state reconstruction strategy, prioritize restoring the core state layer data, and then gradually restore the interactive state layer and environment state layer data to ensure rapid recovery of game services; Dynamically adjust the resource allocation strategy of each node based on the complexity of the game scene and the density of players; Analyze players' gaming behavior patterns through machine learning algorithms, predict players' next actions, and preload and preprocess data in advance; Establish a cross-node resource sharing pool. When a node is short of resources, it can borrow idle resources from other nodes to achieve dynamic balance of resources.