Logic detection method for game time event and terminal

By building a time event dependency map and performing causal contradiction scores, the problem of inefficient logic detection in complex time travel games is solved, automated logic contradiction identification and repair is realized, and testing coverage and detection efficiency are improved.

CN120256274APending Publication Date: 2025-07-04FUJIAN TQ DIGITAL
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510424465.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing game narrative logic testing methods are inefficient in complex time travel mechanism games, difficult to fully cover the player's behavior combination, and lack quantitative assessment of the severity of causal contradictions, resulting in insufficient self-consistent verification of plot logic.

Method used

By capturing player behavior and game state changes events in real time, a time event dependence map is constructed, causal contradiction logic is detected, contradiction severity scores are performed, and a list of contradiction events is output.

Benefits of technology

It realizes automatic verification of game time event logic, improves test coverage and detection efficiency, and can quickly locate and repair logical contradictions under the time travel mechanism in the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256274A_ABST
    Figure CN120256274A_ABST
Patent Text Reader

Abstract

The invention provides a logic detection method for game time events and a terminal. The logic detection method comprises the steps that player behavior events and game state change events in a game are captured in real time, and event nodes in the events are recorded to construct a time event dependency graph; according to the time event dependency graph, causal contradictory logic among the events is detected; and performing contradictory severity scoring on the corresponding contradictory events according to the causal contradictory logic, and outputting a contradictory event list with a contradictory severity score. By capturing player behaviors and game state changes in real time, constructing a time event dependency graph and detecting causal contradictions between events, logic contradictions under a time travel mechanism in a game are automatically recognized, the severity of the contradictions is quantified through severity scores, developers are helped to quickly position and repair problems, and the game quality is improved. Compared with traditional manual inspection and static test, the test coverage rate and the detection efficiency are remarkably improved, and the method is suitable for complex time travel narrative games.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of game narrative logic testing, and particularly to a logical detection method and a terminal for game time events. Background Art

[0002] In the field of game development, especially in games with time travel mechanisms involving complex narrative structures, ensuring the self-consistency of the plot logic is an important challenge. The existing technologies mainly rely on the following two methods: 1. Manual plot script inspection: The game development team or a dedicated testing team checks the game plot script item by item to find potential logical contradictions or timeline conflicts. Manual inspection can handle some complex and non-linear plot logics, especially when the plot involves multiple timelines or parallel universes; but it is time-consuming and prone to missing hidden contradictions. Especially in large-scale games, the number of plot branches and interaction events is huge, the efficiency of manual inspection is low, and it is difficult to cover all possible combinations of player behaviors.

[0003] 2. Static branch coverage testing: Using a finite state machine (FSM) or similar automated tools to traverse the preset plot branches and verify the consistency of the basic logic. Automated tools can cover a large number of preset plot branches in a relatively short time to ensure the self-consistency of the basic logic; but traditional automated tools cannot understand the causal dependencies between events, and static testing can only verify the preset branches and cannot handle the infinite possible combinations caused by players freely modifying the timeline. For example, after a player destroys a certain building in timeline A, the building still exists in timeline B without a reasonable reconstruction setting, and this kind of dynamic change cannot be detected by static testing.

[0004] In addition, the existing game narrative logic testing also lacks a quantitative verification standard and cannot determine the severity level of causal contradictions through a mathematical model. For example, it cannot distinguish the difference between key plot conflicts and minor dialogue errors. Summary of the Invention

[0005] The technical problem to be solved by the present invention is: to provide a logical detection method and a terminal for game time events, and to realize the logical automatic verification of game time events under the time travel mechanism through a time event dependency graph and a causal contradiction score, so as to improve the test coverage rate and detection efficiency.

[0006] To solve the above technical problems, the technical solution adopted by the present invention is: A logical detection method for game time events, comprising the steps: S1. Capture player behavior events and game state change events in the game in real time, record the event nodes of the player behavior events and the game state change events, and construct a time event dependency graph; S2. Detect the causal contradiction logic between events according to the time event dependency graph; S3. Score the severity of the corresponding contradictory events according to the causal contradiction logic, and output a list of contradictory events with the severity scores.

[0007] To solve the above technical problems, another technical solution adopted by the present invention is: A logic detection terminal for game time events, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned logic detection method for game time events are implemented.

