Teaching experiment automatic generation and intelligent deployment device and method
Through the automatic generation and intelligent deployment of teaching experiments, the problems of dynamic adjustment of experimental difficulty and large hardware investment in existing technologies have been solved, and efficient experimental preparation and improved teaching effects have been achieved, students' online time has been extended, and the accuracy of automated judgment has been improved.
Patent Information
- Application Number
- CN202510668915.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-09-16
AI Technical Summary
The existing teaching experiment methods for Linux system management and operation and maintenance courses are difficult to dynamically adjust the difficulty according to the students' level, cannot support the automatic generation of experiments through natural language descriptions, and have problems such as large hardware investment, high maintenance costs, and low efficiency of repeated resetting of the experimental environment.
Provided is a device for automatic generation and intelligent deployment of teaching experiments, including an input module, a judgment engine module and an environment deployment management module. The input module collects experimental configurations and steps described in natural language. The judgment engine module converts natural language into operation scripts and performs judgment. The environment deployment management module maps the experimental configurations to an experimental environment orchestrated by Kubernetes.
It has achieved improved lesson preparation efficiency, saved hardware investment, improved teaching effectiveness, increased students' effective learning time, reduced the error rate of automated script judgment, and increased the completion rate of experimental tasks.
Smart Images

Figure CN120653263A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer model technology, and in particular to a device and method for automatically generating and intelligently deploying teaching experiments, which are specially used for teaching experiments in courses related to Linux system management and operation and maintenance. Background Art
[0002] In the existing technology, the main ways to implement experiments in Linux system management and operation and maintenance related courses are the traditional physical computer room model, pre-made virtualization software images and online experimental platforms to provide standardized experimental environments.
[0003] In the traditional physical computer room model, schools purchase physical servers to build a realistic experimental environment, and students log in remotely to operate. However, this model has the disadvantages of large hardware investment, high maintenance costs, lack of flexible expansion, and low efficiency due to repeated reset of the experimental environment.
[0004] Prefabricated virtualization software images, such as VMware Workstation or VirtualBox, generate fixed virtual machine templates. Typical technical features include students operating in local virtual machines. However, these methods have drawbacks: images cannot be dynamically generated, experiment configurations are fixed, and it's difficult to dynamically adjust the difficulty based on student proficiency, making it difficult to provide feedback and grading.
[0005] Online experimental platforms (such as some mainstream enterprise-level experimental platform products) use Docker+WebTerminal as the core technology to provide a standardized experimental environment. Their experimental configuration is still manually compiled and cannot support automatic generation of experiments through natural language descriptions. Process evaluation relies on manual correction or manually written script correction. Summary of the Invention
[0006] The technical problem addressed by this invention is how to overcome the technical shortcomings of existing approaches to delivering Linux system management and operation and maintenance courses, which include difficulty dynamically adjusting the difficulty based on student proficiency and an inability to support automatic generation of experiments using natural language descriptions. To overcome these shortcomings of the existing technology, the present invention provides an apparatus and method for automated generation and intelligent deployment of teaching experiments, specifically comprising an apparatus and method for automated generation and intelligent deployment of teaching experiments.
[0007] The present invention provides a teaching experiment automatic generation and intelligent deployment device, comprising: An input module includes a display and a domain customization editor electrically connected to each other, wherein the display can display a configuration guide interface and a confirmation interface; the input module is configured to call the display to display the configuration guide interface for the user to input the experiment configuration, then call the domain customization editor to accept the user's natural language description of the experimental steps, and finally call the display to display the confirmation interface to visualize the natural language and the experiment configuration for user confirmation; The judgment engine module is electrically connected to the display and is configured to, after user confirmation, convert the experimental steps described in natural language into an operation script of the experimental steps and a judgment script for judging whether the experimental steps have been correctly executed, using a multi-layer correction mechanism driven by a knowledge base based on a large language model and a dynamic snapshot chain iterative verification method for generating scripts. The module then integrates the experimental configuration, the experimental steps described in natural language, the operation script of the experimental steps, and the judgment script into an experimental configuration document. The environment deployment management module is electrically connected to the question judgment engine module and is configured to map the experiment configuration document into an experiment environment orchestrated and constructed using Kubernetes, and to perform experiment step navigation control and experiment lifecycle management.
[0008] The device for automated generation and intelligent deployment of teaching experiments disclosed in the present invention sets an input module to collect experimental configurations and experimental steps described in natural language, sets a judgment engine module to convert the experimental steps described in natural language into an operation script of the experimental steps and a judgment script to determine whether the experimental steps have been correctly executed, and integrates the experimental configuration, the experimental steps described in natural language, the operation script of the experimental steps, and the judgment script into an experimental configuration document. Setting an environment deployment management module maps the experimental configuration document to an experimental environment orchestrated and constructed using Kubernetes. This can provide the following technical effects:
[0009] First, the efficiency of lesson preparation is improved. Traditional Linux system management course experimental tasks, deployment, distribution and question judgment take a lot of time. Manually designing experimental tasks and deploying and distributing them in the form of virtual machine images takes an average of about 2 hours per experiment, and the subsequent collection of experimental reports and question judgment takes an additional average of 8 minutes per person per experiment. Manually designing experimental tasks, writing scripts to judge questions and collect results, and deploying and distributing them in the form of virtual machine images takes an average of about 4 hours per experiment, but it can save time for question judgment. The present invention uses the input module to execute natural language to generate experimental configurations, uses the question judgment engine module to judge the scripts, and converts them into experimental environments through the environment deployment management module to realize resource deployment and distribution, which can shorten the time for experimental lesson preparation. At the same time, there is no need for question judgment and the process is simple.
[0010] First, save hardware investment. In the traditional case of virtual machines, resources are generally manually allocated and easily over-allocated. The present invention uses Kubernetes to orchestrate and build an experimental environment to schedule containers, which greatly reduces the CPU and memory requirements of the server.
[0011] Second, teaching effectiveness is improved, significantly increasing students' effective learning time (server load duration is significantly reduced, meaning students' online time is significantly increased). Compared to manual grading and manually written scripts, automated script grading significantly reduces the error rate. Traditional full-process feedback and recording, user operation behavior is collected at the command level, significantly improving the completion rate of experimental tasks.
[0012] In one possible implementation, the experiment configuration includes basic information configuration and environment configuration. The basic information configuration includes the experiment name, difficulty level, and system release version; the environment configuration includes pre-installed software, preset files, and pre-execution scripts. This solution helps to build a multi-level experiment definition architecture and helps to implement the definition input of Linux system operation-related experiments.
[0013] In one possible implementation, the domain-customized editor is a domain-specific editor developed based on the CodeMirror 6.0 extension; the editor can accept user input in Chinese natural language to describe the experimental steps: and in the editing description, each line describes a specific step, and can also use CodeMirror's hint plug-in and a preset domain glossary to achieve domain keyword completion.
[0014] In one possible implementation, the question determination engine module includes: an initialization submodule, electrically connected to the display, configured to set an initial sandbox environment to construct a sandbox environment consistent with the experimental configuration, and set a check count threshold and a verification count threshold; a script generation submodule, electrically connected to the initialization submodule, configured as an intelligent script generation engine based on a large language model, which converts the experimental steps described in natural language into verifiable Linux system operation instructions through a dynamic assembly technology of instruction templates under multi-dimensional constraints to obtain an operation script for the experimental steps; a grammar check submodule, electrically connected to the script generation submodule, configured to use a ShellCheck tool to perform a static compliance scan on the operation script of the experimental step, detect command syntax errors and potential safety hazards in the operation script of the experimental step, call a large language model to generate a correction plan based on the specific error and context, and recheck until compliance is achieved or the verification number threshold is exceeded to obtain a grammar check result; a sandbox verification submodule, electrically connected to the grammar check submodule, configured to perform incremental simulation execution on the grammar check result using the sandbox environment to detect the validity of the grammar check result, and to call the large language model to generate a correction solution based on the specific error and context, and to re-verify until verification is successful or a verification number threshold is exceeded, thereby obtaining the judgment script; The result confirmation submodule is electrically connected to the sandbox verification submodule and is configured to verify the operation script of the experimental steps and the question judgment script, and then integrate the experimental configuration, the experimental steps described in natural language, and the operation script and question judgment script of the experimental steps into an experimental configuration document.
[0015] The judgment engine module with the above structure can convert the experimental steps described by the user in natural language into executable Shell scripts and judgment Shell scripts that determine whether the steps have been executed correctly. It also adopts a multi-layer correction mechanism driven by a knowledge base based on a large language model to generate scripts, a dynamic snapshot chain iterative verification method, and a knowledge base, to achieve accurate conversion from natural language to experimental step operation scripts.
[0016] In a possible implementation, the question determination engine module further includes: a fine-tuning submodule, electrically connected to the result confirmation submodule, configured to store the verified experimental configuration document into a knowledge base, and to initiate an asynchronous fine-tuning task when the number of new entries in the knowledge base is not less than a trigger threshold, so as to fine-tune the large language model through the knowledge base; This allows users to further confirm the accuracy of the test content and make corrections to ensure that the experimental steps are reasonable and correct.
[0017] In a possible implementation, the environment deployment management module includes: A resource generation submodule, electrically connected to the result confirmation submodule, and configured to map the experiment configuration document into a k8s YAML file; a terminal exposure submodule, electrically connected to the resource generation submodule, and configured to generate an access entry for the Web terminal based on the YAML file; The step navigation control submodule is electrically connected to the terminal exposure submodule and is configured to utilize the access portal to perform experimental step navigation control and experimental lifecycle management, and during the experimental step navigation control process, navigation and verification are performed through forward, backward, and inspection of the experimental steps, and real-time two-way synchronization of the front and back ends of the experimental status is performed through the websocket protocol.
[0018] The above solution converts natural language generation experiments and judgment scripts into k8s resources for deployment and distribution. This not only shortens the experiment preparation time, but also uses k8s to schedule containers, which greatly reduces the CPU and memory requirements of the server.
[0019] In one possible implementation, the YAML file includes setting the experiment name, system release version image, pre-installed software packages, deployment preset files, running predefined scripts, and text description documents for deploying experimental steps, operation scripts for experimental steps, and verification scripts.
[0020] Another technical solution of the present invention is to provide a method for automatic generation and intelligent deployment of teaching experiments, comprising the following steps: S1: The input module calls the display to display the configuration guidance interface for the user to input the test configuration; S2: calling the domain customized editor through the input module to accept the natural language of the user describing the experimental steps; S3: calling the display to display the confirmation interface through the input module to visualize the natural language and the test configuration, asking the user to confirm, and proceeding to the next step after the user confirms; S4: The judgment engine module uses a large language model-based generation script dynamic snapshot chain iterative verification method and a knowledge base-driven multi-layer correction mechanism to convert the experimental steps described in natural language into an experimental step operation script and a judgment script for determining whether the experimental steps have been correctly executed; S5: Integrate the experiment configuration, the experiment steps described in natural language, the operation scripts of the experiment steps, and the judgment script into an experiment configuration document through the judgment engine module; S6: Map the experiment configuration document to the experiment environment orchestrated and constructed by Kubernetes through the environment deployment management module, and perform experiment step navigation control and experiment lifecycle management.
[0021] The method disclosed in this application uses an input module to collect experimental configurations and experimental steps described in natural language, and uses a judgment engine module to convert the experimental steps described in natural language into an experimental step operation script and a judgment script that determines whether the experimental steps have been correctly executed. The experimental step operation script, judgment script, and visualized natural language and experimental configuration are integrated into an experimental configuration document, and the environment deployment management module maps the experimental configuration document to an experimental environment orchestrated and constructed using Kubernetes. This can improve lesson preparation efficiency and shorten experimental lesson preparation time. At the same time, there is no need for judgment, the process is simple, and hardware investment is saved, thereby improving teaching effectiveness and greatly increasing students' effective learning time. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is a structural diagram of a teaching experiment automatic generation and intelligent deployment device disclosed in an embodiment of the present application; DETAILED DESCRIPTION
[0023] First, those skilled in the art should understand that these embodiments are merely used to explain the technical principles of the embodiments of the present application and are not intended to limit the scope of protection of the embodiments of the present application. Those skilled in the art may adjust them as needed to suit specific application scenarios.
[0024] In the embodiments of the present application, unless otherwise clearly specified and limited, the electrical connection between the first feature and the second feature means that there is transmission of electrical signals between the first feature and the second feature, that is, there is an electrical relationship, and the way to achieve the transmission of electrical signals may be electrical connection of wires, radio connection, electrical connection of electromagnetic media (such as semiconductors), communication achieved by channels, etc.
[0025] In the embodiments of the present application, unless otherwise expressly specified or limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Furthermore, a first feature being "above," "above," and "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below," "below," and "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0026] The present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] See also Figure 1 The embodiment of the present application discloses a teaching experiment automatic generation and intelligent deployment device, which is specifically used for teaching experiments in Linux system management and operation and maintenance related courses, and is not used for general experiments. The structural diagram of the deployment device is shown in FIG. Figure 1 As shown, the deployment device includes an input module, a question judgment engine module and an environment deployment management module, wherein the question judgment engine module is electrically connected to the display, and the environment deployment management module is electrically connected to the question judgment engine module.
[0028] In this deployment device, the input module includes a display and a domain-customized editor electrically connected to each other. The display can display a configuration guidance interface and a confirmation interface. The input module is configured to call the display to display the configuration guidance interface for the user to enter the experiment configuration, then call the domain-customized editor to accept the user's natural language description of the experimental steps, and finally call the display to display the confirmation interface to visualize the natural language and experiment configuration for user confirmation.
[0029] In this embodiment, the experiment configuration includes basic information configuration and environment configuration. Basic information configuration includes the experiment name, difficulty level, and system release version. The experiment name is a text box that accepts the user's input of the experiment name. The text is verified for validity through regular expression pattern matching (special characters #&%$ are restricted). The difficulty level is divided into two levels: basic and advanced, selected by the user based on the experimental steps they will enter later. The system release version is selected from a drop-down box, providing two options: Rocky Linux 9 and Ubuntu Server 24. The environment configuration includes pre-installed software, pre-configured files, and pre-executed scripts. The pre-installed software text box accepts the user's input of the software package name description, separated by commas. The official repository metadata is retrieved in real time (via the yum / apt metadata interface) to verify the installability of the user-entered software package name. The pre-configured files text box accepts the user's input of the file host (only tar or tar.gz files are accepted). The file's deployment path is specified by the user (path length limit ≤ 255 characters). The pre-executed script text box accepts the user's input of a short pre-executed script.
[0030] In this embodiment, the input module first calls the display to display the configuration guide interface corresponding to the running process including parameter configuration initialization, basic information configuration and system environment configuration, and adopts the wizard input process to realize the definition input of Linux system operation related experiments.
[0031] In this embodiment, the domain-customized editor is a domain-specific editor developed based on the CodeMirror 6.0 extension. The editor can be used to accept Chinese natural language input by the user to describe the experimental steps, and in the editing process, each line describes a specific step, and the CodeMirror hint plug-in and the preset domain term list are used to achieve domain keyword completion. The processing flow of the editor mainly includes four processes: term list initialization, editor plug-in configuration, natural language input processing, and content normalization processing. During the visualization process, the constructed experimental JSON file is displayed using a visual interface. If the user confirms, it is stored. If the user does not confirm, it falls back to the experimental parameter configuration step for modification.
[0032] In this deployment device, the judgment engine module is configured to, after user confirmation, use a knowledge base-driven multi-layer correction mechanism based on a large language model-based generation script dynamic snapshot chain iterative verification method to convert the experimental steps described in natural language into an operation script of the experimental steps and a judgment script for judging whether the experimental steps have been correctly executed. Subsequently, the operation script of the experimental steps, the judgment script, and the visualized natural language and experimental configuration are integrated into an experimental configuration document.
[0033] In this embodiment, the judgment engine module converts the experimental steps described by the user in natural language into an executable Shell script and a judgment Shell script that determines whether the step has been executed correctly. This module is mainly divided into the following three parts: Phase 1: Sandbox environment initialization, building a sandbox environment consistent with the experimental configuration, and creating an initial system snapshot. Phase 2: Script generation, verification and correction, for each experimental step, call the large language model to generate operation and verification script pairs, perform syntax verification and sandbox verification on them, and make targeted corrections. Phase 3: Result confirmation and model optimization, display the verified experimental configuration, incorporate it into the knowledge base after user confirmation, and trigger the fine-tuning of the large language model after reaching a certain number.
[0034] See also Figure 1 In this embodiment, the question judgment engine module includes an initialization submodule, a script generation submodule, a grammar check submodule, a sandbox verification submodule, a result confirmation submodule and a fine-tuning submodule. The initialization submodule is electrically connected to the display, the script generation submodule is electrically connected to the initialization submodule, the grammar check submodule is electrically connected to the script generation submodule, the sandbox verification submodule is electrically connected to the grammar check submodule, the result confirmation submodule is electrically connected to the sandbox verification submodule, and the fine-tuning submodule is electrically connected to the result confirmation submodule.
[0035] In the judgment engine module, the initialization submodule is configured to set up the initial sandbox environment to build a sandbox environment consistent with the experimental configuration, and to set the verification and validation thresholds. The initialization submodule executes the procedures in Phase 1.
[0036] In the question-judgment engine module, the script generation submodule is set as an intelligent script generation engine based on a large language model. Through the dynamic assembly technology of instruction templates under multi-dimensional constraints, the experimental steps described in natural language are converted into verifiable Linux system operation instructions to obtain the operation script of the experimental steps.
[0037] In the judgment engine module, the grammar verification submodule is configured to use the ShellCheck tool to perform a static compliance scan on the experimental step operation scripts, detecting command syntax errors and potential security risks in the experimental step operation scripts. Based on the specific errors and context, the large language model is called to generate a correction plan, and the plan is verified again until compliance is achieved or the verification threshold is exceeded to obtain the grammar verification result. The running program mainly includes executing grammar checks and grammar error correction. The grammar checking process includes four steps: operation script verification, verification script verification, constructing a return structure, and resource cleanup. The grammar error correction process includes six steps: correction loop setting, building a correction prompt word template, parameter substitution, generating a correction plan, validity verification, and failure handling.
[0038] In the judgment engine module, the sandbox verification submodule is configured to perform incremental simulation execution of the grammatical verification results in a sandbox environment to test the validity of the grammatical verification results. Based on the specific errors and context, the large language model is called to generate a correction plan and re-verify until the verification succeeds or the verification threshold is exceeded, thereby obtaining the judgment script. The specific procedures include sandbox verification and sandbox verification error correction. Sandbox verification includes four processes: initializing the environment, initial state verification, executing the operation script, and final state verification. Sandbox verification error correction includes initializing correction parameters, constructing domain-specific prompt words, dynamically annotating question commands, filling in prompt word parameters, calling the correction model, verifying the validity of the correction, and handling failures.
[0039] In the judgment engine module, the result confirmation submodule is configured to verify the experimental step operation scripts and judgment scripts. It then integrates the experimental configuration, the experimental steps described in natural language, the experimental step operation scripts, and the judgment scripts into an experimental configuration document. The verification sequence is system verification and manual verification. The fine-tuning submodule is configured to store the user-confirmed or modified experimental configuration document into the knowledge base. When the number of new entries in the knowledge base is no less than the trigger threshold, an asynchronous fine-tuning task is initiated to fine-tune the large language model using the knowledge base.
[0040] In the deployment device, the environment deployment management module is configured to map the experiment configuration document to the experiment environment orchestrated and constructed using Kubernetes, and to perform experiment step navigation control and experiment lifecycle management. Figure 1 The environment deployment management module includes a resource generation submodule, a terminal exposure submodule, and a step navigation control submodule. The resource generation submodule is electrically connected to the result confirmation submodule, the terminal exposure submodule is electrically connected to the resource generation submodule, and the step navigation control submodule is electrically connected to the terminal exposure submodule. This module is mainly divided into the following three parts: (1) K8s resource configuration generation. (2) Experimental environment deployment. (3) Web terminal injection. (4) Experiment lifecycle management.
[0041] In the environment deployment management module, the resource generation submodule is configured to map the experimental configuration document to a YAML file of k8s. The terminal exposure submodule is configured to generate an access entry for the Web terminal based on the YAML file. The step navigation control submodule is configured to use the access entry to perform experimental step navigation control and experimental life cycle management, and in the process of experimental step navigation control, the experimental steps are forwarded, backward, and checked for navigation and verification, and the front-end and back-end real-time bidirectional synchronization of the experimental status is performed through the websocket protocol. In this embodiment, the YAML file includes setting the experiment name, system release version image, pre-installed software package, deployment preset file, running predefined scripts, and deploying text description documents for experimental steps, operation scripts for experimental steps, and verification scripts.
[0042] In this embodiment, the resource generation submodule is a Kubernetes resource orchestration generation submodule, which is mainly used to map the experimental configuration document to a YAML file of k8s, including setting the experiment name, system release version image, pre-installed software package, deploying preset files, running predefined scripts, deploying text description documents of experimental steps, operation scripts and verification scripts of experimental steps. For example, the content not defined in the experimental configuration JSON document is filled with default values, such as storage, network, etc. The submodule uses atomic environment initialization to decouple it from subsequent experimental operations. The environment and experimental logic are separated by injecting experimental step metadata. Dynamically generate node range ports to avoid port conflict problems.
[0043] In this example, the terminal exposure submodule is a web terminal exposure module. This submodule is used to generate a web terminal access portal and integrates with the step navigation controller. This module obtains the NodePort and node IP address of the created Kubernetes service (lab-service-experiment name) and constructs an access URL in the format ssh: / / nodeIP:NodePort.
[0044] In this embodiment, the step navigation control submodule is a step navigation control submodule, which is used to implement experimental step navigation control. It can navigate and verify through the forward, backward, and check (i.e., next, previous, check commands) of the experimental steps, and realize real-time two-way synchronization of the front-end and back-end of the experimental status through the websocket protocol.
[0045] The following further discloses a method for using the teaching experiment automatic generation and intelligent deployment device in this embodiment, which includes the following steps: S1: The input module calls the display to display the configuration guidance interface for the user to input the test configuration; S2: Call the domain-customized editor through the input module to accept the user's natural language description of the experimental steps; S3: The input module calls the display to display the confirmation interface to visualize the natural language and test configuration, and asks the user to confirm. After the user confirms, the next step is entered; S4: The judgment engine module uses a large language model-based generation script dynamic snapshot chain iterative verification method and a knowledge base-driven multi-layer correction mechanism to convert the experimental steps described in natural language into the experimental step operation script and the judgment script to determine whether the experimental steps have been executed correctly; S5: The experiment configuration, the experimental steps described in natural language, the operation scripts of the experimental steps, and the judgment scripts are integrated into an experiment configuration document through the judgment engine module; of course, it can also further include verification and fine-tuning of the large language model; S6: Use the environment deployment management module to map the experiment configuration document to the experiment environment orchestrated and built with Kubernetes, and perform experiment step navigation control and experiment lifecycle management.
[0046] The teaching experiment automatic generation and intelligent deployment device disclosed in this embodiment is configured to collect experimental configurations and experimental steps described in natural language by setting an input module, convert the experimental steps described in natural language into an operation script of the experimental steps and a judgment script for judging whether the experimental steps have been correctly executed by setting a judgment engine module, and integrate the experimental configuration, the experimental steps described in natural language, the operation script of the experimental steps, and the judgment script into an experimental configuration document. The experimental configuration document is mapped to an experimental environment orchestrated and constructed using Kubernetes by setting an environment deployment management module. This can achieve the following technical effects:
[0047] First, the efficiency of lesson preparation is improved. Traditional Linux system management course experimental tasks, deployment, distribution and question judgment take a lot of time. Manually designing experimental tasks and deploying and distributing them in the form of virtual machine images takes an average of about 2 hours per experiment, and the subsequent collection of experimental reports and question judgment takes an additional average of 8 minutes per person per experiment. Manually designing experimental tasks, writing scripts to judge questions and collecting results, and deploying and distributing them in the form of virtual machine images takes an average of about 4 hours per experiment, but it can save time for question judgment. The present invention uses the input module to execute natural language to generate experimental configurations, uses the question judgment engine module to judge the scripts, and converts them into experimental environments through the environment deployment management module to realize resource deployment and distribution, which can shorten the time for experimental lesson preparation. At the same time, there is no need for question judgment and the process is simple.
[0048] Secondly, it saves hardware investment. In the traditional case of virtual machines, resources are generally manually allocated and easily over-allocated. The present invention uses Kubernetes to orchestrate and build an experimental environment to schedule containers, which greatly reduces the CPU and memory requirements of the server.
[0049] Finally, teaching effectiveness is improved, and students' effective learning time is significantly increased (server load duration is significantly reduced, which means that students' online time is greatly increased). Compared with manual grading and manually written scripts, the error rate of automated script grading is greatly reduced. Traditional full-process feedback and recording, user operation behavior is collected with command-level granularity, and the completion rate of experimental tasks is greatly improved.
[0050] In the description of the embodiments of the present application, it should be noted that in the description of the present application, terms such as "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and does not indicate or imply that the device or component must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present application.
[0051] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "in the present embodiment", "specific example", or "some examples" means that the specific features, mechanisms, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, mechanisms, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are mutually inconsistent.
[0052] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A teaching experiment automatic generation and intelligent deployment device, characterized in that: include: An input module comprising a display and a domain customization editor electrically connected to each other, wherein the display can display a configurable guidance interface and a confirmation interface; The input module is configured to call the display to display a configuration guidance interface for the user to input the test configuration, then call the domain customization editor to accept the natural language of the user describing the experimental steps, and finally call the display to display the confirmation interface to visualize the natural language and the test configuration for the user to confirm; The judgment engine module is electrically connected to the display and is configured to, after user confirmation, convert the experimental steps described in natural language into an operation script of the experimental steps and a judgment script for judging whether the experimental steps have been correctly executed, using a multi-layer correction mechanism driven by a knowledge base based on a large language model and a dynamic snapshot chain iterative verification method for generating scripts. The module then integrates the experimental configuration, the experimental steps described in natural language, the operation script of the experimental steps, and the judgment script into an experimental configuration document. The environment deployment management module is electrically connected to the question judgment engine module and is configured to map the experiment configuration document into an experiment environment orchestrated and constructed using Kubernetes, and to perform experiment step navigation control and experiment lifecycle management.
2. The teaching experiment automatic generation and intelligent deployment device according to claim 1 is characterized in that: The test configuration includes basic information configuration and environment configuration. The basic information configuration includes the experiment name, difficulty level, and system release version. The environment configuration includes pre-installed software, pre-set files, and pre-execution scripts.
3. The teaching experiment automatic generation and intelligent deployment device according to claim 1 or 2, characterized in that: The domain-customized editor is a domain-specific editor developed based on CodeMirror 6.0 extensions.
4. The teaching experiment automatic generation and intelligent deployment device according to claim 3 is characterized in that: The judgment engine module includes: an initialization submodule, electrically connected to the display, configured to set an initial sandbox environment to construct a sandbox environment consistent with the experimental configuration, and set a check count threshold and a verification count threshold; a script generation submodule, electrically connected to the initialization submodule, configured as an intelligent script generation engine based on a large language model, which converts the experimental steps described in natural language into verifiable Linux system operation instructions through a dynamic assembly technology of instruction templates under multi-dimensional constraints to obtain an operation script for the experimental steps; a grammar check submodule, electrically connected to the script generation submodule, configured to use a ShellCheck tool to perform a static compliance scan on the operation script of the experimental step, detect command syntax errors and potential safety hazards in the operation script of the experimental step, call a large language model to generate a correction plan based on the specific error and context, and recheck until compliance is achieved or the verification number threshold is exceeded to obtain a grammar check result; a sandbox verification submodule, electrically connected to the grammar verification submodule, configured to perform incremental simulation execution on the grammar verification result using the sandbox environment to detect the validity of the grammar verification result, and, based on specific errors and context, call the large language model to generate a correction solution and verify again until verification is successful or a verification number threshold is exceeded, thereby obtaining the judgment script; The result confirmation submodule is electrically connected to the sandbox verification submodule and is configured to verify the operation script of the experimental steps and the question judgment script, and then integrate the experimental configuration, the experimental steps described in natural language, and the operation script and question judgment script of the experimental steps into an experimental configuration document.
5. The teaching experiment automatic generation and intelligent deployment device according to claim 4 is characterized in that: The judgment engine module also includes: The fine-tuning submodule is electrically connected to the result confirmation submodule and is configured to store the verified experimental configuration document into a knowledge base, and to start an asynchronous fine-tuning task when the number of new entries in the knowledge base is not less than a trigger threshold, so as to fine-tune the large language model through the knowledge base.
6. The teaching experiment automatic generation and intelligent deployment device according to claim 4 or 5, characterized in that: The environment deployment management module includes: A resource generation submodule, electrically connected to the result confirmation submodule, and configured to map the experiment configuration document into a k8s YAML file; a terminal exposure submodule, electrically connected to the resource generation submodule, and configured to generate an access entry for the Web terminal based on the YAML file; The step navigation control submodule is electrically connected to the terminal exposure submodule and is configured to utilize the access portal to perform experimental step navigation control and experimental lifecycle management, and during the experimental step navigation control process, navigation and verification are performed through forward, backward, and inspection of the experimental steps, and real-time two-way synchronization of the front and back ends of the experimental status is performed through the websocket protocol.
7. The teaching experiment automatic generation and intelligent deployment device according to claim 6 is characterized in that: The YAML file includes setting the experiment name, system release version image, pre-installed software package, deployment preset file, running predefined scripts, and text description documents for deploying experimental steps, operation scripts for experimental steps, and verification scripts.
8. A method for automatic generation and intelligent deployment of teaching experiments, characterized in that: The teaching experiment automatic generation and intelligent deployment device according to any one of claims 1 to 7 comprises the following steps: S1: The input module calls the display to display the configuration guidance interface for the user to input the test configuration; S2: calling the domain customized editor through the input module to accept the natural language of the user describing the experimental steps; S3: calling the display to display the confirmation interface through the input module to visualize the natural language and the test configuration, asking the user to confirm, and proceeding to the next step after the user confirms; S4: The judgment engine module uses a large language model-based generation script dynamic snapshot chain iterative verification method and a knowledge base-driven multi-layer correction mechanism to convert the experimental steps described in natural language into an experimental step operation script and a judgment script for determining whether the experimental steps have been correctly executed; S5: Integrate the experiment configuration, the experiment steps described in natural language, the operation scripts of the experiment steps, and the judgment script into an experiment configuration document through the judgment engine module; S6: Map the experiment configuration document to the experiment environment orchestrated and constructed by Kubernetes through the environment deployment management module, and perform experiment step navigation control and experiment lifecycle management.
Citation Information
Cited By
Teaching experiment step verification method and device, electronic equipment and storage medium
CN121960450A