Modularized game development engine system and method based on deep learning

By using a modular game development engine system based on deep learning, combined with formal verification and physical geometry correction, a modular heterogeneous graph is constructed and the EGNN network is improved. This solves the problems of semantic drift of logical structure and interface incompatibility in existing technologies, and achieves efficient generation of game logic flow and improved security.

CN122044553APending Publication Date: 2026-05-15SHENZHEN XUWAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XUWAN TECH CO LTD
Filing Date
2026-02-04
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing modular game development, interface matching algorithms based on graph neural networks ignore the complex physical constraints in the game's runtime environment, leading to semantic drift in the logical structure, insufficient execution stability and self-correction capabilities of the generated code, and increased costs for manual debugging and iterative optimization.

Method used

A modular game development engine system based on deep learning is adopted. Through a closed-loop optimization mechanism of formal verification and physical geometry correction, a module heterogeneous graph is constructed, the EGNN network is improved, physical features are extracted, structured constraints are generated, and the relative position distribution between nodes is adjusted through the backpropagation algorithm to eliminate conflicting connections. This ensures that the generated topological adjacency matrix dynamically adapts to the interface constraints and logic flow of the target module.

Benefits of technology

It significantly improves the correctness and operational security of generated logical flows, dynamically perceives the adaptation relationship between nodes, enhances logical consistency and system robustness in complex scenarios, solves the problem of incompatible interface types between heterogeneous modules, and improves the automation level and code quality of module integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044553A_ABST
    Figure CN122044553A_ABST
Patent Text Reader

Abstract

The invention discloses a modular game development engine system and method based on deep learning, and relates to the technical field of game software development, and the system comprises the following modules: a heterogeneous graph construction module used for constructing a module heterogeneous graph; the physical topology generation module is used for generating a dynamic topology adjacency matrix by improving an EGNN network; the interface alignment tensor generation module is used for generating an interface alignment tensor; the glue code decoding module is used for generating a glue code node sequence; the formal verification module is used for generating a verification feedback vector; the physical geometry correction module is used for generating a corrected topological adjacency matrix; and the logic flow generation module is used for generating a game logic flow file. According to the method, the limitations of low module combination efficiency, high logic error rate of automatically generated codes and lack of self-correction capability in traditional game development are overcome, and an efficient solution is provided for intelligent game development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game software development technology, and in particular to a modular game development engine system and method based on deep learning. Background Technology

[0002] In the field of modular game development and intelligent code generation, with the exponential increase in the complexity of open-world games, traditional development models based on scripts or rule engines face severe efficiency challenges in the automatic orchestration and logical integration of massive functional modules. Existing module combination and code generation technologies, such as interface matching algorithms based on graph neural networks (GNNs), while improving the prediction efficiency of module connections through graph aggregation mechanisms, mainly rely on the semantic similarity of node feature vectors for static graph construction. This method, which is purely based on semantic features, ignores the complex physical constraints implicit in the game runtime environment (such as the strong coupling of resource dependencies, the causal timing of interactive behaviors, etc.) and deep data flow logical connections, leading to semantic drift in the logical structure when building module topologies, thus limiting the execution stability of generated code in complex scenarios. In addition, classic code generation methods often struggle to use formal verification feedback to dynamically correct the internal state of the generated model, resulting in data races or deadlock errors when dealing with complex logic involving concurrent access or circular dependencies, increasing the cost of manual debugging and iterative optimization.

[0003] Therefore, how to provide a modular game development engine system and method based on deep learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] This invention proposes a modular game development engine system and method based on deep learning. Through a closed-loop optimization mechanism based on formal verification and physical geometry correction, it constructs a modular heterogeneous graph and an improved EGNN network, respectively, extracting physical features including node spatial coordinates and interaction force vectors, and generating structured constraints based on interface alignment tensors. The verification feedback vector is used as a gradient signal to back-input the improved EGNN network. By calculating the partial derivatives of the loss function with respect to node spatial coordinates and interaction force calculation parameters, the backpropagation algorithm is used to adjust the relative position distribution between nodes and eliminate conflicting connections. This mechanism, by establishing a closed-loop feedback path from "logical conflict detection" to "physical spatial topology correction," effectively eliminates data competition and circular dependencies in the glue code generation process, ensuring that the generated corrected topology adjacency matrix can dynamically adapt to the interface constraints and logic flow of the target module. This achieves the technical effect of improving the correctness of game logic flow file generation and operational security while reducing manual intervention costs. This invention overcomes the limitations of traditional game development, such as low module combination efficiency, high error rate of automatically generated code logic, and lack of self-correction capabilities, providing an efficient solution for intelligent game development.

[0005] A modular game development engine system based on deep learning according to an embodiment of the present invention includes the following modules:

[0006] The heterogeneous graph construction module is used to obtain the target module set and natural language requirement text, embed word vectors into the interface definition of each target module, and construct a module heterogeneous graph by combining the dependency relationship between the target modules.

[0007] The physical topology generation module is used to input the module heterogeneous graph into the improved EGNN network, aggregate node features and iteratively update node states, calculate the interaction forces between nodes, solve the connection probabilities, and output a dynamic topological adjacency matrix.

[0008] The interface alignment tensor generation module is used to filter target connection edges according to the dynamic topological adjacency matrix, extract the interface feature vectors at both ends of the target connection edge for semantic similarity calculation, and match the type conversion path based on the preset logical conversion rule library to generate the interface alignment tensor.

[0009] The glue code decoding module is used to determine the node connection relationship based on the dynamic topological adjacency matrix, construct structured constraints by combining the interface alignment tensor, map them to the input sequence, and decode to generate the glue code node sequence.

[0010] The formal verification module is used to perform syntax parsing on the glue code node sequence to generate an abstract syntax tree, construct control flow graphs and data flow graphs, traverse execution paths and calculate path constraints, and generate verification feedback vectors if data races or circular dependencies are detected.

[0011] The physical geometry correction module is used to improve the EGNN network by taking the verification feedback vector as a gradient signal input. It updates the spatial coordinate features and interaction force calculation parameters of the nodes through the backpropagation algorithm, adjusts the relative positional relationship between the nodes, and outputs the corrected topological adjacency matrix.

[0012] The logic flow generation module is used to parse and correct the topology of the topology adjacency matrix, call the glue code node sequence to connect the interface ports of each target module, and generate the game logic flow file.

[0013] A modular game development engine method based on deep learning according to an embodiment of the present invention includes the following steps:

[0014] S1. Obtain the target module set and natural language requirement text, embed word vectors into the interface definition of each target module, and construct a module heterogeneity graph by combining the dependency relationship between the target modules;

[0015] S2. Input the module heterogeneous graph into the improved EGNN network, aggregate node features and iteratively update node states, calculate the interaction forces between nodes, solve the connection probabilities, and output the dynamic topological adjacency matrix.

[0016] S3. Filter target connection edges according to the probability weights in the dynamic topological adjacency matrix, extract the interface feature vectors at both ends of the target connection edge for semantic similarity calculation, and match the type conversion path based on the preset logical conversion rule library to generate the interface alignment tensor.

[0017] S4. Determine the node connection relationship based on the dynamic topological adjacency matrix, construct structured constraints by combining the interface alignment tensor, map them into the input sequence, and decode to generate the glue code node sequence.

[0018] S5. Perform syntax parsing on the glue code node sequence to generate an abstract syntax tree, and construct a control flow graph and a data flow graph. Traverse the execution path and calculate the path constraints. If data races or circular dependencies are detected, generate a verification feedback vector.

[0019] S6. Improve the EGNN network by using the verification feedback vector as the gradient signal input, update the spatial coordinate features and interaction force calculation parameters of the nodes through the backpropagation algorithm, adjust the relative positional relationship between the nodes, and output the corrected topological adjacency matrix.

[0020] S7. Parse and correct the topological adjacency matrix, call the glue code node sequence to connect the interface ports of each target module, and generate the game logic flow file.

[0021] Optionally, S1 specifically includes:

[0022] S11. Perform interface signature parsing operation, traverse the target module set, extract interface name, parameter type and return value as keywords, and identify the reference dependency relationship between modules;

[0023] S12. Map keywords to high-dimensional feature vectors, calculate the semantic distance between high-dimensional feature vectors, and determine the topological connection edges between modules based on the weighted result of semantic distance and reference dependency.

[0024] S13. Initialize the heterogeneous graph data structure, instantiate modules as nodes, bind high-dimensional feature vectors to node attributes, map topological connection edges to graph edges, and construct a module heterogeneous graph that integrates semantic features and dependent topology.

[0025] Optionally, the improved EGNN network includes a coordinate feature initialization layer, an equivariant message passing computation layer, an interaction force computation layer, a connection probability mapping layer, and a dynamic topology output layer.

[0026] The coordinate feature initialization layer is used to receive the node features of the module heterogeneous graph, perform a mapping operation to project the node features to a high-dimensional Euclidean space, and initialize the spatial coordinate vector of each node.

[0027] The equivariant message passing computation layer is used to obtain the spatial coordinate vectors of the current node and its neighboring nodes and calculate the coordinate difference vector. The coordinate difference vector is concatenated with the node features of the neighboring nodes to generate a message tensor. The message tensor is then weighted and summed to update the node features of the current node. Based on the coordinate difference vector, the spatial coordinate vector of the current node is translated and the node state is updated iteratively.

[0028] The interaction force calculation layer is used to calculate the Euclidean distance between the updated node spatial coordinate vectors, take the reciprocal of the Euclidean distance to obtain the distance decay factor, and perform a product operation between the distance decay factor and the preset gravitational constant to solve the interaction force value between the node pairs.

[0029] The connection probability mapping layer is used to input the interaction force values ​​into the Sigmoid activation function to perform normalization processing and generate connection probability values ​​between nodes.

[0030] The dynamic topology output layer is used to construct a dynamic topology adjacency matrix based on the connection probability values, assign the connection probability values ​​as the weights of the edges in the adjacency matrix, and output the dynamic topology adjacency matrix.

[0031] Optionally, S3 specifically includes:

[0032] S31. Read the dynamic topological adjacency matrix, traverse the matrix elements and perform binarization filtering according to the probability weight threshold to determine the target connection edge set, and retrieve the interface feature vectors corresponding to the first and last nodes of the target connection edge from the node feature library.

[0033] S32. Perform cosine similarity calculation on the interface feature vectors and output the semantic similarity values ​​between interfaces; read the data type identifier in the interface definition, perform key-value retrieval in the preset logical conversion rule base, match the type conversion paths at both ends of the connection edge, and parse the dimension transformation parameters and conversion operation instructions in the type conversion path;

[0034] S33. The semantic similarity values, dimension transformation parameters, and conversion operation instructions are concatenated and fused along the feature dimension, and an interface-aligned tensor is generated through tensor mapping operation; the dimension channel of the interface-aligned tensor carries the dimension mapping index, and the feature channel carries the type conversion operator.

[0035] Optionally, S4 specifically includes:

[0036] S41. Parse the dynamic topological adjacency matrix to extract node connection dependencies, and parse the interface alignment tensor to extract dimension mapping indexes and type conversion operators, thereby constructing structured constraint conditions containing topological constraints and type conversion constraints.

[0037] S42. Map the structured constraints into an input sequence containing semantic features and positional information, calculate the attention weights between sequence elements through a self-attention mechanism, and aggregate contextual features based on the attention weights;

[0038] S43. Perform probabilistic decoding based on aggregated context features, predict code nodes one by one according to the path with the highest probability, and generate a sequence of glue code nodes containing control flow pointers to interface functions.

[0039] Optionally, S5 specifically includes:

[0040] S51. Perform lexical scanning and syntactic reduction on the glue code node sequence to construct an abstract syntax tree with parent-child nesting relationships; divide the basic blocks based on the abstract syntax tree and identify jump logic to construct a control flow graph, and at the same time parse the variable definition-reference chain to construct a data flow graph;

[0041] S52. Merge the control flow graph, data flow graph, and execution graph to generate a program dependency graph. Use a depth-first search algorithm to traverse all reachable paths in the program dependency graph and extract the topological sorting sequence of path nodes and the read / write access set of variables.

[0042] S53. Based on the variable-based read-write access set, perform concurrent application analysis, calculate the mutually exclusive access intervals of the same variable on different paths, and if the access intervals overlap, it is determined to be a data race; construct strongly connected components based on the topological sorting sequence of path nodes, and if the number of nodes in the strongly connected component is greater than one, it is determined that there is a circular dependency.

[0043] S54. When data races or circular dependencies are detected, locate the coordinate index and path identifier of the conflict node in the program dependency graph, encode the conflict type into a one-hot vector and perform a concatenation operation with the path identifier vector to generate a verification feedback vector.