[0008] The beneficial effects of the present invention are as follows: A logic detection method and terminal for game time events are provided. By capturing player behavior and game state changes in real time, constructing a time event dependency graph, and detecting causal contradictions between events, it realizes the automatic identification of logical contradictions under the time travel mechanism in the game, and quantifies the severity of the contradictions through severity scoring, helping developers quickly locate and fix problems. Compared with traditional manual inspection and static testing, it significantly improves the test coverage rate and detection efficiency, and is applicable to complex time travel narrative games. Description of the Drawings

[0009] Figure 1 It is the overall flowchart of a logic detection method for game time events according to an embodiment of the present invention; Figure 2 It is the structural schematic diagram of a logic detection terminal for game time events according to an embodiment of the present invention.

[0010] Label Description: 1. A logic detection terminal for game time events; 2. Memory; 3. Processor. Detailed Embodiments

[0011] To describe the technical content, achieved objectives and effects of the present invention in detail, the following is described in conjunction with the embodiments and with reference to the drawings.

[0012] Please refer to Figure 1 , A logic detection method for game time events, including the steps: S1. Capture player behavior events and game state change events in the game in real time, record the event nodes of the player behavior events and the game state change events, and construct a time event dependency graph; S2. Detect the causal contradiction logic between events according to the time event dependency graph; S3. Score the severity of the contradictions for the corresponding contradictory events according to the causal contradiction logic, and output a list of contradictory events with the severity scores of the contradictions.

[0013] As can be seen from the above description, the beneficial effects of the present invention are as follows: A logic detection method for game time events is provided. By capturing player behaviors and game state changes in real time, a time event dependency graph is constructed, and the causal contradictions between events are detected, so as to automatically identify the logic contradictions under the time travel mechanism in the game, and quantify the severity of the contradictions through severity scoring, helping developers quickly locate and fix problems. Compared with traditional manual inspection and static testing, the test coverage rate and detection efficiency are significantly improved, and it is applicable to complex time travel narrative games.

[0014] Further, the specific steps of step S1 are as follows: S11. Use a time event recorder to capture player behavior events in the game and game state change events caused by the player behavior events in real time; S12. Convert the player behavior events and the game state change events into structured data; S13. Generate event nodes according to the structured data, and establish a topological relationship between the event nodes; S14. Based on the topological relationship, construct a time event dependency graph through a topological sorting algorithm.

[0015] As can be seen from the above description, the construction process of the time event dependency graph is further refined. By using a time event recorder to capture player behaviors and game state changes in real time, and converting them into structured data, event nodes are generated and a topological relationship is established, ensuring the accuracy and real-time nature of the time event dependency graph, and being able to dynamically reflect the operations of players in different timelines and their impacts on the game state, providing a reliable data basis for subsequent causal contradiction detection.

[0016] Further, the event nodes include the event occurrence timestamp, event type, game variables affected by the event, and parent events on which the event depends.

[0017] As can be seen from the above description, the data structure of the event nodes is clarified, including the timestamp, event type, game variables affected, and parent events on which it depends. This structured data definition enables the event nodes to comprehensively record the detailed information of player behaviors and game state changes, providing a clear data model for constructing the time event dependency graph and ensuring that subsequent causal contradiction detection can accurately identify the dependency relationships between events.

[0018] Further, step S11 further includes: Record the player behavior events captured in real time and the game state change events caused by the player behavior events according to the corresponding recording rules; The player behavior events include timeline jump operation events, physical interaction behavior events, plot selection behavior events, and item operation behavior events; The game state change events include space-time anchor activation state change events, terrain data change events, NPC relationship value change events, and backpack data change events; The recording rules include recording the old and new timeline IDs and the jump time difference, recording the object ID and the damage degree parameter, recording the option ID and the influence variable weight, and recording the item ID and the operation type.

[0019] As can be seen from the above description, the mapping relationship between player behavior events and game state change events is further refined, and specific recording rules are defined, that is, by mapping player behavior events (such as timeline jump, physical interaction, plot selection, item operation) to game state change events (such as space-time anchor activation, terrain data change, NPC relationship value change, backpack data change), the integrity and consistency of event recording are ensured. This mapping relationship provides detailed input data for constructing a time event dependency graph and supports complex causal contradiction detection.

