Method and apparatus for generating virtual experiment

CN122902999APending Publication Date: 2026-10-13EEO EDUCATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611095821.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

更重要的是,当学生或老师不清楚实验原理或实验器材时,整个实验无法成功的生成

Benefits of technology

[0019]根据本申请的技术方案,获取针对待生成的虚拟实验的语言描述,基于所获取的语言描述确定待生成的虚拟实验的实验原理、所需实验器材,基于所获取的语言描述、所确定的实验原理、所需实验器材确定待生成的虚拟实验的代码,基于所确定的代码生成虚拟实验,如此,实现了自动生成虚拟实验。此外,通过自动生成虚拟实验,降低了生成门槛,提高了生成虚拟实验的效率和便捷性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902999A_ABST
    Figure CN122902999A_ABST
Patent Text Reader

Abstract

The application discloses a virtual experiment generation method and device. The generation method comprises the following steps: obtaining a language description for a virtual experiment to be generated; determining an experiment principle and required experiment equipment of the virtual experiment to be generated based on the obtained language description; determining a code of the virtual experiment to be generated based on the obtained language description, the determined experiment principle and the required experiment equipment; and generating the virtual experiment based on the determined code. In this way, the virtual experiment is automatically generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of experimental technology, and more specifically, to a method and apparatus for generating virtual experiments. Background Technology

[0002] In existing virtual experiment platforms, every step requires manual operation by the user. The selection and connection of equipment, parameter settings, and other aspects of the entire experiment all require manual dragging or setting. More importantly, when students or teachers are unfamiliar with the experimental principles or equipment, the entire experiment cannot be successfully generated.

[0003] How to automatically generate virtual experiments has become a technical problem that needs to be solved in this field. Summary of the Invention

[0004] In view of this, this application proposes a method and apparatus for generating virtual experiments to achieve automatic generation of virtual experiments.

[0005] In a first aspect, this application provides a method for generating a virtual experiment, the method comprising: obtaining a language description of the virtual experiment to be generated; determining the experimental principle and required experimental equipment of the virtual experiment to be generated based on the obtained language description; determining the code of the virtual experiment to be generated based on the obtained language description, the determined experimental principle and the required experimental equipment; and generating the virtual experiment based on the determined code.

[0006] Optionally, based on the acquired language description, the experimental principle and required experimental equipment of the virtual experiment to be generated are determined, including: based on the acquired language description, determining the subject knowledge that matches the virtual experiment to be generated; loading each available experimental device and its usage document; constructing a first prompt word based on the acquired language description, the determined subject knowledge, the loaded experimental device and its usage document; and determining the experimental principle and required experimental equipment of the virtual experiment to be generated based on the constructed first prompt word.

[0007] Optionally, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the code for the virtual experiment to be generated is determined, including: generating initial code for the virtual experiment to be generated based on the acquired language description, the determined experimental principle, and the required experimental equipment; reviewing the generated initial code; if the review is passed, the generated initial code is determined as the code for the virtual experiment to be generated; if the review is not passed, the generated initial code is updated, and the review and update are repeated until the review is passed, and the code that passes the review is determined as the code for the virtual experiment to be generated.

[0008] Optionally, the generated initial code is reviewed, including: determining the usage specifications of the required experimental equipment; constructing review instructions based on the acquired language description, the determined experimental principle, the required experimental equipment, and the determined usage specifications; and reviewing the generated initial code based on the constructed review instructions.

[0009] Optionally, if the review fails, the generated initial code is updated, including: determining the review feedback, wherein the review feedback includes errors in the virtual experiment generated based on the generated initial code and the content that needs to be optimized; updating the determined experimental principle and / or required experimental equipment based on the determined review feedback; and regenerating the code for the virtual experiment to be generated based on the obtained language description, the updated experimental principle, and the required experimental equipment, so as to update the generated initial code.