[0044] Optionally, S6 specifically includes:

[0045] S61. Perform a linear mapping on the validation feedback vector to generate a gradient signal, calculate the Euclidean distance between the gradient signal and the current network output state, and convert the Euclidean distance value into a scalar loss function.

[0046] S62. Perform back gradient propagation on the scalar loss function, derive the partial derivatives of the node spatial coordinate vectors and interaction force calculation parameters in reverse along the computation graph, and perform gradient descent update on the node spatial coordinate vectors and the gravity constant weights in the interaction force calculation layer based on the partial derivative values.

[0047] S63. Based on the updated node spatial coordinate vector and gravitational constant weight, recalculate the spatial distance and interaction force values ​​between node pairs, and adjust the relative position distribution of nodes in space according to the magnitude of the interaction force values.

[0048] S64. Based on the adjusted relative position distribution, remap the connection probabilities between nodes, set a conflict elimination threshold, remove connection edges with connection probabilities less than the conflict elimination threshold from the adjacency matrix, and output the corrected topological adjacency matrix.

[0049] Optionally, S7 specifically includes:

[0050] S71. Parse the corrected topological adjacency matrix, extract the row and column indices of the non-zero elements in the matrix, and construct a topological edge set containing the source module identifier and the target module identifier;

[0051] S72. Based on the source module identifier and the target module identifier, index and locate in the glue code node sequence, retrieve the corresponding glue code logic, and instantiate the glue code logic as a middleware interface connecting the input port and output port of the target module.

[0052] S73. Based on the connection order of the topology edge set, the middleware interface and the function of the target module are chained together, and the linked assembly is compiled and built to generate a game logic flow file with independent execution capability.

[0053] The beneficial effects of this invention are:

[0054] (1) This invention employs an improved EGNN network and a formal verification feedback mechanism, significantly enhancing the correctness and operational security of automatically generated logic flows in modular game development. This invention innovatively maps formal verification results to gradient signals, directly updating node spatial coordinates and interaction force parameters via a backpropagation algorithm. This establishes a closed-loop path from logic error detection to physical topology correction, enabling automatic removal of conflicting connections. Simultaneously, the connection probability calculation based on physical Euclidean distance metric allows the model to dynamically perceive the adaptation relationships between nodes, thereby significantly improving the logical consistency and system robustness of the generated code in complex concurrent scenarios.

[0055] (2) This invention effectively solves the problems of incompatible interface types and semantic gaps in glue code generation between heterogeneous game modules by constructing an interface alignment tensor and a structured constraint decoding mechanism. This invention generates an interface alignment tensor by integrating semantic similarity, dimension mapping index, and type conversion operators, explicitly embedding logical conversion rules into the generation process, and combining a self-attention mechanism to decode and generate glue code node sequences. This method can adaptively generate accurate middleware interface code, significantly improving the automation level and code quality of module integration, and providing efficient technical support for agile game logic development. Attached Figure Description

[0056] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0057] Figure 1 This is a schematic diagram of the structure of a modular game development engine system based on deep learning proposed in this invention;

[0058] Figure 2 This is an overall flowchart of a modular game development engine method based on deep learning proposed in this invention;

[0059] Figure 3 This is a flowchart illustrating the working principle of the improved EGNN network in the modular game development engine method based on deep learning proposed in this invention. Detailed Implementation

[0060] The invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0061] refer to Figure 1 A modular game development engine system based on deep learning, comprising the following modules:

[0062] The heterogeneous graph construction module is used to obtain the target module set and natural language requirement text, embed word vectors into the interface definition of each target module, and construct a module heterogeneous graph by combining the dependency relationship between the target modules.

[0063] The physical topology generation module is used to input the module heterogeneous graph into the improved EGNN network, aggregate node features and iteratively update node states, calculate the interaction forces between nodes, solve the connection probabilities, and output a dynamic topological adjacency matrix.

[0064] The interface alignment tensor generation module is used to filter target connection edges according to the dynamic topological adjacency matrix, extract the interface feature vectors at both ends of the target connection edge for semantic similarity calculation, and match the type conversion path based on the preset logical conversion rule library to generate the interface alignment tensor.

[0065] The glue code decoding module is used to determine the node connection relationship based on the dynamic topological adjacency matrix, construct structured constraints by combining the interface alignment tensor, map them to the input sequence, and decode to generate the glue code node sequence.

[0066] The formal verification module is used to perform syntax parsing on the glue code node sequence to generate an abstract syntax tree, construct control flow graphs and data flow graphs, traverse execution paths and calculate path constraints, and generate verification feedback vectors if data races or circular dependencies are detected.

[0067] The physical geometry correction module is used to improve the EGNN network by taking the verification feedback vector as a gradient signal input. It updates the spatial coordinate features and interaction force calculation parameters of the nodes through the backpropagation algorithm, adjusts the relative positional relationship between the nodes, and outputs the corrected topological adjacency matrix.

[0068] The logic flow generation module is used to parse and correct the topology of the topology adjacency matrix, call the glue code node sequence to connect the interface ports of each target module, and generate the game logic flow file.

[0069] refer to Figure 2 and Figure 3 A modular game development engine method based on deep learning includes the following steps:

[0070] S1. Obtain the target module set and natural language requirement text, embed word vectors into the interface definition of each target module, and construct a module heterogeneity graph by combining the dependency relationship between the target modules;

[0071] S2. Input the module heterogeneous graph into the improved EGNN network, aggregate node features and iteratively update node states, calculate the interaction forces between nodes, solve the connection probabilities, and output the dynamic topological adjacency matrix.

[0072] S3. Filter target connection edges according to the probability weights in the dynamic topological adjacency matrix, extract the interface feature vectors at both ends of the target connection edge for semantic similarity calculation, and match the type conversion path based on the preset logical conversion rule library to generate the interface alignment tensor.

[0073] S4. Determine the node connection relationship based on the dynamic topological adjacency matrix, construct structured constraints by combining the interface alignment tensor, map them into the input sequence, and decode to generate the glue code node sequence.

[0074] S5. Perform syntax parsing on the glue code node sequence to generate an abstract syntax tree, and construct a control flow graph and a data flow graph. Traverse the execution path and calculate the path constraints. If data races or circular dependencies are detected, generate a verification feedback vector.

[0075] S6. Improve the EGNN network by using the verification feedback vector as the gradient signal input, update the spatial coordinate features and interaction force calculation parameters of the nodes through the backpropagation algorithm, adjust the relative positional relationship between the nodes, and output the corrected topological adjacency matrix.