[0020] Furthermore, in step S13, the topological relationship between each of the event nodes is established, specifically: Take the event node corresponding to the current timeline as the parent node, search for the event nodes that causally depend on the parent node among all event nodes as the child nodes, and establish a directed edge between the parent and child nodes to obtain a forward dependency chain; Identify the event nodes containing the timeline ID to establish a cross-timeline variable reference relationship chain; Use the Tarjan algorithm to detect the cyclic dependencies of each event node. When there is a timeline version conflict between event nodes, mark it as an illegal cyclic dependency. The timeline version conflict means that the first event node of the second timeline depends on the second event node of the first timeline and the second timeline is later than the first timeline; Generate the topological relationship between each event node based on the forward dependency chain, the cross-timeline variable reference relationship chain, and the illegal cyclic dependency.

[0021] As can be seen from the above description, the process of establishing the topological relationship between event nodes is described, including the construction of the forward dependency chain, the identification of the cross-timeline variable reference relationship, and the detection of cyclic dependencies, ensuring the acyclicity of the time event dependency graph, avoiding logical contradictions caused by cyclic dependencies, and being able to effectively handle complex dependency relationships in multi-timeline interactions, providing a reliable topological structure for causal contradiction detection.

[0022] Further, step S2 is specifically as follows: S21. Traverse the time event dependency graph and check the topological relationship between each event node; S22. If it is detected that a first event node modifies a first variable, a second event node depends on the original value of the first variable, and the first variable has no reset logic, then mark the first event node and the second event node as a contradictory relationship; S23. Calculate the contradiction severity score of the first event node and the second event node according to the importance value of the first variable and the influence range value of the first variable.

[0023] As can be seen from the above description, by traversing the time event dependency graph, checking the topological relationship between event nodes, identifying the logical contradiction caused by the modification of the dependent variable, and calculating the severity score of the contradiction, it is possible to automatically detect the causal paradox of time events under the time travel mechanism in the game, and help developers prioritize the handling of key contradictions through quantitative scoring, significantly improving the detection efficiency and accuracy.

[0024] Further, the calculation formula of the contradiction severity score is as follows in formula (1): (1); Wherein, D 距离 is the time line distance, and, D 距离 = |the current time line generation number - the parent time line generation number| + 1, α and β are both weight coefficients, respectively representing the contribution degree of the importance of the first variable in the total severity and the contribution degree of the influence range of the first variable in the total severity, X 重要性 represents the importance value of the first variable, X 影响范围 represents the influence range value of the first variable; Wherein α is set through the game narrative weight configuration file. If the first variable belongs to a preset key variable, then α is 0.8 - 1.2. If the first variable belongs to a preset non - key variable, then α is 0.1 - 0.3, β is 0.5 - 1.0, and α + β= 1.

[0025] As can be seen from the above description, providing the calculation formula of the contradiction severity score clarifies the weight coefficients α and βIts function and value range, that is, through the calculation formula of the contradiction severity score, developers can quantify the severity of contradictions and distinguish the differences between key plot conflicts and minor dialogue errors. In addition, the dynamic adjustment of the weight coefficient ensures the flexibility and adaptability of the scoring model, and can optimize the detection results according to different stages of game development.

[0026] Furthermore, the preset key variables include a first key variable and a second key variable, and the preset non-key variables include environmental variables; The step S2 further includes: Define the preset label as the main core element affecting the game ending as the first key variable, and the importance value X of the first key variable 重要性 is 0.9 - 1.2; Define the preset label as the secondary core element affecting the game plot as the second key variable, and the importance value X of the second key variable 重要性 is 0.5 - 1.8; Define the preset label as the non-plot element that only changes the scene parameters as the environmental variable, and the importance X of the environmental variable 重要性 numerical value is 0.1 - 0.4.

[0027] From the above description, the variables are divided into a first key variable, a second key variable and an environmental variable, and the importance value ranges of each are defined. This grading standard enables the contradiction severity score to more accurately reflect the influence degree of different variables on game narrative, and helps developers to prioritize dealing with the logical contradictions that have the greatest impact on the game ending and plot branches.

[0028] Furthermore, the step S2 further includes: Obtain the influence range value of the first variable by calculating the proportion of subsequent event nodes affected by the first event node X 影响范围 , as shown in the following formula (2): (2); Among them, the number of direct contradiction events and the number of secondary associated events are respectively the number of event nodes directly affected by the first event node and the number of event nodes indirectly affected obtained based on the time event dependency graph, and the total number of events is the number of all event nodes in the time event dependency graph.

