Graphical logic arrangement cross-platform game content generation implementation method
By using a flowchart data structure based on JSON serialization and an object pool execution system, the performance bottleneck of visual programming in the Web environment is solved, providing real-time debugging and cross-platform compatibility, and achieving efficient game content generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-04-07
AI Technical Summary
Existing visual programming solutions in the Web environment suffer from low execution performance, lack of real-time debugging capabilities, difficulty in integrating with the existing code ecosystem, and insufficient cross-platform compatibility, making it difficult to meet the needs of complex game scenarios.
We adopt a flowchart data structure based on JSON serialization, build a Flow execution system based on object pool, establish a non-intrusive debugging data system, implement an event-driven mechanism and state management, and provide cross-platform compatibility by using a reflection engine to achieve dynamic type conversion and node definition.
It significantly improves execution performance, enables professional-grade real-time debugging, seamlessly integrates with the existing code ecosystem, and achieves efficient operation on multiple platforms, lowering the development threshold.
Smart Images

Figure CN121807280A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game content generation technology, and in particular to a cross-platform game content generation method based on graphical logic arrangement. Background Technology
[0002] With the rapid development of Web technology, its application in game content generation is becoming increasingly widespread, and graphical programming (i.e., visual programming) has attracted much attention due to its ability to lower the development threshold. However, existing visual programming solutions in the Web environment have significant technical bottlenecks and cannot meet the needs of complex game scenarios.
[0003] Specifically, the existing technology has the following main drawbacks: 1. Poor execution performance: Existing tools (such as Google Blockly) mostly use interpreted execution, which requires dynamic lookup and type checking when calling nodes, resulting in huge runtime overhead and making it difficult to meet the high-performance requirements of real-time rendering and logic processing in games.
[0004] 2. Lack of real-time debugging functionality: Traditional solutions lack an effective runtime debugging mechanism, making it impossible for developers to monitor node status, set breakpoints, or track data flow, which seriously affects development efficiency and troubleshooting capabilities.
[0005] 3. Difficulty in integrating with the existing code ecosystem: Existing tools are difficult to integrate deeply with mainstream TypeScript / JavaScript code libraries, and developers cannot make full use of existing code resources and type systems, which limits development flexibility and efficiency.
[0006] 4. Insufficient cross-platform compatibility: Powerful visual programming systems (such as Unity Visual Scripting and Unreal Blueprint) all rely on specific desktop engine runtimes and cannot run natively and efficiently in a pure web browser environment.
[0007] Therefore, there is an urgent need in this field for a graphical logic orchestration solution that can achieve high performance, deep debugging capabilities, and seamless integration with the modern code ecosystem in a web environment. In summary, designing a cross-platform game content generation implementation method based on graphical logic orchestration is essential. Summary of the Invention
[0008] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide a cross-platform game content generation method based on graphical logic arrangement.
[0009] To achieve the above objectives, the present invention provides the following solution: This invention provides a cross-platform game content generation method based on graphical logic orchestration, including: Step 1: Flowchart data structure based on JSON serialization; Step 2: Build a Flow execution system based on object pooling; Step 3: Establish a non-intrusive debugging data system; Step 4: Implement the event-driven mechanism and state management; Step 5: Integrate the TypeScript / JavaScript code library and implement dynamic type conversion and node definition through the reflection engine; Step 6: Achieve cross-platform compatibility by providing a unified runtime environment and data serialization format based on Web standards.
[0010] Preferably, the flowchart data structure includes: a graph structure serialization mechanism based on JSON format, a unified management mechanism for graph elements, a UnitConnection connection system and port management mechanism, and a graph serialization and deserialization mechanism.
[0011] Preferably, the flowchart data structure further includes a port type compatibility check and circular dependency detection mechanism to prevent invalid connections and logical errors.
[0012] Preferably, in step 2, the Flow execution system based on an object pool is constructed as follows: Establish an execution flow management system based on object pools; Establish a graph traversal execution mechanism with recursive protection; Establish the GraphStack execution stack.
[0013] Preferably, step 2 further includes: Establish a recursive detection and protection mechanism to perform recursive detection and protection.
[0014] Preferably, in step 3, a non-intrusive debugging data system is established, specifically as follows: Implement separate management of debugging data; Perform node-level breakpoint setting, execution path tracing, and precise error location; A ghost data mechanism is used to prevent memory leaks during debugging.
[0015] Preferably, in step 4, the event-driven mechanism and state management are implemented, specifically as follows: Establish a global event center system; Perform lifecycle management of the graph; Perform variable system and state management; Establish data flow management and value transfer mechanisms.
[0016] Preferably, in step 5, the TypeScript / JavaScript code library is integrated, and dynamic type conversion and node definition are implemented through a reflection engine, specifically as follows: Establish a node definition system; Provides type conversion and serialization support; Access TypeScript / JavaScript code libraries using the reflection capabilities provided by the reflection engine.
[0017] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention provides a cross-platform game content generation method based on graphical logic orchestration. This method includes a flowchart data structure based on JSON serialization, constructing a Flow execution system based on an object pool, establishing a non-intrusive debugging data system, implementing an event-driven mechanism and state management, integrating TypeScript / JavaScript code libraries, achieving dynamic type conversion and node definition through a reflection engine, realizing cross-platform compatibility, and providing a unified runtime environment and data serialization format based on Web standards. The graphical logic orchestration method provided by this invention brings significant technical advancements and beneficial effects, mainly reflected in the following aspects: 1. Significantly Improved Execution Performance: Through an innovative "serializable flowchart architecture" and "object pool-based Flow execution system," the overhead of repetitive object creation and complex lookups at runtime is avoided. Real-world testing shows that node execution efficiency is improved by 60-80% compared to traditional interpreted execution methods. In complex scenarios with 1000 nodes, the single-frame execution time can be controlled within 2-3 milliseconds, perfectly meeting the real-time requirements of games.
[0018] 2. Provides a professional-grade real-time debugging experience: Through the "non-intrusive debugging data system", the debugging logic and execution logic are completely separated. With almost zero performance loss (performance impact in debugging mode <5%), it provides complete debugging functions such as node-level breakpoints, data flow monitoring, and execution path tracing. Errors can be accurately located to specific nodes and connections, which greatly improves development and debugging efficiency.
[0019] 3. Achieved deep and seamless integration with the code ecosystem: Based on a self-developed reflection engine, this invention can directly call any public interface in the TypeScript / JavaScript code library and automatically generate corresponding visual nodes. Combined with complete type system support, it achieves type-safe data transfer and automatic mapping of code symbols, with a node definition coverage rate of over 98%, significantly reducing the difficulty of reusing existing code resources.
[0020] 4. Excellent cross-platform compatibility and scalability: All core functions are implemented based on standard Web APIs, without relying on any specific browser or engine plugins, and can run directly in web environments on various platforms such as PCs and mobile devices. Meanwhile, the UnitDefinition-based node definition system and modular event-driven architecture give the system high flexibility and scalability, easily adapting to various application scenarios from game development to industrial automation and educational content creation. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 A schematic diagram of the code flow for implementing UnitConnection system connection and port management; Figure 3 This is a schematic diagram illustrating the serialization and deserialization mechanism of a graph. Figure 4 A schematic diagram of the graph traversal execution mechanism for recursion protection; Figure 5 A schematic diagram illustrating the implementation of the GraphStack execution stack mechanism; Figure 6 A schematic diagram illustrating the recursive detection and protection mechanism; Figure 7 A schematic diagram of a program to achieve separate management of debugging data; Figure 8 A schematic diagram illustrating an implementation of a global event system; Figure 9 A flowchart illustrating the data flow management and value transfer mechanism; Figure 10 A schematic diagram illustrating an embodiment of the reflection engine interface; Figure 11 A diagram illustrating the implementation of a standardized data serialization format; Figure 12 This is a schematic diagram illustrating the AI behavior logic flow based on the Unit-Port orchestration method of this invention; Figure 13 A diagram illustrating efficient execution using Flow and GraphStack; Figure 14A schematic diagram of the state machine design; Figure 15 A schematic diagram illustrating the design of a 3D scene interaction system based on the Unit-Port orchestration method of this invention; Figure 16 A schematic diagram illustrating the design of animation sequence control based on the Unit collaboration mechanism of this invention; Figure 17 A schematic diagram illustrating the design of interactive educational content based on the Unit chained arrangement of this invention; Figure 18 This is a schematic diagram illustrating the design of multimedia content integration based on the Unit synchronization mechanism of this invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] The purpose of this invention is to provide a cross-platform game content generation method based on graphical logic orchestration. By using a serializable flowchart and an object pool execution engine, it improves node execution efficiency, effectively solves the performance bottleneck of Web visual programming, provides completely non-intrusive professional-grade real-time debugging functions, supports breakpoints and status monitoring while reducing performance loss, and achieves seamless deep integration with the TypeScript / JavaScript code ecosystem through a reflection engine. It can also run cross-platform based on pure Web standards, greatly reducing the development threshold of complex game logic and interactive content. It can be widely used in multiple fields such as game AI, industrial control, and educational content generation.
[0025] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] like Figure 1 As shown, this invention provides a cross-platform game content generation method based on graphical logic orchestration, including: Step 1: Flowchart data structure based on JSON serialization; Step 2: Build a Flow execution system based on object pooling; Step 3: Establish a non-intrusive debugging data system; Step 4: Implement the event-driven mechanism and state management; Step 5: Integrate the TypeScript / JavaScript code library and implement dynamic type conversion and node definition through the reflection engine; Step 6: Achieve cross-platform compatibility by providing a unified runtime environment and data serialization format based on Web standards.
[0027] In step 1, the flowchart data structure based on JSON serialization is as follows: Its execution entity is: ScriptGraph flowchart manager; 1. Design a flowchart data structure based on JSON serialization: Establish a standardized graph structure management class that inherits from the general graph resource base class; Internal data structures for maintaining node sets and connection relationships; Define complete port interface specifications for control flow and data flow; Supports dynamic port definition and runtime port lookup; This invention provides a detailed design of a data structure based on JSON serialization: classDiagram class SerializedScriptGraphBody { +title: string +nodes: NodeData[] +connections: ConnectionData[] +variables: VariableData[] +controlInputDefinitions: PortDef[] +controlOutputDefinitions: PortDef[] +valueInputDefinitions: PortDef[] +valueOutputDefinitions: PortDef[] } class NodeData { +guid: string +internalID: number +unitType: string +position: Vector2 +defaultValues: Map} class ConnectionData { +sourceUnitID: string +sourceKey: string +destinationUnitID: string +destinationKey: string } Management and data structure maintenance mechanisms: Management class creation: ScriptGraph inherits from GraphAsset, using two Sets: _units and _connections; Set maintains graph element IDs: Data structure maintenance: the addElement method establishes a bidirectional relationship between an element and the graph, and the removeElement method; Clean up related relationships: ID lifecycle management: Unique identification within the graph is achieved through MetaLit3D.InternalID, and EntityID is used; Achieving cross-graph references: Define the specification relationship: Port definitions are standardized through interfaces such as IUnitControlInputDefinition and saved to the port definitions field of JSON during serialization; Port lookup support: The getPortByKey method dynamically finds port instances based on port definitions, and supports runtime type checking and connection verification.
[0028] 2. Implement a unified management mechanism for graph elements: It provides a general interface for adding graph elements, supporting both nodes and connections; The lifecycle of various graph elements is managed through internal IDs; Establish a two-way association between graph elements and their respective graph instances; Verify the consistency and integrity of the graph structure.
[0029] A detailed introduction to graph element management and data structure association mechanisms: (1) Association with data structure: The graph element management directly operates on the nodes and connections arrays defined in the first sub-point, and establishes the mapping relationship between elements and JSON data through GUID; (2) Interface and type correspondence: The addElement interface automatically classifies and stores parameters according to their type (Unit or UnitConnection), and the removeElement interface supports deletion operations of the same type; (3) Internal ID lifecycle management: Each graph element is assigned a unique internal ID, which can be tracked from creation to destruction, and supports cross-graph reference and instance lookup; (4) Establishing bidirectional associations: Graph elements record the graph references they belong to (element.graph), and graph instances maintain a set of element IDs, forming a bidirectional queryable relationship; (5) Consistency and integrity guarantee: Check the uniqueness of ID when adding elements, automatically clean up related connections when deleting elements, and verify the existence of ports when creating connections.
[0030] 3. Implement UnitConnection for system connection and port management: Establish a unified connection management system to support control flow and data flow connections; Implement port type compatibility checks and connection verification; Provides the ability to dynamically create, modify, and delete connections; Supports circular dependency detection and join rule verification; This invention provides an embodiment, for example. Figure 2 The diagram shows a code flow diagram for implementing UnitConnection system connection and port management; 4. For example Figure 3 As shown, a mechanism for serializing and deserializing a graph is established: The complete graph structure data format is defined using SerializedScriptGraphBody; It supports serialization storage of all graph elements, including nodes, connections, and variables; Enables cross-platform graph data exchange and version compatibility; Provides data integrity verification and error recovery mechanisms.
[0031] In step 2, a Flow execution system based on an object pool is constructed, specifically as follows: Its execution entity: Flow execution flow controller; The specific implementation process is as follows: 1. Implement an execution flow management system based on an object pool: Implement a poolable interface to support automatic management of execution stream instances. A static object pool provides an efficient mechanism for acquiring and releasing instances. Define the execution flow cleanup logic to clean up runtime state. Maintain execution context, variable mapping, and local data. 2. Implement a graph traversal execution mechanism with recursion protection: Define the continuous execution mode of the control flow and trigger subsequent operations through the output port; Check the connection status and obtain the target input port for processing; A preprocessing mechanism is invoked before node execution, supporting debugging and monitoring; Data transfer and control flow between management nodes are executed recursively; This invention provides a schematic diagram of a graph traversal execution mechanism for implementing recursion protection, as shown below. Figure 4 As shown; 3. Implement the GraphStack execution stack mechanism: Establish a context stack management mechanism for graph execution; Maintain the association between graph instances, execution data, and debugging information; Supports nested graph calls and hierarchical execution management; Provides snapshot and recovery capabilities for the execution state; This invention provides a schematic diagram of the implementation of the GraphStack execution stack mechanism, as shown below. Figure 5 As shown; 4. Implement recursive detection and protection mechanisms: Establish a recursive access detection system for data ports to prevent infinite loops; A unique recursive detection key is generated using port and execution stack information; Use a collection data structure to track the current access path status; Provides an anomaly-safe recursive cleanup mechanism to ensure system stability; This invention provides a schematic diagram of implementing a recursive detection and protection mechanism, as shown below. Figure 6 As shown.
[0032] Step 2 is related to the next step: the node call events triggered during the Flow execution process provide execution tracing information to the debug data system in Step 3; the instance status managed by the object pool provides status change notifications to the event system in Step 4.
[0033] Step 3 involves establishing a non-intrusive debug data system, specifically as follows: The executing entity is: GraphData debug data manager; Its specific implementation method: 1. Implement separate management of debugging data: Establish a generic graph data management class to support different types of graph resources; Maintain separate mapping tables for execution data and debugging data; Provides an on-demand creation and retrieval mechanism for debug data; Supports type-safe access and conversion of generic constraints; This invention provides a schematic diagram of a program for implementing separate management of debugging data, such as... Figure 7 As shown; 2. Implement a breakpoint system and execution tracing: Establish a global detection mechanism for debug mode, which is only activated during debugging; Check the breakpoint status of the target node; dynamic breakpoint settings are supported. Trigger the breakpoint hit event through the event center to notify the debugger; Monitor the execution process of all graph elements and provide complete call chain tracing; 3. Implement a ghost data mechanism to prevent memory leaks: Establish a mechanism for delayed release and archiving of element data; Retain historical records for a certain period of time after removing element data; Maintain the relationships between ghost data using globally unique identifiers; It supports historical data query and backtracking functions during the debugging process.
[0034] Step 3 is related to the next step: the execution events of debug data collection are uniformly distributed through the event center in step 4; breakpoint hit information provides debug status data for the status management in step 4.
[0035] Step 4 involves implementing the event-driven mechanism and state management, specifically as follows: Its execution entity is: EventCenter; Its specific implementation is as follows: 1. Implement a global event system: Provides a registration and callback handling mechanism for breakpoint hit events; Supports event listening and filtering for specific graph instances; Establish a unified event distribution mechanism for graph elements; Achieve loosely coupled communication between components through a global event center; This invention provides schematic diagrams of embodiments for implementing a global event system, such as... Figure 8 As shown; 2. Implement graph lifecycle management: Define the startup listening mode for the graph instance and activate the listening state for the graph data; Traverse all graph cells, check them one by one, and activate the event listening capability; Supports dynamic listener registration and lifecycle management for nodes; Establish a hierarchical monitoring mechanism for the entire graph and individual nodes; 3. Implement variable system and state management: Establish a string index mapping table for global variables to support name access; Maintain a value mapping table for local data ports to support runtime data transfer; Provides an interface for setting and retrieving data port values; Supports data storage and type conversion of any type; 4. Implement data flow management and value passing mechanisms: To achieve a demand-driven data stream computing model; Establish data dependency chains between nodes through connection relationships; Supports lazy computation and value caching mechanisms; Provides type-safe data conversion and validation; This invention provides a flowchart illustrating a data flow management and value passing mechanism, as shown below. Figure 9 As shown; Step 4 is related to the next step: the type registration mechanism of the event system provides interface discovery capabilities for code library integration in step 5; the state management of the variable system provides context data for reflection calls in step 5.
[0036] In step 5, the TypeScript / JavaScript code library is integrated, and dynamic type conversion and node definition are implemented through the reflection engine, specifically as follows: Its main components are: the reflection engine and the type system; Specific implementation: 1. Implement a node definition system: Establish a generic node definition class to support different types of node details; Define the control input and control output interface specifications for nodes; Define the data input and data output interface specifications for nodes; The internal defined structure is encapsulated using the composite pattern, providing a unified access interface; 2. Implement type conversion and serialization support: Establish a multi-level default value retrieval strategy with decreasing priority; Supports node-level custom default value overriding mechanism; The type system provides automatic serialization and deserialization capabilities; It integrates a global property system and supports default value management for serializable types; 3. Implement the reflection engine interface: Access TypeScript / JavaScript code libraries using the reflection capabilities provided by our self-developed reflection engine; Supports dynamic type conversion and method invocation; Implement a type-safe data transfer mechanism; Automatically generate node definitions to map code symbols to visual nodes; like Figure 10 As shown, this invention provides an embodiment for implementing a reflection engine interface.
[0037] Step 5 is related to the next step: the type information generated by the reflection engine provides type mapping for cross-platform serialization in step 6; the standardized interface defined by the node provides a unified specification for platform compatibility in step 6.
[0038] In step 6, cross-platform compatibility is achieved by providing a unified runtime environment and data serialization format based on Web standards, specifically as follows: The implementing entity is: the cross-platform adaptation layer; The specific implementation is as follows: 1. Implement a pure JavaScript execution environment based on Web standards: All core functionalities are implemented based on standard Web APIs; It does not depend on specific browser or engine extensions; Supports Web graphics technologies such as WebGL and Canvas; 2. Implement progressive feature enhancements: Functionality is dynamically adjusted based on the capabilities of the operating environment. Adaptive optimization on devices with different performance levels; Supports a unified experience across mobile and desktop platforms; 3. Implement a standardized data serialization format: JSON-based graph data serialization standard; Supports version compatibility and data migration mechanisms; Achieve cross-platform data exchange and interoperability; Provides data integrity verification and error recovery; This invention provides a schematic diagram for implementing a standardized data serialization format, such as... Figure 11 As shown.
[0039] The present invention provides an embodiment, and compares and analyzes the method described in the present invention with the prior art to obtain a comparison table as shown in Table 1.
[0040]
[0041] This invention provides several embodiments to illustrate the above method: Example 1: Game AI Behavior Tree System Application Background: Developing an intelligent NPC behavior system for RPG games requires supporting complex decision-making logic and state management.
[0042] Implementation process: 1. Flowchart Design: AI behavioral logic is implemented based on the Unit-Port orchestration method of this invention, such as... Figure 12 As shown: Technical characteristics are reflected in: Unit-based design: Each decision-making function is encapsulated as an independent unit; Port type distinction: Control flow port (blue) vs. data flow port (purple); Precise connection: a one-to-one UnitConnection connection from port to port; Execution flow management: Achieves efficient execution through Flow and GraphStack, specifically as follows: Figure 13 As shown; 2. Execution Flow Control: AI decision processing is implemented based on the Flow execution mechanism of this invention. Technical characteristics are reflected in: Object pool management: an efficient Flow instance reuse mechanism; Control flow driven: Triggers subsequent Unit execution via ControlOutput; Data stream transmission: Port data exchange is achieved through setValue / getValue; Non-intrusive debugging: Debug data is completely separated from execution logic; 3. Status Management and Debugging: AI status monitoring and debugging support: Register a graph element execution event listener to output the execution status of AI nodes in real time; Set breakpoints on the tracking node to support single-step debugging and status checks; Implementation results: AI behavior response time is controlled within 5 milliseconds; Supports complex, multi-layered decision tree structures; Provides complete visualization and debugging of the AI decision-making process.
[0043] Example 2: Industrial Automation Control System Application Background: A manufacturing company needs to develop a web-based equipment monitoring system to achieve real-time monitoring and automatic control of the status of production equipment.
[0044] Implementation process: 1. State machine design, the specific structure of which is as follows: Figure 14 As shown; 2. Equipment Data Acquisition: Flowchart Design of Industrial Equipment Monitoring System: Example of a dedicated flowchart for equipment monitoring; The design incorporates three core processing nodes: sensor reading, data processing, and alarm checking. Establish a complete data link from raw data to processed results through data stream connections; 3. Real-time control logic: Equipment real-time control execution mechanism: Create a dedicated execution flow instance for device control and bind it to the control graph execution stack; Establish a timed monitoring task with a 100-millisecond cycle to ensure the system's real-time response; Check the execution flow status to prevent duplicate execution, and start the monitoring loop through a trigger mechanism; Technical features: Real-time performance: System response time is controlled within 100 milliseconds; Reliability: The safety of system state transitions is ensured through state machines; Scalability: New devices can be connected simply by adding the corresponding node definition.
[0045] Example 3: Web3D Content Creation Platform Application Background: To develop a Web3D scene editing platform for content creators, supporting complex interactive logic design.
[0046] Implementation process: 1. Scene Interaction Design: A 3D scene interaction system is implemented based on the Unit-Port orchestration method of this invention, specifically as follows: Figure 15 As shown; Technical characteristics are reflected in: Event-driven architecture: Mouse events trigger subsequent Unit execution; Data stream transmission: precise transmission of mouse position and button information; Port type security: strict distinction between control flow and data flow; Modular design: Each interaction step is encapsulated as an independent Unit; 2. Animation Control System: Animation sequence control is implemented based on the Unit collaborative mechanism of this invention, specifically as follows: Figure 16 As shown; Technical characteristics are reflected in: Sequence execution control: Animation chains are implemented through the control flow from completed to next; Real-time data updates: The currentValue data stream drives the transformation of the target object in real time; Loop control: Supports repeated playback of animation sequences; State management: Each Unit maintains its own execution state and data; 3. User Interaction Handling: User interaction event handling mechanism: Register a callback handler for the click event in the mouse event unit; Create a new execution flow instance to handle a single click event; The click location data is passed to the data output port to initiate the event handling process; Implementation advantages: Creation efficiency: Content creators can achieve complex interactions without needing programming knowledge; Performance optimization: Flow execution optimization ensures smooth operation of 3D scenes; Cross-platform compatibility: The same logic can run on different devices.
[0047] Example 4: Development of Interactive Educational Content Application Background: Educational institutions need to develop interactive learning content that can express complex teaching logic while also being easy for teachers to create.
[0048] Implementation process: 1. Course Logic Design: Educational interactive content is implemented based on the Unit chaining arrangement of this invention, specifically as follows... Figure 17 As shown; Technical characteristics are reflected in: Teaching process control: Achieving a complete teaching cycle through control flow connections. Data status management: accurate transmission of data such as issue ID, score, and progress. Branching logic processing: Different control flow paths for correct / incorrect answers State-driven design: Each Unit determines its output behavior based on its input state. 2. Learning Progress Tracking: Learning progress tracking and data management: Create a dedicated execution flow instance for course schedule management; Register an answer submission event handler for the answer checking unit; Calculate scores based on the correctness of the answers, triggering progress update logic; 3. Multimedia Content Integration: Multimedia content integration is achieved based on the Unit synchronization mechanism of this invention, specifically as follows: Figure 18 As shown; Technical characteristics are reflected in: Precise synchronization control: Achieve audio and video synchronization through syncTimestamp data stream; Event-driven collaboration: Synchronization management of started events triggered by audio and video units; Real-time status monitoring: The currentTime data stream monitors the playback progress in real time; Distributed collaboration: Each media unit is controlled independently, but they work together through Unit connections; Technical effects: Content production efficiency increased by more than 80%; Supports complex branching teaching logic; Real-time learning data collection and analysis; These embodiments demonstrate the wide applicability of the present invention's serializable flowchart-based technical solution in different application fields, and verify the system's practicality, flexibility, and technological advancement.
[0049] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0050] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for cross-platform game content generation using graphical logic orchestration, characterized in that, include: Step 1: Flowchart data structure based on JSON serialization; Step 2: Build a Flow execution system based on object pooling; Step 3: Establish a non-intrusive debugging data system; Step 4: Implement the event-driven mechanism and state management; Step 5: Integrate the TypeScript / JavaScript code library and implement dynamic type conversion and node definition through the reflection engine; Step 6: Achieve cross-platform compatibility by providing a unified runtime environment and data serialization format based on Web standards.
2. The method according to claim 1, characterized in that, The flowchart data structure includes: a graph structure serialization mechanism based on JSON format, a unified management mechanism for graph elements, a UnitConnection connection system and port management mechanism, and a graph serialization and deserialization mechanism.
3. The method according to claim 2, characterized in that, The flowchart data structure also includes a port type compatibility check and circular dependency detection mechanism to prevent invalid connections and logical errors.
4. The method according to claim 3, characterized in that, In step 2, a Flow execution system based on an object pool is constructed, specifically as follows: Establish an execution flow management system based on object pools; Establish a graph traversal execution mechanism with recursive protection; Establish the GraphStack execution stack.
5. The method according to claim 4, characterized in that, Step 2 also includes: Establish a recursive detection and protection mechanism to perform recursive detection and protection.
6. The method according to claim 5, characterized in that, Step 3 involves establishing a non-intrusive debug data system, specifically as follows: Implement separate management of debugging data; Perform node-level breakpoint setting, execution path tracing, and precise error location; A ghost data mechanism is used to prevent memory leaks during debugging.
7. The method according to claim 6, characterized in that, Step 4 involves implementing the event-driven mechanism and state management, specifically as follows: Establish a global event center system; Perform lifecycle management of the graph; Perform variable system and state management; Establish data flow management and value transfer mechanisms.
8. The method according to claim 7, characterized in that, In step 5, the TypeScript / JavaScript code library is integrated, and dynamic type conversion and node definition are implemented through the reflection engine, specifically as follows: Establish a node definition system; Provides type conversion and serialization support; Access TypeScript / JavaScript code libraries using the reflection capabilities provided by the reflection engine.