Game fault propagation path prediction and optimization method and terminal
By collecting and encoding game data, constructing a dynamic heterogeneous graph, and using the Monte Carlo path prediction method combined with a repair strategy to generate a model, the problem of low efficiency in anomaly detection in game development was solved, and accurate prediction and efficient repair of faulty paths were achieved.
Patent Information
- Application Number
- CN202510834060.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies are inefficient and have limited coverage in physical testing during game development. Traditional AI models are difficult to adapt to complex game scenarios, resulting in low efficiency in anomaly detection and an inability to predict stealth propagation paths.
The system collects device performance data, network synchronization data, and game logic data from user clients, generates abnormal feature vectors using an anomaly feature encoder, constructs a dynamic heterogeneous graph, simulates the propagation path using the Monte Carlo path prediction method, determines node priorities by combining the repair strategy generation model, and executes the repair strategy in sequence.
It enables accurate prediction of the hidden propagation path of game malfunctions, improves the comprehensiveness and timeliness of anomaly detection, balances repair costs and benefits, and enhances resource utilization and user experience consistency.
Smart Images

Figure CN120929362A_ABST
Abstract
Description
Technical Field
[0001] This technology relates to the field of software testing technology, and in particular to a method and terminal for predicting and optimizing game fault propagation paths. Background Technology
[0002] In the game development lifecycle, the real-time performance and predictive accuracy of anomaly detection and repair strategies are crucial for ensuring user experience and product stability. However, existing technologies have certain limitations, primarily manifested in the following core issues: 1. Physical testing is inefficient and has limited coverage: physical testing environments that rely on real equipment deployment take a long time to verify each anomaly, which cannot meet the need for real-time feedback. Furthermore, traditional testing can only capture explicit bugs and cannot predict hidden propagation paths. 2. Traditional AI models are difficult to adapt to complex game scenarios: LSTM-based time series models have low accuracy when dealing with dynamic heterogeneous topologies between game modules. Their sequence modeling mechanism is difficult to characterize the nonlinear propagation relationship of multimodal coupling such as resource loading, physics engine, and network synchronization, which reduces the efficiency of anomaly identification. In addition, the anomaly path complexity in game scenarios is high, and supervised learning methods require a large amount of labeled data, which is costly. Summary of the Invention
[0003] The technical problem to be solved by the present invention is: the present invention provides a method and terminal for predicting and optimizing the propagation path of game faults, which can realize the prediction of the hidden propagation path of game faults and improve the efficiency of anomaly detection and identification.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for predicting and optimizing game fault propagation paths, comprising the following steps: S1. Collect device performance data, network synchronization data, and game logic data from the user client, and use an anomaly feature encoder to fuse the collected data and generate an anomaly feature vector; S2. Construct a dynamic heterogeneous graph. Based on the dynamic heterogeneous graph, use the Monte Carlo path prediction method to simulate the propagation path of the abnormal feature vector, obtain the path propagation probability and the number of affected users, and use the trained repair strategy generation model to generate the repair strategy for each node in the propagation path. S3. Obtain code coupling degree and repair time from external metadata, determine the priority of each node in the propagation path based on the path propagation probability, the number of affected users, the code coupling degree and the repair time, and execute the repair strategy corresponding to each node in sequence according to the priority.
[0005] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A game fault propagation path prediction and optimization terminal 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 various steps of the aforementioned game fault propagation path prediction and optimization method.
[0006] The beneficial effects of this invention are as follows: This invention provides a method and terminal for predicting and optimizing game fault propagation paths. It generates anomaly feature vectors by fusing device performance data, network synchronization data, and game logic data through an anomaly feature encoder, improving the comprehensiveness of anomaly detection and avoiding bias from single data sources. A dynamic heterogeneous graph is constructed, and the Monte Carlo path prediction method is used to simulate the propagation path of the anomaly feature vectors, obtaining the path propagation probability and the number of affected users. This enables accurate anomaly localization and propagation prediction, quantifies the impact range, and provides repair strategies for path nodes based on a repair strategy generation model, ensuring timely response to anomaly detection. The priority of each node in the propagation path is determined by combining the path propagation probability, the number of affected users, code coupling, and repair time. Repair strategies corresponding to each node are executed sequentially according to priority, balancing repair costs and benefits, prioritizing nodes with high propagation risk and low repair costs, improving resource utilization while ensuring the continuity of user experience. Attached Figure Description
[0007] Figure 1 This is a flowchart of a game fault propagation path prediction and optimization method according to an embodiment of the present invention; Figure 2 This is another flowchart of a game fault propagation path prediction and optimization method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a game fault propagation path prediction and optimization terminal according to an embodiment of the present invention; Label Explanation: 1. A terminal for predicting and optimizing game fault propagation paths; 2. Memory; 3. Processor. Detailed Implementation
[0008] 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.
[0009] Please refer to Figure 1 This invention provides a method for predicting and optimizing game fault propagation paths, including the following steps: S1. Collect device performance data, network synchronization data, and game logic data from the user client, and use an anomaly feature encoder to fuse the collected data and generate an anomaly feature vector; S2. Construct a dynamic heterogeneous graph. Based on the dynamic heterogeneous graph, use the Monte Carlo path prediction method to simulate the propagation path of the abnormal feature vector, obtain the path propagation probability and the number of affected users, and use the trained repair strategy generation model to generate the repair strategy for each node in the propagation path. S3. Obtain code coupling degree and repair time from external metadata, determine the priority of each node in the propagation path based on the path propagation probability, the number of affected users, the code coupling degree and the repair time, and execute the repair strategy corresponding to each node in sequence according to the priority.
[0010] As can be seen from the above description, the beneficial effects of the present invention are as follows: By fusing device performance data, network synchronization data, and game logic data through an anomaly feature encoder to generate an anomaly feature vector, the comprehensiveness of anomaly detection is improved, avoiding bias from single data points; a dynamic heterogeneous graph is constructed, and the Monte Carlo path prediction method is used to simulate the propagation path of the anomaly feature vector, obtaining the path propagation probability and the number of affected users, achieving accurate anomaly localization and propagation prediction, quantifying the scope of impact, and providing repair strategies for path nodes based on a repair strategy generation model, ensuring timely response to anomaly detection; the priority of each node in the propagation path is determined by combining the path propagation probability, the number of affected users, code coupling, and repair time, and the repair strategy corresponding to each node is executed sequentially according to the priority, balancing repair costs and benefits, prioritizing nodes with high propagation risk and low repair costs, improving resource utilization while ensuring the continuity of user experience.
[0011] Furthermore, the step of fusing the collected data using an anomaly feature encoder to generate an anomaly feature vector includes: The video memory usage rate is obtained from the device performance data, and the number of skill releases is obtained from the game logic data. Weights are then dynamically calculated based on the video memory usage rate and the number of skill releases. Weight = log(number of skill casts + 1) / (video memory usage × 0.5) The dynamic weight is a single scalar, and the dynamic weight is applied simultaneously to device performance data, network synchronization data, and game logic data to form an abnormal feature vector of a preset dimension.
[0012] As described above, by setting weights, the contribution of different data sources can be adaptively adjusted, and multi-source data can be integrated into anomaly feature vectors of preset dimensions, reducing computational complexity, enhancing the representational ability of anomaly feature vectors, effectively reducing false positives and false negatives, and improving the comprehensiveness of anomaly detection.
[0013] Furthermore, the construction of the dynamic heterogeneous graph includes: Obtain node data from the game logic data, server logs, and map rendering logs; The edge weights are calculated at preset intervals based on the skill verification difference in the game logic data and the map switching frequency in the map rendering log. A dynamic heterogeneous graph is constructed based on the node data and the edge weights.
[0014] As described above, by extracting node data based on game logic data, server logs, and map rendering logs, and calculating edge weights based on skill verification differences and map switching frequency to dynamically construct a heterogeneous graph, it is possible to characterize the game runtime dynamics in real time and accurately, providing reliable data support for fault path prediction.
[0015] Furthermore, the node types in the dynamic heterogeneous graph include client instance classes, server logic classes, and resource management classes; The method of using Monte Carlo path prediction to simulate the propagation path of the abnormal feature vector, and obtaining the path propagation probability and the number of affected users, includes: The edge weights are sorted from largest to smallest. Starting from the abnormal source node in the dynamic heterogeneous graph, a preset proportion of adjacent nodes with the highest edge weights are randomly selected each time. The out-degree of the selected adjacent nodes is calculated. The path propagation probability of the current propagation path is calculated using the edge weights and the out-degree. If the path propagation probability of the current propagation path is less than a preset termination threshold or the node of the current propagation path is a resource management node, then sampling of the current propagation path is stopped, the current propagation path is used as the propagation path of the abnormal feature vector, the path propagation probability of the current propagation path is used as the path propagation probability of the propagation path of the abnormal feature vector, and the number of affected users is determined by traversing each node in the current propagation path.
[0016] As described above, by selecting nodes based on edge weights and calculating the path propagation probability of the current propagation path based on the node's out-degree, the system ensures that high-probability paths are explored first, achieving accurate simulation of the propagation path of abnormal feature vectors. By terminating path exploration with preset probability thresholds and resource management nodes, the system avoids invalid calculations, improves fault analysis efficiency, determines the path propagation probability and the number of affected users of the propagation path of abnormal feature vectors, quickly locates high-risk propagation links, provides direct decision-making basis for game security operation and maintenance and resource scheduling, and reduces fault risks.
[0017] Furthermore, the training process of the repair strategy generation model includes: A parameter server architecture is used to perform distributed training on the repair strategy generation model. The global parameters of the repair strategy generation model are synchronized once every preset time. The features corresponding to the nodes and edges in the dynamic heterogeneous graph are learned. The parameters of the repair strategy generation model are optimized based on the weighted loss function. The model training is repeated until the repair strategy generation model meets the preset model convergence condition.
[0018] As described above, the distributed training and periodic parameter synchronization of the parameter server architecture significantly improve the model training speed. At the same time, the combination of node and edge feature learning and weighted loss function optimization enhances the model's adaptability to dynamic graph structures, thereby generating more accurate repair strategies, ensuring rapid model convergence, and improving the reliability and real-time performance of anomaly repair.
[0019] Please refer to Figure 3 Another embodiment of the present invention provides a game fault propagation path prediction and optimization terminal, including 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 various steps of the above-described game fault propagation path prediction and optimization method.
[0020] The game fault propagation path prediction and optimization method and terminal of the present invention are applicable to game fault detection scenarios. They can predict the hidden propagation path of game faults and improve the efficiency of anomaly detection and identification. The following is a description of specific implementation methods: Please refer to Figure 1 and Figure 2 Embodiment 1 of the present invention is as follows: A method for predicting and optimizing game fault propagation paths, comprising the following steps: S1. Collect device performance data, network synchronization data, and game logic data from the user client. Use an anomaly feature encoder to fuse the collected data and generate an anomaly feature vector.
[0021] In this embodiment, device performance data (CPU / GPU / VRAM) can be obtained through the official performance monitoring interface of "Eudemons Online" (MoyaClientLogger class). Network synchronization data (packet loss rate / RTT) can be obtained through a UDP protocol parser (parses the "Eudemons Online" dedicated UDP synchronization protocol, extracts keyframe latency data, and defines a synchronization error threshold: SYNC_ERROR_THRESHOLD = 200, unit: milliseconds). Game logic data (skill error / LOD switching) can be obtained through the difference between skill pre-calculation data (hit judgment box coordinates, damage value) and server verification results (capture skill data method) and map rendering logs (LOD level switching frequency, texture loading time, with a sampling frequency of 120 times per second). The pseudocode implementation for client log collection is as follows: class MoyaClientLogger: def capture_skill_data(self): # Obtain skill pre-calculation data through the public API of "Eudemons Online" skill_precalc = API.GetSkillPrecalc(player_id) # Official SDK method server_result = API.GetServerVerifyResult(player_id) self.diff = abs(skill_precalc['damage'] - server_result['damage']) # Calculate the damage difference def start_monitor(self): # Enable the official performance monitoring interface (referencing Section 4.2 of the "Eudemons Online" developer documentation) PerformanceMonitor.Start( metrics=['FPS', 'VRAM'], sample_rate=120# Consistent with the document declaration ) Furthermore, in this embodiment, the step of using an anomaly feature encoder to fuse the collected data and generate an anomaly feature vector includes: obtaining the video memory usage rate from the device performance data and the number of skill releases from the game logic data, and dynamically calculating the weight based on the video memory usage rate and the number of skill releases: weight = log(number of skill releases + 1) / (video memory usage rate × 0.5). The dynamic weight is a single scalar, and the dynamic weight is simultaneously applied to the device performance data, network synchronization data, and game logic data to form an anomaly feature vector of a preset dimension.
[0022] An anomaly feature encoder is used to fuse data from different dimensions into a single 64-dimensional anomaly feature vector, which comprehensively characterizes the system state and improves the comprehensiveness of anomaly detection. Specifically, this includes: 1. Vector concatenation (1) Equipment performance data (32 dimensions) CPU utilization: The percentage of CPU usage in the game process; Video memory usage: The amount of memory used by the graphics card (GB); Frame rate fluctuation: the standard deviation of frames per second (FPS), reflecting the smoothness of the video; Other metrics: such as GPU metrics, thread load, etc. (expand according to actual needs).
[0023] (2) Network synchronization data (16 dimensions) Packet loss rate: The percentage of packets lost during data transmission; RTT (Round Trip Time): The communication delay (in milliseconds) between the client and the server. Broadband utilization: The percentage of current network bandwidth being used; Other parameters include TCP retransmission rate and UDP jitter.
[0024] (3) Game logic data (16 dimensions) Skill release frequency: The number of times a player releases a skill per unit of time; Map tile loading status: the number of map tiles currently loaded and the loading time; Other data includes NPC behavior complexity and physics engine computational load.
[0025] The above three types of features are concatenated into a 64-dimensional vector, as expressed by the formula: Feature vector = device performance data 32 ⊕Network synchronization data 16 ⊕Game Logic Data 16 Where ⊕ represents the vector concatenation operation. 2. Assign dynamic weights Dynamic weights are assigned to different features to reflect their importance in anomaly detection. The formula for calculating the dynamic weights is as follows: Feature weight = log(skill release frequency + 1) / (video memory usage (GB) × 0.5), where the logarithmic transformation log(skill release frequency + 1) is used to smooth the values and avoid the influence of extreme values. The higher the skill release frequency, the more significant the player activity or skill synchronization problem may be. The higher the video memory usage, the greater the system performance pressure, and the weight of non-critical features needs to be reduced. The constant (0.5) in the denominator is an adjustment coefficient used to balance the weight range. When the video memory usage is low, the skill release frequency contributes more to the weight; when the video memory usage is high, the weight will be adaptively reduced to avoid misjudgment due to performance bottlenecks.
[0026] S2. Construct a dynamic heterogeneous graph. Based on the dynamic heterogeneous graph, use the Monte Carlo path prediction method to simulate the propagation path of the abnormal feature vector, obtain the path propagation probability and the number of affected users, and use the trained repair strategy generation model to generate the repair strategy for each node in the propagation path, specifically including S2.1-S2.3.
[0027] S2.1 Construct a dynamic heterogeneous graph, including: Obtain node data from the game logic data, server logs, and map rendering logs; The edge weights are calculated at preset intervals based on the skill verification difference in the game logic data and the map switching frequency in the map rendering log. A dynamic heterogeneous graph is constructed based on the node data and the edge weights.
[0028] In this embodiment, the node types in the dynamic heterogeneous graph include client instance class, server logic class, and resource management class. The client instance class includes players (representing player entities in the game) and NPCs (non-player characters, entities controlled by the system) in the game logic data (skill release frequency, player position). The server logic class includes combat calculation (handling combat logic and damage calculation) and map management (responsible for map loading and dynamic resource allocation) in the server log. The resource management class includes textures (texture resources in the game), sound effects (background music and sound effects), and skill effects (visual effects when skills are released) in the map rendering log (LOD switching frequency).
[0029] Based on the skill verification difference in the game logic data and the map switching frequency in the map rendering log, edge weights are calculated at preset intervals. The formula for edge weight calculation is as follows: Among them, Skill errorThe deviation between skill pre-calculation and server verification is [0,1]. The larger the value, the more serious the skill synchronization problem. Considering that the skill synchronization problem has a greater impact on the player experience, its weight is relatively high (60%). LODswitch is the frequency of map detail level switching. After normalization, its range is [0,1]. The higher the value, the more frequent the map resource switching. Considering that the frequency of map resource switching affects performance, its weight is relatively low (40%).
[0030] Dynamic heterogeneous graphs are dynamically constructed based on node data and edge weights, which can accurately represent the runtime characteristics of the game in real time and provide reliable data support for fault path prediction.
[0031] S2.2. Simulate the propagation path of the abnormal feature vector using the Monte Carlo path prediction method to obtain the path propagation probability and the number of affected users, including: The edge weights are sorted from largest to smallest. Starting from the abnormal source node in the dynamic heterogeneous graph, a preset proportion of adjacent nodes with the highest edge weights are randomly selected each time. The out-degree of the selected adjacent nodes is calculated. The path propagation probability of the current propagation path is calculated using the edge weights and the out-degree. If the path propagation probability of the current propagation path is less than a preset termination threshold or the node of the current propagation path is a resource management node, then sampling of the current propagation path is stopped, the current propagation path is used as the propagation path of the abnormal feature vector, the path propagation probability of the current propagation path is used as the path propagation probability of the propagation path of the abnormal feature vector, and the number of affected users is determined by traversing each node in the current propagation path.
[0032] In this embodiment, the Monte Carlo path prediction method employs the following rules: starting from the anomaly source node, the top 30% of adjacent nodes by edge weight are randomly selected each time, with the sampling depth limited to 5 layers (corresponding to the average depth of the game module call chain). The path propagation probability is calculated as follows: Among them, W k Let deg(v) be the weight of the k-th edge in the path, representing the direct impact of this edge on the propagation; k ) represents the current node v k The out-degree represents the number of propagation paths chosen by the node; adding 1 to the denominator avoids a denominator of 0 when the out-degree is 0. Propagation terminates when the path propagation probability is less than 0.1 (i.e., low-probability events stop tracking) or when a resource management node (such as a video memory allocation module) is reached. For example, in the case of the Fire Dragon skill synchronization anomaly, 500 Monte Carlo simulations revealed that 72% of the paths ultimately led to synchronization failure in the battle result, with an average propagation path length of 3.2 layers.
[0033] S2.3 The training process of the repair strategy generation model includes: A parameter server architecture is used to perform distributed training on the repair strategy generation model. The global parameters of the repair strategy generation model are synchronized once every preset time. The features corresponding to the nodes and edges in the dynamic heterogeneous graph are learned. The parameters of the repair strategy generation model are optimized based on the weighted loss function. The model training is repeated until the repair strategy generation model meets the preset model convergence condition.
[0034] In this embodiment, a parameter server architecture is used for model training, synchronizing global parameters every 5 seconds. Features of nodes and edges are learned through a dynamic heterogeneous graph to optimize anomaly detection and repair strategies. Model optimization is guided by a weighted loss function, defined as: L = 0.7·CrossEntropy + 0.3·KL-Divergence. CrossEntropy measures the accuracy of classification tasks (such as anomaly detection), which is the core task and accounts for 70%. KL-Divergence constrains the difference between the model's output distribution and the true distribution to avoid overfitting; distribution consistency serves as an auxiliary constraint, accounting for 30%.
[0035] S3. Obtain code coupling degree and repair time from external metadata, determine the priority of each node in the propagation path based on the path propagation probability, the number of affected users, the code coupling degree and the repair time, and execute the repair strategy corresponding to each node in sequence according to the priority.
[0036] In this embodiment, code coupling is obtained from dependency analysis of the code repository (such as a call relationship graph), and repair time is obtained from the average repair time of historical work orders (such as a preset database). Priority = (path propagation probability × number of affected users) / (code coupling × log (repair time)). The numerator emphasizes the diffusion and scope of the anomaly, while the denominator suppresses high-risk or time-consuming repair tasks. Propagation probability represents the likelihood of the anomaly's feature vector spreading in the system (e.g., a skill synchronization error may quickly affect other players, with a propagation probability of 0.8; while a local texture loading error only affects a single client, with a propagation probability of 0.2); number of affected users represents the number of players affected by the anomaly (e.g., a server crash affects all online players, while an NPC path error only affects nearby players); code coupling represents the code complexity involved in repairing the anomaly (the smaller the value, the better) (e.g., the core combat logic coupling is 5, the UI interface is 1); repair time represents the estimated time required for repair (taking the logarithm to smooth the value). That is, anomalies with high propagation probability or large impact scope are repaired first, while anomalies with high code coupling or long repair times are given lower priority. For example: 1. A certain skill synchronization error: propagation probability = 0.7, number of affected players = 100, code coupling degree = 2, repair time = 10 hours, its priority = (0.7 × 100) / (2 × log (10)) ≈ 35 (high priority).
[0037] 2. A certain sound effect loading error: Propagation probability = 0.1, number of affected players = 5, code coupling degree = 1, repair time = 2 hours, its priority = (0.1×5) / (1×log(2))≈1.6 (low priority).
[0038] Furthermore, in this embodiment, when system resources are scarce, a degradation strategy can be automatically triggered to maintain the operation of core functions. For example, through real-time detection by the monitoring module, when the video memory usage is greater than 80%, the LOD level of non-critical effects is reduced (such as reducing the number / resolution of skill effect examples and disabling unnecessary rendering such as dynamic lighting and shadows in distant scenes), while maintaining full effects for core functions (such as combat calculations and player character rendering) and prioritizing the degradation of non-critical resources (such as environmental decorations and NPC clothing details) until the video memory usage drops below 70%, at which point the original image quality is gradually restored.
[0039] In this embodiment, the following application scenarios are also provided: 1. Fire Dragon skill synchronization error The client-side pre-calculated hit radius of the Fire Dragon skill was 5.2 meters, while the server's actual judgment radius was 4.8 meters, resulting in an error rate of 8.3%. The average synchronization latency was 176ms (peak 312ms). Analysis of the anomaly propagation path through Monte Carlo simulation (500 samples) revealed the core chain as follows: client-side skill release (82% probability) → server judgment latency (67% probability) → battle result synchronization failure (53% probability). Based on this, the remediation strategy is to optimize the skill hit verification algorithm, reducing the error rate from 8.3% to 2.1%; and upgrade the synchronization protocol to a TCP+UDP hybrid mode to reduce transmission latency.
[0040] 2. Crash when loading the main city map. When the LOD (Level of Detail) switching frequency in the game consistently exceeds 8 times / second and the VRAM usage rate consistently exceeds 92%, the Monte Carlo simulation predicts the following failure path: high-precision model loading → VRAM overflow → map tile rendering failure → client crash. Based on this, the implemented repair strategy is to dynamically adjust the LOD switching threshold, setting a 15% reduction in the LOD switching threshold for every 10% increase in VRAM usage. By adapting to VRAM pressure in real time, the risk of high-frequency switching and VRAM overload is significantly reduced, effectively preventing client crashes.
[0041] Please refer to Figure 3 Embodiment two of the present invention is as follows: A game fault propagation path prediction and optimization terminal 1 includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, it implements the various steps of a game fault propagation path prediction and optimization method according to Embodiment 1.
[0042] In summary, the game fault propagation path prediction and optimization method provided by this invention generates anomaly feature vectors by fusing device performance data, network synchronization data, and game logic data based on feature weights using an anomaly feature encoder, thereby improving the comprehensiveness of anomaly detection and avoiding bias from single data sources. It extracts node data based on game logic data, server logs, and map rendering logs, and calculates edge weights based on skill verification differences and map switching frequency to dynamically construct a heterogeneous graph. This graph can accurately and in real-time characterize the game's runtime dynamics, providing reliable data support for fault path prediction. Finally, it uses a Monte Carlo path prediction method to simulate the propagation path of the anomaly feature vectors. The propagation probability and the number of affected users are obtained, and a repair strategy generation model is used to generate a repair strategy for each node in the propagation path. This enables accurate anomaly localization and propagation prediction, quantifies the scope of impact, and provides repair strategies for path nodes based on the repair strategy generation model, ensuring timely response to anomaly detection. The priority of each node in the propagation path is determined by combining the propagation probability, the number of affected users, code coupling, and repair time. The repair strategy corresponding to each node is executed in order of priority, balancing repair costs and benefits, prioritizing nodes with high propagation risk and low repair costs, improving resource utilization while ensuring the continuity of user experience.
[0043] 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 method for predicting and optimizing game fault propagation paths, characterized in that, Including the following steps: S1. Collect device performance data, network synchronization data, and game logic data from the user client, and use an anomaly feature encoder to fuse the collected data and generate an anomaly feature vector; S2. Construct a dynamic heterogeneous graph. Based on the dynamic heterogeneous graph, use the Monte Carlo path prediction method to simulate the propagation path of the abnormal feature vector, obtain the path propagation probability and the number of affected users, and use the trained repair strategy generation model to generate the repair strategy for each node in the propagation path. S3. Obtain code coupling degree and repair time from external metadata, determine the priority of each node in the propagation path based on the path propagation probability, the number of affected users, the code coupling degree and the repair time, and execute the repair strategy corresponding to each node in sequence according to the priority.
2. The method for predicting and optimizing game fault propagation paths according to claim 1, characterized in that, The step of fusing the collected data using an anomaly feature encoder to generate an anomaly feature vector includes: The video memory usage rate is obtained from the device performance data, and the number of skill releases is obtained from the game logic data. Weights are then dynamically calculated based on the video memory usage rate and the number of skill releases. Weight = log(number of skill casts + 1) / (video memory usage × 0.5) The dynamic weight is a single scalar, and the dynamic weight is applied simultaneously to device performance data, network synchronization data, and game logic data to form an abnormal feature vector of a preset dimension.
3. The method for predicting and optimizing game fault propagation paths according to claim 1, characterized in that, The construction of the dynamic heterogeneous graph includes: Obtain node data from the game logic data, server logs, and map rendering logs; The edge weights are calculated at preset intervals based on the skill verification difference in the game logic data and the map switching frequency in the map rendering log. A dynamic heterogeneous graph is constructed based on the node data and the edge weights.
4. The method for predicting and optimizing game fault propagation paths according to claim 3, characterized in that, The node types in the dynamic heterogeneous graph include client instance classes, server logic classes, and resource management classes; The method of using Monte Carlo path prediction to simulate the propagation path of the abnormal feature vector, and obtaining the path propagation probability and the number of affected users, includes: The edge weights are sorted from largest to smallest. Starting from the abnormal source node in the dynamic heterogeneous graph, a preset proportion of adjacent nodes with the highest edge weights are randomly selected each time. The out-degree of the selected adjacent nodes is calculated. The path propagation probability of the current propagation path is calculated using the edge weights and the out-degree. If the path propagation probability of the current propagation path is less than a preset termination threshold or the node of the current propagation path is a resource management node, then sampling of the current propagation path is stopped, the current propagation path is used as the propagation path of the abnormal feature vector, the path propagation probability of the current propagation path is used as the path propagation probability of the propagation path of the abnormal feature vector, and the number of affected users is determined by traversing each node in the current propagation path.
5. The method for predicting and optimizing game fault propagation paths according to claim 1, characterized in that, The training process of the repair strategy generation model includes: A parameter server architecture is used to perform distributed training on the repair strategy generation model. The global parameters of the repair strategy generation model are synchronized once every preset time. The features corresponding to the nodes and edges in the dynamic heterogeneous graph are learned. The parameters of the repair strategy generation model are optimized based on the weighted loss function. The model training is repeated until the repair strategy generation model meets the preset model convergence condition.
6. A game fault propagation path prediction and optimization terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: S1. Collect device performance data, network synchronization data, and game logic data from the user client, and use an anomaly feature encoder to fuse the collected data and generate an anomaly feature vector; S2. Construct a dynamic heterogeneous graph. Based on the dynamic heterogeneous graph, use the Monte Carlo path prediction method to simulate the propagation path of the abnormal feature vector, obtain the path propagation probability and the number of affected users, and use the trained repair strategy generation model to generate the repair strategy for each node in the propagation path. S3. Obtain code coupling degree and repair time from external metadata, determine the priority of each node in the propagation path based on the path propagation probability, the number of affected users, the code coupling degree and the repair time, and execute the repair strategy corresponding to each node in sequence according to the priority.
7. A game fault propagation path prediction and optimization terminal according to claim 6, characterized in that, The step of fusing the collected data using an anomaly feature encoder to generate an anomaly feature vector includes: The video memory usage rate is obtained from the device performance data, and the number of skill releases is obtained from the game logic data. Weights are then dynamically calculated based on the video memory usage rate and the number of skill releases. Weight = log(number of skill casts + 1) / (video memory usage × 0.5) The dynamic weight is a single scalar, and the dynamic weight is applied simultaneously to device performance data, network synchronization data, and game logic data to form an abnormal feature vector of a preset dimension.
8. A game fault propagation path prediction and optimization terminal according to claim 6, characterized in that, The construction of the dynamic heterogeneous graph includes: Obtain node data from the game logic data, server logs, and map rendering logs; The edge weights are calculated at preset intervals based on the skill verification difference in the game logic data and the map switching frequency in the map rendering log. A dynamic heterogeneous graph is constructed based on the node data and the edge weights.
9. A game fault propagation path prediction and optimization terminal according to claim 8, characterized in that, The node types in the dynamic heterogeneous graph include terminal instance class, server logic class, and resource management class; The method of using Monte Carlo path prediction to simulate the propagation path of abnormal feature vectors, and obtaining the path propagation probability and the number of affected users, includes: The edge weights are sorted from largest to smallest. Starting from the abnormal source node in the dynamic heterogeneous graph, a preset proportion of adjacent nodes with the highest edge weights are randomly selected each time. The out-degree of the selected adjacent nodes is calculated. The path propagation probability of the current propagation path is calculated using the edge weights and the out-degree. If the path propagation probability of the current propagation path is less than a preset termination threshold or the node of the current propagation path is a resource management node, then sampling of the current propagation path is stopped, the current propagation path is used as the propagation path of the abnormal feature vector, the path propagation probability of the current propagation path is used as the path propagation probability of the propagation path of the abnormal feature vector, and the number of affected users is determined by traversing each node in the current propagation path.
10. A game fault propagation path prediction and optimization terminal according to claim 9, characterized in that, The training process of the repair strategy generation model includes: A parameter server architecture is used to perform distributed training on the repair strategy generation model. The global parameters of the repair strategy generation model are synchronized once every preset time. The features corresponding to the nodes and edges in the dynamic heterogeneous graph are learned. The parameters of the repair strategy generation model are optimized based on the weighted loss function. The model training is repeated until the repair strategy generation model meets the preset model convergence condition.