[0029] From the above description, by calculating the proportion of subsequent events directly and indirectly affected by the contradiction event, the influence range of the contradiction is quantified, and the chain effect of the contradiction event on game narrative can be comprehensively evaluated, ensuring that the severity score can accurately reflect the global impact of the contradiction and helping developers to identify and fix the problems that have the greatest impact on the overall logic of the game.

[0030] Please refer toFigure 2 , a logic detection terminal for game time events, includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the logic detection method for a game time event as described above.

[0031] As can be seen from the above description, the beneficial effects of the present invention are as follows: Based on the same technical concept, in cooperation with the above-mentioned logic detection method for a game time event, a logic detection terminal for game time events is provided. By capturing player behaviors and game state changes in real time, constructing a time event dependency graph, and detecting causal contradictions between events, it realizes the automatic identification of logical contradictions under the time travel mechanism in the game, and quantifies the severity of the contradictions through severity scoring, helping developers quickly locate and fix problems. Compared with traditional manual inspection and static testing, it significantly improves the test coverage and detection efficiency, and is applicable to complex time travel narrative games.

[0032] The logic detection method and terminal for game time events provided by the present invention are mainly applied to scenarios such as the logical self-consistency verification of multi-timeline narrative games (such as time backtracking, parallel universes, loop events), the causal conflict detection of dynamic plot branches (such as the contradictory effects of player behaviors on subsequent plots), and the timing consistency test of complex interaction events (such as the existence conflict of key items after timeline modification). The following will be specifically described in conjunction with specific embodiments: Please refer to Figure 1 , the first embodiment of the present invention is: A logic detection method for game time events, as Figure 1 shown, includes the steps: S1. Based on the real-time capture of player behavior events and game state change events in the game, record the event nodes of player behavior events and game state change events and construct a time event dependency graph.

[0033] S2. According to the time event dependency graph, detect the causal contradiction logic between events.

[0034] S3. Perform a contradiction severity scoring for the corresponding contradictory events according to the causal contradiction logic, and output a list of contradictory events with contradiction severity scores.

[0035] That is, in this embodiment, by capturing player behaviors and game state changes in real time, constructing a time event dependency graph, and detecting causal contradictions between events, it realizes the automatic identification of logical contradictions under the time travel mechanism in the game, and quantifies the severity of the contradictions through severity scoring, helping developers quickly locate and fix problems. Compared with traditional manual inspection and static testing, it significantly improves the test coverage and detection efficiency, and is applicable to complex time travel narrative games.

[0036] Meanwhile, in this embodiment, the event node includes an event occurrence timestamp, an event type, game variables affected by the event, and parent events on which the event depends. Among them, the timestamp is the time point when the event occurs; the event type is the type describing the event, such as "kill NPC", "obtain item", "complete the xth chapter of the main quest", "unlock the time gate", "change the terrain state", etc.; the affected game variables are the game variables affected by the event and their state changes, such as {"NPC_A": "dead", "key": "held", "quest progress": "completed in the third chapter", "terrain_castle gate": "destroyed", "timeline marker": "Beta"}; the dependent parent events are the list of parent events on which the event depends, such as ["enter the castle", "pick up the weapon", "select a faction", "learn time magic", "activate the time anchor"].

[0037] That is, the data structure of the event node is clarified, including the timestamp, event type, affected game variables, and dependent parent events. This structured data definition enables the event node to comprehensively record the detailed information of player behavior and game state changes, providing a clear data model for constructing the time event dependency graph and ensuring that subsequent causal contradiction detection can accurately identify the dependency relationships between events.

[0038] The second embodiment of the present invention is as follows: A logical detection method for game time events. Based on the above-mentioned first embodiment, in this embodiment, step S1 is specifically as follows: S11. Use a time event recorder to capture in real time the player behavior events in the game and the game state change events caused by the player behavior events, and also include event recording according to the corresponding recording rules.

[0039] Among them, the player behavior events include timeline jump operation events, physical interaction behavior events, plot selection behavior events, and item operation behavior events. The corresponding game state change events are time anchor activation state change events, terrain data change events, NPC relationship value change events, and backpack data change events respectively. The corresponding recording rules are to record the old and new timeline IDs and the jump time difference, record the object ID and the damage degree parameter, record the option ID and the influence variable weight, and record the item ID and the operation type. The specific mapping between player behavior events and game state change events is shown in Table 1 below.

