[go: up one dir, main page]

CN112650500A - Automatic compiling method and device adopting jupyter - Google Patents

Automatic compiling method and device adopting jupyter Download PDF

Info

Publication number
CN112650500A
CN112650500A CN202011622905.4A CN202011622905A CN112650500A CN 112650500 A CN112650500 A CN 112650500A CN 202011622905 A CN202011622905 A CN 202011622905A CN 112650500 A CN112650500 A CN 112650500A
Authority
CN
China
Prior art keywords
compiling
program
terminal
processed
environment
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011622905.4A
Other languages
Chinese (zh)
Inventor
王强
方志
兰亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202011622905.4A priority Critical patent/CN112650500A/en
Publication of CN112650500A publication Critical patent/CN112650500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例公开了一种采用jupyter的自动编译方法,该方法包括:响应于编译请求,确定所述待处理程序的类型;基于所述待处理程序的类型,确定所述待处理程序对应的目标编译环境;根据所述目标编译环境,从预设的云编译系统中确定用于执行编译任务的第一编译终端;所述目标终端中包含所述目标编译环境;将所述待处理程序发送给所述第一编译终端。由此,通过识别程序的类型,并确定出与程序的类型相对应的目标编译环境,实现自动匹配编译环境,进而能够满足用户对不同编译环境的需求。

Figure 202011622905

The embodiment of the present invention discloses an automatic compilation method using jupyter, the method includes: in response to a compilation request, determining the type of the program to be processed; based on the type of the program to be processed, determining the corresponding a target compiling environment; according to the target compiling environment, determine a first compiling terminal for executing the compiling task from a preset cloud compiling system; the target terminal includes the target compiling environment; sending the program to be processed Give the first compile terminal. Therefore, by identifying the type of the program and determining the target compilation environment corresponding to the type of the program, the compilation environment can be automatically matched, and the user's requirements for different compilation environments can be satisfied.

Figure 202011622905

Description