[0010] Optionally, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the initial code for the virtual experiment to be generated is generated, including: based on the required experimental equipment, retrieving the equipment usage documents for the required experimental equipment; based on the determined experimental principle, retrieving the experimental case most similar to the virtual experiment to be generated; based on the acquired language description, the retrieved equipment usage documents, and the retrieved experimental case, constructing a second prompt word; and based on the constructed second prompt word, generating the initial code for the virtual experiment to be generated.

[0011] Secondly, this application also provides a virtual experiment generation device, which includes: an acquisition module for acquiring a language description of the virtual experiment to be generated; a first determination module for determining the experimental principle and required experimental equipment of the virtual experiment to be generated based on the acquired language description; a second determination module for determining the code of the virtual experiment to be generated based on the acquired language description, the determined experimental principle, and the required experimental equipment; and a generation module for generating the virtual experiment based on the determined code.

[0012] Optionally, the first determining module determines the experimental principle and required experimental equipment of the virtual experiment to be generated based on the acquired language description, including: determining the subject knowledge matching the virtual experiment to be generated based on the acquired language description; loading each available experimental equipment and its usage document; constructing a first prompt word based on the acquired language description, the determined subject knowledge, the loaded experimental equipment and its usage document; and determining the experimental principle and required experimental equipment of the virtual experiment to be generated based on the constructed first prompt word.

[0013] Optionally, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the code for the virtual experiment to be generated is determined, including: generating initial code for the virtual experiment to be generated based on the acquired language description, the determined experimental principle, and the required experimental equipment; reviewing the generated initial code; if the review is passed, the generated initial code is determined as the code for the virtual experiment to be generated; if the review is not passed, the generated initial code is updated, and the review and update are repeated until the review is passed, and the code that passes the review is determined as the code for the virtual experiment to be generated.

[0014] Optionally, the generated initial code is reviewed, including: determining the usage specifications of the required experimental equipment; constructing review instructions based on the acquired language description, the determined experimental principle, the required experimental equipment, and the determined usage specifications; and reviewing the generated initial code based on the constructed review instructions.

[0015] Optionally, if the review fails, the generated initial code is updated, including: determining the review feedback, wherein the review feedback includes errors in the virtual experiment generated based on the generated initial code and the content that needs to be optimized; updating the determined experimental principle and / or required experimental equipment based on the determined review feedback; and regenerating the code for the virtual experiment to be generated based on the obtained language description, the updated experimental principle, and the required experimental equipment, so as to update the generated initial code.

[0016] Optionally, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the initial code for the virtual experiment to be generated is generated, including: based on the required experimental equipment, retrieving the equipment usage documents for the required experimental equipment; based on the determined experimental principle, retrieving the experimental case most similar to the virtual experiment to be generated; based on the acquired language description, the retrieved equipment usage documents, and the retrieved experimental case, constructing a second prompt word; and based on the constructed second prompt word, generating the initial code for the virtual experiment to be generated.

[0017] Thirdly, this application also provides a machine-readable storage medium storing instructions that cause a machine to perform the above-described generation method.

[0018] Fourthly, this application also provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the above-described generation method.

[0019] According to the technical solution of this application, a language description of the virtual experiment to be generated is obtained; based on the obtained language description, the experimental principle and required experimental equipment of the virtual experiment to be generated are determined; based on the obtained language description, the determined experimental principle, and the required experimental equipment, the code of the virtual experiment to be generated is determined; and based on the determined code, the virtual experiment is generated. Thus, automatic generation of virtual experiments is achieved. Furthermore, by automatically generating virtual experiments, the generation threshold is lowered, and the efficiency and convenience of generating virtual experiments are improved.