[0040] Table 1. Example of behavior-state mapping

[0041] That is, it refines the mapping relationship between player behavior events and game state change events, and defines specific recording rules. That is, by mapping player behavior events (such as timeline jumps, physical interactions, plot selections, item operations) to game state change events (such as activation of spacetime anchors, terrain data changes, NPC relationship value changes, backpack data changes), the integrity and consistency of event recording are ensured. This mapping relationship provides detailed input data for constructing a time event dependency graph and supports complex causal contradiction detection.

[0042] S12. Convert player behavior events and game state change events into structured data and perform standardized processing with a unified timestamp, such as taking the start time of the game as 0 o'clock.

[0043] S13. Generate event nodes based on the structured data and establish the topological relationship between each event node. Specifically: S13.1. Take the event node corresponding to the current timeline as the parent node, and find the event nodes among all event nodes that causally depend on the parent node as the child nodes, and establish a directed edge between the parent and child nodes to obtain the forward dependency chain.

[0044] In this embodiment, causal dependence is not based on physical time or recording order, but on the timeline topological relationship. For example: The player triggers event A (such as "killing an NPC") at t = 100 on timeline T1, and then jumps to t = 50 on timeline T2 to trigger event B (such as "the NPC is alive"); Although the recording time of event B is later than A, it logically belongs to an early node on timeline T2 and may become the source of "causal contradiction" for event A.

[0045] Then in this embodiment, the construction of the forward dependency chain should be based on the causal dependence relationship rather than the time order. The specific process is as follows: Step 1: When event X (such as the player breaking the door lock on timeline T1) is recorded, extract the set of variables Vars_X affected by it (such as door lock status = T1. broken); Step 2: Traverse all event nodes (including all timelines) to find the "subsequent" event Y that meets the following conditions: The event timeline ID of event Y has an inheritance relationship with X (such as Y is on timeline T2, and T2 is generated from T1 through a time jump), and the set of input variables of event Y has an intersection with Vars_X (such as Y is "the player tries to enter the room on timeline T2", and the door lock status needs to be detected); Step 3: Establish a directed edge from event X to event Y, indicating that the logical execution of event Y depends on the result of event X.

[0046] Meanwhile, a dynamic update mechanism is also introduced in the construction of the forward dependency chain, which is as follows: The forward dependency chain graph needs to achieve real-time performance through incremental updates: When a new event Y is captured, reverse search all historical events for event nodes that intersect with event Y, and dynamically establish a dependency chain. For example, when a new event Y (depending on the door lock status) is added, it is automatically associated with event X that modified the door lock status in the T1 timeline.

[0047] S13.2. Identify event nodes containing timeline IDs to establish a cross-timeline variable reference relationship chain.

[0048] Among them, the timeline ID generation rule is as follows: When a player performs a time jump, the system generates a new timeline ID, in the format of parent timeline ID_jump timestamp_SHA256(variable snapshot). For example, when branching from timeline T1 at t = 200, T1_200_8a3d is generated. The timeline inheritance relationship is stored through a parent-child ID linked list, forming a tree-like topological structure.

[0049] S13.3. Use the Tarjan algorithm to detect circular dependencies among event nodes. When there is a timeline version conflict between event nodes, it is marked as an illegal circular dependency. A timeline version conflict occurs when the first event node in the second timeline depends on the second event node in the first timeline, and the second timeline is later than the first timeline, triggering an artificial review process. Among them, the Tarjan algorithm is a graph theory algorithm based on depth-first search (DFS), mainly used to analyze the connectivity of directed and undirected graphs.

[0050] S13.4. Generate the topological relationship among each event node based on the forward dependency chain, cross-timeline variable reference relationship chain, and illegal circular dependencies.

[0051] Meanwhile, this embodiment also includes the optimization of the topological relationship among each event node, including merging duplicate nodes (such as the same reference event in multiple timelines) and compressing low-weight edges (such as converting a dependency relationship with an influence range <0.05 into a weak association mark).

[0052] That is, it describes the establishment process of the topological relationship among event nodes, including the construction of the forward dependency chain, the identification of cross-timeline variable reference relationships, and the detection of circular dependencies, ensuring the acyclicity of the time event dependency graph, avoiding logical contradictions caused by circular dependencies, being able to effectively handle complex dependency relationships in multi-timeline interactions, and providing a reliable topological structure for causal contradiction detection.