Automatic compiling method and device adopting jupyter
Technical Field
The invention relates to the field of compiling, in particular to an automatic compiling method and device adopting jupyter.
Background
For applications of computer languages, most difficult is the compiling process of programs, and currently, many compiling platforms exist, but each compiling platform can only realize compiling of a single language, such as jupyter, is mainly applied to compiling of programs of python, and does not support compiling of programs such as windows, apk and the like. In the practical application process, a single compiling environment cannot meet the requirements of users, and therefore a compiling platform suitable for different programs is urgently needed.
Disclosure of Invention
In view of the above, the present invention discloses an automatic compiling method using jupyter, which realizes automatic matching of compiling environments, and further can meet the requirements of users for different compiling environments.
In a first aspect:
the embodiment of the invention discloses an automatic compiling method adopting jupyter, which is applied to a central server and comprises the following steps:
receiving a program to be processed sent by a user terminal;
responding to a compiling request, and determining the type of the program to be processed;
determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed;
determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the first compiling terminal comprises the target compiling environment;
sending the program to be processed to the first compiling terminal; the program to be processed is basic information of a compiling task executed by the first compiling terminal through an installed compiling environment;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compilation environment contains at least jupyter.
Optionally, the method further includes:
detecting whether a specified compiling environment is received;
and in the case of containing a specified compiling environment, taking the specified compiling environment as a target compiling environment.
Optionally, the determining, according to the target compiling environment, a target terminal for executing a compiling task from a preset cloud compiling system includes:
screening out a terminal containing a target compiling environment from the preset cloud compiling system;
screening out idle terminals from the terminals containing the target compiling environment;
acquiring an idle time period of an idle terminal;
predicting the compiling time length of the program to be processed;
and determining a first compiling terminal for executing the program to be compiled according to the compiling time length of the program to be processed and the idle time period of the idle terminal.
Optionally, the method further includes:
detecting a compiling process of a first compiling terminal;
when a preset situation occurs in the compiling process of the first compiling terminal, acquiring a current compiling result of the compiling terminal;
according to the occupation situation of the cloud compiling system resource, a third compiling terminal for compiling the program to be processed is allocated again;
and sending the compiling result and the program to be processed to the third compiling terminal.
Optionally, the method further includes:
when a request for sharing a compiling environment is received, acquiring information of a terminal initiating the request for sharing the compiling environment and information of the compiling environment installed on the terminal initiating the request for sharing the compiling environment;
information of a compilation environment installed on a terminal that initiates a request for sharing a compilation environment and information of a terminal that initiates a request for sharing a compilation environment are stored.
Optionally, the method further includes:
receiving error information fed back by a first compiling terminal; the error information is generated by the first compiling terminal in the compiling process;
analyzing the error information to obtain reasons and/or an optimization scheme corresponding to the error information;
feeding back the error information, the reason corresponding to the error information and/or the optimization scheme to the user terminal; the user terminal is a terminal for sending a program to be compiled.
Optionally, the method further includes:
responding to a program simulation request, and determining the type of the program to be processed;
determining a target simulator corresponding to the program to be processed according to the type of the program to be processed;
determining a second compiling terminal for executing a program simulation task from a preset cloud compiling system according to the target simulator;
acquiring the information of the second compiling terminal, and sending the information of the second compiling terminal to an initiating user terminal; the information of the second compiling terminal is a basis for the user terminal to initiate remote control to the second compiling terminal;
and sending the program to be processed to the second compiling terminal so that the user terminal controls a target simulator installed on the second compiling terminal to simulate the program to be processed after the user terminal initiates remote control to the second compiling terminal.
Optionally, the error information is presented in the form of a video; and the video is obtained by the first compiling terminal through screen recording.
Optionally, the method further includes:
when detecting that the user terminal executes the code editing process, analyzing a currently edited code of the user terminal, and predicting a function realized by the currently edited code of the user terminal;
calling a reference code corresponding to a function realized by a code currently edited by a user terminal;
acquiring optimization information of a reference code;
and sending the reference code and/or the optimization information of the reference code to the user terminal.
In a second aspect:
the embodiment of the invention also discloses an automatic compiling method adopting jupyter, which is applied to a user terminal and comprises the following steps:
receiving a program to be processed;
sending the program to be processed to a server so that the server processes the program to be compiled based on the automatic compiling method adopting jupyter in the first aspect;
and receiving a compiling result sent by the server.
Optionally, the receiving the compiling result sent by the server includes:
receiving an installation package sent by a central server;
or
And receiving the executable program sent by the central server.
Optionally, the method includes:
receiving a sharing program uploaded by a user;
determining an editable portion of the shared program;
marking an editable portion of the engineering program.
Optionally, the receiving the to-be-processed program includes:
calling a sharing program;
acquiring a modification result of an editable part of the shared program to obtain a modified program;
and taking the modified program as a program to be processed.
In a third aspect:
the embodiment of the invention discloses an automatic compiling system adopting jupyter, which comprises the following steps:
the system comprises a user terminal, a central server and a cloud compiling system;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compiling environment at least comprises jupyter;
the central server is used for executing the automatic compiling method adopting jupyter in the first aspect;
the user terminal is configured to perform the automatic compilation with jupyter according to the second aspect.
In a fourth aspect:
the invention also discloses an automatic compiling device adopting jupyter, which is applied to the central server, and the method comprises the following steps:
the first receiving unit is used for receiving the program to be processed sent by the terminal;
the type determining unit is used for responding to the compiling request and determining the type of the program to be processed;
the first compiling environment determining unit is used for determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed;
the compiling terminal determining unit is used for determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the target terminal comprises the target compiling environment;
the first sending unit is used for sending the program to be processed to the first compiling terminal; the program to be processed is basic information of a compiling task executed by the first compiling terminal through an installed compiling environment;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compilation environment contains at least jupyter.
In a fifth aspect:
the embodiment of the invention also discloses an automatic compiling device adopting jupyter, which is applied to a terminal and comprises the following components:
the second receiving unit is used for receiving the program to be processed;
a second sending unit, configured to send the program to be compiled to a server, so that the server processes the program to be compiled based on the automatic compilation method using jupyter of the first aspect;
and the third receiving unit is used for receiving the compiling result sent by the server.
The embodiment of the invention discloses an automatic compiling method adopting jupyter, which comprises the following steps: responding to a compiling request, and determining the type of the program to be processed; determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed; determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the target terminal comprises the target compiling environment; and sending the program to be processed to the first compiling terminal. Therefore, by identifying the type of the program and determining the target compiling environment corresponding to the type of the program, the compiling environment can be automatically matched, and the requirements of users on different compiling environments can be further met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart illustrating an automatic compiling method using jupyter according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a resource allocation method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating an automatic compiling method using jupyter according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating a method for program optimization according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating an automatic compiling method using jupyter according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an automatic compiling system using jupyter according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an automatic compiling apparatus using jupyter according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an automatic compiling apparatus using jupyter according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an automatic compiling method using jupyter according to an embodiment of the present invention is shown, where the method is applied to a server, and the method includes:
s101: receiving a program to be processed sent by a terminal;
s102: responding to a compiling request, and determining the type of the program to be processed;
in this embodiment, the type of the program to be compiled in this embodiment may be understood as a certain type of computer language, for example, JAVA, PHP, C #, and the like.
Wherein each type of program has a unique writing format, for example, the type of program can be determined by the writing format of the program.
S103: determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed;
in this embodiment, in order to identify the target compilation environment corresponding to the type of the program, a correspondence relationship between the type of the program and the compilation environment may be preset. And when the type of the program to be processed is determined, determining a target compiling environment corresponding to the program to be processed according to the preset corresponding relation between the type of the program and the compiling environment.
In this embodiment, the compiling environment includes: the compiling environment provided by various compiling platforms such as winform, web, android, IOS and jupitter, in the embodiment, includes, but is not limited to, the compiling environment mentioned above.
S104: determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to a target compiling environment; the first compiling terminal comprises the target compiling environment;
in this embodiment, the cloud compiling system is composed of a plurality of terminals installed with compiling environments; the installed compilation environment contains at least jupyter.
As can be seen from the above description, the cloud compiling system includes compiling environments provided by various compiling platforms such as winform, web, android, IOS and jupyter, but is not limited to the above-mentioned compiling environments.
In this embodiment, in order to enrich the cloud compiling system, the personal terminal may be used as the cloud compiling system, and specifically, the method further includes:
when a request for sharing a compiling environment is received, acquiring information of a terminal initiating the request for sharing the compiling environment and information of the compiling environment installed on the terminal initiating the request for sharing the compiling environment;
information of a compilation environment installed on a terminal that initiates a request for sharing a compilation environment and information of a terminal that initiates a request for sharing a compilation environment are stored.
In this embodiment, it is assumed that the terminal a initiates a request for sharing the compiling environment to the central server, and the central server obtains information of the terminal a and information of the compiling environment installed on the terminal a.
The information of the terminal a may be information for uniquely representing the terminal a, or information for accessing the terminal a, such as an IP address of the terminal a.
The information of the compiling environment installed in the terminal a may be a name of the compiling environment, such as winform, web, android, IOS, jupitter, and the like.
In this embodiment, the first compiling terminal for executing the to-be-processed program may be determined according to the pre-compiling duration of the to-be-processed program and the idle condition of the terminal included in the current cloud compiling system, and a specific implementation method will be described below, which is not described in detail in this embodiment.
S105: sending the program to be processed to a first compiling terminal;
in this embodiment, when the first compiling terminal receives the to-be-processed program, the to-be-processed program is compiled through the installed compiling environment. That is, the to-be-processed program executes basic information of the compilation task for the first compilation terminal through the installed compilation environment.
In this embodiment, the type of the program to be processed is determined in response to a compilation request; determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed; determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the target terminal comprises the target compiling environment; and sending the program to be processed to the first compiling terminal. Therefore, by identifying the type of the program and determining the target compiling environment corresponding to the type of the program, the compiling environment can be automatically matched, and the requirements of users on different compiling environments can be further met.
Further, in order to provide a humanized choice, the user may select which compiling environment to use by himself, specifically, the method further includes:
detecting whether a specified compiling environment is received;
and if the specified compiling environment is received, taking the specified compiling environment as a target compiling environment.
Further, according to the specified compiling environment (namely a target compiling environment), a first compiling terminal for executing a compiling task is determined from a preset cloud compiling system; the target terminal comprises the target compiling environment and sends the program to be processed to the first compiling terminal.
In this embodiment, some error reporting problems may occur during the process of executing the compiling task by the first compiling terminal, so that the first compiling terminal sends error information generated during the compiling process to the central server in order to facilitate the user to know the compiling condition in time. In order to further instruct the user how to handle the error when the central server receives the error report, the central server may analyze the received error information, and further determine a reason and/or an optimization scheme corresponding to the error, specifically, the central server further includes:
receiving error information fed back by a first compiling terminal; the error information is generated by the first compiling terminal in the compiling process;
analyzing the error information to obtain reasons and/or an optimization scheme corresponding to the error information;
feeding back the error information, the reason corresponding to the error information and/or the optimization scheme to the user terminal; the user terminal is a terminal for sending a program to be compiled.
In this embodiment, the association relationship between the error information and the cause and the optimization scheme may be preset, and the cause generated by the error information and the optimization scheme for solving the error information may be found through the association relationship.
The error information can be fed back in a video mode or in a preset error information format.
And if the error information is fed back in a video mode, the video is obtained by a first compiling terminal which executes a compiling task through screen recording.
Further, to avoid congestion of the cloud compiling system, the resource allocation compiling terminal based on the cloud compiling system may specifically include:
1) screening out a terminal containing a target compiling environment from the preset cloud compiling system;
2) screening out idle terminals from the terminals containing the target compiling environment;
in this embodiment, the idle terminal is a terminal that does not currently execute the compiling task.
3) Acquiring an idle time period of an idle terminal;
in this embodiment, each terminal included in the cloud compiling system may preset a time period that can be used for executing the compiling task, and only execute the compiling task in the time period.
4) Predicting the compiling time length of the program to be processed;
in this embodiment, the compiling time of the program to be processed may be predicted through a preset prediction model, where the compiling time is represented as the time required for compiling the program to be processed.
The prediction model may be obtained by training a training sample, where the training sample includes: and training the models by taking training samples containing different types of programs as input and taking the compiling time of each program as output so as to obtain the prediction models. The prediction model may be a Deep Belief network (Deep Belief networks), a Deep convolutional neural network, or the like.
5) And determining a first compiling terminal for executing a compiling task according to the compiling time length of the program to be processed and the idle time period of the idle terminal.
In this embodiment, based on the current time as a reference and based on the idle time period of the idle terminal, it is calculated whether the remaining time length of the idle terminal can execute the compiling task of the to-be-processed program, where the method for determining whether the remaining time length of the idle terminal can execute the compiling task of the to-be-processed program includes multiple methods, which are not limited in this embodiment, and may be, for example, the following method: and judging whether the remaining time length of the idle terminal is greater than the compiling time length of the program to be processed, and if so, determining that the terminal can be used for executing the compiling task.
If a terminal which can be used for executing the compiling task is screened out, the terminal is used as a first compiling terminal;
if a plurality of terminals which can be used for executing the compiling task are screened out, one of the terminals can be screened out as a first compiling terminal.
Or, which first compiling terminal is selected according to the condition of the client requesting the compiling, and if the level of the client is higher, the terminal with higher performance can be selected.
In this embodiment, the first compiling terminal for executing the program to be compiled is determined according to the predicted compiling time length of the program to be processed and the idle time period of the idle terminal including the target compiling environment, so that the reasonable allocation of resources is realized.
Further, the method also comprises the following steps:
if no idle terminal exists in the cloud compiling system, setting a queuing identifier for the received program to be processed according to the time for receiving the program to be processed; and when the idle terminal exists, distributing the terminal for compiling the program to be processed according to the queuing identification of the program to be processed.
In this embodiment, a problem that compilation is slow in compilation or cannot be completed due to a system failure may occur in a compilation process of a compilation terminal, which may affect an overall process of compilation, even may cause that compilation of a program cannot be completed, and in order not to affect a result of compilation, referring to fig. 2, a flowchart illustrating a resource allocation method provided by an embodiment of the present invention is shown, and includes:
s201: detecting a compiling process of a first compiling terminal;
s202: when a preset situation occurs in the compiling process of the first compiling terminal, acquiring a current compiling result of the compiling terminal;
in this embodiment, the preset situation may include multiple situations, which are not limited in this embodiment, for example: slow compilation or system failure, etc.
S203: according to the occupation situation of the cloud compiling system resource, a third compiling terminal for compiling the program to be processed is allocated again;
s204: and sending the compiling result and the program to be processed to the third compiling terminal.
In this embodiment, when compiling the program, the following process may be performed: lexical analysis, syntax analysis, semantic analysis, library, class file loading, intermediate code generation, optimization and target code generation. Each of which generates a compilation result. When the slow compiling process of the compiling terminal or the system fault is detected, other compiling terminals (third compiling terminals) can be allocated according to the resource occupation condition of the cloud compiling system, and the third compiling terminals can compile the program according to the compiling result obtained by the first compiling terminal, so that the compiling process of the program can be accelerated.
Referring to fig. 3, a schematic flow chart of an automatic compiling method using jupyter according to an embodiment of the present invention is shown, where in this embodiment, the method includes:
s301: responding to a program simulation request, and determining the type of the program to be processed;
s302: determining a target simulator corresponding to the program to be processed according to the type of the program to be processed;
in this embodiment, if the to-be-processed program initiates the program simulation instruction, a simulator for simulating the to-be-processed program may be determined based on the type of the to-be-processed program.
In this embodiment, a correspondence between the type of the program to be processed and the simulator may be preset, and the simulator corresponding to the program to be processed may be determined according to the correspondence and the type of the program to be processed.
S303: determining a second compiling terminal for executing a program simulation task from a preset cloud compiling system according to the target simulator;
in this embodiment, the second compiling terminal for executing the program to be processed may be determined according to the simulation duration of the program to be processed and the idle condition of the terminal included in the current cloud compiling system.
The specific confirmation method is the same as S201 to S205 described above, and is not limited in this embodiment.
S304: acquiring the information of the second compiling terminal, and sending the information of the second compiling terminal to an initiating user terminal; the information of the second compiling terminal is a basis for the user terminal to initiate remote control to the second compiling terminal;
s305: and sending the program to be processed to the second compiling terminal so that the terminal initiating the program simulation request controls a target simulator installed on the second compiling terminal to simulate the program to be processed after the user terminal initiates remote control to the second compiling terminal.
In this embodiment, after receiving the terminal information of the second compiling terminal, the user terminal may initiate remote control with the second compiling terminal, install the to-be-processed program into the simulator of the second compiling terminal through the remote control, and control the simulator of the second compiling terminal to simulate the to-be-processed program.
In this embodiment, a target simulator corresponding to the program to be processed is determined according to the type of the program to be processed; determining a second compiling terminal for executing a program simulation task from a preset cloud compiling system according to the target simulator; acquiring the information of the second compiling terminal, and sending the information of the second compiling terminal to an initiating user terminal; the information of the second compiling terminal is a basis for the user terminal to initiate remote control to the second compiling terminal; and sending the program to be processed to the second compiling terminal so that the terminal initiating the program simulation request controls a target simulator installed on the second compiling terminal to simulate the program to be processed after the user terminal initiates remote control to the second compiling terminal. Therefore, the simulation function of the program is realized, and the compiling function of the program is enriched.
In this embodiment, when the user terminal edits the program, some errors may occur or a better scheme is not adopted for editing, so that problems are likely to occur in the compiling process, and in order to avoid the problems, the user terminal may prompt a problem that may occur to the client in advance or provide some reference programs for the client. Specifically, referring to fig. 4, a flowchart of a program optimization method provided in an embodiment of the present invention is shown, where in this embodiment, the method includes:
s401: when detecting that the user terminal executes the code editing process, analyzing a currently edited code of the user terminal, and predicting a function realized by the currently edited code of the user terminal;
in this embodiment, when a user calls a code in the version library, or after calling an upload code, the process of S401-S404 may be triggered.
In this embodiment, the currently edited program may be analyzed by an intelligent algorithm or a pre-trained prediction model.
The prediction model can be obtained by training codes and functions of the codes.
S402: calling a reference code corresponding to a function realized by a code currently edited by a user terminal;
the code stored in the version library can be preset with a function tag, and the reference code can be searched through the function tag.
S403: acquiring optimization information of a reference code;
the optimization information of the reference code may include: the position of the code which is easy to make mistakes, the writing mode of the editable part of the code and the like.
S404: and sending the reference code and/or the optimization information of the reference code to the user terminal.
In this embodiment, the reference code and/or the optimization information of the reference code is sent to the user terminal, and the user can edit the code with reference to the reference code.
In the embodiment, the reference code with the same or similar function as the edited code and the optimization information of the reference code are obtained, and the reference code and/or the optimization information are/is sent to the user terminal, so that the user terminal can edit the code according to the reference code and the optimization information, thereby avoiding common errors and further obtaining a code program with better effect.
Referring to fig. 5, a flowchart of an automatic compiling method using jupyter according to an embodiment of the present invention is shown, where the method is applied to a terminal, and includes:
s501: acquiring a program to be processed;
the acquiring manner of the to-be-processed program may include multiple manners, which is not limited in this embodiment, and may include, for example, the following two manners:
the method comprises the steps of firstly, programming a program written by a user;
in a second mode, the program obtained by modifying the program shared by other users by the user specifically includes:
calling a sharing program;
acquiring a modification result of an editable part of the shared program to obtain a modified program;
and taking the modified program as a program to be compiled.
Wherein, the terminal can provide the program sharing function, and specifically further comprises:
receiving a sharing program uploaded by a user;
determining an editable portion of the shared program;
marking an editable portion of the engineering program.
S502: sending the program to be compiled to a central server;
wherein the central server is used for executing the methods of S101-S104;
s503: and receiving a compiling result sent by the central server.
The compiling result fed back by the central server may include: an installation package or an executable program.
In the embodiment, the user can send the program to be processed to the central server through the terminal, and the central server allocates the terminal for executing the compiling task to the user, so that the purpose of automatically matching the compiling environment is realized, and the requirements of the user on different compiling environments can be further met.
Referring to fig. 6, a schematic structural diagram of an automatic compiling system using jupyter according to an embodiment of the present invention is shown, in this embodiment, the system includes:
a user terminal 601, a central server 602 and a cloud compiling system 603;
the cloud compiling system 603 is composed of a plurality of compiling terminals provided with compiling environments; the installed compiling environment at least comprises jupyter;
the central server 602 is configured to perform the following method:
receiving a program to be processed sent by a user terminal;
responding to a compiling request, and determining the type of the program to be processed;
determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed;
determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the first compiling terminal comprises the target compiling environment;
sending the program to be processed to the first compiling terminal; the program to be processed is basic information of a compiling task executed by the first compiling terminal through an installed compiling environment;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compilation environment contains at least jupyter.
Optionally, the method further includes:
detecting whether a specified compiling environment is received;
and in the case of containing a specified compiling environment, taking the specified compiling environment as a target compiling environment.
Optionally, the determining, according to the target compiling environment, a target terminal for executing a compiling task from a preset cloud compiling system includes:
screening out a terminal containing a target compiling environment from the preset cloud compiling system;
screening out idle terminals from the terminals containing the target compiling environment;
acquiring an idle time period of an idle terminal;
predicting the compiling time length of the program to be processed;
and determining a first compiling terminal for executing the program to be compiled according to the compiling time length of the program to be processed and the idle time period of the idle terminal.
Optionally, the method further includes:
if no idle terminal exists in the cloud compiling system, setting a queuing identifier for the received program to be processed according to the time for receiving the program to be processed;
and when the idle terminal exists, distributing the terminal for compiling the program to be processed according to the queuing identification of the program to be processed.
Optionally, when receiving a request for sharing a compiling environment, obtaining information of a terminal initiating the request for sharing the compiling environment and information of a compiling environment installed on the terminal initiating the request for sharing the compiling environment;
information of a compilation environment installed on a terminal that initiates a request for sharing a compilation environment and information of a terminal that initiates a request for sharing a compilation environment are stored.
Optionally, the method further includes:
receiving error information fed back by a first compiling terminal; the error information is generated by the first compiling terminal in the compiling process;
analyzing the error information to obtain reasons and/or an optimization scheme corresponding to the error information;
feeding back the error information, the reason corresponding to the error information and/or the optimization scheme to the user terminal; the user terminal is a terminal for sending a program to be compiled.
Optionally, the method further includes:
responding to a program simulation request, and determining the type of the program to be processed;
determining a target simulator corresponding to the program to be processed according to the type of the program to be processed;
determining a second compiling terminal for executing a program simulation task from a preset cloud compiling system according to the target simulator;
acquiring the information of the second compiling terminal, and sending the information of the second compiling terminal to an initiating user terminal; the information of the second compiling terminal is a basis for the user terminal to initiate remote control to the second compiling terminal;
and sending the program to be processed to the second compiling terminal so that the user terminal controls a target simulator installed on the second compiling terminal to simulate the program to be processed after the user terminal initiates remote control to the second compiling terminal.
Optionally, the error information is presented in the form of a video; and the video is obtained by the first compiling terminal through screen recording.
The user terminal 601 is configured to perform the following method:
receiving a program to be processed;
sending the program to be processed to a server;
and receiving a compiling result sent by the server.
Optionally, the receiving the compiling result sent by the server includes:
receiving an installation package sent by a central server;
or
And receiving the executable program sent by the central server.
Optionally, the method includes:
receiving a sharing program uploaded by a user;
determining an editable portion of the shared program;
marking an editable portion of the engineering program.
Optionally, the obtaining the program to be compiled includes:
calling a sharing program;
acquiring a modification result of an editable part of the shared program to obtain a modified program;
and taking the modified program as a program to be compiled.
In this embodiment, after receiving a to-be-processed program, a user terminal sends the to-be-processed program to a central server, the central server determines a target compiling environment corresponding to the to-be-processed program based on the type of the to-be-processed program, determines a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment, and sends the to-be-processed program to the first compiling terminal, and the first compiling terminal compiles the to-be-processed program. Therefore, through interaction of the user terminal, the central server and the compiling terminal, automatic matching of the compiling environments is achieved, and further the requirements of users on different compiling environments can be met.
Referring to fig. 7, a schematic structural diagram of an automatic compiling apparatus using jupyter according to an embodiment of the present invention is shown, where the apparatus is applied to a central server, and the server includes:
a first receiving unit 701, configured to receive a to-be-processed program sent by a terminal;
a type determining unit 702, configured to determine a type of the to-be-processed program in response to a compilation request;
a first compiling environment determining unit 703, configured to determine, based on the type of the to-be-processed program, a target compiling environment corresponding to the to-be-processed program;
a compiling terminal determining unit 704, configured to determine, according to the target compiling environment, a first compiling terminal for executing a compiling task from a preset cloud compiling system; the target terminal comprises the target compiling environment;
a first sending unit 705, configured to send the to-be-processed program to the first compiling terminal; the program to be processed is basic information of a compiling task executed by the first compiling terminal through an installed compiling environment;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compilation environment contains at least jupyter.
Optionally, the method further includes:
a second compilation environment determination unit to:
detecting whether a specified compiling environment is received;
and in the case of containing a specified compiling environment, taking the specified compiling environment as a target compiling environment.
Optionally, the compiling terminal determining unit is specifically configured to:
screening out a terminal containing a target compiling environment from the preset cloud compiling system;
screening out idle terminals from the terminals containing the target compiling environment;
acquiring an idle time period of an idle terminal;
predicting the compiling time length of the program to be processed;
and determining a first compiling terminal for executing the program to be compiled according to the compiling time length of the program to be processed and the idle time period of the idle terminal.
Optionally, the method further includes:
a queuing unit to:
if no idle terminal exists in the cloud compiling system, setting a queuing identifier for the received program to be processed according to the time for receiving the program to be processed;
and when the idle terminal exists, distributing the terminal for compiling the program to be processed according to the queuing identification of the program to be processed.
Optionally, the method further includes:
a compilation environment sharing unit to:
when a request for sharing a compiling environment is received, acquiring information of a terminal initiating the request for sharing the compiling environment and information of the compiling environment installed on the terminal initiating the request for sharing the compiling environment;
information of a compilation environment installed on a terminal that initiates a request for sharing a compilation environment and information of a terminal that initiates a request for sharing a compilation environment are stored.
Optionally, the method further includes:
an error feedback unit to:
receiving error information fed back by a first compiling terminal; the error information is generated by the first compiling terminal in the compiling process;
analyzing the error information to obtain reasons and/or an optimization scheme corresponding to the error information;
feeding back the error information, the reason corresponding to the error information and/or the optimization scheme to the user terminal; the user terminal is a terminal for sending a program to be compiled.
Optionally, the method further includes:
an analog unit to:
responding to a program simulation request, and determining the type of the program to be processed;
determining a target simulator corresponding to the program to be processed according to the type of the program to be processed;
determining a second compiling terminal for executing a program simulation task from a preset cloud compiling system according to the target simulator;
acquiring the information of the second compiling terminal, and sending the information of the second compiling terminal to an initiating user terminal; the information of the second compiling terminal is a basis for the user terminal to initiate remote control to the second compiling terminal;
and sending the program to be processed to the second compiling terminal so that the user terminal controls a target simulator installed on the second compiling terminal to simulate the program to be processed after the user terminal initiates remote control to the second compiling terminal.
Optionally, the error information is presented in the form of a video; and the video is obtained by the first compiling terminal through screen recording.
By the device of the embodiment, the type of the program to be processed is determined in response to a compiling request; determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed; determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the target terminal comprises the target compiling environment; and sending the program to be processed to the first compiling terminal. Therefore, by identifying the type of the program and determining the target compiling environment corresponding to the type of the program, the compiling environment can be automatically matched, and the requirements of users on different compiling environments can be further met.
Referring to fig. 8, a schematic structural diagram of an automatic compiling apparatus using jupyter according to an embodiment of the present invention is shown, where the apparatus is applied to a terminal, and the apparatus includes:
a second receiving unit 801, configured to receive a program to be processed;
a second sending unit 802, configured to send the program to be processed to a server, so that the server processes the program to be compiled based on the method in S101-S104;
a third receiving unit 803, configured to receive the compiling result sent by the server.
Optionally, the third receiving unit is specifically configured to:
receiving an installation package sent by a central server;
or
And receiving the executable program sent by the central server.
Optionally, the program sharing unit is configured to:
receiving a sharing program uploaded by a user;
determining an editable portion of the shared program;
marking an editable portion of the engineering program.
Optionally, the second receiving unit is specifically configured to:
calling a sharing program;
acquiring a modification result of an editable part of the shared program to obtain a modified program;
and taking the modified program as a program to be compiled.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (16)

