WO2023071067A1 - 编程教育实验方法及装置、电子设备和存储介质 - Google Patents

编程教育实验方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2023071067A1
WO2023071067A1 PCT/CN2022/086703 CN2022086703W WO2023071067A1 WO 2023071067 A1 WO2023071067 A1 WO 2023071067A1 CN 2022086703 W CN2022086703 W CN 2022086703W WO 2023071067 A1 WO2023071067 A1 WO 2023071067A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
experiment
experimental
library
user
Prior art date
Application number
PCT/CN2022/086703
Other languages
English (en)
French (fr)
Inventor
郑聪瑶
卞荣辉
张宁
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023071067A1 publication Critical patent/WO2023071067A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B19/00Teaching not covered by other main groups of this subclass
    • G09B19/0053Computers, e.g. programming

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a programming education experiment method and device, electronic equipment and a storage medium.
  • the present application at least provides a programming education experiment method and device, electronic equipment and a storage medium.
  • a programming education experiment method the method is applied to a user terminal, and the method includes: acquiring a code set for completing the experiment, the code set includes at least one set of codes, the At least one set of codes includes user codes submitted by experimental users; through the software framework deployed on the user terminal, the code set is executed to obtain experimental results; wherein, the software framework includes a core computing library and an experimental component library, so The experiment component library includes an interface for loading an experiment resource pool, and the experiment resource pool is deployed on a server.
  • the at least one set of codes further includes the initialization code submitted by the experiment maker, and the code set is executed through the software framework deployed on the user terminal to obtain the experimental results, including: executing the The above initialization code is used to complete the initialization of the experiment; the user code is executed to obtain the experiment result.
  • executing the initialization code to complete the initialization of the experiment includes: according to the initialization code, using the interface of the experiment component library to obtain an experiment resource pool; and/or, according to the The initialization code is used to package the experimental tool based on the core computing library and/or the experimental component library; and/or, according to the initialization code, the initialization of the user terminal interaction is completed.
  • the level of the experimental component library is higher than that of the core computing library, and the experiments are performed based on the core computing library and/or the experimental component library according to the initialization code Packaging of tools, including: preferentially using the experimental component library to package the experimental tool; in response to the experimental tool being unable to be packaged based on the experimental component library, using the core computing library to package the experimental tool encapsulation.
  • the completing the initialization of the user terminal interaction according to the initialization code includes: based on the initialization code, performing Rewritten, the browser includes an interactive interface for performing interactive operations.
  • the at least one set of codes further includes approval codes submitted by the experiment maker, and after executing the user codes and obtaining the experimental results, the method further includes: executing the approval codes , to obtain the approval result of the user code.
  • the approval result includes one or more of the time complexity of the user code, the space complexity of the user code, and the performance of the experimental results, and the time complexity is used to determine The running time required by the user code, the space complexity is used to determine the memory occupied by the user code, and the performance of the experimental result includes the accuracy of the experimental result.
  • the at least one set of codes further includes a reset code submitted by the experiment maker, and the method further includes: refreshing the codes in the code set that need to be adjusted according to the reset code, Get the reset result.
  • the method further includes: determining the initialization code of other experiments according to the user code submitted by the user of the experiment.
  • the experimental component library includes a model loading sub-library, a model migration sub-library, and a port processing sub-library
  • the model loading sub-library is used to load the experimental resource pool deployed on the server.
  • the model migration sub-library is used for the migration of neural network models
  • the port processing sub-library is used for code encapsulation.
  • the acquiring the code set for completing the experiment includes: receiving the code set for completing the experiment submitted by the user based on an interactive interface of the browser of the user terminal.
  • a programming education experimental device which is applied to a user terminal, including: an acquisition module, configured to acquire a code set for completing the experiment, the code set includes at least one set of codes, and the at least A set of codes includes user codes submitted by experimental users; an execution module is used to execute the code set through the software framework deployed on the user terminal to obtain experimental results; wherein the software framework includes a core computing library and an experimental A component library, the experiment component library includes an interface for loading an experiment resource pool, and the experiment resource pool is deployed on a server.
  • the at least one set of codes further includes initialization codes submitted by the experiment maker, and the execution module includes: a first submodule, configured to execute the initialization codes to complete the experiment Initialization; the second submodule is used to execute the user code to obtain experimental results.
  • the first submodule is configured to: according to the initialization code, use the interface of the experiment component library to obtain an experiment resource pool; and/or, according to the initialization code, based on the The core operation library and/or the experiment component library package the experiment tool; and/or, according to the initialization code, complete the initialization of the user terminal interaction.
  • the level of the experimental component library is higher than that of the core computing library, and the first submodule is based on the core computing library and/or the experimental
  • the method of packaging the experimental tool by the component library includes: preferentially using the experimental component library to package the experimental tool; in response to the fact that the experimental tool cannot be packaged based on the experimental component library, using the core computing library Carry out packaging of the experimental kit.
  • the first submodule is configured to complete the initialization of the user terminal interaction according to the initialization code, including: browsing the user terminal based on the initialization code rewrite the interaction with the rewrite permission on the browser, and the browser includes an interactive interface for performing interactive operations.
  • the at least one set of codes also includes approval codes submitted by the experiment maker, and the device further includes a third submodule, configured to: obtain the experimental results when executing the user codes Afterwards, the approval code is executed to obtain the approval result of the user code.
  • the approval result includes one or more of the time complexity of the user code, the space complexity of the user code, and the performance of the experimental results, and the time complexity is used to determine The running time required by the user code, the space complexity is used to determine the memory occupied by the user code, and the performance of the experimental result includes the accuracy of the experimental result.
  • the at least one set of codes also includes a reset code submitted by the experiment maker, and the device further includes a fourth submodule, configured to: refresh the code according to the reset code The code that needs to be adjusted in the collection gets the reset result.
  • the device includes a fifth submodule, configured to: determine the initialization code of another experiment according to the user code submitted by the user of the experiment.
  • the experimental component library includes a model loading sub-library, a model migration sub-library, and a port processing sub-library
  • the model loading sub-library is used to load the experimental resource pool deployed on the server.
  • the model migration sub-library is used for the migration of neural network models
  • the port processing sub-library is used for code encapsulation.
  • the method for the acquiring module to acquire the code set for completing the experiment includes: receiving the code set for completing the experiment submitted by the user based on an interactive interface of the browser of the user terminal.
  • an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above-mentioned method.
  • a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.
  • the experimental component library included in the software framework can be used to load the experimental resource pool deployed on the server, which is conducive to the hot update of the software framework;
  • the obtained code set is executed to obtain the experimental results, which not only facilitates the migration and integration of programming education experiments, but also makes it more flexible and easy to use, improves the production efficiency of programming education experiments, and ensures that programming education experiments can be shared with other users.
  • the user terminal can be used and operated without distinction, there is no need to install other environments or software, which is conducive to reducing the implementation cost of programming education experiments and improving the stability of programming education experiments.
  • FIG. 1 shows a flowchart of a programming education experiment method according to an embodiment of the present disclosure.
  • FIG. 2 shows a schematic diagram of a programming education experiment method according to an embodiment of the present disclosure.
  • FIG. 3 shows a schematic diagram of a programming education experiment method according to an embodiment of the present disclosure.
  • FIG. 4 shows a block diagram of a programming education experiment device according to an embodiment of the present disclosure.
  • FIG. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the experimental component library included in the software framework can be used to load the experimental resource pool deployed on the server, which is conducive to the hot update of the software framework; and after loading resources, it does not depend on the backend (server)
  • the obtained code set is executed to obtain the experimental results, which not only facilitates the migration and integration of programming education experiments, is more flexible and easy to use, improves the production energy efficiency of programming education experiments, and can ensure that programming education experiments After being shared with other user terminals, it can be used and run indiscriminately without installing other environments or software, which is conducive to reducing the implementation cost of programming education experiments and improving the stability of programming education experiments.
  • a programming education experiment platform composed of a user terminal and a server can be constructed, and the programming education experiment platform can include a software framework deployed on the user terminal and an experiment resource pool deployed on the server.
  • the programming education experiment platform can support users in designing and implementing experiments, wherein the users can include experiment producers and experiment users.
  • Experiment creators can design and make programming education experiments based on this platform. For example, in the browser window of the user terminal, the experiment maker can use the local resources of the user terminal and the server experiment resource pool to complete multiple sets of functional codes that help the experiment user to implement programming education experiments, which may include providing a programming education experiment environment codes, codes that provide experimental tools, codes that guide the interactive process of programming education experiments, codes that evaluate experimental effects, etc.
  • Experiment users can complete the programming education experiments that come with the platform or the programming education experiments designed and produced by the experiment creators based on the platform. Experiment users can submit user codes in the browser window of the user terminal to complete the programming education experiment.
  • FIG. 1 shows a flow chart of a programming education experiment method according to an embodiment of the present disclosure.
  • the programming education experiment method includes:
  • step S11 a code set for completing the experiment is obtained, the code set includes at least one set of codes, and the at least one set of codes includes user codes submitted by experiment users.
  • step S12 the code set is executed through the software framework deployed on the user terminal to obtain the experimental results; wherein, the software framework includes a core computing library and an experimental component library, and the experimental component library includes a library for loading The interface of the experimental resource pool, which is deployed on the server.
  • the programming education experiment method can be executed by electronic equipment such as a terminal device or a server, and the terminal device can be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, Cordless phones, personal digital assistants (Personal Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc., the method can be realized by calling the computer-readable instructions stored in the memory by the processor. Alternatively, the method may be performed by a server.
  • UE User Equipment
  • PDA Personal Digital Assistant
  • the code set used to complete the experiment may be obtained through the browser window of the user terminal.
  • the code collection obtained by the user terminal may include the code edited by the user obtained from the code editing window of the user terminal, or the code transmitted by the code editing device connected to the user terminal received by the user terminal.
  • the source is not limited.
  • the code set includes at least one set of codes, that is, at least user codes submitted by experiment users (such as students).
  • the codes included in the code collection may include C language codes, C++ language codes, Python codes (designed by Guido van Rossum of the Netherlands Society for Mathematics and Computer Science Research), Java codes (produced by Oracle Corporation of the United States), and this There is no restriction on the language type of the code.
  • the experimental process is relatively simple, but also the corresponding operating environment configuration is relatively simple, and the software framework deployed on the user terminal can directly provide the running The environment configuration required for artificial intelligence experiment A.
  • the code collection used to complete the experiment may only include the user code submitted by the experiment user.
  • the heavyweight artificial intelligence experiment B for example, including the neural network training experiment
  • the experimental process is relatively complicated, but also the corresponding operating environment configuration is also relatively complicated, and even requires resource support from a remote server.
  • the experiment maker (such as a teacher) can use the submitted code to support the experiment user to complete the artificial intelligence experiment B.
  • the code set used to complete the artificial intelligence experiment B includes not only the user code submitted by the experiment user, but also at least one set of codes from the initialization code, approval code, and reset code submitted by the experiment creator.
  • the initialization code can support the initialization of artificial intelligence experiment B, and provide the operating environment configuration required by artificial intelligence experiment B; the approval code can be used to evaluate the user code submitted by the experiment creator, and provide feedback information on the completion of artificial intelligence experiment B to the experiment Users, the reset code can be used to adjust part of the content of artificial intelligence experiment B to form a new experiment.
  • a code set including at least user code may be executed through a software framework deployed on the user terminal to obtain an experimental result.
  • the software framework is used to provide the basic structure and software component specifications for the programming education experiment of the user (ie, the experiment maker and the experiment user).
  • the user can use various programming algorithms and software included in the software framework. Components to complete the writing of the experimental code.
  • various programming algorithms and components included in the software framework can be called to obtain experimental results.
  • the software framework of the user terminal can be combined with the reasoning engine of the user terminal itself, so as to further reduce the resource cost of the disclosed method.
  • the user terminal itself has already deployed one or more inference engines, such as neural network inference engines based on related technologies, which can be used to deploy deep learning models, and can include a variety of inference engines based on depth
  • the software framework of the user terminal can call the algorithm library of the reasoning engine through the software interface, so as to combine the resources of the user terminal's own reasoning engine to further reduce resource costs.
  • the software framework may include a core computing library and an experimental component library.
  • the core algorithm library may include multiple types of algorithms such as machine learning algorithms, neural network algorithms, and target recognition algorithms. This disclosure does not limit the number and types of algorithms included in the core algorithm library.
  • the core algorithm library can be used to support the execution of related algorithms in programming education experiments, for example, for the experiment of target recognition for genetic algorithms, the experiment can operate the icon corresponding to the genetic algorithm in the user interface through a simple few lines of code (or by interactive means ) directly calls the genetic algorithm in the core algorithm library, without developing the corresponding code for the algorithm. By calling the genetic algorithm in the core algorithm library, it helps to improve the efficiency of programming education experiments.
  • the experimental component library is a collection of components obtained by encapsulating some of the data and/or function codes required for the experiment. It can be used to reduce the mode for users to write programming education experiment codes directly from the bottom layer, and to componentize complex code logic to improve programming experiments. s efficiency. Whether it is a scenario of programming education experiment production for the experiment maker (for example, the user is a teacher), or a scenario of programming education experiment learning for the experiment user (for example, the user is a student), the user can select from the experimental components according to the needs of the programming education experiment. Select multiple components in the library, and use the building block method of splicing or combining experimental components to splice or combine the selected multiple experimental components to complete the production of programming education experiments.
  • the experimental component library includes a model loading sub-library, a model migration sub-library, and a port processing sub-library.
  • the model loading sub-library is used to load the experimental resource pool deployed on the server, and the experimental resource pool is used to provide resources for programming education experiments, for example, may include convolutional neural networks (Convolutional Neural Networks, CNN), recurrent neural networks Network (Recurrent Neural Network, RNN), confrontation neural network (Generative Adversarial Nets, GAN) and other model files can be used to form a variety of training sets (Train Set), validation sets (Validation Set), and test sets (Test Set) Sample data such as images, texts, and audios, and resources in the experimental resource pool can be maintained and updated. This disclosure does not limit the specific resources included in the experimental resource pool.
  • the model migration sub-library is used for the migration of the neural network model. For example, for the scene where the difference between the image segmentation task A and the image segmentation task B is relatively small, the neural network model of the image segmentation task A has been trained, and the image segmentation task B If the neural network model of the image segmentation task A has not been trained, the neural network model of the image segmentation task A can be migrated based on the model migration sub-library, that is, the network model structure or Fine-tuning the weights of the network model to obtain a neural network model suitable for the image segmentation task B; or, the neural network model of the image segmentation task A can also be directly used as the neural network model of the image segmentation task B.
  • the port processing sub-library is used for code encapsulation, and can be encapsulated according to different experimental frameworks to obtain multiple functional modules after encapsulation.
  • the code set of programming education experiment F includes initialization code, user code, and approval code
  • the experimental framework of this programming education experiment F can be a file directory used to indicate the content of the code set
  • the initialization code can be included according to the file directory , user code, and approval code for the programming education experiment F to be packaged
  • the packaged programming education experiment F may include: an initialization code packaging module, a user code packaging module, and an approval code packaging module.
  • the initialization code encapsulation module of programming education experiment F can be called directly.
  • multimedia interactive forms such as images, video streams, voices, and texts may be supported to call the port processing sub-library, which is not limited in the present disclosure.
  • the experimental component library it is not only beneficial to load the experimental resource pool of the server, but also provide efficient and reliable multi-type experimental components to support the call of programming education experiments, for example, it can support the production of programming education experiments such as computer vision, speech recognition, and natural language processing. It is conducive to improving the efficiency of programming education experiments.
  • step S12 The following describes the process of executing the code set in step S12 based on the above software framework for the scenario where the code set is one or more sets.
  • the programming education experiment to be processed is a lightweight artificial intelligence experiment A
  • the obtained code set only includes the user code submitted by the experiment user.
  • the experiment resource pool of the remote server may not be used, and the requirements of the artificial intelligence experiment A can be met according to the user terminal's own resources.
  • the user code can be directly executed to obtain the experimental result of the artificial intelligence experiment A, and the experimental result can be displayed on the user terminal to the experiment user who submits the user code; or, based on the software framework of the user terminal, Using the interactive interface of the browser window of the user terminal, the experimenter is guided to input the code segments multiple times, and then executes the user code composed of the multiple code segments input by the experimenter to obtain the experimental result of the artificial intelligence experiment A, and in the interactive The experimental results are displayed to the experimental users in the interface.
  • the programming education experiment to be processed is a heavyweight artificial intelligence experiment B
  • the obtained code set includes not only the user code submitted by the experiment user, but also the initialization code submitted by the experiment producer, it can be based on the user terminal software Framework, first execute the initialization code, initialize the artificial intelligence experiment B according to the instructions of the initialization code, and provide the required experimental resources for the artificial intelligence experiment B, wherein the provided experimental resources can be the resources of the user terminal itself, or can be It is the experimental resource loaded from the experimental resource pool set on the remote server.
  • the user terminal can execute the user code related to the artificial intelligence experiment B, and obtain the experimental results of the artificial intelligence experiment B.
  • the obtained code set includes not only the user code submitted by the experiment user, but also the initialization code, approval code, reset code, etc. submitted by the experiment producer. In the case of sets of codes.
  • the user terminal software framework Based on the user terminal software framework, according to the user terminal's own resources and the experimental resource pool set on the remote server, it supports multiple sets of codes for resource loading in different steps. After the resources are loaded, the requirements of the artificial intelligence experiment C can be met, and the user terminal can respectively execute multiple sets of codes related to the artificial intelligence experiment C to obtain the experimental results of the artificial intelligence experiment C.
  • the experimental component library included in the software framework can be used to load the experimental resource pool of the remote server.
  • the interface in the experimental component library can be used to obtain large files such as model files from the remote server.
  • the experimental component library included in the software framework can be used to load the experimental resource pool deployed on the server, which is beneficial to realize the hot update of the software framework;
  • the software framework of the user terminal executes the obtained code set to obtain the experimental results, which is conducive to the migration and integration of programming education experiments, is more flexible and easy to use, improves the production energy efficiency of programming education experiments, and can ensure that programming education experiments are shared with other users After the terminal, it can be used and operated indiscriminately without installing other environments or software, which is beneficial to reduce the implementation cost of programming education experiments and improve the stability of programming education experiments.
  • FIG. 2 shows a schematic diagram of a programming education experiment method according to an embodiment of the present disclosure.
  • the code set used to complete the programming education experiment may include four sets of codes, namely, initialization codes, user codes, approval codes, and reset codes. It should be understood that FIG. 2 only takes four sets of codes as an example, and the present disclosure does not limit the specific number of sets of codes in the code set.
  • users can submit experiment codes for completing the experiment through the interactive interface of the browser window of the user terminal.
  • the experiment creator can submit the initialization code for initializing the programming education experiment, the approval code for evaluating the user code submitted by the experiment user, and the approval code for The reset code for resetting the programming education experiment; the experiment user can submit the user code for the programming education experiment through the interactive interface of the browser window of the user terminal.
  • the user terminal can obtain the code collection used to complete the programming education experiment through the browser window.
  • step S11 the code set used to complete the programming education experiment is obtained, and in step S12, the code set is executed through the software framework deployed on the user terminal to obtain the experimental result.
  • the at least one set of codes further includes initialization codes submitted by the experiment maker, and the code set is executed through the software framework deployed on the user terminal to obtain experimental results, including:
  • Step S121 executing the initialization code to complete the initialization of the experiment
  • the programming education experiment is an artificial intelligence experiment customized by the experiment maker for the experiment user.
  • the experiment user can enter the interface of the programming education experiment in the browser window of the user terminal.
  • the browser loads the programming education experiment, There may be a waiting period.
  • the initialization code for the programming education experiment submitted by the experiment maker may be executed through the software framework deployed on the user terminal to complete the initialization process.
  • the initialization of the experiment is the preparatory work for the experimenter to successfully complete the current programming education experiment before the experimenter performs the programming education experiment.
  • various preparatory work can be completed according to the content of the initialization code.
  • the content of the initialization code may include an experiment resource initialization part, which is used to provide experimental resources for the current programming education experiment. Load the required experimental resources;
  • the content of the initialization code may also include the initialization part of experimental tools, which is used to provide experimental tools for current programming education experiments, such as training experiments for neural network models, which can provide batch training tools;
  • the initialization content can also include the experiment interaction initialization part, which is used to provide various interaction methods for the current programming education experiment.
  • the reader can load the code corresponding to the icon by dragging and dropping the icon in the interface.
  • experiment maker can customize the content of the initialization code according to the expected experimental effect, and this disclosure does not limit the specific content of the initialization code.
  • the experiment resources and the experiment environment can be prepared for the programming education experiment by executing the initialization code, reducing the risk of Lack of experimental resources or instability caused by the experimental environment.
  • the required experimental resources can be loaded from the experimental resource pool of the server only when the resources of the user terminal itself cannot meet the requirements of the programming education experiment, which is conducive to the maximum efficiency of using the user terminal's own resources. resource.
  • the software framework of the embodiments of the present disclosure can use a browser, and without adapting to different operating systems, it can be directly submitted and displayed on the interactive interface of the browser window. Execution of code is beneficial to improve the stability of the environment. In a possible implementation manner, the initialization code is executed to complete the initialization of the experiment, including:
  • the packaging of the experimental tool is performed;
  • the programming education experiment is an artificial intelligence experiment customized by the experiment maker for the experiment user, for example, a convolutional neural network (Convolutional Neural Networks, CNN) training experiment.
  • CNN convolutional Neural Networks
  • the purpose of the experiment is to enable the experimental users to learn the training of the model, and the teaching focus is on the training process, not the process of building the CNN model. Therefore, the experiment maker can submit the initialization code to directly construct the CNN model for the experiment user during the initialization process of the experiment, so that the experiment user does not need to spend a lot of time on the construction of the CNN model, and directly proceeds to the training stage of the CNN model .
  • the initialization code submitted by the experiment maker can also use the experimental component library and/or the core computing library to pre-package the tools required for the experiment, so that the experimenter can write the user code. Directly call the encapsulated experimental tools to increase the usability of user code.
  • the experiment maker can use the software interface to call the core computing library and/or the experimental component library through the initialization code, and at the same time Batch training (a neural network training method) related library files or library functions, the training method of batch training is packaged into a batch training experiment tool, so that experiment users can directly call the package in the process of CNN model training experiment A good batch training experiment tool, which increases the ease of use of user code.
  • Batch training a neural network training method
  • the level of the experimental component library may be higher than that of the core computing library, that is, the experimental component library depends on the core computing library.
  • the experimental component library can be used first to realize the packaging of experimental tools. If the experimental tool packaging cannot be realized based on the experimental component library, the experimental tool packaging can be realized based on the core computing library. Therefore, the encapsulation of the experimental tool may be implemented based on the core computing library, the experimental component library, or the core computing library and the experimental component library, which is not limited in the present disclosure.
  • the browser interaction interface of the user terminal in the default state can be used, or the interaction on the browser can be rewritten according to the instructions of the initialization code.
  • the default interactive interface does not have a CNN model icon
  • the CNN model cannot be built interactively by dragging the CNN model icon with the mouse.
  • the experiment maker can rewrite the interactive mode by submitting the initialization code, that is, the initialization code can add an icon representing the CNN model on the interactive interface, so that the experimental user can realize the CNN model by dragging the interactive mode of the icon build.
  • the interaction related to the security and stability of the programming education platform cannot be rewritten.
  • the interaction with the main frame such as the main interface frame
  • the main process, identity authentication, etc. will greatly affect the security and stability of the programming education platform, and cannot be rewritten.
  • the addition and deletion of content on the branch framework for example, adding a model to the model library of the interactive interface
  • the addition and deletion of process nodes in the branch process can be rewritten. You can set the permission of the experimental component library to limit the rewriting permission of the interactive interface, and you can rewrite the part with open permission in the files included in the experimental component library.
  • the initialization code is executed to complete the initialization of the programming education experiment, which is conducive to providing the required resources and environment for various programming education experiments, and according to the teaching objectives, the experiment maker Based on the core computing library and experimental component library, the experimental tools and experimental interaction process can be designed flexibly and efficiently, which is conducive to improving the energy efficiency of educational experiment production.
  • Step S122 execute the user code to obtain the experimental result.
  • the user code execution stage can be entered, and the user terminal can execute the user code submitted by the experiment user, and the user code can call the initialization code and the interface capability encapsulated in the experiment component library.
  • the core computing library and experimental component library included in the software framework can be designed so that the experimental component library depends on the core computing library.
  • the lower-level core computing library can be shielded from the experimental users, so that the experimental users do not need to pay attention
  • the core computing library can indirectly call the core computing library by calling the experimental component library, which can improve the coding efficiency and execution efficiency of user code.
  • the initialization code can be executed first to provide the resources and environment required by the user code, which is conducive to improving the stability and efficiency of the programming education experiment.
  • the initialization codes of other experiments are determined according to the user codes submitted by the experiment users.
  • both the user code submitted by the experiment user and the initialization code submitted by the experiment creator are based on the same library, that is, the core computing library and the experiment component library of the software framework. Therefore, in order to improve the code utilization rate and reduce the workload of the user (such as the experiment maker), the user code submitted by the experiment user or a part of the code segment included in the user code can be determined as the initialization code or part of the initialization code of other experiments code snippet.
  • programming education experiment A is a convolutional neural network experiment
  • the user code submitted by experimenters of programming education experiment A is used to implement the convolutional neural network.
  • the experiment maker designed a comparative experiment of convolutional neural network and recurrent neural network, which needs to provide convolutional neural network and recurrent neural network in the initialization stage.
  • the experiment maker of programming education experiment B can use the user code as a part of the initialization code if the user code of programming education experiment A is found in the user terminal.
  • the migrated programming education experiment can support direct combination with existing general programming education experiments, browser port visualization tools, H5 (HTML5, a language description method for building web content) rendering tools, and educational games.
  • H5 HTML5
  • the experiment maker wants to add H5 animation to guide the experiment users in the programming education experiment, he can call the H5 rendering tool through the software interface in the initialization code of the programming education experiment, and this disclosure does not limit the specific combination method. Since the programming education experiments before and after the migration can be performed on the user terminal, no environmental conflicts will be caused during the above combination process.
  • the at least one set of codes further includes approval codes submitted by the experiment maker, and after the user codes are executed to obtain the experimental results, the method further includes: step S123, executing the the above approval code to obtain the approval result of the user code.
  • the approval code execution phase may enter.
  • the initialization code and the experimental component library can also be called, which efficiently utilizes the existing code and library files, which is conducive to reducing the coding workload of the approval code, and can further reduce the code due to approval.
  • the approval result can include the time complexity of the user code, the space complexity of the user code, the performance of the experimental result (ie, the running result of the user code), and the like. Among them, the time complexity is used to determine the running time required by the user code, the space complexity is used to determine the memory occupied by the user code, and the performance of the experimental results can represent the performance such as the accuracy of the experimental results.
  • the approval code is executed to obtain the approval result of the user code, which is beneficial to the experiment user and the experiment creator to obtain the experiment effect efficiently.
  • the at least one set of codes also includes a reset code submitted by the experiment maker, and the method further includes: Step S124, according to the reset code, refreshing the set of codes that need to be adjusted code to get the reset result.
  • the reset code execution phase may enter.
  • the experiment maker can indicate whether to refresh the code that needs to be adjusted in the code collection through the submitted reset code according to the teaching situation.
  • the model migration sub-library in the experimental component library can be called through the software interface to adjust the code in the code collection. Resetting codes may adjust some codes in the code set, or adjust all the codes in the code set, which is not limited in the present disclosure.
  • users can choose whether to reload all of them. If you want to rewrite part of the storage in the programming education experiment while retaining other loaded parts, you can call or rewrite the content of the programming education experiment by resetting the code.
  • FIG. 3 shows a schematic diagram of a programming education experiment method according to an embodiment of the present disclosure.
  • the code set used to complete the programming education experiment may include two sets of codes, namely initialization codes and user codes.
  • the experimental component library of the software library framework can be used to load the resources of the server by using the software interface included in the component library.
  • step S122 can continue to re-execute the initialization code (step S121), reload the resources required for the programming education experiment, so that it is convenient for the user to repeat the experiment and improve the proficiency of the experiment Spend.
  • the programming education experiment method of the embodiment of the present disclosure shown in FIG. 2 or FIG. 3 does not limit the number of codes included in the user code set, and can support multiple sets of codes according to experimental requirements during the experiment.
  • the resource loading of the steps and the simple and fast rewriting of any code are beneficial to meet the variability of the experiment, which is not limited in the present disclosure.
  • the user terminal can load the resources deployed in the experimental resource pool of the remote server and execute the code set, which is conducive to improving the migration of programming education experiments, so that the client can be updated remotely and support different
  • the platform and equipment reduce operation and maintenance costs.
  • the user terminal and the remote server, where the software framework and the experimental resource pool are placed separately are isolated on both sides, which can improve the stability of the programming education experiment and increase the speed of the experiment.
  • the core algorithm library and experimental component library included in the software framework are conducive to enhancing the technical support required to realize programming education experiments, and can more conveniently upgrade and iterate the technical core.
  • user A (experiment maker) needs to make an easy-to-use artificial intelligence experiment with an interactive interface and deliver it to a large number of student customers (experiment users).
  • A is understaffed to support the situation where each student device is deployed individually.
  • user A hopes to directly migrate the content completed by students in the classroom to become a new programming education experiment.
  • User A can use the programming education experiment method provided by the embodiment of the present disclosure to realize and deploy the artificial intelligence experiment platform in a low-cost manner.
  • the experimental component library included in the software framework can be used to load the experimental resource pool deployed on the server, which is conducive to the hot update of the software framework; and after loading resources, it does not depend on the backend (server) Computing, through the software framework of the user terminal, execute the obtained code set to obtain the experimental results, which is not only conducive to the migration and integration of programming education experiments, but also more flexible and easy to use, improves the production efficiency of programming education experiments, and can ensure the sharing of programming education experiments It can be used and run indiscriminately after being transferred to other user terminals, without installing other environments or software, which is conducive to reducing the implementation cost of programming education experiments, improving the stability of programming education experiments, and facilitating management.
  • this disclosure also provides programming education experiment devices, electronic equipment, computer readable storage media, and programs, all of which can be used to implement any programming education experiment method provided by this disclosure, and refer to the corresponding technical solutions and descriptions in the method section Corresponding records are not repeated here.
  • Fig. 4 shows a block diagram of a programming education experiment device according to an embodiment of the present disclosure. As shown in Fig. 4, the device includes:
  • the obtaining module 41 is used to obtain a code set for completing the experiment, the code set includes at least one set of codes, and the at least one set of codes includes user codes submitted by experiment users;
  • An execution module 42 configured to execute the code set through the software framework deployed on the user terminal to obtain experimental results
  • the software framework includes a core computing library and an experiment component library
  • the experiment component library includes an interface for loading an experiment resource pool
  • the experiment resource pool is deployed on a server.
  • the at least one set of codes also includes initialization codes submitted by the experiment maker, and the execution module 42 includes: a first submodule, configured to execute the initialization codes to complete the experiment initialization; the second submodule is used to execute the user code to obtain experimental results.
  • the first submodule is configured to: according to the initialization code, use the interface of the experiment component library to obtain an experiment resource pool; and/or, according to the initialization code, based on the The core operation library and/or the experiment component library package the experiment tool; and/or, according to the initialization code, complete the initialization of the user terminal interaction.
  • the at least one set of codes also includes approval codes submitted by the experiment maker, and the device further includes a third submodule, configured to: obtain the experimental results when executing the user codes Afterwards, the approval code is executed to obtain the approval result of the user code.
  • the at least one set of codes also includes a reset code submitted by the experiment maker, and the device further includes a fourth submodule, configured to: refresh the code according to the reset code The code that needs to be adjusted in the collection gets the reset result.
  • the device includes a fifth submodule, configured to: determine the initialization code of another experiment according to the user code submitted by the user of the experiment.
  • the experimental component library includes a model loading sub-library, a model migration sub-library, and a port processing sub-library
  • the model loading sub-library is used to load the experimental resource pool deployed on the server.
  • the model migration sub-library is used for the migration of neural network models
  • the port processing sub-library is used for code encapsulation.
  • the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor.
  • Computer readable storage media may be volatile or nonvolatile computer readable storage media.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • FIG. 5 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
  • electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
  • the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • the power supply component 806 provides power to various components of the electronic device 800 .
  • Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
  • the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 .
  • the audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and the peripheral interface module, and the above-mentioned peripheral interface module can be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
  • the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications.
  • CMOS complementary metal-oxide-semiconductor
  • CCD charge-coupled device
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access wireless networks based on communication standards, such as wireless networks (Wi-Fi), second-generation mobile communication technologies (2G), third-generation mobile communication technologies (3G), fourth-generation mobile communication technologies (4G ), long-term evolution (LTE) of universal mobile communication technology, fifth generation mobile communication technology (5G) or their combination.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmable gate array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
  • FIG. 6 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs.
  • the application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on the operating system stored in the memory 1932, such as the Microsoft server operating system (Windows ServerTM), the graphical user interface-based operating system (Mac OS XTM) introduced by Apple Inc., and the multi-user and multi-process computer operating system (UnixTM). ), a free and open source Unix-like operating system (LinuxTM), an open source Unix-like operating system (FreeBSDTM), or similar.
  • a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
  • the present disclosure can be a system, method and/or computer program product.
  • a computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disc read only memory
  • DVD digital versatile disc
  • memory stick floppy disk
  • mechanically encoded device such as a printer with instructions stored thereon
  • a hole card or a raised structure in a groove and any suitable combination of the above.
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as via the Internet using an Internet service provider). connect).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA)
  • FPGA field programmable gate array
  • PDA programmable logic array
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically realized by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
  • a software development kit Software Development Kit, SDK

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种编程教育实验方法及装置、电子设备和存储介质,包括:获取用于完成实验的代码集合,代码集合包括至少一套代码,至少一套代码包括实验使用者提交的用户代码;通过部署于用户终端的软件框架,执行代码集合,得到实验结果。其中,软件框架包括核心运算库和实验组件库,实验组件库包括用于加载实验资源池的接口,实验资源池部署于服务器,有利于编程教育实验的迁移与融合,能够提高编程教育实验的稳定性。