[0020] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0021] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application, and the illustrative embodiments and descriptions thereof are used to explain this application. In the drawings: Figure 1 This is a flowchart of a method for generating a virtual experiment according to a preferred embodiment of this application; Figure 2 This is an exemplary schematic diagram of a method for generating virtual experiments according to a preferred embodiment of this application; Figure 3 This is a schematic diagram of the interface of the Nobook experimental platform; Figure 4 This is a structural block diagram of a virtual experiment generation device according to a preferred embodiment of this application. Detailed Implementation

[0022] The technical solution of this application will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] In a first aspect, embodiments of this application provide a method for generating virtual experiments.

[0024] Figure 1 This is a flowchart of a method for generating a virtual experiment according to a preferred embodiment of this application. Figure 1 As shown, the generation method includes the following.

[0025] In step S10, a language description for the virtual experiment to be generated is obtained. The form and content of the language description can be determined according to specific circumstances and are not restricted, as long as it describes the virtual experiment to be generated. The language description can be question-based, with the user asking experimental questions in natural language, such as, "How do I perform the experiment of measuring resistance using the voltmeter-ammeter method?". Alternatively, the language description can be declarative, where the user freely describes the experimental requirements using natural language, such as, "measuring resistance using the voltmeter-ammeter method."

[0026] In step S11, based on the acquired language description, the experimental principle and required experimental equipment for the virtual experiment to be generated are determined. Specifically, an educational expert agent can be constructed to determine the experimental principle and required experimental equipment.

[0027] In step S12, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the code for the virtual experiment to be generated is determined. Specifically, a coding expert agent can be constructed to determine the code.

[0028] In step S13, a virtual experiment is generated based on the determined code. Specifically, the determined code can be compiled using the Nobook experimental platform to render the virtual experiment and generate it.

[0029] The Nobook experimental platform compiles the defined code and fully displays the generated experiment, showing the readings or parameters of each instrument. For example, the ammeter reading is 0.12 amperes. Simultaneously, the Nobook experimental platform can also demonstrate and explain the experimental principles to the user, such as... Figure 2 As shown.

[0030] Nobook Experiment Platform is a platform for simulating experiments. Students and teachers can use it to simulate real experiments through operations such as clicking and dragging. For example, they can add light bulbs, turn switches on or off, and drag sliding rheostats. Figure 3 As shown.

[0031] Optionally, in this embodiment of the application, the experimental principle and required experimental equipment of the virtual experiment to be generated are determined based on the obtained language description, which may include the following:

[0032] Based on the acquired language description, the subject knowledge matching the virtual experiment to be generated is determined. Optionally, based on the acquired language description, RAG retrieval technology can be used to retrieve the subject knowledge matching the virtual experiment to be generated from the Nobook experiment platform's preset knowledge base. The preset knowledge base stores a large amount of subject knowledge, experimental cases, and other information. Specifically, key information can be extracted from the language description, and the subject knowledge matching the virtual experiment to be generated can be retrieved based on the key information. For example, an educational expert agent can dynamically retrieve matching subject knowledge from the preset knowledge base based on the language description. The language description can include at least one of the following: experimental purpose, experimental requirements, experimental questions, experimental phenomena, experimental principles, etc. Furthermore, the key information can include at least one of the following: experimental purpose, experimental requirements, keywords, experimental questions, experimental phenomena, experimental principles, etc.

[0033] Load each available experimental device and its user manual. Specifically, load the names of all available experimental devices on the Nobook experimental platform and the user manual for each available device. This loading is performed by the educational expert agent.

[0034] Based on the acquired language description, the identified subject knowledge, the loaded experimental equipment and its user manual, a first prompt keyword is constructed. Specifically, the acquired language description, the identified subject knowledge, and the loaded experimental equipment and its user manual are filled into the prompt keyword template to construct the first prompt keyword. For example, for an optimized prompt keyword template, this template contains multiple placeholders for filling in different information, such as user questions, retrieved knowledge, and experimental equipment information. The educational expert agent fills in the language description, the identified subject knowledge, and the loaded experimental equipment and its user manual according to the requirements of the prompt keyword template to construct a complete first prompt keyword.

