CN-122018883-A - Visual script game project automatic generation method based on artificial intelligence
Abstract
The application discloses an artificial intelligence based visual script game engineering automatic generation method, which relates to the field of animation production, and comprises the steps that a demand analysis agent acquires natural language demands and generates and outputs structural function specifications based on the natural language demands; the node selecting agent calls a retrieval MCP tool to retrieve the node MCP tool conforming to the structural function specification to obtain and output a target node MCP tool set, the logic arranging agent builds and outputs an original visual script node diagram structure according to the structural function specification, the target node MCP tool set and the operation MCP tool, the engineering specification agent carries out normalized adjustment on the original visual script node diagram structure to generate and output normalized visual script engineering, so that a large language model (agent) can understand and call nodes in a deterministic and stable mode, and the problem of ambiguity and instability of the whole understanding mode of a traditional interface document is solved.
Inventors
- ZHENG LIGUO
- ZHANG QIAN
- ZHENG XINRAN
Assignees
- 吉林动画学院
- 吉林吉动盘古网络科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260408
Claims (10)
- 1. The visual script game engineering automatic generation method based on artificial intelligence is characterized by being realized by a plurality of intelligent agents, wherein the plurality of intelligent agents are respectively a demand analysis intelligent agent, a node selection intelligent agent, a logic arrangement intelligent agent, an engineering specification intelligent agent and a quality assurance intelligent agent; the visual script game project automatic generation method based on artificial intelligence comprises the following steps: the demand analysis agent obtains natural language demands and generates and outputs structural function specifications based on the natural language demands; the node selection agent invokes a search MCP tool to search for node MCP tools meeting the structural function specification to obtain and output a target node MCP tool set; The logic arrangement agent builds and outputs an original visual script node diagram structure according to the structural function specification, the target node MCP tool set and an operation MCP tool; the engineering standardization intelligent agent performs standardization adjustment on the original visual script node diagram structure to generate and output standardized visual script engineering; The quality assurance agent performs quality verification and analysis on the visual script engineering to generate a verification report, and generates correction instructions for different agents according to the verification report, wherein the correction instructions are used for guiding the corresponding agents to correct the output of the agents; The node MCP tool, the operation MCP tool and the retrieval MCP tool are packaged by acquiring a node library of a visual script engine, packaging each node in the node library into an independent node MCP tool, packaging each node diagram operation into an independent operation MCP tool, and packaging each node retrieval function into an independent retrieval MCP tool.
- 2. The automated artificial intelligence based visual script game project generation method of claim 1, wherein the data structure of each of the node MCP tools includes a node identifier, a list of attributes, a list of control flow outputs, a list of data flow outputs, and a type constraint.
- 3. The automatic generation method of visual script game engineering based on artificial intelligence according to claim 1, wherein the search MCP tools include a first sub-search MCP tool for searching nodes by functional domain, a second sub-search MCP tool for searching nodes by semantic description, and a third sub-search MCP tool for acquiring node MCP tools corresponding to the nodes; invoking a search MCP tool to search node MCP tools that meet the structured functional specification to obtain and output a target node MCP tool set, including in particular: Acquiring a node functional domain list, wherein the node functional domain list comprises nodes of different functional domains; Determining a plurality of target functional domains according to the structural functional specification, and calling the first sub-retrieval MCP tool to screen out nodes of the plurality of target functional domains from the node functional domain list; Invoking the second sub-retrieval MCP tool to screen a plurality of target nodes conforming to the semantic description of the structural function specification from the nodes of a plurality of target function domains; invoking the third sub-retrieval MCP tool to acquire a plurality of node MCP tools corresponding to the target nodes, wherein the node MCP tools corresponding to the target nodes form the target node MCP tool set; Outputting the target node MCP tool set.
- 4. The automatic generation method of visual script game engineering based on artificial intelligence according to claim 1, wherein the second MCP tool includes a create node MCP tool and a create connection MCP tool; Constructing and outputting an original visual script node diagram structure according to the structural function specification, the target node MCP tool set and an operation MCP tool, and specifically comprising the following steps: Dividing the structural function specification into a plurality of semantic subgraphs, wherein each semantic subgraph corresponds to a function; For each semantic subgraph, calling nodes required by the creating node MCP tool for creating the semantic subgraph based on the target node MCP tool set, calling the creating connection MCP tool for creating connection between nodes based on control flow and data flow relation between the nodes, and marking exposed ports of the semantic subgraph, wherein the exposed ports comprise input ports and output ports; calling the creating connection MCP tool to create connection between exposed ports of different semantic sub-graph pairs so as to form the original visual script node graph structure; And outputting the original visual script node diagram structure.
- 5. The automatic generation method of visual script game engineering based on artificial intelligence according to claim 4, wherein the standardized adjustment comprises layout standardization, naming standardization and annotation generation; the layout standardization comprises the steps of carrying out position adjustment on nodes in the original visual script node diagram structure according to preset layout rules; the naming standardization comprises the steps of uniformly naming nodes and semantic subgraphs in the node diagram structure of the original visual script according to functional semantics and engineering naming standards; the annotation generation includes generating an annotation for each semantic subgraph in the original visual script node graph structure.
- 6. The automated artificial intelligence based visual script game project generation method of claim 5, wherein the quality verification and analysis comprises interface compatibility verification, logic integrity verification, and static runtime problem analysis.
- 7. The automatic generation method of visual script game engineering based on artificial intelligence according to claim 5, wherein generating correction instructions for different agents according to the verification report specifically comprises: determining error types according to the verification report, wherein the error types comprise misunderstanding requirements, node selection errors, connection logic errors and layout/naming errors; If the error of misunderstanding the demand exists, generating a correction instruction for the demand analysis agent; if the node type selection error exists, generating a correction instruction facing the logic arrangement agent; if the connection logic errors exist, generating a correction instruction for the logic arrangement agent; And if the layout/naming errors exist, generating a correction instruction oriented to the engineering specification agent.
- 8. An artificial intelligence based visual script game engineering automatic generation method is characterized by comprising the following steps: Acquiring a node library of a visual script engine; packaging each node in the node library into an independent node MCP tool, packaging each node diagram operation into an independent operation MCP tool, and packaging each node retrieval function into an independent retrieval MCP tool; acquiring natural language requirements and generating and outputting structural function specifications based on the natural language requirements; Invoking a search MCP tool to search for node MCP tools that meet the structured functional specification to obtain and output a target node MCP tool set; Constructing and outputting an original visual script node diagram structure according to the structural function specification, the target node MCP tool set and an operation MCP tool; And carrying out normalized adjustment on the original visual script node diagram structure to generate and output normalized visual script engineering.
- 9. The visual script game engineering automatic generation system is characterized by comprising an MCP tool packaging module, an MCP service module and a plurality of intelligent agents, wherein the intelligent agents are respectively a demand analysis intelligent agent, a node selection intelligent agent, a logic arrangement intelligent agent, an engineering specification intelligent agent and a quality assurance intelligent agent; The demand analysis agent is used for acquiring natural language demands and generating and outputting structural function specifications based on the natural language demands; the node selection agent is used for calling a retrieval MCP tool to retrieve the node MCP tool meeting the structural function specification so as to obtain and output a target node MCP tool set; The logic arrangement agent is used for constructing and outputting an original visual script node diagram structure according to the structural function specification, the target node MCP tool set and an operation MCP tool; The engineering specification agent is used for carrying out normalized adjustment on the original visual script node diagram structure so as to generate and output normalized visual script engineering; The quality assurance agent is used for carrying out quality verification and analysis on the visual script engineering to generate a verification report, and generating correction instructions for different agents according to the verification report, wherein the correction instructions are used for guiding the corresponding agents to correct the output of the agents; The MCP tool packaging module is used for acquiring a node library of the visual script engine, packaging each node in the node library into an independent node MCP tool, packaging each node diagram operation into an independent operation MCP tool, and packaging each node retrieval function into an independent retrieval MCP tool; The MCP service module is used for hosting the MCP tool set generated by the MCP tool packaging module and providing MPC tool calling service for each agent module.
- 10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the artificial intelligence based visual script game engineering automatic generation method of any of claims 1-8.
Description
Visual script game project automatic generation method based on artificial intelligence Technical Field The application relates to the field of animation production, in particular to an artificial intelligence-based visual script game engineering automatic generation method. Background With the development of game engines and visual script technology (such as node blueprints, flow chart driving components, etc.), more and more game logic and level behavior are realized by means of a visual script node chart. Large language models (LLM, large Language Model) exhibit great capabilities in terms of natural language understanding and code generation, and there are also technical attempts in the industry to generate visual script node diagrams through large language models, but there are significant limitations. In particular, visualization script engines typically contain hundreds to thousands of node types, each with complex input-output ports and attribute definitions. The existing scheme needs to input the information of the whole node library into the large-scale language model at one time, is easy to exceed the limit of a context window of the large-scale language model, or can only be used for fuzzy understanding, cannot accurately use the nodes, and needs additional external rules to explain the relation among the nodes, so that the complexity of understanding and the error probability are further increased, and further, an accurate visual script node diagram cannot be generated. Disclosure of Invention The application aims to provide an artificial intelligence based visual script game engineering automatic generation method, which packages each visual script node into an independent self-explanatory node MCP tool, so that a large language model (intelligent body) can understand and call the node in a deterministic and stable mode, and the problems of ambiguity and instability of the whole understanding mode of a traditional interface document are eliminated. In order to achieve the above object, the present application provides the following solutions: in a first aspect, the application provides an automatic generation method of visual script game engineering based on artificial intelligence, which is realized by a plurality of intelligent agents, wherein the plurality of intelligent agents are respectively a demand analysis intelligent agent, a node selection intelligent agent, a logic arrangement intelligent agent, an engineering specification intelligent agent and a quality assurance intelligent agent; the visual script game project automatic generation method based on artificial intelligence comprises the following steps: the demand analysis agent obtains natural language demands and generates and outputs structural function specifications based on the natural language demands; the node selection agent invokes a search MCP tool to search for node MCP tools meeting the structural function specification to obtain and output a target node MCP tool set; The logic arrangement agent builds and outputs an original visual script node diagram structure according to the structural function specification, the target node MCP tool set and an operation MCP tool; the engineering standardization intelligent agent performs standardization adjustment on the original visual script node diagram structure to generate and output standardized visual script engineering; The quality assurance agent performs quality verification and analysis on the visual script engineering to generate a verification report, and generates correction instructions for different agents according to the verification report, wherein the correction instructions are used for guiding the corresponding agents to correct the output of the agents; The node MCP tool, the operation MCP tool and the retrieval MCP tool are packaged by acquiring a node library of a visual script engine, packaging each node in the node library into an independent node MCP tool, packaging each node diagram operation into an independent operation MCP tool, and packaging each node retrieval function into an independent retrieval MCP tool. In a second aspect, the present application provides an artificial intelligence based visual script game engineering automatic generation method, including: Acquiring a node library of a visual script engine; packaging each node in the node library into an independent node MCP tool, packaging each node diagram operation into an independent operation MCP tool, and packaging each node retrieval function into an independent retrieval MCP tool; acquiring natural language requirements and generating and outputting structural function specifications based on the natural language requirements; Invoking a search MCP tool to search for node MCP tools that meet the structured functional specification to obtain and output a target node MCP tool set; Constructing and outputting an original visual script node diagram structure according to the structural