[0076] S7. Parse and correct the topological adjacency matrix, call the glue code node sequence to connect the interface ports of each target module, and generate the game logic flow file.

[0077] In this embodiment, S1 specifically includes:

[0078] S11. Read the source code files in the target module set, use regular expression matching to find the starting line of the function definition, extract the function name as the interface name keyword, find the variable definition within the parentheses to extract the parameter type keyword, find the return type definition after the parentheses to extract the return value keyword, and at the same time scan the reference statements at the beginning of the file. If the file name appears in the reference statements of other files, it is recorded as a reference dependency relationship.

[0079] S12. Input the extracted interface name, parameter type, and return value keywords into the pre-trained BERT model, perform context encoding on the input text, and output a 768-dimensional floating-point array as a high-dimensional feature vector. Read the 768-dimensional arrays corresponding to the two modules, calculate the absolute value of the numerical difference between the corresponding positions in each row, and add these 768 absolute values ​​to get the sum as the semantic distance. Set the semantic distance to less than 50 to represent high similarity and score it as 1 point. If there is a reference dependency relationship between the modules, add an extra 1 point. When the total score is greater than or equal to 1 point, determine to establish a topological connection edge between the two modules.

[0080] S13. Allocate graph data storage space in computer memory, create a unique identifier for each target module in memory as a node, store an array containing 768 floating-point numbers in the attribute area corresponding to the node identifier, write the identifiers of the two connected modules into the adjacency list as graph edges, and finally generate a module heterogeneous graph containing node attributes and edge connection relationships.

[0081] In this embodiment, the improved EGNN network includes a coordinate feature initialization layer, an equivariant message passing computation layer, an interaction force computation layer, a connection probability mapping layer, and a dynamic topology output layer.

[0082] The coordinate feature initialization layer is used to read the feature vector containing 768 values ​​in the heterogeneous graph node of the module, perform a numerical product operation on the vector with a first weight matrix of size 128 by 768 and sum them up to obtain a first intermediate vector of length 128. All values ​​less than 0 in the vector are modified to 0, while the remaining values ​​remain unchanged to achieve nonlinear transformation. Then, the processed vector is performed a numerical product operation on the second weight matrix of size 3 by 128 and summed up to obtain an initial coordinate array containing three floating-point numbers. These three floating-point numbers are used as the horizontal, vertical and vertical coordinates of the node in turn to complete the initialization of the node's position in three-dimensional Euclidean space.

[0083] The equivariant message passing computation layer is used to read the three-dimensional coordinate array of the current node and all its directly connected neighboring nodes, subtract the coordinate values ​​of the neighboring nodes from the coordinate values ​​of the current node to obtain a coordinate difference vector containing three values, concatenate this difference vector with the feature arrays of the neighboring nodes to form a new message vector, add the message vectors of all the current node's neighbors, and use the sum to replace and update the feature values ​​of the current node; at the same time, the coordinate difference vector is multiplied by a learning rate of 0.1, and the calculated displacement is accumulated into the coordinate values ​​of the current node to change the spatial position of the node.

[0084] The interaction force calculation layer is used to traverse all node pairs in the graph, calculate the square of the difference between the corresponding positions in the three-dimensional coordinate array after the update of the two nodes and take the square root to obtain the Euclidean distance, divide the value 1 by the Euclidean distance to obtain the distance decay factor, and multiply the distance decay factor by the preset value 5 to obtain the gravitational constant, so as to obtain the final interaction force value.

[0085] The connection probability mapping layer is used to input the interaction force values ​​into the Sigmoid activation function to perform normalization processing and generate connection probability values ​​between nodes.

[0086] The dynamic topology output layer is used to create a square matrix with the same number of rows and columns as the number of nodes. The probability values ​​corresponding to the nodes are filled into the row and column intersection positions of the square matrix, and 0 is filled into the empty positions to generate a dynamic topology adjacency matrix containing probability weights.

[0087] The improved EGNN network proposed in this invention is similar to the traditional EGNN network in that it retains the core architecture of the EGNN network, namely, updating the features of the central node by aggregating the information of neighboring nodes, and performing translation transformation on the node coordinates using coordinate difference vectors to maintain the equivariance to physical transformations. Both networks also use multilayer perceptrons to process node features.

[0088] The difference lies in that this invention breaks away from the limitations of traditional EGNN networks, which rely solely on static distance aggregation features or predict fixed graph structures. It introduces a physical and mechanical mechanism to construct a dynamic topology generation mapping system. Building upon the traditional model's simple node state updates, this invention adds an interaction force calculation layer. This layer calculates the distance decay factor by taking the reciprocal of the Euclidean distance between nodes and combines this with a preset gravitational constant to calculate the interaction force values ​​between node pairs. In the connection probability mapping layer, the Sigmoid activation function is used to convert the interaction force values ​​into connection probabilities, rather than directly outputting feature labels. Finally, in the dynamic topology output layer, a dynamic topology adjacency matrix containing probability weights is constructed based on the probability values.

[0089] The beneficial effects of the improvements are that by introducing interaction forces and probability mapping mechanisms, the EGNN network can transform the relative positional relationships of nodes in Euclidean space into physical connection strengths. This breaks the limitations of traditional methods that rely solely on semantic similarity to construct topologies, and achieves dynamic mapping from geometric space to logical topology. This design significantly enhances the model's ability to perceive implicit physical constraints between modules, enabling more accurate adaptation to resource coupling relationships between game modules. The coordinate correction mechanism based on feedback gradients effectively improves the self-consistency of the generated topology, enhancing the robustness and correctness of the system in complex logical integration scenarios.

[0090] In this embodiment, S3 specifically includes:

[0091] S31. Read all the values ​​in the dynamic topology adjacency matrix, set 0.5 as the filtering threshold, keep the positions in the matrix with values ​​greater than 0.5, set the rest to zero, determine the target connection edge set corresponding to the retained positions, search the node feature library according to the edge index, and extract the interface feature vector array with a length of 768 corresponding to the starting node and ending node of each edge in the set.

[0092] S32. Multiply the values ​​at corresponding positions of the two extracted interface feature vectors and add these 768 products to get the numerator. Calculate the square root of the sum of squares of all values ​​in each vector and multiply the two roots to get the denominator. Divide the numerator by the denominator to get a decimal between 0 and 1 as the semantic similarity value. Read the type name string in the interface definition, search for the string in the logical transformation rule base, and obtain the corresponding dimension transformation parameters and transformation operation instructions.