[0035] Based on the constructed initial prompts, the experimental principle and required equipment for the virtual experiment to be generated are determined. Specifically, after constructing the complete initial prompts, the educational expert agent calls the large language model, inputting the initial prompts into it. The large language model then generates a list of experimental principles and required equipment based on the information in the initial prompts.

[0036] Optionally, in this embodiment of the application, the code for the virtual experiment to be generated is determined based on the obtained language description, the determined experimental principle, and the required experimental equipment, and may include the following:

[0037] Based on the acquired language description, the determined experimental principle, and the required experimental equipment, initial code for the virtual experiment is generated. This initial code includes creating equipment, connecting equipment, configuring equipment parameters, and optimizing the experimental layout. For example, it can be generated by referencing a pre-set knowledge base and the pre-set experimental case library of the Nobook experimental platform. Specifically, the coding expert agent analyzes the acquired language description, understands the experimental principle and required experimental equipment, and generates initial code for generating the virtual experiment by referring to the pre-set knowledge base and pre-set experimental case library. It should be noted that the content included in both the initial code and the updated code is the same: creating equipment, connecting equipment, configuring equipment parameters, and optimizing the experimental layout. Furthermore, the experimental layout can include the following: the placement of experimental equipment. Optimizing the experimental layout can include ensuring proper spacing and alignment between equipment, uniform and coordinated distribution of all equipment, and a reasonable and non-intersecting wire layout.

[0038] The generated initial code is reviewed. Optionally, the review can be based on a pre-defined knowledge base and the equipment usage documents for the required experimental equipment, combined with the acquired language descriptions. Specifically, a review expert agent is constructed, and the review is performed based on this expert agent.

[0039] If the review is approved, the generated initial code will be used as the code for the virtual experiment to be generated.

[0040] If the review fails, the generated initial code is updated, and the review and update process is repeated until the review passes. The code that passes the review is then designated as the code for the virtual experiment to be generated. Alternatively, if the initial code fails the review, it is updated and then reviewed again. If the review passes, the code is designated as the code for the virtual experiment to be generated; if it fails, the code is updated again. This cycle is repeated until the review passes. The review can be conducted by an expert intelligent agent, and the code can be updated by a coding expert intelligent agent.

[0041] Optionally, in this embodiment of the application, reviewing the generated initial code may include the following:

[0042] Determine the usage specifications for the required experimental equipment. These specifications include the parameter range for each piece of equipment (e.g., 3V / 6V for a power supply), connection rules (e.g., series connection for an ammeter), and functional limitations (e.g., restricted connection method for a sliding rheostat). Based on the name of each piece of equipment, retrieve the corresponding usage specifications from the Nobook experimental platform's pre-set document library to determine the usage specifications for that specific piece of equipment. The pre-set document library contains usage specifications for various types of experimental equipment.

[0043] Based on the acquired language description, the determined experimental principle, the required experimental equipment, and the established usage specifications, review instructions are constructed. Specifically, based on a pre-defined structured prompt template, the acquired language description, the determined experimental principle, the required experimental equipment, and the established usage specifications are filled into the pre-defined structured prompt template to construct review instructions. The experimental principle and required experimental equipment clearly define the core objectives and requirements of the virtual experiment to be constructed.

[0044] The generated initial code is reviewed based on the constructed review instructions. For example, a review can be conducted based on a large language model.

[0045] Specifically, the pre-built review instructions are used as input to call a specified large language model (such as CodeLlama or GPT-4). The model reviews the code module by module based on code understanding ability, subject knowledge and review rules.

[0046] Optionally, in this embodiment of the application, updating the generated initial code if the review fails may include the following:

[0047] The review feedback is determined, including errors in the virtual experiment generated based on the initial code and areas requiring optimization. Specifically, the review expert agent receives the review results from the large language model and generates a structured review feedback report according to a standard format, thus determining the review feedback. For example, errors in the virtual experiment may include at least one of the following: incorrect equipment selection, incorrect equipment parameter configuration, incorrect equipment wiring, improper equipment use, or the experiment failing to reflect the experimental principle. Areas requiring optimization may include at least one of the following: correcting errors in the experiment, removing redundant experimental equipment, or optimizing the experimental layout.

[0048] The established experimental principles and / or required experimental equipment are updated based on the identified review feedback. Specifically, the coding expert agent performs the updates.

[0049] Based on the acquired language description, updated experimental principles, and required experimental equipment, the code for the virtual experiment to be generated is regenerated to update the initial generated code. Specifically, the coding expert agent regenerates the code.

[0050] The review expert agent receives the review results from the large language model, organizes them according to a standard format, and outputs them. If the review passes, the final version of the virtual experiment code is output. If the review fails, a structured review feedback report is generated. The output of the review expert agent directly drives the iterative optimization of the coding expert agent, forming a quality closed loop. When the review fails, the review expert agent synchronizes the structured review feedback report to the coding expert agent. The coding expert agent automatically parses the feedback content. Based on the review feedback, the coding expert agent makes targeted modifications to the code (e.g., modifying equipment selection and / or configuration parameters and / or connection methods), optimizes user experience details, and then regenerates the code and submits it for review. The review expert agent repeats the above review process until the code passes the review.

[0051] Optionally, in this embodiment of the application, the initial code for generating the virtual experiment to be generated based on the obtained language description, the determined experimental principle, and the required experimental equipment may include the following:

[0052] Based on the required experimental equipment, the system retrieves the corresponding equipment usage documents. Specifically, for each required experimental equipment, the system retrieves its usage document from a pre-defined equipment usage document library. These documents include the equipment's parameter range in the virtual environment (e.g., for a power supply, specifying selectable 3V / 6V voltage), interface type (e.g., for a resistor, specifying terminal markings), and functional attributes (e.g., for an ammeter, specifying selectable ranges). Using these documents ensures that the generated code simulates the experimental equipment in accordance with actual logic. The pre-defined equipment usage document library includes the names of the experimental equipment and their corresponding usage documents; for each required experimental equipment, the system retrieves its corresponding usage document from this library based on its name.

[0053] Based on the established experimental principles, the most similar experimental case to the virtual experiment to be generated is retrieved. Specifically, based on the established experimental principles, the most similar experimental case is retrieved from a pre-defined experimental case library. For example, the retrieval can be based on text similarity matching.

[0054] Based on the obtained language descriptions, retrieved equipment usage documents, and retrieved experimental cases, a second prompt word is constructed. Based on a preset prompt word template, the obtained language descriptions, retrieved equipment usage documents, and retrieved experimental cases are filled into the preset prompt word template to construct the second prompt word.

[0055] Based on the constructed second prompt word, initial code for the virtual experiment to be generated is produced. For example, initial code can be generated based on a large language model. Specifically, the coding expert agent invokes the large language model, which generates code for generating the virtual experiment.

[0056] The technical solution provided in this application, based on a large-scale multi-agent system, intelligently and automatically generates virtual experiments according to the user's natural language description of the experiment, along with an explanation of the experimental principles. Specifically, it includes the following aspects: 1) AI-powered Nobook virtual experiment platform, intelligently and automatically generating virtual experiments. 2) Multi-role, multi-agent planning and collaboration technology in virtual experiment scenarios, achieving automated generation of virtual experiments from experimental requirements through the division of labor and feedback iteration of educational experts, coding experts, and review expert agents. 3) Multi-role, multi-agent action-reflection technology in virtual experiment scenarios, with an iterative "generation-review-feedback-optimization" process for coding expert agents and review expert agents, ensuring the accuracy and standardization of virtual experiments.