Description

编程教育实验方法及装置、电子设备和存储介质
本申请要求在2021年10月29日提交中国专利局、申请号为CN202111271437.5、申请名称为“编程教育实验方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
【技术领域】
本公开涉及计算机技术领域,尤其涉及一种编程教育实验方法及装置、电子设备和存储介质。
【背景技术】
随着各种电子设备走进千家万户,编程教育受到的关注越来越广泛,人工智能教育是编程教育中的重要组成。人工智能已经渗透进大众生活的方方面面,掌握和了解人工智能知识势必成为教育中的必要环节。业界对于人工智能教育的教学方法与技术方案还在探索阶段,使用实验的方式在实践中教授与学习知识内容是教育学中公认的有效手段。
【发明内容】
本申请至少提供一种编程教育实验方法及装置、电子设备及存储介质。
根据本公开的一方面,提供了一种编程教育实验方法,所述方法应用于用户终端,所述方法包括:获取用于完成实验的代码集合,所述代码集合包括至少一套代码,所述至少一套代码包括实验使用者提交的用户代码;通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果;其中,所述软件框架包括核心运算库和实验组件库,所述实验组件库包括用于加载实验资源池的接口,所述实验资源池部署于服务器。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的初始化代码,通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果,包括:执行所述初始化代码,完成所述实验的初始化;执行所述用户代码,得到实验结果。
在一种可能的实现方式中,执行所述初始化代码,完成所述实验的初始化,包括:根据所述初始化代码,利用所述实验组件库的接口,获取实验资源池;和/或,根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装;和/或,根据所述初始化代码,完成所述用户终端交互的初始化。
在一种可能的实现方式中,所述实验组件库的层级高于所述核心运算库的层级,所述根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装,包括:优先使用所述实验组件库进行所述实验工具的封装;响应于基于所述实验组件库无法对所述实验工具进行封装,使用所述核心运算库进行所述实验工具的封装。
在一种可能的实现方式中,所述根据所述初始化代码,完成所述用户终端交互的初始化,包括:基于所述初始化代码,对所述用户终端的浏览器上具备重写权限的交互进行重写,所述浏览器包括用于进行交互操作的交互界面。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的审 批代码,在所述执行所述用户代码,得到实验结果之后,所述方法还包括:执行所述审批代码,得到所述用户代码的审批结果。
在一种可能的实现方式中,所述审批结果包括用户代码的时间复杂度、用户代码的空间复杂度以及所述实验结果的性能中的一者或多者,所述时间复杂度用于确定所述用户代码所需的运行时间,所述空间复杂度用于确定用户代码所占用的内存,所述实验结果的性能包括实验结果的准确性。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的重置代码,所述方法还包括:根据所述重置代码,刷新所述代码集合中需要调整的代码,得到重置结果。
在一种可能的实现方式中,所述方法还包括:根据所述实验使用者提交的用户代码,确定其他实验的所述初始化代码。
在一种可能的实现方式中,所述实验组件库包括模型加载子库、模型迁移子库、端口处理子库,所述模型加载子库用于加载部署于服务器的所述实验资源池,所述模型迁移子库用于神经网络模型的迁移,所述端口处理子库用于代码的封装。
在一种可能的实现方式中,所述获取用于完成实验的代码集合,包括:基于所述用户终端的浏览器的交互界面,接收用户提交的用于完成实验的代码集合。
根据本公开的一方面,提供了一种编程教育实验装置,应用于用户终端,包括:获取模块,用于获取用于完成实验的代码集合,所述代码集合包括至少一套代码,所述至少一套代码包括实验使用者提交的用户代码;执行模块,用于通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果;其中,所述软件框架包括核心运算库和实验组件库,所述实验组件库包括用于加载实验资源池的接口,所述实验资源池部署于服务器。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的初始化代码,所述执行模块,包括:第一子模块,用于执行所述初始化代码,完成所述实验的初始化;第二子模块,用于执行所述用户代码,得到实验结果。
在一种可能的实现方式中,第一子模块,用于:根据所述初始化代码,利用所述实验组件库的接口,获取实验资源池;和/或,根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装;和/或,根据所述初始化代码,完成所述用户终端交互的初始化。
在一种可能的实现方式中,所述实验组件库的层级高于所述核心运算库的层级,所述第一子模块根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装的方式,包括:优先使用所述实验组件库进行所述实验工具的封装;响应于基于所述实验组件库无法对所述实验工具进行封装,使用所述核心运算库进行所述实验工具的封装。
在一种可能的实现方式中,所述第一子模块,用于根据所述初始化代码,完成所述用户终端交互的初始化的方式,包括:基于所述初始化代码,对所述用户终端的浏览器上具备重写权限的交互进行重写,所述浏览器包括用于进行交互操作的交互界面。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的审批代码,所述装置还包括第三子模块,用于:在所述执行所述用户代码,得到实验结果之后,执行所述审批代码,得到所述用户代码的审批结果。
在一种可能的实现方式中,所述审批结果包括用户代码的时间复杂度、用户代码的空间复杂度以及所述实验结果的性能中的一者或多者,所述时间复杂 度用于确定所述用户代码所需的运行时间,所述空间复杂度用于确定用户代码所占用的内存,所述实验结果的性能包括实验结果的准确性。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的重置代码,所述装置还包括第四子模块,用于:根据所述重置代码,刷新所述代码集合中需要调整的代码,得到重置结果。
在一种可能的实现方式中,所述装置包括第五子模块,用于:根据所述实验使用者提交的用户代码,确定其他实验的所述初始化代码。
在一种可能的实现方式中,所述实验组件库包括模型加载子库、模型迁移子库、端口处理子库,所述模型加载子库用于加载部署于服务器的所述实验资源池,所述模型迁移子库用于神经网络模型的迁移,所述端口处理子库用于代码的封装。
在一种可能的实现方式中,所述获取模块获取用于完成实验的代码集合的方式,包括:基于所述用户终端的浏览器的交互界面,接收用户提交的用于完成实验的代码集合。
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
在本公开实施例中,可利用软件框架包括的实验组件库加载部署在服务器的实验资源池,有利于实现软件框架的热更新;并且在加载资源后,不依赖后端(服务器)的运算,通过用户终端的软件框架,执行所获取的代码集合得到实验结果,不仅有利于编程教育实验的迁移与融合,更加灵活易用,提升编程教育实验的制作能效,而且可以保证编程教育实验分享到其他用户终端后可以无差别地使用及运行,无需安装其他环境或软件,有利于降低编程教育实验的实施成本,提高编程教育实验的稳定性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
【附图说明】
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的编程教育实验方法的流程图。
图2示出根据本公开实施例的编程教育实验方法的示意图。
图3示出根据本公开实施例的编程教育实验方法的示意图。
图4示出根据本公开实施例的编程教育实验装置的框图。
图5示出根据本公开实施例的电子设备的框图。
图6示出根据本公开实施例的电子设备的框图。
【具体实施方式】
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图 中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
相关技术中,编程教育实验(例如人工智能实验)所依赖的智能推理引擎(将逻辑规则应用于知识库以推断出新信息的系统组件)大多需要配套的环境配置来运行,将环境部署在用户本地会面临不稳定以及难以升级迭代的困难;将环境部署在远端,则需要根据用户数量准备大量服务器资源,极大增加了实施成本的负担,同时由于依托于网络链接,还会在实验过程中产生更多不稳定性。此外,以上两种方案由于运行条件比较严格,都会存在实验本身难以迁移到其他平台或设备环境的问题。
有鉴于此,本公开的实施例,可利用软件框架包括的实验组件库加载部署在服务器的实验资源池,有利于实现软件框架的热更新;并且在加载资源后,不依赖后端(服务器)的运算,通过用户终端的软件框架,执行所获取的代码集合得到实验结果,不仅有利于编程教育实验的迁移与融合,更加灵活易用,提升编程教育实验的制作能效,而且可以保证编程教育实验分享到其他用户终端后可以无差别地使用及运行,无需安装其他环境或软件,有利于降低编程教育实验的实施成本,提高编程教育实验的稳定性。
在本公开的实施例中,可构建由用户终端和服务器构成的编程教育实验平台,该编程教育实验平台可包括部署于用户终端的软件框架,以及部署于服务器的实验资源池。
该编程教育实验平台可支持用户进行实验的设计和实施,其中,用户可包括实验制作者和实验使用者。
实验制作者(例如老师)可基于该平台进行编程教育实验的设计和制作。例如,实验制作者可以在用户终端的浏览器窗口,利用用户终端的本地资源以及服务器实验资源池,完成有助于实验使用者实施编程教育实验的多套功能代码,可包括提供编程教育实验环境的代码,提供实验工具的代码,指引编程教育实验交互过程的代码,评价实验效果的代码等。
实验使用者(例如学生)可基于该平台,完成平台自带的编程教育实验,或者由实验制作者设计制作的编程教育实验。实验使用者可以在用户终端的浏览器窗口,提交用户代码,完成编程教育实验。
图1示出根据本公开实施例的编程教育实验方法的流程图,如图1所示,所述编程教育实验方法包括:
在步骤S11中,获取用于完成实验的代码集合,所述代码集合包括至少一套代码,所述至少一套代码包括实验使用者提交的用户代码。
在步骤S12中,通过部署于所述用户终端的软件框架,执行所述代码集合, 得到实验结果;其中,所述软件框架包括核心运算库和实验组件库,所述实验组件库包括用于加载实验资源池的接口,所述实验资源池部署于服务器。
在一种可能的实现方式中,所述编程教育实验方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。
在一种可能的实现方式中,在步骤S11中,可通过用户终端的浏览器窗口,获取用于完成实验的代码集合。其中,用户终端获取的代码集合,可以包括用户终端自带的代码编辑窗口获取到用户编辑的代码,也可以包括用户终端接收到与其连接的代码编辑设备传输的代码,本公开对代码集合的代码来源不作限制。
在一种可能的实现方式中,代码集合中至少包括一套代码,即至少包括实验使用者(例如学生)提交的用户代码。其中,代码集合包括的代码可以包括C语言代码、C++语言代码、Python代码(由荷兰数学和计算机科学研究学会的吉多·范罗苏姆设计)、Java代码(由美国甲骨文公司推出),本公开对代码的语言类型不作限制。
例如,针对轻量级的人工智能实验A(例如包括基于阈值的图像分割实验),不仅实验过程比较简单,而且其对应的运行环境配置也比较简单,部署于用户终端的软件框架可直接提供运行人工智能实验A需要的环境配置。在这种情况下,用于完成实验的代码集合,可以只包括实验使用者提交的用户代码。
或者,针对重量级的人工智能实验B(例如包括神经网络训练实验),不仅实验过程比较复杂,而且其对应的运行环境配置也比较复杂,甚至需要远端服务器进行资源的支持。在这种情况下,实验制作者(例如老师)可利用提交的代码支持实验使用者完成人工智能实验B。用于完成人工智能实验B的代码集合,不仅包括实验使用者提交的用户代码,还可包括实验制作者提交的初始化代码、审批代码、重置代码中的至少一套代码。其中,初始化代码可支持人工智能实验B的初始化,提供人工智能实验B需要的运行环境配置;审批代码可用于评价实验制作者提交的用户代码,提供关于人工智能实验B完成情况的反馈信息至实验使用者,重置代码可用于对人工智能实验B的部分内容进行调整,形成新的实验。
在一种可能的实现方式中,在步骤S12中,可通过部署于所述用户终端的软件框架,执行至少包括用户代码的代码集合,得到实验结果。其中,软件框架用于为用户(即实验制作者和实验使用者)的编程教育实验提供基础的结构和软件组件规范,用户在编写代码的过程中,可利用软件框架包括的各类编程算法和组件,完成实验代码的编写。进一步,基于软件框架执行代码集合中每一套代码的过程中,可调用软件框架中包括的各类编程算法和组件,得到实验结果。
应当理解,用户终端的软件框架可以与用户终端自身的推理引擎结合,进一步降低本公开方法的资源成本。例如,用户终端在使用本软件框架之前,用户终端自身已经部署了一种或多种推理引擎,例如包括基于相关技术的神经网络推理引擎,可用于部署深度学习模型,可包括了多种基于深度学习的图像分割、目标识别、文本识别等算法库,用户终端的软件框架可通过软件接口调用所属的推理引擎的算法库,从而结合用户终端自身推理引擎的资源,进一步降 低资源成本。
在一种可能的实现方式中,软件框架可包括核心运算库和实验组件库。
核心算法库可包括机器学习算法、神经网络算法、目标识别算法等多类算法,本公开对核心算法库包括的算法数量和类型不作限制。核心算法库可用于支持编程教育实验中相关算法的执行,例如,针对遗传算法进行目标识别的实验,该实验可以通过简单的几行代码(或通过交互的方式操作用户界面中遗传算法对应的图标)直接调用核心算法库中的遗传算法,无需为该算法开发对应的代码。通过调用核心算法库中的遗传算法,有助于提高编程教育实验的效率。
实验组件库是将实验所需部分数据和/或函数代码进行封装后得到的组件集合,可用于减少用户直接从底层开始编写编程教育实验代码的模式,将复杂的代码逻辑组件化,提高编程实验的效率。无论是针对实验制作者(例如用户为老师)进行编程教育实验制作的场景,还是针对实验使用者(例如用户为学生)进行编程教育实验学习的场景,用户可根据编程教育实验需求,从实验组件库中选择多个组件,通过积木式的实验组件拼接或结合方法,将选择的多个实验组件进行拼接或结合,完成编程教育实验的制作。
其中,所述实验组件库包括模型加载子库、模型迁移子库、端口处理子库。
所述模型加载子库用于加载部署于服务器的所述实验资源池,所述实验资源池用于为编程教育实验提供资源,例如可包括卷积神经网络(Convolutional Neural Networks,CNN)、循环神经网络(Recurrent Neural Network,RNN)、对抗神经网络(Generative Adversarial Nets,GAN)等模型文件,可用于构成训练集(Train Set)、验证集(Validation Set)、和测试集(Test Set)的各种图像、文本、音频等样本数据,实验资源池内的资源可进行维护和更新,本公开对实验资源池包括的具体资源不作限制。
所述模型迁移子库用于神经网络模型的迁移,例如,针对图像分割任务A和图像分割任务B差别比较小的场景,在图像分割任务A的神经网络模型已经训练好,而图像分割任务B的神经网络模型还未训练的情况下,可基于模型迁移子库,对图像分割任务A的神经网络模型进行迁移处理,也即在图像分割任务A的神经网络模型基础上,进行网络模型结构或网络模型权重的微调,得到适用于图像分割任务B的神经网络模型;或者,还可以直接将图像分割任务A的神经网络模型作为图像分割任务B的神经网络模型。
所述端口处理子库用于代码的封装,可根据不同的实验框架进行封装,得到封装后的多个功能模块。例如,假设编程教育实验F的代码集合包括初始化代码、用户代码、审批代码,该编程教育实验F的实验框架可以是用于指示代码集合内容的文件目录,可根据该文件目录,对包括初始化代码、用户代码、审批代码的编程教育实验F进行封装,封装后的编程教育实验F可包括:初始化代码封装模块、用户代码封装模块、审批代码封装模块。在这种情况下,如果另一编程教育实验E和编程教育实验F的初始化过程是一样的,可以直接调用编程教育实验F的初始化代码封装模块。而且,在本公开的实施例中,可支持图像、视频流、语音、文本等多媒体交互形式调用端口处理子库,本公开对此不作限制。
通过实验组件库,不仅有利于加载服务器的实验资源池,而且可以提供高效可靠的多类实验组件支持编程教育实验的调用,例如可以支持计算机视觉、语音识别、自然语言处理等编程教育实验制作,有利于提高编程教育实验的效率。
下面分别针对代码集合为一套或多套的场景,对步骤S12基于上述软件框 架执行代码集合的过程进行说明。
假设待处理的编程教育实验为轻量级的人工智能实验A,获取的代码集合只包括实验使用者提交的用户代码的情况下。可以不使用远端服务器的实验资源池,根据用户终端的自身资源就可以满足人工智能实验A的需求。可基于用户终端的软件框架,直接执行用户代码,得到人工智能实验A的实验结果,并在用户终端向提交用户代码的实验使用者展示该实验结果;或者,还可基于用户终端的软件框架,利用用户终端的浏览器窗口的交互界面,引导实验使用者分多次输入代码段,然后执行实验使用者输入的多个代码段构成的用户代码,得到人工智能实验A的实验结果,并在交互界面中向实验使用者展示该实验结果。
假设待处理的编程教育实验为重量级的人工智能实验B,在获取的代码集合不仅包括实验使用者提交的用户代码,还可以包括实验制作者提交的初始化代码的情况下,可基于用户终端软件框架,先执行初始化代码,根据初始化代码的指示对人工智能实验B进行初始化,为人工智能实验B提供所需的实验资源,其中,所提供的实验资源,可以是用户终端自身的资源,也可以是从设置在远端服务器的实验资源池加载的实验资源。在实验资源可满足人工智能实验B的需求的情况下,用户终端可执行关于人工智能实验B的用户代码,得到人工智能实验B的实验结果。
假设待处理的编程教育实验为重量级的人工智能实验C,在获取的代码集合不仅包括实验使用者提交的用户代码,还可以包括实验制作者提交的初始化代码、审批代码、重置代码等多套代码的情况下。可基于用户终端软件框架,根据用户终端自身的资源,以及设置在远端服务器的实验资源池,支持多套代码进行不同步骤的资源加载。在资源加载后可满足人工智能实验C的需求,用户终端可分别执行关于人工智能实验C的多套代码,得到人工智能实验C的实验结果。
其中,可利用软件框架包括的实验组件库,加载远端服务器的实验资源池,例如,可使用实验组件库中的接口从远端服务器获取模型文件等大型文件。
通过这种方式,对比相关技术中依赖后端(服务器)运算,前端(用户终端)显示的前后割裂方式,不利于编程教育实验的迁移与结合,而且编程教育实验需要依赖特定的环境,例如基于大规模神经网络的人脸识别实验,需要依赖基于图形处理器(Graphics Processing Unit,GPU)的服务器环境。本公开的实施例,可利用软件框架包括的实验组件库加载部署在服务器的实验资源池,有利于实现软件框架的热更新;并且在加载资源后,不依赖后端(服务器)的运算,通过用户终端的软件框架,执行所获取的代码集合,得到实验结果,有利于编程教育实验的迁移与融合,更加灵活易用,提升编程教育实验的制作能效,而且可以保证编程教育实验分享到其他用户终端后可以无差别地使用及运行,无需安装其他环境或软件,有利于降低编程教育实验的实施成本,提高编程教育实验的稳定性。
下面对本公开实施例的编程教育实验方法进行展开说明。
图2示出根据本公开实施例的编程教育实验方法的示意图。如图2所示,用于完成编程教育实验的代码集合可包括四套代码,即初始化代码、用户代码、审批代码、重置代码。应当理解,图2仅以四套代码为例,本公开对代码集合中代码的具体套数不作限制。
在步骤S11中,用户(实验使用者和实验制作者)可通过用户终端的浏览器窗口的交互界面,提交用于完成实验的实验代码。例如,实验制作者可通过 用户终端的浏览器窗口的交互界面,提交用于对编程教育实验进行初始化的初始化代码、用于对实验使用者提交的用户代码进行评价的审批代码,以及用于对编程教育实验重新设置的重置代码;实验使用者可通过用户终端的浏览器窗口的交互界面,提交针对编程教育实验的用户代码。这样,用户终端可通过浏览器窗口获取用于完成编程教育实验的代码集合。
在步骤S11获取了用于完成编程教育实验的代码集合,可在步骤S12中,通过部署于用户终端的软件框架执行该代码集合,得到实验结果。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的初始化代码,通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果,包括:
步骤S121,执行所述初始化代码,完成所述实验的初始化;
举例来说,假设编程教育实验是由实验制作者为实验使用者定制的人工智能实验,实验使用者可进入用户终端浏览器窗口编程教育实验的界面,浏览器在加载编程教育实验的过程中,可能会出现一段等待时间。该等待时间内,可以通过部署于用户终端的软件框架,执行实验制作者所提交的针对该编程教育实验的初始化代码,完成初始化流程。
实验的初始化就是在实验使用者进行编程教育实验之前,为了使实验使用者可顺利地完成当前的编程教育实验,所进行的各项准备工作。其中,通过执行实验制作者提供的初始化代码,可根据初始化代码的内容,完成各种准备工作。
初始化代码的内容可包括实验资源初始化部分,用于为当前编程教育实验提供实验资源,例如,根据初始化代码,在用户终端自身资源无法满足编程教育实验资源需求的情况下,可以从服务器实验资源池加载需要的实验资源;
初始化代码的内容也可以包括实验工具初始化部分,用于为当前编程教育实验提供实验工具,例如针对神经网络模型的训练实验,可提供批训练工具;
初始化的内容还可以包括实验交互初始化部分,用于为当前编程教育实验提供各种交互方式,例如实验制作者可通过初始化代码,指示某一图标可通过拖拽的交互方式加载代码,使实验使用者在编程教育实验的过程中,可通过在界面中拖拽该图标的交互方式,加载对应该图标的代码。
应当理解,实验制作者可根据预期的实验效果,定制初始化代码的内容,本公开对初始化代码的具体内容,不作限制。
可见,在本公开的实施例中,在实验使用者进行编程教育实验之前,能够通过执行初始化代码,为该编程教育实验准备好实验资源和实验环境,降低实验使用者在进行实验的过程中由于缺少实验资源或实验环境带来的不稳定。其中,在编程教育实验初始化过程中,可以在用户终端自身的资源无法满足该编程教育实验的情况下,才从服务器的实验资源池加载需要的实验资源,有利于最大效率地利用用户终端自身的资源。
而且,由于不同的用户终端可对应不同的操作系统,本公开实施例的软件框架可以利用浏览器,在不需要适配不同操作系统的情况下,就可以在浏览器窗口的交互界面直接提交并执行代码,有利于提高环境的稳定性。在一种可能的实现方式中,执行所述初始化代码,完成所述实验的初始化,包括:
根据所述初始化代码,利用所述实验组件库的接口,获取实验资源池;
和/或,根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装;
和/或,根据所述初始化代码,完成所述用户终端交互的初始化。
举例来说,假设编程教育实验是由实验制作者为实验使用者定制的人工智能实验,例如,卷积神经网络(Convolutional Neural Networks,CNN)的训练实验。针对该CNN模型的训练实验,实验的目的是为了使实验使用者学会模型的训练,教学重点是在训练过程,而不是构建CNN模型过程。因此,实验制作者可提交初始化代码,用于在该实验的初始化过程,直接为实验使用者构建好CNN模型,使实验使用者不用花费大量时间在CNN模型的构建,直接进行CNN模型的训练阶段。
所以,在编程教育实验的初始化阶段,可根据实验制作者提交的初始化代码的指示,借助实验组件库包括的模型加载子库中的接口,从远端服务器读取模型文件等大型文件,例如针对CNN模型的训练实验,可以利用模型加载子库中CNN模型的加载接口,从服务器加载CNN模型,获取服务器实验资源池包括的CNN模型资源。
通过实验组件库的接口,可以在编程教育实验的初始化过程中,从服务器的实验资源池中获取所需的各种资源,提高编程教育实验的效率。
在编程教育实验的初始化阶段,实验制作者提交的初始化代码,还可以利用实验组件库和/或核心运算库进行实验所需工具的预封装,使实验使用者在编写用户代码的过程中,可以直接调用封装的实验工具,增加用户代码易用性。例如,针对CNN模型的训练实验,实验制作者为使实验使用者体会批训练的训练方式对训练效果的影响,可以通过初始化代码,利用软件接口调用核心运算库和/或实验组件库中,同批训练(一种神经网络的训练方式)相关的库文件或库函数,将批训练的训练方式封装成批训练实验工具,使实验使用者在进行CNN模型训练实验的过程中,可以直接调用封装好的批训练实验工具,增加用户代码易用性。
其中,实验组件库的层级可高于核心运算库,也即实验组件库依赖核心运算库。为了提高代码效率,可以优先使用实验组件库实现实验工具的封装,如果在基于实验组件库无法实现实验工具封装的情况下,再基于核心运算库实现实验工具的封装。因此,实验工具的封装可以是基于核心运算库实现的,可以是基于实验组件库实现的,还可以是基于核心运算库以及实验组件库实现的,本公开对此不作限制。
在编程教育实验的初始化阶段,可以使用缺省状态下用户终端的浏览器交互界面,也可以根据初始化代码的指示,对浏览器上的交互进行重写。例如,针对CNN模型的训练实验,如果缺省状态下的交互界面没有CNN模型的图标,不能通过鼠标拖动CNN模型图标的交互方式进行CNN模型的构建。实验制作者可以通过提交初始化代码对交互方式进行重写,也即该初始化代码可以在交互界面上增加代表CNN模型的图标,使实验使用者通过拖拽该图标的交互方式,就可以实现CNN模型的构建。
其中,为了提高编程教育平台的安全性和稳定性,在用户终端浏览器的交互界面中,同编程教育平台安全性和稳定性相关的交互是不能重写的。例如,在浏览器的交互界面中,与主框架(例如主界面框架)、主流程、身份认证等相关的交互,会较大影响编程教育平台的安全性和稳定性,是不能重写的。对于分支框架上内容的增减(例如在交互界面的模型库中增加一个模型),以及分支流程中流程节点的增删,是可以重写的。可以设置实验组件库的权限来限制交互界面的重写权限,可以重写实验组件库包括的文件中拥有开放权限的部分。
通过这种方式,基于软件框架的核心运算库和实验组件库,执行初始化代码完成编程教育实验的初始化,有利于为各种编程教育实验提供需要的资源和 环境,而且根据教学目标,实验制作者可基于核心运算库和实验组件库,灵活高效地设计实验工具和实验交互过程,有利于提升教育实验制作能效。
步骤S122,执行所述用户代码,得到实验结果。
初始化阶段之后,可进入用户代码执行阶段,用户终端可执行实验使用者提交的用户代码,该用户代码可调用初始化代码及实验组件库中所封装的接口能力。其中,软件框架包括的核心运算库和实验组件库,可以设计成实验组件库依赖核心运算库,在这种情况下,可以对实验使用者屏蔽更底层的核心运算库,使实验使用者无需关注核心运算库,通过调用实验组件库间接的调用核心运算库,可提高用户代码的编码效率和执行效率。
通过这种方法,在执行用户代码之前,可以先执行初始化代码,以提供用户代码需要的资源和环境,有利于提高编程教育实验的稳定性和实验效率。
在一种可能的实现方式中,根据所述实验使用者提交的用户代码,确定其他实验的所述初始化代码。
举例来说,无论是实验使用者提交的用户代码,还是实验制作者提交的初始化代码,都是基于相同的库,即软件框架的核心运算库和实验组件库。因此,为了提高代码利用率,减少用户(例如实验制作者)的工作量,可以将实验使用者提交的用户代码或用户代码包括的部分代码段,确定为其他实验的初始化代码或初始化代码的部分代码段。例如,假设编程教育实验A为卷积神经网络实验,编程教育实验A的实验使用者提交的用户代码用于实现该卷积神经网络。针对编程教育实验B,实验制作者设计了一个卷积神经网络和循环神经网络的对比实验,需要在初始化阶段提供卷积神经网络和循环神经网络。编程教育实验B的实验制作者,在用户终端中搜索到编程教育实验A的用户代码的情况下,可以将该用户代码作为初始化代码的一部分。
并且,迁移后的编程教育实验,可以支持与已有的普通编程教育实验、浏览器端口可视化工具、H5(HTML5,构建网页内容的一种语言描述方式)渲染工具、教育游戏直接结合。例如,实验制作者如果想在编程教育实验中增加H5动画引导实验使用者,可以在编程教育实验的初始化代码中,通过软件接口调用H5渲染工具,本公开对具体的结合方法不作限制。由于迁移前后的编程教育实验均可以在用户终端执行,在上述结合过程中不引发环境冲突。
通过这种方式,有利于编程教育实验的迁移与融合,提高编程教育实验的效率。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的审批代码,在所述执行所述用户代码,得到实验结果之后,所述方法还包括:步骤S123,执行所述审批代码,得到所述用户代码的审批结果。
举例来说,用户代码执行阶段之后,可以进入审批代码执行阶段。在执行实验制作者提交的审批代码的过程中,同样可以调用初始化代码及实验组件库,高效利用了已存在的代码和库文件,有利于减少审批代码的编码工作量,进一步可以减少因审批代码中存在错误而多次执行的情况,提高了审批代码的执行效率。通过审批代码的执行,可以对用户代码进行审批,得到审批结果,该审批结果可包括用户代码的时间复杂度、用户代码的空间复杂度、实验结果(即用户代码的运行结果)的性能等。其中,时间复杂度用于确定用户代码所需的运行时间,空间复杂度用于确定用户代码所占用的内存,实验结果的性能可代表实验结果的准确性等性能。
通过这种方式,执行审批代码得到用户代码的审批结果,有利于实验使用者及实验制作者高效地获取实验效果。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的重置代码,所述方法还包括:步骤S124,根据所述重置代码,刷新所述代码集合中需要调整的代码,得到重置结果。
举例来说,审批代码执行阶段之后,可进入重置代码执行阶段。在实际的应用场景中,为了节省用户终端的存储空间与运行时间,实验制作者可以根据教学情况,通过提交的重置代码,指示是否刷新代码集合中需要调整的代码。其中,重置代码中可以通过软件接口调用实验组件库中模型迁移子库,对代码集合中的代码进行调整。重置代码可以对代码集合中的部分代码做调整,也可以对代码集合中的全部代码做调整,本公开对此不作限制。
例如针对编程教育实验的再次运行的场景,为了节省时间和空间,可支持用户选择是否重新全部加载。如果想满足编程教育实验中部分存储重写,同时保留其他已加载部分,可通过重置代码对编程教育实验的内容进行再次调用或重写。
通过这种方式,有利于对用户终端存储的编程教育实验进行微调,形成新的编程教育实验,而且,针对重置后再次运行的编程教育实验,可以仅对调整的代码部分进行重新加载,无需对未调整的代码进行重建加载,有利于节省用户资源,提高编程教育实验的部署和交付效率。
图3示出根据本公开实施例的编程教育实验方法的示意图。如图3所示,用于完成编程教育实验的代码集合可包括两套代码,即初始化代码和用户代码。通过部署于用户终端的软件框架,执行初始化代码和用户代码的过程,并且在初始化过程中,可利用软件库框架的实验组件库,通过使用组件库包括的软件接口,加载服务器的资源。图3示意的编程教育实验方法,可以参考上文中的步骤S121~S122,此处不再赘叙。
其中,在如图3所示的编程教育实验结束后(步骤S122),可继续重新执行初始化代码(步骤S121),重新加载编程教育实验所需资源,便于教育使用者重复实验,提高实验的熟练度。
应当理解,图2或图3示意的本公开实施例的编程教育实验方法,对用户代码集合中包括的代码数量不作限制,并且可以在实验的过程中,根据实验需求可以支持多套代码进行不同步骤的资源加载及对任一代码进行简单快速的重写,有利于满足实验的多变性,本公开对此也不作限制。
综上可知,用户终端基于软件框架可加载部署于远端服务器实验资源池的资源,对代码集合进行执行,有利于提升编程教育实验的迁移性,使得客户端既可以远程更新,又能支持不同的平台以及设备,降低运维成本。其中,将软件框架与实验资源池分别放置的用户终端和远端服务器,双边进行隔离,可提升编程教育实验稳定性的同时提升实验运行速度。并且,软件框架包括的核心算法库和实验组件库,有利于增强实现编程教育实验所需的技术支持,可更加方便技术内核的升级迭代。
例如,假设用户A(实验制作者)需要制作简单易用带有交互界面的人工智能实验交付大量学生客户(实验使用者),但考虑到学生客户的预算较少,无法采购大量服务器资源,用户A人手不足,无法支持每个学生设备单独部署的情况。并且,用户A希望可以将学生课堂完成的内容直接迁移出来,成为新的编程教育实验,用户A可以采用本公开实施例提供的编程教育实验方法以低成本方式实现并部署交付人工智能实验平台。
可见,在本公开实施例中,可利用软件框架包括的实验组件库加载部署在服务器的实验资源池,有利于实现软件框架的热更新;并且在加载资源后,不 依赖后端(服务器)的运算,通过用户终端的软件框架,执行所获取的代码集合得到实验结果,不仅有利于编程教育实验的迁移与融合,更加灵活易用,提升编程教育实验的制作能效,而且可以保证编程教育实验分享到其他用户终端后可以无差别地使用及运行,无需安装其他环境或软件,有利于降低编程教育实验的实施成本,提高编程教育实验的稳定性,便于管理。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开还提供了编程教育实验装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种编程教育实验方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图4示出根据本公开实施例的编程教育实验装置的框图,如图4所示,所述装置包括:
获取模块41,用于获取用于完成实验的代码集合,所述代码集合包括至少一套代码,所述至少一套代码包括实验使用者提交的用户代码;
执行模块42,用于通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果;
其中,所述软件框架包括核心运算库和实验组件库,所述实验组件库包括用于加载实验资源池的接口,所述实验资源池部署于服务器。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的初始化代码,所述执行模块42,包括:第一子模块,用于执行所述初始化代码,完成所述实验的初始化;第二子模块,用于执行所述用户代码,得到实验结果。
在一种可能的实现方式中,第一子模块,用于:根据所述初始化代码,利用所述实验组件库的接口,获取实验资源池;和/或,根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装;和/或,根据所述初始化代码,完成所述用户终端交互的初始化。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的审批代码,所述装置还包括第三子模块,用于:在所述执行所述用户代码,得到实验结果之后,执行所述审批代码,得到所述用户代码的审批结果。
在一种可能的实现方式中,所述至少一套代码还包括实验制作者提交的重置代码,所述装置还包括第四子模块,用于:根据所述重置代码,刷新所述代码集合中需要调整的代码,得到重置结果。
在一种可能的实现方式中,所述装置包括第五子模块,用于:根据所述实验使用者提交的用户代码,确定其他实验的所述初始化代码。
在一种可能的实现方式中,所述实验组件库包括模型加载子库、模型迁移子库、端口处理子库,所述模型加载子库用于加载部署于服务器的所述实验资源池,所述模型迁移子库用于神经网络模型的迁移,所述端口处理子库用于代码的封装。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图5示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图5,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口 模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(CMOS)或电荷耦合装置(CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(Wi-Fi)、第二代移动通信技术(2G)、第三代移动通信技术(3G)、第四代移动通信技术(4G)、通用移动通信技术的长期演进(LTE)、第五代移动通信技术(5G)或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图6示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图6,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows ServerTM),苹果公司推出的基于图形用户界面操作系统(Mac OS XTM),多用户多进程的计算机操作系统(UnixTM),自由和开放原代码的类Unix操作系统(LinuxTM),开放原代码的类Unix操作系统(FreeBSDTM)或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括 计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一 系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (24)

  1. 一种编程教育实验方法,其特征在于,所述方法应用于用户终端,所述方法包括:
    获取用于完成实验的代码集合,所述代码集合包括至少一套代码,所述至少一套代码包括实验使用者提交的用户代码;
    通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果;
    其中,所述软件框架包括核心运算库和实验组件库,所述实验组件库包括用于加载实验资源池的接口,所述实验资源池部署于服务器。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一套代码还包括实验制作者提交的初始化代码,
    通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果,包括:
    执行所述初始化代码,完成所述实验的初始化;
    执行所述用户代码,得到实验结果。
  3. 根据权利要求2所述的方法,其特征在于,执行所述初始化代码,完成所述实验的初始化,包括:
    根据所述初始化代码,利用所述实验组件库的接口,获取实验资源池;
    和/或,根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装;
    和/或,根据所述初始化代码,完成所述用户终端交互的初始化。
  4. 根据权利要求3所述的方法,其特征在于,所述实验组件库的层级高于所述核心运算库的层级,所述根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装,包括:
    优先使用所述实验组件库进行所述实验工具的封装;
    响应于基于所述实验组件库无法对所述实验工具进行封装,使用所述核心运算库进行所述实验工具的封装。
  5. 根据权利要求3所述的方法,其特征在于,所述根据所述初始化代码,完成所述用户终端交互的初始化,包括:
    基于所述初始化代码,对所述用户终端的浏览器上具备重写权限的交互进行重写,所述浏览器包括用于进行交互操作的交互界面。
  6. 根据权利要求2或3所述的方法,其特征在于,所述至少一套代码还包括实验制作者提交的审批代码,
    在所述执行所述用户代码,得到实验结果之后,所述方法还包括:
    执行所述审批代码,得到所述用户代码的审批结果。
  7. 根据权利要求6所述的方法,其特征在于,所述审批结果包括用户代码的时间复杂度、用户代码的空间复杂度以及所述实验结果的性能中的一者或多者,所述时间复杂度用于确定所述用户代码所需的运行时间,所述空间复杂度用于确定用户代码所占用的内存,所述实验结果的性能包括实验结果的准确性。
  8. 根据权利要求1所述的方法,其特征在于,所述至少一套代码还包括实验制作者提交的重置代码,
    所述方法还包括:
    根据所述重置代码,刷新所述代码集合中需要调整的代码,得到重置结果。
  9. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    根据所述实验使用者提交的用户代码,确定其他实验的所述初始化代码。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述实验组件库包括模型加载子库、模型迁移子库、端口处理子库,所述模型加载子库用于加载部署于服务器的所述实验资源池,所述模型迁移子库用于神经网络模型的迁移,所述端口处理子库用于代码的封装。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述获取用于完成实验的代码集合,包括:
    基于所述用户终端的浏览器的交互界面,接收用户提交的用于完成实验的代码集合。
  12. 一种编程教育实验装置,其特征在于,应用于用户终端,包括:
    获取模块,用于获取用于完成实验的代码集合,所述代码集合包括至少一套代码,所述至少一套代码包括实验使用者提交的用户代码;
    执行模块,用于通过部署于所述用户终端的软件框架,执行所述代码集合,得到实验结果;
    其中,所述软件框架包括核心运算库和实验组件库,所述实验组件库包括用于加载实验资源池的接口,所述实验资源池部署于服务器。
  13. 根据权利要求12所述的装置,其特征在于,所述至少一套代码还包括实验制作者提交的初始化代码,所述执行模块包括:
    第一子模块,用于执行所述初始化代码,完成所述实验的初始化;
    第二子模块,用于执行所述用户代码,得到实验结果。
  14. 根据权利要求13所述的装置,其特征在于,所述第一子模块执行所述初始化代码,完成所述实验的初始化的方式包括:
    根据所述初始化代码,利用所述实验组件库的接口,获取实验资源池;
    和/或,根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装;
    和/或,根据所述初始化代码,完成所述用户终端交互的初始化。
  15. 根据权利要求14所述的装置,其特征在于,所述实验组件库的层级高于所述核心运算库的层级,所述第一子模块根据所述初始化代码,基于所述核心运算库和/或所述实验组件库进行实验工具的封装的方式,包括:
    优先使用所述实验组件库进行所述实验工具的封装;
    响应于基于所述实验组件库无法对所述实验工具进行封装,使用所述核心运算库进行所述实验工具的封装。
  16. 根据权利要求14所述的装置,其特征在于,所述第一子模块,用于根据所述初始化代码,完成所述用户终端交互的初始化的方式,包括:
    基于所述初始化代码,对所述用户终端的浏览器上具备重写权限的交互进 行重写,所述浏览器包括用于进行交互操作的交互界面。
  17. 根据权利要求13或14所述的装置,其特征在于,所述至少一套代码还包括实验制作者提交的审批代码,
    所述装置包括第三子模块,所述第三子模块用于:
    执行所述审批代码,得到所述用户代码的审批结果。
  18. 根据权利要求17所述的装置,其特征在于,所述审批结果包括用户代码的时间复杂度、用户代码的空间复杂度以及所述实验结果的性能中的一者或多者,所述时间复杂度用于确定所述用户代码所需的运行时间,所述空间复杂度用于确定用户代码所占用的内存,所述实验结果的性能包括实验结果的准确性。
  19. 根据权利要求12所述的装置,其特征在于,所述至少一套代码还包括实验制作者提交的重置代码,
    所述装置包括第四子模块,所述第四子模块用于:
    根据所述重置代码,刷新所述代码集合中需要调整的代码,得到重置结果。
  20. 根据权利要求13所述的装置,其特征在于,所述装置包括第五子模块,所述第五子模块用于:
    根据所述实验使用者提交的用户代码,确定其他实验的所述初始化代码。
  21. 根据权利要求12-20中任一项所述的装置,其特征在于,所述实验组件库包括模型加载子库、模型迁移子库、端口处理子库,所述模型加载子库用于加载部署于服务器的所述实验资源池,所述模型迁移子库用于神经网络模型的迁移,所述端口处理子库用于代码的封装。
  22. 根据权利要求12-21任一项所述的装置,其特征在于,所述获取模块获取用于完成实验的代码集合的方式,包括:
    基于所述用户终端的浏览器的交互界面,接收用户提交的用于完成实验的代码集合。
  23. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。
  24. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。