[0093] S33. The calculated semantic similarity values, dimension transformation parameter values, and numerical codes representing transformation operations are concatenated first and last in order to form a fusion array with a total length of 800. The 800-dimensional array is mapped to an interface-aligned tensor containing 256 values ​​through a fully connected layer. The first 50 positions of the tensor are stored as dimension mapping indices, and the last 206 positions are stored as type conversion operator codes.

[0094] In this embodiment, S4 specifically includes:

[0095] S41. Read the dynamic topological adjacency matrix, extract the row and column index pairs with values ​​greater than 0 in the matrix, and store them in the dependency list. At the same time, read the interface alignment tensor, directly extract the values ​​from the 1st to the 50th position in the tensor data stream as dimension mapping indices, extract the values ​​from the 51st to the 256th position and map them to the corresponding instruction codes as type conversion operators, and package the dependency list, dimension mapping indices and instruction codes to generate structured constraints.

[0096] S42. Divide the numerical values ​​in the structured constraints into text segments of length 10 in sequence to generate an input sequence. For the current segment and any reference segment in the sequence, read the numerical vector of the current segment and the numerical vector of the reference segment. Calculate the sum of the product of the corresponding values ​​in the two vectors as the original attention score. Divide the original attention score by the value 10 to obtain the scaled score. Calculate the scaled score raised to the power of the numerical constant e as the numerator. Calculate the sum of the corresponding numerator values ​​of all reference segments in the sequence as the denominator. Divide the numerator by the denominator to obtain the attention probability of the current segment to the reference segment. Multiply the attention probability by the feature vector of the reference segment to obtain the weighted feature vector. Add the weighted feature vectors of all reference segments in the sequence to obtain the context feature vector after aggregation of the current segment.

[0097] S43. Load the preset code vocabulary, read the aggregated context feature vector, perform a dot product operation with the feature vector corresponding to each word in the vocabulary, take the exponent of the operation result and divide it by the sum of the exponents of all words to calculate the predicted probability of each word; perform probability calculation and node appending, select the word with the highest predicted probability value from the vocabulary as the currently generated node, convert it into text and append it to the end of the generated sequence, repeat the probability calculation and node appending steps until the generated node contains a control flow pointer to the interface function, and output the final glue code node sequence.

[0098] The glue code decoding method proposed in this step is similar to traditional sequence generation methods in that it retains the core decoding mechanism of the Transformer architecture. That is, it calculates the association weight between elements at different positions in the sequence through a self-attention mechanism, performs normalization distribution processing using the Softmax function, and aggregates context features based on weighted summation. Both methods also use a greedy strategy of word mapping and probability maximization for node prediction.

[0099] The difference lies in that this invention breaks away from the limitations of traditional code generation models that rely solely on natural language context for free generation. It introduces a strong constraint system based on heterogeneous topology and logical transformation, constructing a precise decoding process based on structured constraints. Building upon the traditional model's simple input text features, this invention adds a structured constraint construction step as a pre-guiding module. This step extracts dependency indices from the dynamic topological adjacency matrix and precisely slices the interface alignment tensor to extract dimension mapping indices and type conversion operators. In the input sequence mapping step, logical constraint values ​​are transformed into specific text fragments and integrated into the input sequence, rather than generating a general semantic description. In the code node generation step, based on the logical constraint information, the model forces the output of a sequence of code nodes containing specific interface function pointers during the decoding process.

[0100] The beneficial effects of the improvements lie in the fact that by introducing structured constraints and a fusion decoding mechanism, this invention can explicitly inject complex module connection topologies and underlying type conversion rules into the code generation process, breaking the limitation that traditional model-generated code cannot guarantee interface adaptation and achieving accurate conversion from natural language descriptions to logically executable code. This design significantly enhances the compatibility of generated code with heterogeneous module interface differences and can automatically handle complex data type conversions and dimension mappings. Context aggregation based on attention mechanisms combined with strong constraint guidance effectively improves the syntactic correctness and logical rigor of glue code, enhancing the generation efficiency and usability of the system in automated game logic integration scenarios.

[0101] In this embodiment, S5 specifically includes:

[0102] S51. Read characters one by one from left to right in the glue code node sequence, identify keywords, variable names and operators to generate a token sequence, use a stack structure to reduce the token sequence to an abstract syntax tree containing parent-child relationships, divide the abstract syntax tree nodes into basic blocks according to condition judgments and jump statements, establish directed edges between basic blocks to generate a control flow graph, record the assignment and reading positions of variables in basic blocks, construct variable definition-reference chains, and merge directed edges and reference chains to generate a program dependency graph;

[0103] S52. Set the entry node as the starting point in the program dependency graph, use the depth-first search algorithm to visit all successor nodes in sequence, record the order of the nodes visited to form a topological sorting sequence of reachable paths, count the node numbers of variable assignment and read operations on each path, and summarize these node numbers to generate a variable read and write access set.

[0104] S53. For the same variable, read the read and write access sets on different paths, extract the node sequence index in the set, compare the distribution range of the index values ​​on the time axis. If there is at least one index value that is the same on two paths or if there is an overlap in the distribution range, it is determined that the variable is in data competition in the overlapping interval. Based on the topological sorting sequence of path nodes, the mutually reachable nodes in the sequence are grouped into the same set, and the total number of nodes in the set is counted. If the total number of nodes is greater than 1, it is determined that there is a circular dependency between the nodes in the set.

[0105] S54. When a data race or circular dependency signal is detected, lock the row and column numbers of the node that triggered the conflict in the program dependency graph as coordinate indices, obtain the path number of the node as the path identifier, create a vector of length 2, if the conflict is a data race, set the first position to 1 and the second position to 0, if the conflict is a circular dependency, set the first position to 0 and the second position to 1, generate a one-hot vector, and concatenate the one-hot vector with the numerical vector corresponding to the path identifier to generate a verification feedback vector.

[0106] In this embodiment, S6 specifically includes:

[0107] S61. Obtain a validation feedback vector of length 10, create a weight matrix of size 128 by 10, perform matrix multiplication on the validation feedback vector and the weight matrix and add a bias term to generate a gradient signal of length 128; calculate the square of the difference between each value in the gradient signal and the corresponding value in the current output state vector of the network, sum these squared values ​​and take the square root to obtain the Euclidean distance value, and use this value as the output value of the scalar loss function;