[0053] S14. Based on the topological relationship, use the topological sorting algorithm to construct a time event dependency graph, ensuring no circular dependencies.

[0054] That is, in this embodiment, the construction process of the time event dependency graph is further refined. The time event recorder captures the player's behavior and game state changes in real time, converts them into structured data, generates event nodes, and establishes topological relationships to ensure the accuracy and real-time nature of the time event dependency graph, which can dynamically reflect the player's operations in different timelines and their impact on the game state, providing a reliable data basis for subsequent causal contradiction detection.

[0055] Embodiment 3 of the present invention is as follows: A logical detection method for game time events. Based on the above Embodiment 2, in this embodiment, step S2 is specifically as follows: S21. Traverse the time event dependency graph and check the topological relationships between event nodes.

[0056] S22. If it is detected that the first event node modifies the first variable, the second event node depends on the original value of the first variable, and the first variable has no reset logic, then mark the first event node and the second event node as a contradictory relationship.

[0057] S23. Calculate the contradiction severity score of the first event node and the second event node according to the importance value of the first variable and the influence range value of the first variable.

[0058] That is, in this embodiment, by traversing the time event dependency graph, checking the topological relationships between event nodes, identifying the logical contradictions caused by variable modification, and calculating the severity score of the contradictions, it is possible to automatically detect the causal paradoxes of time events under the time travel mechanism in the game, and help developers prioritize key contradictions through quantitative scoring, significantly improving the detection efficiency and accuracy.

[0059] Among them, the calculation formula for the contradiction severity score is as follows Formula (1): (1); Among them, D 距离 is the timeline distance, and, D 距离 = |the current timeline generation - the parent timeline generation| + 1. For example, if timeline T3 (generation = 3) references timeline T1 (generation = 1), then the timeline distance = 3. α and β are both weight coefficients, respectively representing the contribution degree of the importance of the first variable in the total severity and the contribution degree of the influence range of the first variable in the total severity. X 重要性 represents the importance value of the first variable. X 影响范围 represents the influence range value of the first variable.

[0060] In addition, the determination of the current timeline generation number and the parent timeline generation number can be determined by the cross-timeline variable reference rule. The specific rules are as follows: If the child timeline does not cover the parent timeline variable, it is default to inherit the latest state of the parent timeline; The variable version number format is timeline ID_modification times. For example, if the current timeline generation number is T1_3, it means the 3rd modification of the current timeline T1. When referencing across timelines, the continuity of the version number needs to be verified, and if it is broken, it is marked as a logical contradiction.

[0061] Meanwhile α through the game narrative weight configuration file settings, if the first variable belongs to the preset key variable, then α it is 0.8 - 1.2, if the first variable belongs to the preset non-key variable, then α it is 0.1 - 0.3, β it is 0.5 - 1.0, and α + β= 1, that is, the value of the total severity is 1.

[0062] That is, a calculation formula for the contradiction severity score is provided, clarifying the weight coefficient α and β the role and its value range, that is, through the calculation formula of the contradiction severity score, developers can quantify the severity of contradictions and distinguish the differences between key plot conflicts and minor dialogue errors. In addition, the dynamic adjustment of the weight coefficient (in this embodiment α through the configuration file settings, β then it can increase according to each stage of the game, such as increasing in the direction from the initial stage of the game to the middle stage and then to the late stage of the game) ensures the flexibility and adaptability of the scoring model, and can optimize the detection results according to different stages of game development.

[0063] Meanwhile, the preset key variables include the first key variable and the second key variable, and the preset non-key variables include environmental variables. Then step S2 also includes: Define the preset label as the main core element affecting the game ending as the first key variable, and the importance value X of the first key variable 重要性 is 0.9 - 1.2; Define the preset label as the secondary core element affecting the game plot as the second key variable, and the importance value X of the second key variable 重要性 is 0.5 - 1.8; Define the preset label as the non-plot element that only changes the scene parameters as the environmental variable, and the importance value X of the environmental variable 重要性 is 0.1 - 0.4.

[0064] In this embodiment, for the first key variable, the importance grading criteria for the first key variable and environmental variables are shown in Table 2 below. Table 2. Variable Importance Grading Criteria

[0065]