1. An automatic compiling method adopting jupyter, which is applied to a central server and comprises the following steps:
receiving a program to be processed sent by a user terminal;
responding to a compiling request, and determining the type of the program to be processed;
determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed;
determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the first compiling terminal comprises the target compiling environment;
sending the program to be processed to the first compiling terminal; the program to be processed is basic information of a compiling task executed by the first compiling terminal through an installed compiling environment;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compilation environment contains at least jupyter.
2. The method of claim 1, further comprising:
detecting whether a specified compiling environment is received;
and in the case of containing a specified compiling environment, taking the specified compiling environment as a target compiling environment.
3. The method according to claim 1, wherein the determining a target terminal for executing a compilation task from a preset cloud compilation system according to the target compilation environment comprises:
screening out a terminal containing a target compiling environment from the preset cloud compiling system;
screening out idle terminals from the terminals containing the target compiling environment;
acquiring an idle time period of an idle terminal;
predicting the compiling time length of the program to be processed;
and determining a first compiling terminal for executing the program to be compiled according to the compiling time length of the program to be processed and the idle time period of the idle terminal.
4. The method of claim 1, further comprising:
detecting a compiling process of a first compiling terminal;
when a preset situation occurs in the compiling process of the first compiling terminal, acquiring a current compiling result of the compiling terminal;
according to the occupation situation of the cloud compiling system resource, a third compiling terminal for compiling the program to be processed is allocated again;
and sending the compiling result and the program to be processed to the third compiling terminal.
5. The method of claim 1, further comprising:
when a request for sharing a compiling environment is received, acquiring information of a terminal initiating the request for sharing the compiling environment and information of the compiling environment installed on the terminal initiating the request for sharing the compiling environment;
information of a compilation environment installed on a terminal that initiates a request for sharing a compilation environment and information of a terminal that initiates a request for sharing a compilation environment are stored.
6. The method of claim 1, further comprising:
receiving error information fed back by a first compiling terminal; the error information is generated by the first compiling terminal in the compiling process;
analyzing the error information to obtain a position and/or an optimization scheme corresponding to the error information;
feeding back the error information, the reason corresponding to the error information and/or the optimization scheme to the user terminal; the user terminal is a terminal for sending a program to be compiled.
7. The method of claim 1, further comprising:
responding to a program simulation request, and determining the type of the program to be processed;
determining a target simulator corresponding to the program to be processed according to the type of the program to be processed;
determining a second compiling terminal for executing a program simulation task from a preset cloud compiling system according to the target simulator;
acquiring the information of the second compiling terminal, and sending the information of the second compiling terminal to an initiating user terminal; the information of the second compiling terminal is a basis for the user terminal to initiate remote control to the second compiling terminal;
and sending the program to be processed to the second compiling terminal so that the user terminal controls a target simulator installed on the second compiling terminal to simulate the program to be processed after the user terminal initiates remote control to the second compiling terminal.
8. The method of claim 6, wherein the error information is presented in the form of a video; and the video is obtained by the first compiling terminal through screen recording.
9. The method of claim 1, further comprising:
when detecting that the user terminal executes the code editing process, analyzing a currently edited code of the user terminal, and predicting a function realized by the currently edited code of the user terminal;
calling a reference code corresponding to a function realized by a code currently edited by a user terminal;
acquiring optimization information of a reference code;
and sending the reference code and/or the optimization information of the reference code to the user terminal.
10. An automatic compiling method using jupyter, which is applied to a user terminal, includes:
receiving a program to be processed;
sending the program to be processed to a server so that the server processes the program to be compiled based on any method of claims 1 to 9;
and receiving a compiling result sent by the server.
11. The method of claim 10, wherein receiving the compiled result sent by the server comprises:
receiving an installation package sent by a central server;
or
And receiving the executable program sent by the central server.
12. The method of claim 10, comprising:
receiving a sharing program uploaded by a user;
determining an editable portion of the shared program;
marking an editable portion of the engineering program.
13. The method of claim 10, wherein receiving the pending program comprises:
calling a sharing program;
acquiring a modification result of an editable part of the shared program to obtain a modified program;
and taking the modified program as a program to be processed.
14. An automated compilation system using jupyters, comprising:
the system comprises a user terminal, a central server and a cloud compiling system;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compiling environment at least comprises jupyter;
the central server is used for executing the method of any one of claims 1-9;
the user terminal is configured to perform the method of any one of claims 10-13.
15. An automatic compiling apparatus using jupyter, wherein the apparatus is applied to a central server, the method comprising:
the first receiving unit is used for receiving the program to be processed sent by the terminal;
the type determining unit is used for responding to the compiling request and determining the type of the program to be processed;
the first compiling environment determining unit is used for determining a target compiling environment corresponding to the program to be processed based on the type of the program to be processed;
the compiling terminal determining unit is used for determining a first compiling terminal for executing a compiling task from a preset cloud compiling system according to the target compiling environment; the target terminal comprises the target compiling environment;
the first sending unit is used for sending the program to be processed to the first compiling terminal; the program to be processed is basic information of a compiling task executed by the first compiling terminal through an installed compiling environment;
the cloud compiling system is composed of a plurality of terminals provided with compiling environments; the installed compilation environment contains at least jupyter.
16. An automatic compiling apparatus using jupyter, wherein the apparatus is applied to a terminal, the apparatus comprising:
the second receiving unit is used for receiving the program to be processed;
a second sending unit, configured to send the program to be processed to a server, so that the server processes the program to be compiled based on any method of any one of claims 1 to 9;
and the third receiving unit is used for receiving the compiling result sent by the server.
CN202011622905.4A 2020-12-31 2020-12-31 Automatic compiling method and device adopting jupyter Pending CN112650500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011622905.4A CN112650500A (en) 2020-12-31 2020-12-31 Automatic compiling method and device adopting jupyter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011622905.4A CN112650500A (en) 2020-12-31 2020-12-31 Automatic compiling method and device adopting jupyter