[0108] S62. Backpropagate the derivative of the scalar loss function with respect to the input variables, and use the chain rule to calculate the partial derivative of the scalar loss function with respect to the node spatial coordinate vector and the partial derivative with respect to the gravitational constant weights in the interaction force calculation layer. Set the learning rate to 0.01, subtract the product of the learning rate and the corresponding partial derivative from the current value of the gravitational constant weights, update the gravitational constant weights, and subtract the product of the learning rate and the corresponding partial derivative from the current value of the node spatial coordinate vector, update the node spatial coordinate vector.

[0109] S63. Traverse all node pairs, calculate the sum of squares of the differences between the spatial coordinate vectors of the two updated nodes and take the square root to obtain the new spatial distance; divide the value 1 by the new spatial distance to obtain the distance decay factor, multiply the distance decay factor by the updated gravitational constant weight to obtain the new interaction force value; if the interaction force value is positive, move the node along the coordinate axis direction, the moving distance is proportional to the value, and adjust the relative position distribution of the node in space.

[0110] S64. Calculate the distance between any two nodes in the adjusted relative position distribution, substitute it into the Sigmoid activation function to calculate the connection probability of the node, which is 1 divided by 1 plus e raised to the power of the negative distance value; set 0.1 as the conflict elimination threshold, traverse the dynamic topological adjacency matrix, modify the elements with values ​​less than 0.1 to 0, indicating the removal of the corresponding connection edge, retain the elements with values ​​greater than or equal to 0.1, and output the corrected topological adjacency matrix.

[0111] The topology correction method based on physical forces and verification feedback proposed in this step is similar to the traditional gradient descent optimization method in that it retains the core architecture of backpropagation optimization, namely, quantifying the error by constructing a scalar loss function, calculating the partial derivatives using the backpropagation algorithm, and iteratively updating the target parameters based on the chain rule, and both use a preset learning rate to control the step size of parameter updates.

[0112] The difference lies in that this invention breaks away from the limitations of traditional methods that optimize network weights solely based on numerical errors. It introduces a physical force-driven and geometric position correction mechanism, constructing a collaborative optimization system from the logical space to the physical space. Building upon the traditional model's simple adjustment of the weight matrix, this invention not only updates the gravitational constant weights but also directly performs gradient descent updates on the spatial coordinate vectors of the nodes. Based on the updated parameters, the interaction forces between nodes are recalculated and transformed into physical movement commands for the nodes along the coordinate axes, rather than being used solely for loss calculation. A conflict elimination threshold is used to filter connection probabilities, eliminating non-compliant connections and reconstructing the topology.

[0113] The beneficial effects of the improvements lie in the fact that by introducing matrix weighted mapping and physical force-driven mechanisms, the abstract verification feedback vector can be transformed into specific node coordinate adjustment instructions. This breaks the limitation of traditional optimization algorithms that only update network parameters and cannot dynamically change the input topology, and achieves collaborative correction from the loss function space to the Euclidean geometric space. This design significantly enhances the model's ability to physically resolve logical conflicts, and can automatically increase the physical distance between conflicting modules through the adaptive movement of nodes in space. Dynamic reconstruction based on interaction forces and probability threshold pruning effectively improve the legitimacy and self-consistency of generated connection relationships, and enhance the robustness and security of the system in complex logical integration scenarios.

[0114] In this embodiment, S7 specifically includes:

[0115] S71. Read the corrected topological adjacency matrix, use a double loop to traverse each element in the matrix, and for the current row and column positions, determine whether the value of the current element is greater than the preset zero threshold. If the value is greater than the zero threshold, record the current row position value as the source module identifier and the current column position value as the target module identifier. Combine the source module identifier and the target module identifier into a tuple and add the tuple as a topological edge to the initially empty topological edge set until all elements in the matrix have been traversed.

[0116] S72. Traverse each tuple in the topological edge set, obtain the source module identifier value, use this value as a search keyword, perform a matching search in the glue code node sequence, locate the code node containing the identifier, extract the logical statement string stored in the node as the glue code logic; call the instantiation function of the runtime environment, create an active program object as the middleware interface based on the logical statement string, establish a pointer variable pointing to the output port of the source module, establish a pointer variable pointing to the input port of the target module, bind the source module output port pointer to the input parameter attribute of the middleware interface, and bind the target module input port pointer to the return value attribute of the middleware interface;

[0117] S73. Define an empty program linked list head node. Read the tuples sequentially according to the arrangement order of the topological edge set. For each tuple, obtain its corresponding middleware interface and target module, create a new linked list node, connect the output end of the middleware interface to the input end of the target module, and append the new linked list node to the end of the program linked list. Traverse the constructed program linked list, read the code file paths of all nodes in the linked list and write them into the compilation script, execute the compilation script commands, perform lexical analysis, syntax analysis and target code generation on the code file, write the generated binary machine code into the memory, and output a game logic flow file with independent execution capability.

[0118] Example 1:

[0119] To verify the feasibility of this invention in constructing complex game logic, the method was applied to an engine upgrade project for a large-scale massively multiplayer online role-playing game (MMORPG) at a well-known online game development company (hereinafter referred to as "Company G"). In traditional game development processes, interface connections between different functional modules (such as the combat system, quest system, and UI system) typically rely on manually written glue code. This approach is not only inefficient but also prone to data races and circular dependencies in multi-threaded concurrent environments, leading to game crashes or logical deadlocks. To address these issues, Company G decided to adopt the modular game development engine system and method based on deep learning proposed in this invention.

[0120] During implementation, Company G first utilized a log collection system deployed on the development side to acquire module interaction data during game runtime. It then parsed the dynamic topological adjacency matrix to extract node connection dependencies and analyzed the interface alignment tensor to extract dimension mapping indices and type conversion operators. Based on this, it constructed structured constraints containing topological and type conversion constraints. Simultaneously, Company G's technical experts standardized and annotated the interface definitions in the historical codebase, serving as a benchmark for model training and semantic understanding.

[0121] Company G calculates attention weights between sequence elements using a self-attention mechanism, aggregates contextual features based on these weights, and performs probabilistic decoding to generate a sequence of glue code nodes containing control flow pointers to interface functions. Next, lexical scanning and syntax reduction are performed on the generated code node sequence to construct an abstract syntax tree, control flow graph, and data flow graph, thereby generating a program dependency graph. A depth-first search algorithm is then used to traverse all reachable paths in the program dependency graph. Consecutive-use analysis is performed based on the read / write access sets of variables to calculate mutually exclusive access intervals for the same variable on different paths. If access intervals overlap, a data race is identified. Strongly connected components are constructed based on the topological sorting sequence of path nodes. If the number of nodes in a strongly connected component is greater than one, a circular dependency is identified, thus achieving precise localization of potential code conflicts.