PCT/CN2022/086703 2021-10-29 2022-04-13 编程教育实验方法及装置、电子设备和存储介质 WO2023071067A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111271437.5A CN114020369A (zh) 2021-10-29 2021-10-29 编程教育实验方法及装置、电子设备和存储介质
CN202111271437.5 2021-10-29

Publications (1)

Publication Number Publication Date
WO2023071067A1 true WO2023071067A1 (zh) 2023-05-04

Family

ID=80058715

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/086703 WO2023071067A1 (zh) 2021-10-29 2022-04-13 编程教育实验方法及装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN114020369A (zh)
WO (1) WO2023071067A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020369A (zh) * 2021-10-29 2022-02-08 上海商汤科技开发有限公司 编程教育实验方法及装置、电子设备和存储介质
CN116029526B (zh) * 2023-02-03 2024-03-12 北京联合伟世科技股份有限公司 一种实验资源的调度方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007225726A (ja) * 2006-02-21 2007-09-06 Teikyo Univ プログラミング学習支援システムおよびプログラミング学習支援方法
CN112002162A (zh) * 2020-09-02 2020-11-27 上海上益教育设备制造有限公司 在线教育开放课程平台系统
CN112463138A (zh) * 2020-11-18 2021-03-09 华南师范大学 一种软硬件结合的人工智能教育学习系统
CN113032047A (zh) * 2021-03-29 2021-06-25 京东方科技集团股份有限公司 人脸识别系统应用方法、电子设备及存储介质
CN113450627A (zh) * 2021-06-25 2021-09-28 上海商汤临港智能科技有限公司 实验项目运行方法及装置、电子设备和存储介质
CN114020369A (zh) * 2021-10-29 2022-02-08 上海商汤科技开发有限公司 编程教育实验方法及装置、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007225726A (ja) * 2006-02-21 2007-09-06 Teikyo Univ プログラミング学習支援システムおよびプログラミング学習支援方法
CN112002162A (zh) * 2020-09-02 2020-11-27 上海上益教育设备制造有限公司 在线教育开放课程平台系统
CN112463138A (zh) * 2020-11-18 2021-03-09 华南师范大学 一种软硬件结合的人工智能教育学习系统
CN113032047A (zh) * 2021-03-29 2021-06-25 京东方科技集团股份有限公司 人脸识别系统应用方法、电子设备及存储介质
CN113450627A (zh) * 2021-06-25 2021-09-28 上海商汤临港智能科技有限公司 实验项目运行方法及装置、电子设备和存储介质
CN114020369A (zh) * 2021-10-29 2022-02-08 上海商汤科技开发有限公司 编程教育实验方法及装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN114020369A (zh) 2022-02-08