[0066] That is, the variables are divided into the first key variable, the second key variable, and environmental variables, and the respective importance value ranges are defined. This grading criteria enables the severity score of contradictions to more accurately reflect the impact degree of different variables on the game narrative, helping developers prioritize handling the logical contradictions that have the greatest impact on the game ending and plot branches.

[0067] In addition, in this embodiment, step S2 further includes: Obtaining the influence range value of the first variable by calculating the proportion of subsequent event nodes affected by the first event node X 影响范围 , as shown in the following formula (2): (2); Among them, the number of direct contradiction events and the number of secondary associated events are respectively the number of event nodes directly affected by the first event node and the number of event nodes indirectly affected obtained based on the time event dependency graph, and the total number of events is the number of all event nodes in the time event dependency graph.

[0068] That is, by calculating the proportion of subsequent events directly and indirectly affected by the contradiction event, the influence range of the contradiction is quantified, enabling a comprehensive assessment of the chain effect of the contradiction event on the game narrative, ensuring that the severity score can accurately reflect the global impact of the contradiction, and helping developers identify and fix the problems that have the greatest impact on the overall game logic.

[0069] In addition, in this embodiment, the contradiction list in step S3 can be visually output after summarizing the results by a report generator for intuitive viewing by developers.

[0070] In this embodiment, the causal paradox detection process of the in-game time travel mechanism in several specific scenarios is provided.

[0071] Scenario 1: NPC Survival Status Contradiction Detection Test objective: Verify the logical consistency after the player modifies the NPC status on different timelines Technical implementation: Record that the player kills NPC_X at t = 300 on timeline T1 (generation = 1); Detect the survival status of NPC_X at t = 200 on the branch timeline T1_300_xx (generation = 2); If it survives and there is no variable reset record from T1 to T1_300_xx, it is marked as contradictory.

[0072] Scenario 2: Conflict in the spatio-temporal existence of key items Test objective: Detect the illegal existence of items after timeline jumps Technical implementation: The player obtains the unique item "Time-Space Key" on timeline C; In timeline D, the player does not experience the acquisition event, but the item still exists in the backpack; The dependency graph detects that there is no parent event of "obtaining the key", triggering a contradiction alert.

[0073] The advantages of the logical detection of a game time event in this embodiment compared with the prior art can be summarized as shown in Table 3 below.

[0074] Table 3. Advantages compared with the prior art

[0075] According to Table 3, for the logical detection method of a game time event in this embodiment, its time event dependency graph improves the multi-timeline interaction test coverage rate from 45% to 95%, and the causal contradiction scoring mechanism improves the detection rate of key plot loopholes by 50% and reduces the false alarm rate to less than 10%.

[0076] Please refer to Figure 2 , Embodiment 4 of the present invention is: A logical detection terminal 1 for a game time event, including a memory 2, a processor 3, and a computer program stored on the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, it completes the steps in the logical detection method of a game time event in any one of Embodiments 1 to 3 above.

[0077] In summary, the logical detection method and terminal for a game time event provided by the present invention have the following beneficial effects: 1. Quantify the causal relationship of events through topological sorting, covering complex timeline interactions that are difficult for humans to trace, such as detecting the implicit contradiction between "the player destroys the spaceship engine on timeline E" and "the spaceship takes off normally on timeline F".

[0078] 2. Introduce a contradiction severity scoring mechanism, enabling developers to prioritize fixing key contradictions with high scores and optimizing the time travel rule settings through the score distribution.

[0079] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent transformation made using the content of the specification and drawings of the present invention, or directly or indirectly applied in the relevant technical fields, is equally included in the patent protection scope of the present invention.

Claims

1. A logical detection method for game time events, characterized in that, Including the steps: S1. Real-time capture player behavior events and game state change events in the game, record the event nodes of the player behavior events and the game state change events, and construct a time event dependency graph; S2. According to the time event dependency graph, detect the causal contradiction logic between events; S3. Score the severity of contradictions for the corresponding contradictory events according to the causal contradiction logic, and output a list of contradictory events with the severity scores of the contradictions.

2. The logical detection method for a game time event according to claim 1, characterized in that, The specific steps of S1 are as follows: S11. Use a time event recorder to real-time capture player behavior events in the game and game state change events caused by the player behavior events; S12. Convert the player behavior events and the game state change events into structured data; S13. Generate event nodes according to the structured data, and establish the topological relationship between the event nodes; S14. Based on the topological relationship, construct a time event dependency graph through a topological sorting algorithm.

