Remote practical training test method and remote practical training test platform
By using container modules in the remote training platform to create and manage the training test environment, the problems of large resource occupation and poor stability in the existing technology are solved, rapid deployment and automated verification are achieved, and independent testing environments and process-based testing verification capabilities are provided.
Patent Information
- Application Number
- CN202510128766.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing remote training technology has problems such as large resource occupancy, long startup and destruction, complex resource cataloging, inflexible debugging and poor stability.
The container module is used to create and manage the training test environment. After entering the test, users can quickly respond and deploy the test environment, and perform automated verification after submitting the reply results, without using a virtual machine.
It solves the problems of large resource occupation, long startup and destruction occupation, complex resource cataloging, inflexible debugging and poor stability caused by virtual machines, and provides an independent test environment and process-based test verification capabilities to meet various training test needs.
Smart Images

Figure CN119576355A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of remote training technology, and in particular to a remote training test method and a remote training test platform. Background Art
[0002] With the development of technologies such as big data, cloud computing, and artificial intelligence, the impact of computer technology on human life has gradually increased, and the demand for talents in the computer field has also increased. The training of computer technology talents should combine theoretical teaching, dynamic practice, and practical training tests. Traditional tests are either theoretical tests on paper or experimental reports using operation screenshots. This not only increases the workload of teachers, but also does not provide real-time feedback, resulting in poor test results.
[0003] In recent years, cloud computing technology has made breakthrough developments, and virtual machines have been rapidly applied to various fields, such as using OpenStack technology for training. However, this method has the following disadvantages: 1. It occupies a large amount of system resources, and its startup and destruction take a long time, which is not user-friendly; 2. The resource cataloging process is relatively complicated, and the debugging process is not flexible enough; 3. OpenStack does not support sending instructions directly to virtual machines for execution verification, and needs to be performed through virtual machines on the same network segment or other third-party plug-ins, resulting in poor stability. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide a remote training and testing method and a remote training and testing platform to solve the problems in the prior art such as large resource occupation, long startup and destruction time, complex resource cataloging, inflexible debugging and poor stability.
[0005] The present application embodiment provides a remote training test method, which is applied to a remote training test platform. The platform includes a management background, a user terminal, a container module, and a database. The method includes:
[0006] In response to detecting the practical training test request from the user terminal, the management backend determines all test questions corresponding to the current test based on the database, sends all test questions to the user terminal for display, and generates a container scheduling instruction and sends it to the container module;
[0007] The container module, in response to the container scheduling instruction, queries at least one current image file corresponding to the current test based on the database, and starts at least one container through all the current image files, so that the user performs the answering operation to the test question in the started container;
[0008] In response to detecting the reply submission request from the user terminal, the management backend determines the container verification order according to the question answer order, and runs the corresponding verification script in each container in turn according to the container verification order, so as to verify the reply result in the container through the verification script.
[0009] Optionally, the platform further includes a cache module, and starting at least one container through all current image files includes:
[0010] The management backend determines whether there is a namespace corresponding to the user in the cache module;
[0011] If so, the container module starts at least one container in the namespace corresponding to the user through all current image files.
[0012] Optionally, after starting at least one container through all current image files, the method further includes:
[0013] The container module obtains the container usage time of the user, and in response to detecting that the container usage time reaches the usable time corresponding to the user, the container module closes all containers started for the user.
[0014] Optionally, the method further includes:
[0015] The container module determines the delay amount in response to detecting the delay request from the user terminal based on the number of times the delay request is received and / or the identity information of the user;
[0016] The container module updates the available time corresponding to the user based on the delay amount.
[0017] Optionally, the platform further includes an object storage module, and after determining all test questions corresponding to the current test based on the database, further includes:
[0018] The user end obtains the multimedia file corresponding to the test question from the object storage module in the form of a link, and displays the multimedia file.
[0019] Optionally, after running the corresponding verification script in each container in turn according to the container verification sequence, the method further includes:
[0020] The management backend determines the test score of the user based on the script execution results returned by all containers;
[0021] The management backend sends the test results to the user terminal for display.
[0022] Optionally, the management backend determines the test score of the user based on the script execution results returned by all containers, including:
[0023] For each container, the management backend determines whether the response result in the container is correct based on the script execution result returned by the container;
[0024] The management backend determines the test score of the user according to the correct answer results and the wrong answer results in all containers.
[0025] Optionally, the management backend determines whether the reply result in the container is correct based on the script execution result returned by the container, including:
[0026] If the verification script running in the container is a non-error script, the management backend determines that the response result in the container is correct when there is no error information in the script execution result returned by the container; or
[0027] If the verification script running in the container is a comparison value script, the management backend determines whether the value in the script execution result returned by the container is the same as the expected value, and if so, determines that the response result in the container is correct.
[0028] Optionally, the platform further includes a security module, and the method further includes:
[0029] The security module obtains the identity information of the user in response to receiving the practical training test request sent by the user terminal;
[0030] The security module authenticates the user based on the user's identity information. If the identity authentication is successful, the security module authenticates the user's authority based on the user's identity information. If the authority verification is successful, the training test request is forwarded to the management backend.
[0031] The embodiment of the present application also provides a remote training and testing platform, which includes a management backend, a user terminal, a container module, and a database, wherein:
[0032] The management backend is used to respond to the detection of the practical training test request of the user terminal, determine all test questions corresponding to the current test based on the database, send all test questions to the user terminal for display, and generate a container scheduling instruction to send to the container module;
[0033] The container module is used to respond to the container scheduling instruction, query at least one current image file corresponding to the current test based on the database, and start at least one container through all current image files, so that the user can perform the answer operation to the test question in the started container;
[0034] The management backend is also used to determine the container verification order according to the question answer order in response to detecting the reply submission request of the user terminal, and run the corresponding verification script in each container in turn according to the container verification order, so as to verify the reply result in the container through the verification script.
[0035] The present application also provides an electronic device, the electronic device comprising:
[0036] Processor and memory;
[0037] The processor is used to execute the steps of the remote training test method provided in any embodiment of the present application by calling the program or instruction stored in the memory.
[0038] An embodiment of the present application also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the remote training test method provided by any embodiment of the present application.
[0039] In summary, the present application proposes a remote training test method. In response to detecting a training test request from a user end, the management background determines all test questions corresponding to the current test based on a database, sends all test questions to the user end for display, and generates a container scheduling instruction and sends it to the container module. The container module responds to the container scheduling instruction, queries at least one current image file corresponding to the current test according to the database, and starts at least one container through all current image files, so that the user can perform a reply operation to the test question in the started container. Then, in response to detecting a reply submission request from the user end, the management background determines the container verification order according to the test question reply order, and runs the corresponding verification script in each container in turn according to the container verification order to realize the verification of the reply result in the container. The method uses a container to create and manage a training test environment. After the user enters the test and issues a request, the training test environment can be quickly responded and deployed. After the user submits the reply result, the automatic verification can be completed without using a virtual machine. The problems of large resource occupation, long startup and destruction time, complex resource cataloging, inflexible debugging and poor stability caused by virtual machines are solved. Moreover, the method starts at least one container for the user, and can provide each user with an independent test environment. Unlike a centralized environment, operations between users will not affect each other, and the platform and the test environment are independent of each other, and will not affect each other when verifying the test answers. In addition, the method can start multiple containers for users, allowing users to answer questions in different containers respectively, forming a process-based practical training test, and verifying in sequence according to the order of answering questions, forming a process-based test verification, which can support tests composed of multiple test questions and meet various practical training test needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 It is a flow chart of a remote training test method provided by an embodiment of the present application;
[0042] Figure 2 It is a schematic diagram of a remote training and testing platform provided in an embodiment of the present application;
[0043] Figure 3 This is a schematic diagram of image management provided by an embodiment of the present application;
[0044] Figure 4 This is a schematic diagram of starting a container provided in an embodiment of the present application;
[0045] Figure 5 This is a schematic diagram of container scheduling provided by an embodiment of the present application;
[0046] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0048] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0049] As mentioned in the background technology, in view of the problems in the prior art, this application proposes a remote training test method. The remote training test method provided in the embodiment of this application can be applied to a remote training test platform, which includes a management background, a user end, a container module and a database.
[0050] Figure 1 Flowchart of a remote training test method provided by the embodiment of the present application. Figure 1 , the remote training test method specifically includes:
[0051] S110, in response to detecting a practical training test request from the user end, the management backend determines all test questions corresponding to the current test based on the database, sends all test questions to the user end for display, and generates a container scheduling instruction and sends it to the container module.
[0052] In an embodiment of the present application, the remote training and testing platform can adopt a BS (Browser / Server Architecture) access architecture, and users can use the remote training and testing service through a user terminal deployed on a terminal without installing a plug-in.
[0053] The user end may be a Web. The user can perform operations on the page displayed on the user end, and the page converts the operations into practical training test requests, which are transmitted to the management backend through an API (Application Programming Interface).
[0054] Specifically, the management backend can be used to handle various operations of the remote training and testing platform. In order to meet the needs of rapid response, persistent storage, etc. within the platform, the management backend can communicate with other modules such as container modules and databases to ensure reliable and efficient operation of the platform.
[0055] Figure 2 is a schematic diagram of a remote training and testing platform provided in an embodiment of the present application, such as Figure 2 As shown, the management backend can communicate with the security module, cache module, database, object storage module and container module.
[0056] In the embodiment of the present application, in order to further ensure the security of the remote training and testing platform, a security module can also be set in the remote training and testing platform, such as Figure 2 The user end can send a training test request to the security module, which will then verify and forward it to the management platform.
[0057] In one example, the remote training test platform provided in the embodiment of the present application further includes a security module, and the remote training test method provided in the embodiment of the present application further includes:
[0058] The security module obtains the user's identity information in response to receiving the practical training test request sent by the user end; the security module authenticates the user based on the user's identity information. If the identity authentication passes, the security module performs authority verification on the user based on the user's identity information. If the authority verification passes, the practical training test request is forwarded to the management background.
[0059] Specifically, after receiving the practical training test request sent by the user end, the security module may first obtain the user's identity information, for example, the identity information may be the user's login code. Further, the security module may authenticate the identity information to determine whether the identity information is incorrect, so as to prevent other users from using the remote practical training test service with tampered identity information. If the identity authentication is passed, the identity information may be further authenticated, such as determining whether the identity information has the authority to conduct the test, or determining whether the identity information has the authority to conduct the current test requested.
[0060] Furthermore, if both identity verification and authority verification are passed, the security module can send the practical training test request to the management backend.
[0061] Through the above example, security verification is achieved before users use the remote training and testing service, which can ensure the security of the remote training and testing service and the security within the remote training and testing platform.
[0062] In the embodiment of the present application, after receiving the practical training test request, the management backend can parse the practical training test request, determine the current test requested by the user, and then query all test questions corresponding to the current test in the database.
[0063] The database is used to store all test questions corresponding to each test, as well as the corresponding relationship between each test and each verification script. For example, a test question management module can also be set in the remote training test platform, which is responsible for creating, modifying, deleting platform test questions and verifying user operation permissions.
[0064] Furthermore, the management backend can send all test questions to the user end, and then the user end can display the test questions; in addition, the management backend can also generate a container scheduling instruction and send it to the container module to start the container to enable the user to answer questions in the container.
[0065] Considering that some test questions may also have corresponding multimedia files, in some implementations, the remote training test platform provided in the embodiment of the present application further includes an object storage module, which, after determining all test questions corresponding to the current test based on the database, further includes:
[0066] The user end obtains the multimedia file corresponding to the test question from the object storage module in the form of a link and displays the multimedia file.
[0067] Specifically, after the management background queries the test questions and returns them to the user end, the user end can obtain the links to the multimedia files in the test questions while displaying the test questions. Then, the user end can obtain the multimedia files corresponding to the test questions from the object storage module through the links, and then dynamically load them into the page.
[0068] Among them, the multimedia files corresponding to each test question can be pre-stored in the object storage module by the management platform. After the multimedia files are stored in the object storage module, the object storage module can return a link for obtaining the multimedia file. The management background can write the link into the test question, which makes it convenient for the user end to obtain the multimedia file according to the link after obtaining the test question.
[0069] Through the above implementation, for test questions that contain multimedia files such as pictures, related multimedia files can be displayed together, and test questions in graphic and text form can be implemented to meet the practical training test needs in various scenarios.
[0070] S120. The container module responds to the container scheduling instruction, queries at least one current image file corresponding to the current test based on the database, and starts at least one container through all the current image files, so that the user can perform answering operations on the test questions in the started container.
[0071] The container module may include a container resource scheduling system and an image repository. Figure 2 As shown, in the container module, the container resource scheduling system is mainly responsible for the scheduling and management of the container.
[0072] In the embodiment of the present application, the container module can be used to unify the container image resources in the platform. The image file of the container can be entered by the cataloger in the front end of the remote training test platform, and the instruction is sent to the management background through the API. After receiving the instruction, the management background generates the image configuration file and packages the image. The packaged image file is stored in the image warehouse, and its author, authority, and the relationship between the test can be recorded in the database.
[0073] For example, Figure 3 This is a schematic diagram of image management provided by an embodiment of the present application, such as Figure 3 As shown, in terms of image management, after receiving the instructions sent by the front-end, the management background can verify its identity and permissions. After successful verification, it sends instructions to the container resource scheduling system through the preset API to complete the management operation, write to the image repository, and synchronize the relationship between the author, permissions, and tests to the database for storage.
[0074] Specifically, after receiving the container scheduling instruction, the container module may first query at least one current image file corresponding to the current test from the database, and then obtain the current image file from the image repository, and the container resource scheduling system starts the container through the current image file.
[0075] It should be noted that the container resource scheduling system can start one or more containers, the number of started containers can be determined by the current test, and the user can complete the answers to each test question in different containers.
[0076] For example, Figure 4 is a schematic diagram of container startup provided in an embodiment of the present application, such as Figure 4 As shown, the current practical training test includes question 1, question 2 and question 3, and the test containers started corresponding to the current practical training test include container 1 and container 2, wherein container 1 corresponds to question 1 and question 2, that is, the user completes the answer to question 1 and question 2 in container 1, and container 2 corresponds to question 3, that is, the user completes the answer to question 3 in container 2.
[0077] In the embodiment of the present application, in order to prevent a user from occupying too many container resources, a container quantity threshold may be pre-set. The container quantity threshold may adopt a uniform value or may be determined based on the user's identity information. When the container resource scheduling system starts a container for a user, the number of containers started should not exceed the container quantity threshold.
[0078] In addition, in the embodiment of the present application, in order to facilitate the isolation and management of each user and ensure that the tests between users do not affect each other, the container resource scheduling system can also create a namespace for each user, and each user's container is in its own namespace.
[0079] In a specific implementation, the remote training test platform provided in the embodiment of the present application further includes a cache module, which starts at least one container through all current image files, including:
[0080] The management backend determines whether there is a namespace corresponding to the user in the cache module; if so, the container module starts at least one container in the namespace corresponding to the user through all current image files.
[0081] The mapping relationship between the user and the namespace can be managed by the cache module. Specifically, the management backend can first search for the namespace corresponding to the user in the cache module. If it exists, the container module can further start all containers in the namespace. If it does not exist, the container module can first create a namespace corresponding to the user and write the mapping relationship to the cache module, and then the container module starts all containers in the namespace.
[0082] For example, Figure 5 is a schematic diagram of container scheduling provided by an embodiment of the present application, such as Figure 5 As shown, the container resource scheduling system starts containers in namespace 1, namespace 2, and namespace 3 for different users, and the number of started containers can be determined by tests.
[0083] Through the above implementation, each user's container can be started in the corresponding namespace, so that each user is isolated from each other through the namespace, and the user's network traffic will not be obtained by other users, thereby ensuring the security of remote training tests and facilitating user management.
[0084] In the embodiment of the present application, after at least one container is started for the user, the user can perform the answering operation to the test question in the started container. It should be noted that the user usually needs to answer the test questions in order, such as Figure 4 As shown, the user answers question 2 after answering question 1, and answers question 3 after answering question 2.
[0085] S130. In response to detecting the reply submission request from the user end, the management backend determines the container verification order according to the question answer order, and runs the corresponding verification script in each container in turn according to the container verification order, so as to verify the reply result in the container through the verification script.
[0086] Specifically, after completing the answers to all test questions, the user can submit the answer results on the user side. In response to detecting a user-triggered submission control or a user-input submission command, the user side can generate a reply submission request and send it to the management background.
[0087] Further, after receiving the reply submission request, the management backend can verify the reply result submitted by the user. In the embodiment of the present application, the reply result can be verified by a verification script, that is, whether the reply result is correct.
[0088] Specifically, after the user submits the answer result, the container verification order can be determined according to the test question answer order, where the test question answer order can be the answer order specified by the current test. The container verification order can be obtained according to the test question answer order and the correspondence between the test and the test questions, and the correspondence between the test and the container stored in the database.
[0089] Furthermore, the corresponding verification scripts can be run in each container in turn according to the container verification order. The management backend can determine the verification scripts that need to be run in each container according to the correspondence between the test and the test questions stored in the database, and the correspondence between the test and the verification script stored in the database, and then the management backend uses the API to issue verification instructions to the container module, so that the container module controls each container to run the verification script in turn.
[0090] by Figure 4For example, you can first run the verification script corresponding to question 1 in container 1, and then run the verification script corresponding to question 2 in container 1, or run the verification script that can verify questions 1 and 2 in turn in container 1, and after container 1 gets the result returned by the script, you can run the verification script corresponding to question 3 in container 2. It should be noted that the purpose of executing the verification script in the container in sequence according to the corresponding order between the questions and the containers is to create a test environment in sequence according to the content of the practical test, and verify in the environment in sequence after the test is completed, so as to realize customized testing and verification, and form a process-based practical test, thereby helping users complete the process-based test.
[0091] Specifically, after each container runs the corresponding verification script in turn, the management background can receive the results returned by the container, summarize the results returned by all containers, and obtain the test score of the user. For example, a test question verification module can be set in the remote training test platform, and the test question verification module determines whether the answer is correct based on the results returned by each container and summarizes the test score.
[0092] In a specific implementation, after running the corresponding verification script in each container in turn according to the container verification order, the following steps are also included:
[0093] Step 11: The management backend determines the user's test score based on the script execution results returned by all containers;
[0094] Step 12: The management backend sends the test results to the user end for display.
[0095] Among them, in step 11, the management background can send the script execution results returned by all containers to the test question verification module, and then the test question verification module determines the test score according to all script execution results.
[0096] Furthermore, in step 12, the test question verification module may send the test results to the management background, and the management background sends the test results to the user end, and then the user end displays the test results.
[0097] Through the above steps 11 and 12, feedback of test results can be achieved, allowing users to learn about the test results in a timely manner.
[0098] With respect to the above step 11, in one example, the management backend determines the test score of the user based on the script execution results returned by all containers, including:
[0099] For each container, the management background determines whether the response results in the container are correct based on the script execution results returned by the container; the management background determines the user's test score based on the correct response results and incorrect response results in all containers.
[0100] Specifically, for each container, the management background can call the test question verification module to determine whether the answer result in the container is correct based on the script execution result returned by the container, thereby integrating all correct answer results and incorrect answer results to obtain the user's test score.
[0101] Through the above example, it is possible to determine whether the answer is correct based on the script execution result, thereby obtaining the test score, which can ensure the accuracy of the test score.
[0102] In the embodiment of the present application, the verification of test questions can be divided into two categories, namely, no-error verification and comparison value verification. In the no-error verification, if the container does not return an error message after executing the script, it is determined that the answer is correct. In the comparison value verification, if the value returned by the container after executing the script is the same as the expected value, it is determined that the answer is correct.
[0103] In some implementations, the management backend determines whether the response result in the container is correct based on the script execution result returned by the container, including:
[0104] If the verification script running in the container is a non-error script, the management backend determines that the response result in the container is correct if there is no error information in the script execution result returned by the container;
[0105] Alternatively, if the verification script running in the container is a comparison value script, the management backend determines whether the value in the script execution result returned by the container is the same as the expected value, and if so, determines that the response result in the container is correct.
[0106] Specifically, if the verification script running in the container is a non-error script, that is, a non-error verification is implemented, then the response result in the container can be determined to be correct if there is no error information in the script execution result. If the verification script running in the container is a comparison value script, that is, a comparison value verification is implemented, then the response result in the container can be determined to be correct if the value in the script execution result is the same as the expected value.
[0107] Through the above implementation, error-free verification and comparison value verification are realized, and the verification of user tests is realized through multiple verification methods to ensure the accuracy of verification.
[0108] In the embodiment of the present application, considering that after starting at least one container for a user, there may be a user timeout, in order to avoid wasting resources, resources can also be recycled in time.
[0109] In one example, after starting at least one container through all current image files, the method further includes:
[0110] The container module obtains the container usage time of the user, and in response to detecting that the container usage time reaches the corresponding usable time of the user, the container module closes all containers started for the user.
[0111] Specifically, the container module can detect the user's container usage time in real time and compare it with the corresponding usable time of the user. If the container usage time reaches the usable time, all containers started for the user can be closed. The usable time is the time the user can use the container. The usable time can be a unified value or determined based on the user's identity information.
[0112] In an embodiment of the present application, in addition to passive resource recovery, active resource recovery can also be achieved. Active recovery can be initiated by the user. For example, the user can send a test end request to the management platform through the user terminal, and the management platform responds to the test end request and closes all containers started for the user.
[0113] Taking into account that during the remote training test, there may be situations where users expect a delay, in such situations, a delay can be provided for the user to avoid a situation where the container is closed before the user completes the test, resulting in test failure.
[0114] In some embodiments, the method provided in the embodiments of the present application further includes:
[0115] In response to detecting a delay request from the user end, the container module determines a delay amount based on the number of delay requests received and / or the user's identity information; the container module updates the corresponding available time of the user based on the delay amount.
[0116] The user may initiate a delay request by triggering a delay control on the user end, or may initiate a delay request by entering a delay command on the user end.
[0117] Specifically, if the container module receives a delay request from the user end, it can determine the delay amount according to the number of times the delay request from the user end is received. For example, the corresponding relationship between different times and different delay amounts can be preset, the lower the number, the greater the delay amount, and then the corresponding delay amount is queried according to the number.
[0118] Alternatively, if the container module receives a delay request from the user, the delay amount can be determined according to the user's identity information. For example, multiple permissions can be pre-divided, and different permissions have corresponding delay amounts. The user's permissions can be determined according to the user's identity information, thereby querying the corresponding delay amount.
[0119] Alternatively, the container module may determine the delay amount based on the number of delay requests received and the user's identity information. Exemplarily, the user's authority may be determined based on the user's identity information, thereby querying the corresponding delay amount as the basic delay amount, and then adjusting the basic delay amount based on the number of delay requests received to obtain the final delay amount. For example, if the number of delay requests is less than 2, the basic delay amount is maintained, and if the number of delay requests is greater than or equal to 2, the basic delay amount is reduced.
[0120] After obtaining the delay amount, the container module may further update the available time length corresponding to the user according to the delay amount, for example, based on the available time length, increase the delay amount to obtain a new available time length.
[0121] Through the above implementation, when the user has a delay demand, the available time for the user can be appropriately increased to avoid test failure caused by recycling resources before the user completes the test. In addition, the delay amount can be determined based on the number of delay requests received and / or the user's identity information, so that the delay can be carried out for the user in a targeted manner to ensure the accuracy of the delay.
[0122] In the embodiment of the present application, the storage of the user test environment can also be realized. In one example, the remote training test method provided by the embodiment of the present application also includes:
[0123] In response to detecting the reply submission request from the user, the management backend packages all containers started for the user for the current test into images and stores them.
[0124] Specifically, in response to detecting the reply submission request from the user, the management background can package all containers started for the user for the current test into an image file and store it, so that all containers of the user under the current test can be restarted later through the stored image file, so that the test environment and the reply results in the environment can be restored together, thereby achieving the purpose of retrieving the user's completed test at any time later.
[0125] In addition, the management background can also automatically retain the user's operation content while the user is answering the test questions and before the container is recycled, and then detect when the user reconnects to the container before the container is recycled. The user can continue to answer the questions on this basis, avoiding the user having to start from the beginning after the connection is disconnected.
[0126] The remote training test method provided by the embodiment of the present application is that the management background responds to the detection of the training test request from the user end, determines all the test questions corresponding to the current test based on the database, sends all the test questions to the user end for display, and generates a container scheduling instruction and sends it to the container module. The container module responds to the container scheduling instruction, queries at least one current image file corresponding to the current test according to the database, and starts at least one container through all the current image files, so that the user can perform the answer operation to the test question in the started container. Then, the management background responds to the detection of the reply submission request from the user end, determines the container verification order according to the test question answer order, and runs the corresponding verification script in each container in turn according to the container verification order to realize the verification of the reply result in the container. The method uses containers to create and manage the training test environment. After the user enters the test and sends a request, the training test environment can be quickly responded and deployed. After the user submits the reply result, the automatic verification can be completed without using a virtual machine, which solves the problems of large resource occupation, long startup and destruction time, complex resource cataloging, inflexible debugging and poor stability caused by virtual machines. Moreover, the method starts at least one container for the user, and can provide each user with an independent test environment. Unlike a centralized environment, operations between users will not affect each other, and the platform and the test environment are independent of each other, and will not affect each other when verifying the test answers. In addition, the method can start multiple containers for users, allowing users to answer questions in different containers respectively, forming a process-based practical training test, and verifying in sequence according to the order of answering questions, forming a process-based test verification, which can support tests composed of multiple test questions and meet various practical training test needs.
[0127] In an embodiment of the present application, container technology is used to create and manage a practical training test environment. After the user enters the test and issues a request to create a practical training test, the platform can quickly respond and deploy the practical training test environment. After the user submits the test answer, the platform can quickly recycle the resources occupied by the container into the system for other users to use in the test. In addition, an independent test environment can be provided for each user. Unlike a centralized environment, under this architecture, operations between users will not affect each other, and the platform and the test environment are independent of each other. The test results are judged through the RPC (Remote Procedure Call) protocol, and there is no impact on each other.
[0128] In addition, it supports a variety of test environments and software, such as Ubuntu, Centos, Fedora and other Linux operating systems, and various shell, Python, PHP and other test evaluation mechanisms. It supports editors to select operating systems and software to create test environments based on the content of practical training tests, and input test questions and verification codes through the platform to achieve customized test functions. It supports editors to upload practical training environments and test questions to the platform at any time without the user's awareness, without shutting down the environment.
[0129] The method provided in the embodiment of the present application also has the following technical effects:
[0130] 1. Fast deployment: Containers are lighter than traditional virtual machines, so their deployment and destruction responses will be faster and more convenient. The containerized deployment approach is more in line with users' performance expectations for the platform and enhances the user experience;
[0131] 2. Strong stability. The container module, database, cache module, etc. are all implemented with a distributed high-availability architecture. When the hardware device or operating system of a machine fails, the corresponding module services will not be interrupted, and the user's use of the platform will not be affected;
[0132] 3. Lower the operational threshold for catalogers: Compared with the complex virtual machine image production process, the container packaging process is relatively simple and can be connected to the platform for operation, so catalogers can more easily master its operation methods;
[0133] 4. Support multiple operating systems and software: The platform supports multiple operating systems such as centos, ubuntu, fedora, and multiple software such as MySQL, Hadoop, Spark, and multiple languages such as Python, PHP, and JAVA, and can be applied to various training and testing scenarios;
[0134] 5. Support multi-container scheduling and verification: The platform supports single test settings, combining multiple training test environments, and supports unified scheduling and verification to meet diverse inspection needs;
[0135] 6. Strong security: The container environment verification test results can be directly executed through the container API without the need for third-party plug-ins or keys. This method can effectively protect against security issues caused by key leakage.
[0136] The present application embodiment also provides a remote training and testing platform, which includes a management backend, a user terminal, a container module, and a database, wherein:
[0137] The management backend is used to respond to the practical training test request detected by the user terminal, determine all test questions corresponding to the current test based on the database, send all test questions to the user terminal for display, and generate a container scheduling instruction to send to the container module;
[0138] A container module, for responding to the container scheduling instruction, querying at least one current image file corresponding to the current test based on the database, and starting at least one container through all the current image files, so that the user can perform answering operations on the test questions in the started container;
[0139] The management backend is also used to respond to the detection of the reply submission request from the user end, determine the container verification order according to the question answer order, and run the corresponding verification script in each container in turn according to the container verification order, so as to verify the reply result in the container through the verification script.
[0140] Based on the above implementation modes, optionally, the platform also includes a cache module and a management background, which is also used to determine whether there is a namespace corresponding to the user in the cache module; if so, at least one container is started in the namespace corresponding to the user through all current image files.
[0141] Based on the above implementations, optionally, the container module is further used to obtain the container usage time of the user, and in response to detecting that the container usage time reaches the usable time corresponding to the user, the container module closes all containers started for the user.
[0142] Based on the above-mentioned implementation modes, optionally, the container module is also used to determine the delay amount in response to detecting a delay request from the user terminal, based on the number of times the delay request is received and / or the identity information of the user; and update the corresponding usable time of the user based on the delay amount.
[0143] On the basis of the above-mentioned implementation modes, optionally, the platform further includes an object storage module, and the user terminal is further used to obtain the multimedia file corresponding to the test question from the object storage module in the form of a link, and display the multimedia file.
[0144] On the basis of the above implementation modes, optionally, the management backend is further used to determine the test score of the user based on the script execution results returned by all containers; and send the test score to the user terminal for display.
[0145] On the basis of the above-mentioned implementation modes, optionally, the management background is also used to determine, for each container, whether the response result in the container is correct based on the script execution result returned by the container; and determine the test score of the user according to the correct response results and incorrect response results in all containers.
[0146] On the basis of the above-mentioned implementation modes, optionally, the management backend is further used to, if the verification script running in the container is a non-error script, determine that the reply result in the container is correct if there is no error information in the script execution result returned by the container; or, the management backend is further used to, if the verification script running in the container is a comparison value script, determine whether the value in the script execution result returned by the container is the same as the expected value, and determine that the reply result in the container is correct if the same.
[0147] On the basis of the above-mentioned implementation modes, optionally, the platform also includes a security module, which is used to obtain the user's identity information in response to receiving a practical training test request sent by the user terminal; authenticate the user based on the user's identity information, and if the identity authentication passes, verify the user's authority based on the user's identity information; if the authority verification passes, forward the practical training test request to the management background.
[0148] The remote training and testing platform provided in the embodiment of the present application can execute the steps in the remote training and testing method provided in the embodiment of the method of the present application, and the execution steps and beneficial effects are no longer repeated here.
[0149] Figure 6 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .
[0150] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
[0151] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may run the program instructions to implement the remote training test method of any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.
[0152] In one example, the electronic device 400 may further include: an input device 403 and an output device 404, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 403 may include, for example, a keyboard, a mouse, etc. The output device 404 may output various information to the outside, including early warning prompt information, braking force, etc. The output device 404 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0153] Of course, to simplify, Figure 6 Only some of the components related to the present application in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.
[0154] In addition to the above-mentioned methods and devices, the embodiments of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the remote training test method provided in any embodiment of the present application.
[0155] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0156] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the remote training test method provided in any embodiment of the present application.
[0157] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0158] It should be noted that the terms used in this application are only for describing specific embodiments, rather than limiting the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0159] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0160] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the concept and technical solution of the invention to other occasions without improvement, should be regarded as the scope of protection of this application.
Claims
1. A remote training test method, characterized in that: Applied to a remote training and testing platform, the platform includes a management backend, a user terminal, a container module and a database, and the method includes: In response to detecting the practical training test request from the user terminal, the management backend determines all test questions corresponding to the current test based on the database, sends all test questions to the user terminal for display, and generates a container scheduling instruction and sends it to the container module; The container module, in response to the container scheduling instruction, queries at least one current image file corresponding to the current test based on the database, and starts at least one container through all the current image files, so that the user performs the answering operation to the test question in the started container; In response to detecting the reply submission request from the user terminal, the management backend determines the container verification order according to the question answer order, and runs the corresponding verification script in each container in turn according to the container verification order, so as to verify the reply result in the container through the verification script.
2. The method according to claim 1, characterized in that The platform further includes a cache module, and the starting at least one container through all current image files includes: The management backend determines whether there is a namespace corresponding to the user in the cache module; If so, the container module starts at least one container in the namespace corresponding to the user through all current image files.
3. The method according to claim 1, characterized in that After starting at least one container through all current image files, the method further includes: The container module obtains the container usage time of the user, and in response to detecting that the container usage time reaches the usable time corresponding to the user, the container module closes all containers started for the user.
4. The method according to claim 3, characterized in that The method further comprises: The container module determines the delay amount in response to detecting the delay request from the user terminal based on the number of times the delay request is received and / or the identity information of the user; The container module updates the available time corresponding to the user based on the delay amount.
5. The method according to claim 1, characterized in that The platform also includes an object storage module, after determining all test questions corresponding to the current test based on the database, further including: The user end obtains the multimedia file corresponding to the test question from the object storage module in the form of a link, and displays the multimedia file.
6. The method according to claim 1, characterized in that After running the corresponding verification script in each container in turn according to the container verification sequence, the method further includes: The management backend determines the test score of the user based on the script execution results returned by all containers; The management backend sends the test results to the user terminal for display.
7. The method according to claim 6, characterized in that The management backend determines the test score of the user based on the script execution results returned by all containers, including: For each container, the management backend determines whether the response result in the container is correct based on the script execution result returned by the container; The management backend determines the test score of the user according to the correct answer results and the wrong answer results in all containers.
8. The method according to claim 7, characterized in that The management backend determines whether the response result in the container is correct based on the script execution result returned by the container, including: If the verification script running in the container is a non-error script, the management backend determines that the response result in the container is correct when there is no error information in the script execution result returned by the container; or If the verification script running in the container is a comparison value script, the management backend determines whether the value in the script execution result returned by the container is the same as the expected value, and if so, determines that the response result in the container is correct.
9. The method according to claim 1, characterized in that: The platform further includes a security module, and the method further includes: The security module obtains the identity information of the user in response to receiving the practical training test request sent by the user terminal; The security module authenticates the user based on the user's identity information. If the identity authentication is successful, the security module authenticates the user's authority based on the user's identity information. If the authority verification is successful, the training test request is forwarded to the management backend.
10. A remote training and testing platform, characterized in that: The platform includes a management backend, a user terminal, a container module and a database, wherein: The management backend is used to respond to the detection of the practical training test request of the user terminal, determine all test questions corresponding to the current test based on the database, send all test questions to the user terminal for display, and generate a container scheduling instruction to send to the container module; The container module is used to respond to the container scheduling instruction, query at least one current image file corresponding to the current test based on the database, and start at least one container through all current image files, so that the user can perform the answer operation to the test question in the started container; The management backend is also used to determine the container verification order according to the question answer order in response to detecting the reply submission request of the user terminal, and run the corresponding verification script in each container in turn according to the container verification order, so as to verify the reply result in the container through the verification script.
Citation Information
Patent Citations
Multi-task scheduling automated testing method and system based on Docker container
CN108427641A
A control method and a control device for automatically judging a program code
CN109189463A
A designer and a design method for a test question and a test paper structure
CN109241508A
On-line detection method for composite type questions based on docker and juyer notebook
CN115145805A
Remote practical training method and device and storage medium
CN117149360A