Publications (1)

Publication Number Publication Date
CN112650500A true CN112650500A (en) 2021-04-13

Family

ID=75366654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011622905.4A Pending CN112650500A (en) 2020-12-31 2020-12-31 Automatic compiling method and device adopting jupyter

Country Status (1)

Country Link
CN (1) CN112650500A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061702A (en) * 2022-08-19 2022-09-16 荣耀终端有限公司 IDE management method and electronic equipment
CN116594632A (en) * 2023-07-18 2023-08-15 中国电信股份有限公司 Compiling method, compiling device, computer device, storage medium and compiling system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078687A1 (en) * 2002-10-16 2004-04-22 Noubar Partamian Recovering from compilation errors in a dynamic compilation environment
CN103713889A (en) * 2012-09-29 2014-04-09 三亚中兴软件有限责任公司 Method and device for developing, compiling and debugging application
WO2017173662A1 (en) * 2016-04-08 2017-10-12 华为技术有限公司 Heterogeneous system based program processing method and device
CN108121543A (en) * 2017-11-30 2018-06-05 北京奇安信科技有限公司 A kind of software code process of compilation method and device
CN110688142A (en) * 2019-10-10 2020-01-14 星环信息科技(上海)有限公司 Method, device and storage medium for publishing application programming interface

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078687A1 (en) * 2002-10-16 2004-04-22 Noubar Partamian Recovering from compilation errors in a dynamic compilation environment
CN103713889A (en) * 2012-09-29 2014-04-09 三亚中兴软件有限责任公司 Method and device for developing, compiling and debugging application
WO2017173662A1 (en) * 2016-04-08 2017-10-12 华为技术有限公司 Heterogeneous system based program processing method and device
CN108121543A (en) * 2017-11-30 2018-06-05 北京奇安信科技有限公司 A kind of software code process of compilation method and device
CN110688142A (en) * 2019-10-10 2020-01-14 星环信息科技(上海)有限公司 Method, device and storage medium for publishing application programming interface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061702A (en) * 2022-08-19 2022-09-16 荣耀终端有限公司 IDE management method and electronic equipment
CN116594632A (en) * 2023-07-18 2023-08-15 中国电信股份有限公司 Compiling method, compiling device, computer device, storage medium and compiling system