[0057] This application only requires the user to input a description in natural language to intelligently generate accurate virtual experiments and corresponding explanations of the experimental principles, eliminating the need for manual experiment generation. This application can also intelligently generate virtual experiments based on user questions in natural language, along with explanations of the experimental principles and answers to user inquiries.

[0058] Secondly, this application also provides a device for generating virtual experiments.

[0059] Figure 4 This is a structural block diagram of a virtual experiment generation apparatus according to a preferred embodiment of this application. Figure 4 As shown, the generating device includes an acquisition module 10, a first determination module 20, a second determination module 30, and a generating module 40.

[0060] The acquisition module 10 is used to acquire a language description of the virtual experiment to be generated. The first determination module 20 is used to determine the experimental principle and required experimental equipment of the virtual experiment to be generated based on the acquired language description. The second determination module 30 is used to determine the code of the virtual experiment to be generated based on the acquired language description, the determined experimental principle, and the required experimental equipment. The generation module 40 is used to generate the virtual experiment based on the determined code.

[0061] Optionally, the first determining module determines the experimental principle and required experimental equipment of the virtual experiment to be generated based on the acquired language description, including: determining the subject knowledge matching the virtual experiment to be generated based on the acquired language description; loading each available experimental equipment and its usage document; constructing a first prompt word based on the acquired language description, the determined subject knowledge, the loaded experimental equipment and its usage document; and determining the experimental principle and required experimental equipment of the virtual experiment to be generated based on the constructed first prompt word.

[0062] Optionally, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the code for the virtual experiment to be generated is determined, including: generating initial code for the virtual experiment to be generated based on the acquired language description, the determined experimental principle, and the required experimental equipment; reviewing the generated initial code; if the review is passed, the generated initial code is determined as the code for the virtual experiment to be generated; if the review is not passed, the generated initial code is updated, and the review and update are repeated until the review is passed, and the code that passes the review is determined as the code for the virtual experiment to be generated.

[0063] Optionally, the generated initial code is reviewed, including: determining the usage specifications of the required experimental equipment; constructing review instructions based on the acquired language description, the determined experimental principle, the required experimental equipment, and the determined usage specifications; and reviewing the generated initial code based on the constructed review instructions.

[0064] Optionally, if the review fails, the generated initial code is updated, including: determining the review feedback, wherein the review feedback includes errors in the virtual experiment generated based on the generated initial code and the content that needs to be optimized; updating the determined experimental principle and / or required experimental equipment based on the determined review feedback; and regenerating the code for the virtual experiment to be generated based on the obtained language description, the updated experimental principle and required experimental equipment, so as to update the generated initial code.

[0065] Optionally, based on the acquired language description, the determined experimental principle, and the required experimental equipment, the initial code for the virtual experiment to be generated is generated, including: based on the required experimental equipment, retrieving the equipment usage documents for the required experimental equipment; based on the determined experimental principle, retrieving the experimental case most similar to the virtual experiment to be generated; based on the acquired language description, the retrieved equipment usage documents, and the retrieved experimental case, constructing a second prompt word; and based on the constructed second prompt word, generating the initial code for the virtual experiment to be generated.

[0066] The specific working principle and benefits of the generating apparatus provided in this application are similar to those of the generating method provided in this application, and will not be repeated here.

[0067] Thirdly, this application also provides a machine-readable storage medium storing instructions that cause a machine to execute the above-described generation method.

[0068] Fourthly, this application also provides an electronic device comprising: a processor; a memory for storing processor-executable instructions; and a processor for reading the executable instructions from the memory and executing the executable instructions to implement the above-described generation method.

[0069] The preferred embodiments of this application have been described in detail above. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solution of this application, and these simple modifications all fall within the protection scope of this application.

[0070] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not describe the various possible combinations separately.

[0071] Furthermore, various different implementations of this application can be combined in any way, as long as they do not violate the spirit of this application, they should also be regarded as the content disclosed in this application.

Claims