[0122] In the core feedback and correction phase, this invention encodes conflict types into one-hot vectors and concatenates them with path identifier vectors to generate verification feedback vectors. Gradient signals are generated through linear mapping, and the Euclidean distance between the gradient signals and the current network output state is calculated. This distance is then transformed into a scalar loss function, and backpropagation is performed. The partial derivatives of the node spatial coordinate vectors and interaction force calculation parameters are derived backward along the computation graph. Based on the partial derivative values, gradient descent updates are performed on the node spatial coordinate vectors and the gravity constant weights. Finally, the connection probabilities between nodes are recalculated based on the updated parameters, a conflict elimination threshold is set to remove conflicting connections, and a corrected topological adjacency matrix is ​​output.

[0123] During implementation, Company G's technical team discovered that, compared to traditional manual coding and conventional static testing methods, the method of this invention significantly improves the quality of generated game glue code and the stability of the system. Traditional methods struggle to predict and resolve complex concurrent conflicts during the generation phase and have poor adaptability to dynamic topology changes between modules. In contrast, the method of this invention, through a manifold optimization feedback mechanism and multi-dimensional conflict detection, effectively achieves the automatic generation and dynamic correction of conflict-free interface logic.

[0124] To further verify the actual performance of the method of the present invention, Company G conducted a detailed comparative test between the method of the present invention and the traditional method. The specific performance data is shown in Table 1:

[0125] Table 1. Performance Comparison of Company G Game Logic Glue Code Generation and Verification Methods

[0126] As shown in Table 1, the performance of the game logic development system was comprehensively improved after applying the method of this invention. The accuracy of code generation increased from 84.2% with traditional methods to 97.5%, and the concurrent conflict detection rate increased from 65.8% to 99.2%, significantly improving the security of the code logic. The automatic logic conflict correction rate increased dramatically from 45.0% to 93.6%, effectively reducing the time for manual debugging. The time for generating a single module interface was shortened from 120 seconds to 35 seconds, significantly improving development efficiency. In addition, the number of runtime logic deadlocks decreased from 5.2 times / day to 0.1 times / day, and the module integration testing cycle was reduced from 15 days to 4 days, significantly reducing time costs. The manpower cost for code maintenance also decreased significantly, from 20 person-months to 8 person-months, and the system architecture robustness score increased from 7.5 to 9.6.

[0127] Through the method of this invention, Company G has successfully achieved efficient automatic generation of glue code between game modules and self-evolutionary correction of logical conflicts. This effectively avoids the risks of data competition and deadlock in multi-threaded environments, ensures the stable operation of game servers, significantly improves the automation and intelligence level of game development, significantly reduces the workload of programmers, enhances the scalability and stability of game engines, and provides strong technical support for the rapid iteration of complex game systems.

[0128] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A modular game development engine system based on deep learning, characterized in that, Includes the following modules: The heterogeneous graph construction module is used to obtain the target module set and natural language requirement text, embed word vectors into the interface definition of each target module, and construct a module heterogeneous graph by combining the dependency relationship between the target modules. The physical topology generation module is used to input the module heterogeneous graph into the improved EGNN network, aggregate node features and iteratively update node states, calculate the interaction forces between nodes, solve the connection probabilities, and output a dynamic topological adjacency matrix. The interface alignment tensor generation module is used to filter target connection edges according to the dynamic topological adjacency matrix, extract the interface feature vectors at both ends of the target connection edge for semantic similarity calculation, and match the type conversion path based on the preset logical conversion rule library to generate the interface alignment tensor. The glue code decoding module is used to determine the node connection relationship based on the dynamic topological adjacency matrix, construct structured constraints by combining the interface alignment tensor, map them to the input sequence, and decode to generate the glue code node sequence. The formal verification module is used to perform syntax parsing on the glue code node sequence to generate an abstract syntax tree, construct control flow graphs and data flow graphs, traverse execution paths and calculate path constraints, and generate verification feedback vectors if data races or circular dependencies are detected. The physical geometry correction module is used to improve the EGNN network by taking the verification feedback vector as a gradient signal input. It updates the spatial coordinate features and interaction force calculation parameters of the nodes through the backpropagation algorithm, adjusts the relative positional relationship between the nodes, and outputs the corrected topological adjacency matrix. The logic flow generation module is used to parse and correct the topology of the topology adjacency matrix, call the glue code node sequence to connect the interface ports of each target module, and generate the game logic flow file.

2. A modular game development engine method based on deep learning, characterized in that, Includes the following steps: S1. Obtain the target module set and natural language requirement text, embed word vectors into the interface definition of each target module, and construct a module heterogeneity graph by combining the dependency relationship between the target modules; S2. Input the module heterogeneous graph into the improved EGNN network, aggregate node features and iteratively update node states, calculate the interaction forces between nodes, solve the connection probabilities, and output the dynamic topological adjacency matrix. S3. Filter target connection edges according to the probability weights in the dynamic topological adjacency matrix, extract the interface feature vectors at both ends of the target connection edge for semantic similarity calculation, and match the type conversion path based on the preset logical conversion rule library to generate the interface alignment tensor. S4. Determine the node connection relationship based on the dynamic topological adjacency matrix, construct structured constraints by combining the interface alignment tensor, map them into the input sequence, and decode to generate the glue code node sequence. S5. Perform syntax parsing on the glue code node sequence to generate an abstract syntax tree, and construct a control flow graph and a data flow graph. Traverse the execution path and calculate the path constraints. If data races or circular dependencies are detected, generate a verification feedback vector. S6. Improve the EGNN network by using the verification feedback vector as the gradient signal input, update the spatial coordinate features and interaction force calculation parameters of the nodes through the backpropagation algorithm, adjust the relative positional relationship between the nodes, and output the corrected topological adjacency matrix. S7. Parse and correct the topological adjacency matrix, call the glue code node sequence to connect the interface ports of each target module, and generate the game logic flow file.