3. The logical detection method for a game time event according to claim 2, characterized in that, The event nodes include the event occurrence timestamp, event type, game variables affected by the event, and parent events on which the event depends.

4. The logical detection method of a game time event according to claim 2, characterized in that, The steps of S11 also include: Record the player behavior events captured in real time and the game state change events caused by the player behavior events according to the corresponding recording rules; The player behavior events include timeline jump operation events, physical interaction behavior events, plot selection behavior events, and item operation behavior events; The game state change events include space-time anchor activation state change events, terrain data change events, NPC relationship value change events, and backpack data change events; The recording rules include recording the old and new timeline IDs and the jump time difference, recording the object ID and the damage degree parameter, recording the option ID and the influence variable weight, and recording the item ID and the operation type.

5. The logical detection method for a game time event according to claim 2, characterized in that, The establishment of the topological relationship between the event nodes in the step S13 is specifically as follows: Take the event node corresponding to the current timeline as the parent node, find the event nodes that causally depend on the parent node among all event nodes as the child nodes, establish a directed edge between the parent and child nodes, and obtain a forward dependency chain; Identify the event nodes containing the timeline ID to establish a cross-timeline variable reference relationship chain; Use the Tarjan algorithm to detect the cyclic dependencies of each event node. When there is a timeline version conflict between event nodes, mark it as an illegal cyclic dependency. The timeline version conflict means that the first event node of the second timeline depends on the second event node of the first timeline and the second timeline is later than the first timeline; Based on the forward dependency chain, the cross-timeline variable reference relationship chain, and the illegal cyclic dependency, generate the topological relationship between the event nodes.

6. The logical detection method for a game time event according to claim 2, characterized in that, The specific steps of S2 are as follows: S21. Traverse the time event dependency graph and check the topological relationship between the event nodes; S22. If it is detected that the first event node modifies the first variable, the second event node depends on the original value of the first variable, and the first variable has no reset logic, then mark the first event node and the second event node as a contradictory relationship; S23. Calculate the contradiction severity score of the first event node and the second event node according to the importance value of the first variable and the influence range value of the first variable.

7. The logical detection method of a game time event according to claim 6, wherein The calculation formula of the contradiction severity score is as follows in formula (1): (1); Among them, D 距离 is the time - line distance, and D 距离 = |the current time - line generation - the parent time - line generation| + 1, α and β are both weight coefficients, representing the contribution degree of the importance of the first variable in the total severity and the contribution degree of the influence range of the first variable in the total severity respectively, X 重要性 represents the importance value of the first variable, X 影响范围 represents the influence - range value of the first variable; Among them α Through the game narrative weight configuration file setting, if the first variable belongs to the preset key variable, then α It is 0.8 - 1.

2. If the first variable belongs to the preset non - key variable, then α It is 0.1 - 0.3, β It is 0.5 - 1.0, and α + β= 1.

8. The logical detection method of a game time event according to claim 7, characterized in that The preset key variables include the first key variable and the second key variable, and the preset non-key variables include environmental variables; The step S2 further includes: Define the preset tag as the main core element that affects the game ending as the first key variable, and the importance value of the first key variable X 重要性 is 0.9 - 1.2; Define the preset tag as the core secondary element that affects the game plot as the second key variable, and the importance value of the second key variable X 重要性 is 0.5 - 1.8; Define the preset tag as a non-plot element that only changes scene parameters as the environmental variable, and the importance of the environmental variable X 重要性 is 0.1 - 0.

4.

9. The logical detection method for a game time event according to claim 6, characterized in that, The step S2 further includes: The influence range value of the first variable is obtained by calculating the proportion of subsequent event nodes affected by the first event node X 影响范围 , as shown in formula (2) below: (2); Among them, the number of direct contradiction events and the number of secondary associated events are respectively the number of event nodes directly affected by the first event node and the number of event nodes indirectly affected obtained based on the time event dependency graph, and the total number of events is the number of all event nodes in the time event dependency graph.

10. A logical detection terminal for game time events, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps in any one of claims 1 to 9 of a logical detection method for game time events.

Citation Information

Cited By

  • Scenario-centered interaction-driven scene generation system

    CN121364778A

  • Coal industry digital transformation maturity evaluation data management method and system

    CN121457594A

  • Mobile game cross-platform real-time interaction optimization method and device based on cloud data synchronization

    CN121695486A