1. A method for generating a virtual experiment, characterized in that, The generation method includes: Obtain the language description for the virtual experiment to be generated; Based on the obtained language description, the experimental principle and required experimental equipment for the virtual experiment to be generated are determined. Based on the acquired language description, the determined experimental principles, and the required experimental equipment, the code for the virtual experiment to be generated is determined; and Based on the determined code, a virtual experiment is generated.

2. The generation method according to claim 1, characterized in that, Based on the obtained language description, the experimental principle and required experimental equipment for the virtual experiment to be generated are determined, including: Based on the acquired language description, determine the subject knowledge that matches the virtual experiment to be generated; Load each available experimental instrument and its usage documentation; Based on the acquired language descriptions, the identified subject knowledge, the loaded experimental equipment and its usage documentation, the first prompt words are constructed. Based on the constructed first prompt word, the experimental principle and required experimental equipment for the virtual experiment to be generated are determined.

3. The generation method according to claim 1, characterized in that, Based on the acquired language description, the determined experimental principles, and the required experimental equipment, the code for the virtual experiment to be generated is determined, including: Based on the obtained language description, the determined experimental principle, and the required experimental equipment, the initial code for the virtual experiment to be generated is produced. Review the generated initial code; If the review is approved, the generated initial code will be used as the code for the virtual experiment to be generated. If the review fails, the generated initial code is updated, and the review and update process is repeated until the review is passed. The code that passes the review is then determined as the code for the virtual experiment to be generated.

4. The generation method according to claim 3, characterized in that, The generated initial code was reviewed, including: Determine the usage specifications for the required experimental equipment; Based on the obtained language description, the determined experimental principle, the required experimental equipment, and the determined usage specifications, review instructions are constructed. The generated initial code is reviewed based on the constructed review instructions.

5. The generation method according to claim 3, characterized in that, If the review fails, the generated initial code will be updated, including: Determine the review feedback, wherein the review feedback includes errors present in the virtual experiment generated based on the generated initial code and the aspects that need to be optimized; The determined experimental principles and / or required experimental equipment are updated based on the identified review feedback. Based on the acquired language description, the updated experimental principles, and the required experimental equipment, the code for the virtual experiment to be generated is regenerated to update the initial code.

6. The generation method according to claim 3, characterized in that, Based on the acquired language description, the determined experimental principles, and the required experimental equipment, the initial code for the virtual experiment to be generated is produced, including: Based on the required experimental equipment, retrieve the equipment usage documents for the required experimental equipment; Based on the established experimental principles, retrieve the experimental cases that are most similar to the virtual experiment to be generated; Based on the obtained language descriptions, retrieved equipment usage documents, and retrieved experimental cases, a second prompt word is constructed; Based on the constructed second prompt word, the initial code for the virtual experiment to be generated is produced.

7. A device for generating virtual experiments, characterized in that, The generating apparatus includes: The acquisition module is used to acquire the language description of the virtual experiment to be generated; The first determining module is used to determine the experimental principle and required experimental equipment for the virtual experiment to be generated based on the acquired language description. The second determining module is used to determine the code for the virtual experiment to be generated based on the acquired language description, the determined experimental principle, and the required experimental equipment; and The generation module is used to generate virtual experiments based on the given code.

8. The generating apparatus according to claim 7, characterized in that, The first determining module, based on the acquired language description, determines the experimental principle and required experimental equipment for the virtual experiment to be generated, including: Based on the acquired language description, determine the subject knowledge that matches the virtual experiment to be generated; Load each available experimental instrument and its usage documentation; Based on the acquired language descriptions, the identified subject knowledge, the loaded experimental equipment and its usage documentation, the first prompt words are constructed. Based on the constructed first prompt word, the experimental principle and required experimental equipment for the virtual experiment to be generated are determined.

9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the generation method according to any one of claims 1-6.

10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the generation method according to any one of claims 1-6.