3. The modular game development engine method based on deep learning according to claim 2, characterized in that, S1 includes: S11. Perform interface signature parsing operation, traverse the target module set, extract interface name, parameter type and return value as keywords, and identify the reference dependency relationship between modules; S12. Map keywords to high-dimensional feature vectors, calculate the semantic distance between high-dimensional feature vectors, and determine the topological connection edges between modules based on the weighted result of semantic distance and reference dependency. S13. Initialize the heterogeneous graph data structure, instantiate modules as nodes, bind high-dimensional feature vectors to node attributes, map topological connection edges to graph edges, and construct a module heterogeneous graph that integrates semantic features and dependent topology.

4. The method for a modular game development engine based on deep learning according to claim 2, characterized in that, The improved EGNN network includes a coordinate feature initialization layer, an equivariant message passing computation layer, an interaction force computation layer, a connection probability mapping layer, and a dynamic topology output layer. The coordinate feature initialization layer is used to receive the node features of the module heterogeneous graph, perform a mapping operation to project the node features to a high-dimensional Euclidean space, and initialize the spatial coordinate vector of each node. The equivariant message passing computation layer is used to obtain the spatial coordinate vectors of the current node and its neighboring nodes and calculate the coordinate difference vector. The coordinate difference vector is concatenated with the node features of the neighboring nodes to generate a message tensor. The message tensor is then weighted and summed to update the node features of the current node. The spatial coordinate vector of the current node is translated based on the coordinate difference vector, and the node state is updated iteratively with equal variation. The interaction force calculation layer is used to calculate the Euclidean distance between the updated node spatial coordinate vectors, take the reciprocal of the Euclidean distance to obtain the distance decay factor, and perform a product operation between the distance decay factor and the preset gravitational constant to solve the interaction force value between the node pairs. The connection probability mapping layer is used to input the interaction force values ​​into the Sigmoid activation function to perform normalization processing and generate connection probability values ​​between nodes. The dynamic topology output layer is used to construct a dynamic topology adjacency matrix based on the connection probability values, assign the connection probability values ​​as the weights of the edges in the adjacency matrix, and output the dynamic topology adjacency matrix.

5. The method for a modular game development engine based on deep learning according to claim 2, characterized in that, S3 specifically includes: S31. Read the dynamic topological adjacency matrix, traverse the matrix elements and perform binarization filtering according to the probability weight threshold to determine the target connection edge set, and retrieve the interface feature vectors corresponding to the first and last nodes of the target connection edge from the node feature library. S32. Perform cosine similarity calculation on the interface feature vectors and output the semantic similarity values ​​between interfaces; read the data type identifier in the interface definition, perform key-value retrieval in the preset logical conversion rule base, match the type conversion paths at both ends of the connection edge, and parse the dimension transformation parameters and conversion operation instructions in the type conversion path; S33. The semantic similarity values, dimension transformation parameters, and conversion operation instructions are concatenated and fused along the feature dimension, and an interface-aligned tensor is generated through tensor mapping operation; the dimension channel of the interface-aligned tensor carries the dimension mapping index, and the feature channel carries the type conversion operator.

6. The modular game development engine method based on deep learning according to claim 2, characterized in that, S4 specifically includes: S41. Parse the dynamic topological adjacency matrix to extract node connection dependencies, and parse the interface alignment tensor to extract dimension mapping indexes and type conversion operators, thereby constructing structured constraint conditions containing topological constraints and type conversion constraints. S42. Map the structured constraints into an input sequence containing semantic features and positional information, calculate the attention weights between sequence elements through a self-attention mechanism, and aggregate contextual features based on the attention weights; S43. Perform probabilistic decoding based on aggregated context features, predict code nodes one by one according to the path with the highest probability, and generate a sequence of glue code nodes containing control flow pointers to interface functions.

7. The modular game development engine method based on deep learning according to claim 2, characterized in that, S5 specifically includes: S51. Perform lexical scanning and syntactic reduction on the glue code node sequence to construct an abstract syntax tree with parent-child nesting relationships; divide the basic blocks based on the abstract syntax tree and identify jump logic to construct a control flow graph, and at the same time parse the variable definition-reference chain to construct a data flow graph; S52. Merge the control flow graph, data flow graph, and execution graph to generate a program dependency graph. Use a depth-first search algorithm to traverse all reachable paths in the program dependency graph and extract the topological sorting sequence of path nodes and the read / write access set of variables. S53. Based on the variable-based read-write access set, perform concurrent application analysis, calculate the mutually exclusive access intervals of the same variable on different paths, and if the access intervals overlap, it is determined to be a data race; construct strongly connected components based on the topological sorting sequence of path nodes, and if the number of nodes in the strongly connected component is greater than one, it is determined that there is a circular dependency. S54. When data races or circular dependencies are detected, locate the coordinate index and path identifier of the conflict node in the program dependency graph, encode the conflict type into a one-hot vector and perform a concatenation operation with the path identifier vector to generate a verification feedback vector.

8. The method for a modular game development engine based on deep learning according to claim 2, characterized in that, S6 specifically includes: S61. Perform a linear mapping on the validation feedback vector to generate a gradient signal, calculate the Euclidean distance between the gradient signal and the current network output state, and convert the Euclidean distance value into a scalar loss function. S62. Perform back gradient propagation on the scalar loss function, derive the partial derivatives of the node spatial coordinate vectors and interaction force calculation parameters in reverse along the computation graph, and perform gradient descent update on the node spatial coordinate vectors and the gravity constant weights in the interaction force calculation layer based on the partial derivative values. S63. Based on the updated node spatial coordinate vector and gravitational constant weight, recalculate the spatial distance and interaction force values ​​between node pairs, and adjust the relative position distribution of nodes in space according to the magnitude of the interaction force values. S64. Based on the adjusted relative position distribution, remap the connection probabilities between nodes, set a conflict elimination threshold, remove connection edges with connection probabilities less than the conflict elimination threshold from the adjacency matrix, and output the corrected topological adjacency matrix.

9. The method for a modular game development engine based on deep learning according to claim 2, characterized in that, Specifically, S7 includes: S71. Parse the corrected topological adjacency matrix, extract the row and column indices of the non-zero elements in the matrix, and construct a topological edge set containing the source module identifier and the target module identifier; S72. Based on the source module identifier and the target module identifier, index and locate in the glue code node sequence, retrieve the corresponding glue code logic, and instantiate the glue code logic as a middleware interface connecting the input port and output port of the target module. S73. Based on the connection order of the topology edge set, the middleware interface and the function of the target module are chained together, and the linked assembly is compiled and built to generate a game logic flow file with independent execution capability.