Similar Documents

Publication Publication Date Title
US7895565B1 (en) Integrated system and method for validating the functionality and performance of software applications
US7707552B2 (en) Method and system for autonomically prioritizing software defects
US20070028229A1 (en) Method and system for dynamic generation of computer system installation instructions
CN111061489B (en) Multi-platform compiling detection method, device, equipment and medium
CN109614109B (en) Application deployment method, device and system
JP5213671B2 (en) Test case selection method and selection system
CN110597710B (en) Test coverage rate statistical method, device, computer equipment and storage medium
CN112650500A (en) Automatic compiling method and device adopting jupyter
CN113282504B (en) Incremental code coverage detection method and business development method and device
CN105389263A (en) Method, system and equipment for monitoring application software permissions
CN105072398B (en) A kind of device updating method and device
CN111736951B (en) Automatic driving simulation method, computer device, and storage medium
CN112463585A (en) Solid state disk code testing method and system, storage medium and electronic equipment
CN112732265A (en) Data processing method and related device
CN113742211B (en) A testing method, Appium client and computer storage medium
US20090293053A1 (en) Method and system for dynamic generation of computer system installation instructions
CN115048313B (en) Automatic test method and device, computer readable storage medium and electronic equipment
CN107665115B (en) Software development platform and method
CN112925658B (en) A bridging method and device
CN112380129B (en) Debugging method, device, equipment and medium suitable for butt joint proxy system
CN116094919A (en) Communication network operation method, device and system and electronic equipment
CN115794529A (en) Storage fault simulation method, device, equipment and storage medium in cloud environment
CN116225441B (en) Code hosting method and system for online coding system
CN113900644A (en) Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium
CN112612710A (en) Automatic test method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210413