Similar Documents

Publication Publication Date Title
WO2023071067A1 (zh) 编程教育实验方法及装置、电子设备和存储介质
CN110378820B (zh) 教学系统及方法、电子设备和存储介质
US20240184438A1 (en) Interactive content generation method and apparatus, and storage medium and electronic device
KR102614263B1 (ko) 인터랙션 방법 및 장치, 전자 디바이스 및 컴퓨터 판독 가능 저장 매체
CN111459586B (zh) 远程协助方法、装置、存储介质及终端
CN107408052A (zh) 共享对象层级上的二进制转换
US20200312299A1 (en) Method and system for semantic intelligent task learning and adaptive execution
Walter et al. Learning MIT app inventor: A hands-on guide to building your own android apps
CN109074218B (zh) 文档内容重放
CN112218130A (zh) 互动视频的控制方法、装置、存储介质以及终端
CN104063424B (zh) 网页图片的展现方法和展现装置
CN111726685A (zh) 视频处理方法、装置、电子设备和介质
WO2024037557A1 (zh) 特效道具处理方法、装置、电子设备及存储介质
WO2023279699A1 (zh) 实验生成方法及装置、电子设备、存储介质和程序
Quinn Mobile learning
Nafasov et al. Technology of creating educational mobile applications
CN113378893B (zh) 数据管理方法及装置、电子设备和存储介质
Tillmann et al. Engage your students by teaching computer science using only mobile devices with touchDevelop
US20210035468A1 (en) Interactive device-based teaching of language
US20200151241A1 (en) Webpage component replication system and method
CN110853643A (zh) 快应用中进行语音识别的方法、装置、设备及存储介质
Boyer Android 9 Development Cookbook: Over 100 recipes and solutions to solve the most common problems faced by Android developers
US20230196935A1 (en) Systems and methods for managing experiential course content
Dang et al. Teaching mobile app development: Choosing the best development tools in practical labs
CN116916092A (zh) 视频处理方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22884983

Country of ref document: EP

Kind code of ref document: A1