Game situation restoring method, system, device, storage medium and program product
By using back diffusion and conditional constraint embedding of a pre-trained diffusion model, the problem of missing information in game situation replay is solved, achieving high-fidelity and intelligent situation reconstruction and tactical analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-03-20
AI Technical Summary
Existing game situation replay technologies cannot effectively reconstruct the full picture of the game when key operations or intermediate state data are missing, and they cannot deduce hidden information of players, making it difficult to handle uncertain scenarios.
A pre-trained diffusion model is used for the back diffusion process. Combined with game state information and preset constraints, a situation reconstruction trajectory is generated. The game process is gradually reconstructed through the back diffusion mechanism of the diffusion model. The cross-attention mechanism is used to embed the constraints to ensure that the generated trajectory conforms to the game logic and rules.
Even with some missing observational information, it generates a high-fidelity, logically sound game situation reconstruction trajectory, possesses the ability to reason about hidden information, and improves the completeness and intelligence level of the review.
Smart Images

Figure CN121060069B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of game situation review, and in particular to a game situation restoration method, system, device, storage medium and program product. BACKGROUND
[0002] In the field of game situation review, especially in complex confrontation games (such as chess games and strategy games), the review mainly relies on rule reasoning, manual recording or backtracking based on review files. However, the existing methods have the following main defects: first, the existing game situation review technology relies on complete operation records, and if key operations or intermediate state data are missing, the system cannot effectively restore the overall game situation; second, the traditional method does not have the function of inferring hidden information of players (such as hand cards and strategy intentions), and it is difficult to handle non-deterministic scenarios. SUMMARY
[0003] The main purpose of the present application is to provide a game situation restoration method, system, device, storage medium and program product, aiming to solve the technical problem of how to accurately restore the game situation under the condition of partial observation information missing.
[0004] To achieve the above-mentioned purpose, the present application provides a game situation restoration method, which comprises:
[0005] The collected game session information is input into a pre-trained diffusion model, and a situation restoration track is generated through the reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset condition constraints.
[0006] In an embodiment, the step of inputting the collected game session information into the pre-trained diffusion model and generating the situation restoration track through the reverse diffusion process of the pre-trained diffusion model comprises:
[0007] The collected game session information is input into a pre-trained diffusion model;
[0008] Through the reverse diffusion process of the pre-trained diffusion model, the input game session information is denoised based on the preset condition constraints to generate a situation restoration track.
[0009] In an embodiment, the step of inputting the collected game session information into the pre-trained diffusion model and generating the situation restoration track through the reverse diffusion process of the pre-trained diffusion model comprises:
[0010] The game session information is initialized as a noise state;
[0011] Based on the noise state and the preset condition constraints, the current noise component is calculated.
[0012] updating the noise state according to the current noise component by a reverse diffusion formula to obtain an updated noise state;
[0013] outputting the denoised situation restoration trajectory when a time step in the updated noise state decreases to zero.
[0014] In an embodiment, before the step of inputting the collected game session information into the pre-trained diffusion model and generating the situation restoration trajectory through a reverse diffusion process of the pre-trained diffusion model, the method further comprises:
[0015] embedding the preset conditional constraint into the diffusion model;
[0016] training the diffusion model based on the preset conditional constraint and the game state information to obtain a pre-trained diffusion model.
[0017] In an embodiment, the step of embedding the preset conditional constraint into the diffusion model comprises:
[0018] encoding the preset conditional constraint into a conditional feature vector;
[0019] concatenating the conditional feature vector with a noise state to obtain a concatenated noise state, and inputting the concatenated noise state into the diffusion model; and / or
[0020] taking the noise state as a query vector, the conditional feature vector as a key vector and a value vector, fusing through a cross-attention mechanism to generate a condition-guided denoised state representation, and inputting the condition-guided denoised state representation into the diffusion model.
[0021] In an embodiment, after the step of inputting the collected game session information into the pre-trained diffusion model and generating the situation restoration trajectory through a reverse diffusion process of the pre-trained diffusion model, the method further comprises:
[0022] verifying whether the situation restoration trajectory conforms to a preset game rule;
[0023] if the situation restoration trajectory does not conform to the preset game rule, mapping a rule-violating state in the detected situation restoration trajectory to a legal state through a projection operation to generate a compliant situation restoration trajectory.
[0024] In addition, to achieve the above-mentioned purposes, the present application further provides a game situation restoration system, which comprises:
[0025] A situation restoration module is configured to input the collected game session information into a pre-trained diffusion model, and generate a situation restoration track through a reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset conditional constraints.
[0026] In addition, to achieve the above object, the present application further provides a game situation restoration device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the game situation restoration method as described above.
[0027] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the game situation restoration method as described above.
[0028] In addition, to achieve the above object, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the game situation restoration method as described above.
[0029] The present application provides a game situation restoration method, system, device, storage medium and program product, which comprises inputting collected game session information into a pre-trained diffusion model, and generating a situation restoration track through a reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset conditional constraints. This scheme uses the reverse diffusion mechanism of the diffusion model to gradually reconstruct the session process, and can generate a complete game situation restoration track under the condition of partial missing observation information. At the same time, the model is trained in combination with game state information and preset conditional constraints, so that the diffusion model has reasoning ability for hidden information such as opponent's hand cards and strategy intention, effectively improving the accuracy of game situation restoration. BRIEF DESCRIPTION OF DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0032] Figure 1A flowchart provided by the game situation restoring method embodiment one of the present application;
[0033] Figure 2 A flowchart provided by the game situation restoring method embodiment two of the present application;
[0034] Figure 3 A flowchart provided by the game situation restoring method embodiment three of the present application;
[0035] Figure 4 A module structure diagram of the game situation restoring system of the present application embodiment;
[0036] Figure 5 A device structure diagram of the hardware running environment related to the game situation restoring method of the present application embodiment.
[0037] The object implementation, functional features and advantages of the present application will be further explained with reference to the accompanying drawings in combination with embodiments. DETAILED DESCRIPTION
[0038] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0039] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings in the specification and specific embodiments.
[0040] The main solution of the present application embodiment is to input the collected game match information into the pre-trained diffusion model to generate a situation restoring track, wherein the diffusion model is trained based on game state information and preset condition constraints.
[0041] In the present embodiment, for the convenience of description, the following describes the game situation restoring system as the execution subject.
[0042] Due to the existing similar game review scheme, it mainly depends on rule reasoning, manual recording or backtracking based on review files. These methods have the following main defects: if the key operation or intermediate state data is missing, the system cannot effectively restore the overall game; the traditional method does not have the ability to speculate the hidden information of the player (such as hand cards, strategy intention); at the same time, it is unable to simulate and review the different possible branches and situation evolution trend with high quality; in addition, it also lacks the mechanism of visual restoration, strategy adjustment, review deduction, which is not convenient for players or coaches to conduct in-depth analysis.
[0043] To solve the above technical problems, the application provides a game situation restoration method, system, device, storage medium and program product. The scheme gradually recovers the complete game track from noise in the reverse generation process by constructing a pre-trained conditional diffusion model, can intelligently infer hidden states and generate restoration results consistent with game logic under the condition of missing part of the observed information. Further, by embedding game rules, win-lose results, player behavior patterns, etc. as conditional constraints into the model training process, the generated track is guided to meet the legality and strategy consistency, and multi-modal sampling is supported to simulate different possible situation evolution paths. The scheme realizes high-fidelity situation reconstruction without relying on complete original data, supports visual deduction, strategy intervention and branch review, and significantly improves the intelligent level and analysis depth of game review.
[0044] It should be noted that the execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions. Hereinafter, the embodiment and the following embodiments will be described taking a mobile phone as an example.
[0045] Based on this, the application embodiment provides a game situation restoration method, referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the game situation restoration method of the application is shown in the figure.
[0046] In this embodiment, the game situation restoration method includes step S10:
[0047] Step S10, input the collected game game information into the pre-trained diffusion model, and generate a situation restoration track through the reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset conditional constraints.
[0048] It should be noted that the game game information includes but is not limited to: part of the player's card action, situation screenshot, final win-lose result, etc. incomplete or fragmented observation data.
[0049] In addition, it should be noted that the situation restoration track refers to the complete game progress sequence from the initial state to the final state, including the game state, player action, hidden information (such as opponent's hand, strategy intention) estimation result of each time step, and state transition time sequence path.
[0050] It can be understood that, since the traditional method is difficult to reconstruct the complete game in the scene of lacking key operation or intermediate state data, and the diffusion model has the ability to generate structured sequences step by step from noise, step S10 is performed, which can avoid the failure of review caused by incomplete data, thereby improving the integrity and rationality of the situation restoration.
[0051] In a possible implementation, step S10 can include steps S11-S12.
[0052] In step S11, the collected game information is input into the pre-trained diffusion model.
[0053] In step S12, the pre-trained diffusion model is used to generate a situation restoration trajectory according to the input game information through a reverse diffusion process of the pre-trained diffusion model.
[0054] Optionally, in the embodiment, since the pre-trained diffusion model has been trained on the game data containing conditional constraints, it has the ability to infer a complete path from partial observation information. Therefore, the reverse diffusion mechanism of the pre-trained diffusion model is used to gradually denoise and generate intermediate states conforming to the game logic under the guidance of the input information, and finally output a complete situation restoration trajectory.
[0055] In another possible implementation, step S12 can further include steps A11-A14.
[0056] In step A11, the game information is initialized as a noise state.
[0057] In the embodiment, the reverse diffusion is the core of the system, which is used to reconstruct a complete game state trajectory from partial observation information.
[0058] Specifically, a noise state is first initialized from a Gaussian noise distribution or partial observable game information, denoted as where T represents the maximum noise level. By initializing the noise state, a starting point is provided for the subsequent reverse diffusion process, and a complete situation restoration trajectory is gradually denoised and generated.
[0059] In step A12, a current noise component is calculated based on the noise state and a preset conditional constraint.
[0060] It should be noted that the preset conditional constraint includes but is not limited to known cards, player behavior, or win-lose results.
[0061] In the embodiment, a trained neural network The noise component is calculated as wherein, denotes the current noise state, t is the time step, and c is a preset conditional constraint. The neural network can estimate the noise component in the current state by learning historical data.
[0062] Step A13, updating the noise state according to the current noise component through a backward diffusion formula to obtain an updated noise state;
[0063] After calculating the current noise component, the noise state is updated through a backward diffusion formula. The process of calculating the updated noise state is as follows:
[0064]
[0065] In the formula, the is a predefined noise scheduling parameter; is a cumulative noise scheduling parameter; is a noise variance; is a noise component predicted by a trained neural network; is the noise state of the current time step t; z is a random Gaussian noise, which follows a standard normal distribution N(0, I).
[0066] According to the above formula, the noise level is gradually reduced, and iteration is performed from t=T to t=0, and the noise state is updated each time. , which gradually approaches the true game state.
[0067] Step A14, when the time step in the updated noise state is decremented to zero, output the denoised situation restoration trajectory.
[0068] When the time step t is decremented to zero, i.e., t=0, the noise state at this time is the denoised situation restoration trajectory. Among them, the output contains estimated hidden information (such as the opponent's hand or strategy), forming a complete game process. By sampling different initial noises multiple times, multiple reasonable trajectories can be produced to support multi-branch simulation and review analysis.
[0069] Finally, multiple situation restoration trajectories are displayed through an interface, and the user is supported to score, select, and further deduce the generated review.
[0070] For example, by restoring the complete trajectory of a key match, the player and the coach can analyze the pros and cons of the decision and identify the key turning point, such as generating multiple possible operation sequences based on part of the match video for group discussion to improve tactics.
[0071] Or, the generated high-quality review data is used as training data for game AI to enhance its strategy learning ability, such as using the situation restoration trajectory for pre-training of a reinforcement learning model to reduce the demand for real game data.
[0072] At the same time, support multi-view, multi-strategy situation analysis, generate reasonable evolution path under different player perspectives, help players understand the potential strategies of opponents, such as in card games, infer the hidden cards of opponents and simulate their possible actions to assist players in optimizing strategies.
[0073] Also, by analyzing the player behavior in the situation restoration trajectory, the decision-making quality and competitive level of the player can be evaluated, such as comparing the deviation of the generated situation restoration trajectory from the optimal strategy to quantify the player's performance in different situations.
[0074] In addition, the situation restoration trajectory generated by the diffusion model generates an intuitive game replay for novice players, showing the decision-making process of high-level players; or generates diverse game evolution in the game community, enhancing user engagement and entertainment.
[0075] Through the above steps, the condition diffusion model is used to gradually generate high-fidelity, logical situation restoration trajectories from noise in the case of incomplete game information, with intelligent inference ability for hidden states and multi-branch counterfactual reasoning function, significantly improving the completeness, intelligence level and tactical analysis depth of game review.
[0076] Through the above embodiment method, the collected game information is input into the pre-trained diffusion model, and the situation restoration trajectory is generated through the reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset condition constraints. This scheme uses the reverse diffusion mechanism of the diffusion model to gradually reconstruct the game process, and can generate a complete game situation restoration trajectory under the condition of partial missing observation information; at the same time, the model is trained in combination with game state information and preset condition constraints, so that the diffusion model has reasoning ability for hidden information such as opponent's cards and strategy intention, effectively improving the accuracy of game situation restoration.
[0077] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and will not be repeated hereinafter. On this basis, please refer to Figure 2 , before step S10, the game situation restoration method further includes steps S01-S02:
[0078] Step S01, embed the preset condition constraint into the diffusion model;
[0079] It can be understood that, since the game situation restoration process needs to ensure that the generated trajectory conforms to the actual game logic and rules, step S01 is performed to embed the preset condition constraint into the diffusion model to guide the model to always follow the known information and game mechanism during the denoising process.
[0080] In an implementable embodiment, step S01 can include steps S011-S013:
[0081] Step S011, encode the preset condition constraints into a condition feature vector;
[0082] In this embodiment, first, the preset condition constraints (such as hand information, opponent actions, win or lose results, etc.) are encoded into a condition feature vector. For example, the hand information can be encoded into a one-hot vector, and the win or lose result can be encoded into a binary label. In this way, the unstructured condition information is converted into a numerical representation that can be processed by the model, facilitating subsequent fusion with the noise state.
[0083] Step S012, concatenate the condition feature vector and the noise state to obtain a concatenated noise state, and input the concatenated noise state into the diffusion model;
[0084] Next, the encoded condition feature vector and the current noise state are concatenated to obtain a concatenated noise state. Then, the concatenated noise state is input to the denoising network in the diffusion model .
[0085] The above concatenation method is simple and direct, which can effectively integrate the condition constraints into the input end of the model, so that the model can fully inform and utilize the condition information in the denoising process, thereby generating an output result that conforms to the expected semantics or structure.
[0086] Step S013, the noise state is taken as a query vector, the condition feature vector is taken as a key vector and a value vector, and the cross-attention mechanism is used for fusion to generate a condition-guided denoising state representation, and input into the diffusion model.
[0087] Another embedding method is also proposed in this embodiment, i.e., the cross-attention mechanism. Specifically, the multi-head self-attention layer is used to take the noise state as a query vector (Query), and the condition feature vector as a key vector (Key) and a value vector (Value), and the cross-attention mechanism is used for deep fusion. This mechanism can capture the complex dependency relationship between the condition information and the noise state, so that the model pays more attention to the key conditions (such as recent actions are better than early actions), and ensures that the generated situation restoration trajectory conforms to the known situation or legal action.
[0088] Further, for various conditional constraints (such as hand cards, opponent actions, win or loss results), a transformer-based encoder is used to convert heterogeneous conditional constraints into a unified denoising state representation. This representation injects the diffusion model at each diffusion step for the denoising process. In this way, the diffusion model can continuously receive guidance from conditional constraints at different time steps, further improving the accuracy and reasonableness of the generated restored trajectory.
[0089] By the above steps, the preset conditional constraints are encoded into conditional features, and a splicing or cross-attention mechanism is used to embed them into the diffusion model, ensuring that the generated game situation restored trajectory not only conforms to the actual game logic, but also has high fidelity and tactical reference value.
[0090] Step S02, based on the preset conditional constraints and the game state information, the diffusion model is trained to obtain a pre-trained diffusion model.
[0091] In this embodiment, in order to improve the restoration ability and generalization performance of the diffusion model in the information missing scene, first, the original game state information is structured and preprocessed as the basic input of model training.
[0092] Specifically, first, the game state information is represented as a structured tensor, including but not limited to the chessboard setting, the player's hand cards and the action history. For example, in a card game, the chessboard state is encoded as a two-dimensional matrix, where the row represents the player and the column represents the card type, and the matrix element value represents the number of cards of that type held by the player or its position on the field; for continuous variables (such as player scores), the min-max normalization method is used to map them to the [0,1] interval to eliminate dimensional differences and improve model convergence stability.
[0093] Further, the player's actions (such as card play, movement) in the game state information are encoded into one-hot vectors or embedding vectors. For example, card play actions are represented as one-hot encoding of card IDs, and movement actions are represented as position coordinate vectors.
[0094] In addition, the complete game history is represented as time series data, and each time step contains current state and action information. For different lengths of game sequences, a fixed length sliding window truncation or padding strategy is used to ensure input dimension consistency for batch training.
[0095] After completing the data representation, combined with the preset conditional constraint information, a training sample pair (x, c) is constructed, where x is the real game state sequence, and c is the preset conditional constraint input. Through the forward diffusion process, Gaussian noise is gradually added to generate noisy samples and predict the noise component using a diffusion model. In addition, during the model training process, a loss function containing a constraint consistency penalty term is introduced to guide the generated results to comply with the game rules and logic.
[0096] Optionally, to ensure that the training set covers multiple game types, player levels, and game lengths, the generalization ability of the model is enhanced. In the training process, the game state data set is divided into a training set (70%), a validation set (20%), and a test set (10%). Using stratified sampling, the balance of each type of win-lose result and strategy distribution is ensured.
[0097] Optionally, to improve the robustness of the model to incomplete observations, a data augmentation strategy is introduced during the training process.
[0098] Specifically, first, the complete game sequence is randomly truncated to generate game fragments at different time periods, such as the first 50% of the rounds or the last 30% of the key stages, as model inputs. This approach simulates the scenario in actual applications where only partial game information (such as missing opening or terminal data) is available, forcing the model to learn the ability to infer the complete situation from partial observations and enhancing its generalization performance under fragmented data.
[0099] Further, a random information missing processing mechanism is used to randomly remove part of the state information (such as hiding the opponent's hand cards and covering part of the chessboard) to train the diffusion model to adapt to incomplete data.
[0100] In addition, to improve the adaptability of the diffusion model to noise and disturbances, a noise injection strategy is implemented. A slight Gaussian noise is added to the structured state tensor, with a noise standard of 0.01-0.1. This operation simulates sensor errors or data transmission distortion, enhancing the robustness of the model input.
[0101] In the present embodiment, the above data augmentation methods are applied to each training sample with a probability of 50%, and only one type of augmentation is applied each time, ensuring the stability and diversity of the training process. Through the synergistic effect of game clipping, information masking, and noise injection, the model learns the ability to recover high-fidelity game states from incomplete and noisy inputs during the training phase, significantly improving its practicality and reliability in real game review scenarios.
[0102] Through the above embodiment, the diffusion model learns the ability to gradually recover the complete situation that complies with the game logic from the noise during the training phase, and finally obtains a pre-trained diffusion model with strong generalization and conditional guidance capabilities, which can be used for situation restoration tasks.
[0103] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar content as the above embodiment one can refer to the above introduction, and will not be repeated hereinafter. On this basis, please refer toFigure 3 After step S10, the game situation restoration method further comprises steps S100-S101:
[0104] In step S100, it is verified whether the situation restoration trajectory conforms to the preset game rules.
[0105] It should be noted that the preset game rules include but are not limited to legal card playing, turn order, etc.
[0106] It can be understood that, due to the noise or model prediction error in the situation restoration process, there may be states in the generated situation restoration trajectory that do not conform to the game rules (such as illegal card playing, incorrect turn order, etc.). Therefore, step S100 is performed to ensure that the finally generated situation restoration trajectory strictly complies with the game rules, thereby improving the accuracy and reliability of the results.
[0107] Specifically, the generated situation restoration trajectory is verified frame by frame to check whether each frame meets the preset game rules. For example, for each action (such as card playing or moving), it is checked whether it conforms to the legal card playing rules and the allowed operation of the current turn; the turn order is checked to ensure that the operation of each player is performed in the correct order without omission or repetition.
[0108] During the verification process, if it is found that there is a frame that does not conform to the preset game rules, the specific information of the corresponding illegal state is recorded, including the type of violation, the time of violation, and the players or objects involved.
[0109] In step S101, if the preset game rules are not met, the illegal state in the detected situation restoration trajectory is mapped to a legal state through a projection operation to generate a compliant situation restoration trajectory.
[0110] Once a violation state is detected in step S100, the system uses the constraint knowledge learned in the training phase, i.e., the rule prior internalized by the diffusion model during the training process through the loss function containing the constraint consistency penalty term, to guide the repair of the violation state. In the reasoning phase, based on this implicit rule knowledge, the system performs a projection operation to map the detected violation state to the nearest legal state. Finally, the legal state adjusted by the projection operation replaces the original violation state, and the entire situation restoration trajectory is updated. It is ensured that the adjusted trajectory conforms to the preset game rules at all time points.
[0111] Through the above embodiment method, not only the semantic rationality and rule compliance of the results generated by the diffusion model are improved, but also a self-consistent error correction mechanism without external rule engine intervention is provided, which significantly enhances the robustness and practicality of the game situation restoration system, and is especially suitable for the complex and tactical analysis scenarios that require incomplete information and faithful deduction.
[0112] To facilitate understanding of the method of the embodiments of the present application, the following will be illustrated by a specific scenario:
[0113] For example, in a multi-player online card battle game, a player can only observe his own hand, public information on the field, and part of the opponent's card action, while the remaining hand of the opponent, unexecuted operation intention, and other key information are in a hidden state. After a game is over, the user wants to review the entire game process to analyze the possible card combination held by the opponent and the strategy evolution path.
[0114] In this scenario, first, part of the observation information of the game is collected, including: the card sequence of the player, the visible state change on the field, the final win or lose result, and the known key operation time point (such as the use of a big move). These information are input into the diffusion model pre-trained by the present application as input, combined with the preset condition constraints (such as card number conservation, card rule restriction, round sequence logic), and input into the diffusion model pre-trained by the present application.
[0115] The diffusion model has learned the mapping relationship between the complete state and the local observation in a large amount of historical game data in the training stage, and has strengthened the compliance ability to the game rules by introducing a constraint consistency loss function. In the inference stage, the model starts from a noise state, gradually denoises through the reverse diffusion process, and guides the generation direction according to the input condition constraints in each step, and finally outputs a complete situation restoration track.
[0116] As can be seen from the above embodiments, the present application can use the generation ability and condition guiding mechanism of the diffusion model to intelligently complete the hidden state in the case of incomplete input information, realize high-fidelity and logical game situation restoration, and significantly improve the depth and intelligent level of the review analysis.
[0117] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the game situation restoration method of the present application. More forms of simple changes based on this technical concept are within the protection scope of the present application.
[0118] The present application also provides a game situation restoration system, please refer to Figure 4 , the game situation restoration system comprises:
[0119] The situation restoration module 10 is configured to input the collected game information into the pre-trained diffusion model, and generate a situation restoration track through the reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset condition constraints.
[0120] The game situation restoring system provided in the present application adopts the game situation restoring method in the above embodiments, and can solve the technical problem of how to accurately restore the game situation of a game under the condition that part of the observation information is missing. Compared with the prior art, the game situation restoring system provided in the present application has the same beneficial effects as the game situation restoring method provided in the above embodiments, and other technical features in the game situation restoring system are the same as the features disclosed in the above embodiments, which will not be repeated here.
[0121] The present application provides a game situation restoring device, which comprises at least one processor and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the game situation restoring method in the above embodiment one.
[0122] Reference will be made to the following description of the embodiments of the present application, taken in conjunction with the accompanying drawings, in which Figure 5 which shows a structural schematic diagram of a game situation restoring device suitable for being used to implement the embodiments of the present application. The game situation restoring device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The game situation restoring device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0123] As Figure 5As shown, the game situation restoring device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or loaded from a storage device 1003 into a random access memory 1004. Various programs and data required for the operation of the game situation restoring device are also stored in the random access memory 1004. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other by a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the game situation restoring device to communicate with other devices wirelessly or by wire to exchange data. Although the game situation restoring device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.
[0124] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.
[0125] The game situation restoring device provided in the present application adopts the game situation restoring method in the above-mentioned embodiments, and can solve the technical problem of how to accurately restore the game situation of a game under the condition that part of the observation information is missing. Compared with the prior art, the game situation restoring device provided in the present application has the same beneficial effects as the game situation restoring method provided in the above-mentioned embodiments, and other technical features in the game situation restoring device are the same as the features disclosed in the previous embodiment method, which will not be described here.
[0126] It should be understood that various aspects of the disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any appropriate manner in any one or more embodiments or examples.
[0127] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any modifications or equivalents of the application should be construed as falling within the scope of the application. The scope of the application should be determined by the appended claims.
[0128] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., a computer program) for performing the game situation restoring method in the above embodiments.
[0129] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the embodiments, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any appropriate medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any appropriate combination thereof.
[0130] The above computer readable storage medium can be contained in the game situation restoring device, or can exist separately and not be assembled into the game situation restoring device.
[0131] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the game situation restoration device, the game situation restoration device: inputs the collected game match information into a pre-trained diffusion model, and generates a situation restoration trajectory through the reverse diffusion process of the pre-trained diffusion model, wherein the diffusion model is trained based on game state information and preset condition constraints.
[0132] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0134] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0135] The readable storage medium provided by the application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the game situation restoration method described above, and can solve the technical problem of game situation restoration. Compared with the prior art, the computer readable storage medium provided by the application has the same beneficial effects as the game situation restoration method provided by the above-mentioned embodiments, and will not be repeated here.
[0136] The application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the game situation restoration method as described above.
[0137] The computer program product provided by the application can solve the technical problem of how to accurately restore the game situation under the condition of partial observation information missing. Compared with the prior art, the computer program product provided by the application has the same beneficial effects as the game situation restoration method provided by the above-mentioned embodiments, and will not be repeated here.
[0138] The above-mentioned is only part of the embodiments of the application, and does not limit the patent scope of the application, and any equivalent structural transformation, direct / indirect application in other related technical fields within the technical concept of the application, using the content of the application specification and drawings, are included in the patent protection scope of the application.
Claims
1. A method for reconstructing a game situation, characterized in that, The method for restoring the game situation includes: The collected game information is input into a pre-trained diffusion model, and the situation reconstruction trajectory is generated through the reverse diffusion process of the pre-trained diffusion model. The diffusion model is trained based on game state information and preset condition constraints. The step of inputting the collected game information into a pre-trained diffusion model and generating a situation reconstruction trajectory through the back-diffusion process of the pre-trained diffusion model includes: The collected game information is input into a pre-trained diffusion model; Through the back-diffusion process of the pre-trained diffusion model, the input game information is denoised based on preset conditional constraints to generate a game situation reconstruction trajectory, including: The game match information is initialized to a noise state; Based on the noise state and preset constraints, calculate the current noise component; Based on the current noise component, the noise state is updated using the back diffusion formula to obtain the updated noise state; When the time step in the updated noise state decreases to zero, the denoised situation reconstruction trajectory is output.
2. The game situation restoration method as described in claim 1, characterized in that, Before the step of inputting the collected game information into the pre-trained diffusion model and generating the situation reconstruction trajectory through the back diffusion process of the pre-trained diffusion model, the method further includes: The preset conditional constraints are embedded into the diffusion model; Based on the preset condition constraints and the game state information, the diffusion model is trained to obtain a pre-trained diffusion model.
3. The game situation restoration method as described in claim 2, characterized in that, The step of embedding the preset conditional constraints into the diffusion model includes: The preset conditional constraints are encoded into conditional feature vectors; The conditional feature vector is concatenated with the noise state to obtain the concatenated noise state, and the concatenated noise state is input into the diffusion model; and / or The noisy state is used as the query vector, and the conditional feature vector is used as the key vector and value vector. They are fused through a cross-attention mechanism to generate a condition-guided denoised state representation, which is then input into the diffusion model.
4. The game situation restoration method as described in claim 1, characterized in that, After the step of inputting the collected game information into a pre-trained diffusion model and generating a situation reconstruction trajectory through the back-diffusion process of the pre-trained diffusion model, the method further includes: Verify whether the reconstructed situation trajectory conforms to the preset game rules; If the game does not conform to the preset rules, the detected violation status in the situation reconstruction trajectory will be mapped to the legal status through projection operation to generate a compliant situation reconstruction trajectory.
5. A game situation restoration system, characterized in that, The game situation restoration system includes: The situation reconstruction module is used to input the collected game information into a pre-trained diffusion model and generate a situation reconstruction trajectory through the reverse diffusion process of the pre-trained diffusion model. The diffusion model is trained based on game state information and preset condition constraints. The situation reconstruction module is further used to input the collected game information into a pre-trained diffusion model; through the back diffusion process of the pre-trained diffusion model, the input game information is denoised based on preset condition constraints to generate a situation reconstruction trajectory, including: initializing the game information into a noise state; calculating the current noise component based on the noise state and preset condition constraints; updating the noise state according to the current noise component using a back diffusion formula to obtain an updated noise state; and outputting the denoised situation reconstruction trajectory when the time step in the updated noise state decreases to zero.
6. A game situation restoration device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the game situation restoration method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the game situation restoration method as described in any one of claims 1 to 4.
8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the game situation restoration method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Game replaying method and system
CN107754311A
Replaying method and device for game match, storage medium and server
CN115554706A