Compilation method, compilation device, compilation system, storage medium and electronic device
By configuring a private compilation server for the user side, the problems of ineffective resource utilization of compilation task and confusing tool versions are solved, the compilation efficiency and quality are improved, and the stability and performance of the compilation service are ensured.
Patent Information
- Application Number
- CN202080100522.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-04
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2040-06-04
AI Technical Summary
In the prior art, compilation tasks are usually piled up on fixed servers, resulting in the inability to effectively support resources, affecting the compilation efficiency, and the compilation tool version is chaotic, which can easily lead to compilation failure.
Configure a private compilation server for the user side, and handle the user side's compilation requests through the private compilation server to ensure the effective utilization of resources and the fixation of the compilation tool version.
Improves compilation efficiency and quality, avoids compilation failure caused by confusion in the compilation tool version, balances server pressure, and ensures the performance and efficiency of compilation services.
Smart Images

Figure CN115552369B_ABST
Abstract
Description
Background Art
[0002] Compilation refers to converting the source code of a program into binary code that can be recognized by a computer. In related technologies, compilation tasks of the same language are usually piled up on a few fixed servers for compilation, which results in each compilation task not being effectively supported by server resources, affecting compilation efficiency.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The present disclosure provides a compilation method, a compilation device, a compilation system, a computer-readable storage medium and an electronic device, thereby improving the problems of high cluster operation cost and high resource overhead in the related technology at least to a certain extent.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0006] According to a first aspect of the present disclosure, a compilation method is provided, comprising: obtaining a compilation request initiated by a user terminal; obtaining required compilation data according to the compilation request; determining a private compilation server preconfigured for the user terminal, and calling the private compilation server to process the compilation data; and obtaining a compilation product obtained by the private compilation server processing the compilation data.
[0007] According to a second aspect of the present disclosure, a compilation method is provided, including: a scheduling server receives a compilation request from a user terminal, determines a task server, and sends the compilation request to the task server; the task server obtains required compilation data according to the compilation request, determines a private compilation server pre-configured for the user terminal, and calls the private compilation server to process the compilation data; the private compilation server obtains a compilation product by processing the compilation data, and returns the compilation product to the task server.
[0008] According to a third aspect of the present disclosure, a compilation device is provided, including: a compilation request acquisition module, used to acquire a compilation request initiated by a user terminal; a compilation data acquisition module, used to acquire required compilation data according to the compilation request; a calling module, used to determine a private compilation server pre-configured for the user terminal, and call the private compilation server to process the compilation data; and a compilation product acquisition module, used to acquire a compilation product obtained by the private compilation server processing the compilation data.
[0009] According to a fourth aspect of the present disclosure, a compilation system is provided, comprising a scheduling server, a task server and a private compilation server; wherein the scheduling server is used to receive a compilation request from a user terminal, determine a task server, and send the compilation request to the task server; the task server is used to obtain required compilation data according to the compilation request, determine a private compilation server pre-configured for the user terminal, and call the private compilation server to process the compilation data; the private compilation server is used to obtain a compilation product by processing the compilation data, and return the compilation product to the task server.
[0010] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the compilation method of the first or second aspect and possible implementation methods thereof are implemented.
[0011] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the compilation method of the first or second aspect and its possible implementation method by executing the executable instructions.
[0012] The technical solution disclosed in this disclosure has the following beneficial effects:
[0013] On the one hand, by configuring a private compilation server for the user side, the compilation request of the user side can be processed in a targeted manner, which can improve the compilation efficiency and compilation quality. On the other hand, the resources required for the user's compilation request are deployed on the private compilation server, and the compilation tool version is relatively fixed, which solves the problem of confusion in the compilation tool version in the related technology and avoids the situation where the compilation fails due to the tool version. On the other hand, the server can balance the pressure of various aspects when configuring the private compilation server for the user side, thereby improving the abnormal situations that may occur in the actual application (such as a large number of compilation requests of a certain language in a short period of time, by performing balanced deployment when configuring the private compilation server, it can prevent the concurrent requests from being concentrated on a few servers), and ensure the performance and efficiency of the compilation service.
[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 An architectural diagram of a compilation system in this exemplary embodiment is shown;
[0017] Figure 2 A flowchart showing a compiling method in this exemplary embodiment is shown;
[0018] Figure 3 A flowchart of obtaining compiled data in this exemplary embodiment is shown;
[0019] Figure 4 A flowchart of calling a private compile server in this exemplary embodiment is shown;
[0020] Figure 5 A flowchart showing another compiling method in this exemplary embodiment;
[0021] Figure 6 A structural diagram of a compiling device in this exemplary embodiment is shown;
[0022] Figure 7 An electronic device for implementing the above method in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0024] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0025] In the related art, since different compilation servers rely on different compilation tool versions, it may be necessary to repeatedly install and uninstall the compilation tool on the compilation server during compilation, which affects the compilation efficiency and causes confusion in the compilation server tool version.
[0026] In view of one or more of the above problems, an exemplary embodiment of the present disclosure first provides a compilation system. Figure 1 As shown, the compilation system may include: a user terminal 110, a scheduling server 120, a task server 130, a compilation server 140, a database 150, a code warehouse 160 and a product warehouse 170. Among them, the user terminal 110 is a terminal device such as a computer, a smart phone, a tablet computer, etc. used by the user. When the user initiates a compilation request to the server through a browser on the terminal device, the user terminal 110 may also specifically refer to a browser. The scheduling server 120 is usually deployed at the front end to schedule the compilation request initiated by the user terminal 110 and assign it to a suitable task server 130. In addition, it can also assemble the relevant parameters required for compilation. The task server 130 is usually deployed at the back end of the scheduling server 120 to execute the compilation request and call the compilation server 140. The compilation server 140 is used to perform compilation tasks, such as compiling the source code of the program into binary code. The database 150 is used to store the relevant data required for compilation, such as various compilation-related parameters with the program as the dimension. The database 150 can be set as a relational database MySQL, or other data systems can be used. The code warehouse 160 is used to store the source code required for compilation, such as git, Java, Python code, etc. The product warehouse 170 is used to store compilation products, such as compiled program binary codes.
[0027] It should be understood that in the above-mentioned compilation system, the scheduling server 120, the task server 130 and the compilation server 140 can be deployed in a distributed manner to process a large number of compilation requests in parallel. According to actual needs, any number of other devices can also be set, such as setting two or more code repositories 160 to support the situation where multiple task servers 130 need to read source code in parallel. In addition, the architecture of the compilation system can also be appropriately adjusted, such as deploying the scheduling server 120 and the task server 130 on the same physical machine to realize the scheduling and execution of compilation requests.
[0028] Based on the above compilation system, an exemplary embodiment of the present disclosure provides a compilation method, which can be executed by the above task server 130 . Figure 2 The schematic flow of the compilation method is shown, which may include the following steps S210 to S240:
[0029] Step S210: obtaining a compile request initiated by the user terminal.
[0030] The task server may receive the compilation request sent from the scheduling server, or may directly obtain the compilation request from the user end.
[0031] In an optional implementation, the user client can edit the compilation request through a browser and send it to the scheduling server. The scheduling server selects a suitable task server based on the compilation type in the compilation request (such as which type of program to compile) or according to the load balancing mechanism, and then sends the compilation request to the task server.
[0032] Step S220: Obtain required compilation data according to the compilation request.
[0033] The compilation data refers to the relevant data required for this compilation, which may include the source code of the program to be compiled requested for compilation, the build parameters of this compilation (such as compilation environment parameters, tool version parameters), etc.
[0034] In an optional embodiment, reference Figure 3 As shown, step S220 may specifically include the following steps S310 and S320:
[0035] Step S310, obtaining the build parameters of the compilation request from the scheduling server;
[0036] Step S320, obtaining source code of the program to be compiled from the code repository, where the program to be compiled is the program in the compilation request.
[0037] As mentioned above, the program to be compiled is the program to be compiled in this request. Generally, when editing a compilation request, the user will enter the name, version number or other identification information of the program to be compiled. After obtaining the compilation request, the scheduling server can determine the program to be compiled by parsing the compilation request, and can also obtain other relevant information, such as the language of the source code of the program to be compiled, the operating system environment, etc. The scheduling server can assemble the build parameters of this compilation based on this information and send it to the task server.
[0038] The task server can search and obtain the source code of the program to be compiled from the code repository without the need for the user to upload the source code, which improves compilation efficiency while protecting the security of the source code.
[0039] Step S230: determine a private compilation server pre-configured for the user terminal, and call the private compilation server to process the compilation data.
[0040] In this exemplary embodiment, users are supported to configure their own private compilation servers and select compilation environments. The private compilation server includes a private physical server, or a private container deployed on the compilation server. That is, the server can deploy a physical machine specifically for a certain user to process the program compilation request of the user, or set a container for the user on the physical machine to process the program compilation request of the user through the container. Whether it is a private physical server or a private container, the user can independently maintain the compilation configuration parameters and resources therein.
[0041] For example, before a user requests compilation for the first time, he or she can apply for private compilation resources from the server. The server generates a new container on the compilation server based on the user's needs and allocates it to the user. The user can set the CPU and memory resources required for the container and configure the compilation parameters. For example, if the user's daily business is to compile Java-based programs in the Linux system, the corresponding compilation tools can be installed in the container; in addition, the proxy service provided by the server can be installed.
[0042] Users can also modify and update the configuration of the private compile server according to changes in their business needs, or dynamically expand the compilation resources. For example, when the user's commonly used operating system changes, the configuration parameters of the compilation environment in the private compile server can be modified.
[0043] It can be seen that some users have pre-configured private compilation servers. The task server can determine the private compilation server of the user terminal based on the user identifier, or the source address information, browser information, etc. in the compilation request, and then call the private compilation server to process the above compilation data, that is, execute the compilation process.
[0044] It should be noted that the server can also optimize the deployment of private compilation servers. For example, when many users use private containers, these containers can be diverted to different compilation servers (host machines) to reduce the pressure on the same compilation server to handle parallel compilation tasks.
[0045] In an optional embodiment, reference Figure 4 As shown, the private compilation server can be called to process the compilation data through the following steps S410 and S420:
[0046] Step S410, establishing a workspace according to the compiled data;
[0047] Step S420: calling the private compile server to run the compiled data in the workspace through the proxy service set on the private compile server.
[0048] The workspace can be regarded as a specific directory divided on the task server, which is used to store the compilation data and related resources in this compilation. Different workspaces are generally independent of each other to ensure that parallel compilation tasks do not interfere with each other.
[0049] The proxy service is provided by the server and is generally pre-installed by the user on the private compile server. It is used to provide a channel for interaction between the task server and the private compile server. For example, the task server synchronizes the compilation task to the private compile server through the proxy service to call the private compile server to execute the compilation task. The private compile server obtains the compilation data from the workspace of the task server for compilation.
[0050] Further, the task server can also monitor the compilation log returned by the proxy service and return the compilation log to the user end. Specifically, in the process of the private compilation server executing the compilation, the compilation log will be continuously generated, and the proxy service can transmit the compilation log back to the task server in real time; the task server can timely discover the abnormalities in the compilation by monitoring the compilation log, for example, when no new log is generated for a period of time, the private compilation server can be called to re-awaken the compilation task, etc., and the abnormal discovery and disposal in the compilation log can be realized by setting corresponding rules on the task server or the proxy service. In addition to monitoring the compilation log, the task server can also upload it to the log storage system (which can be an independent data system or a subsystem divided in the database storing the compilation data); the scheduling server obtains the compilation log from the log storage system and finally returns it to the user end for display. Allow the user to see the compilation log during the compilation process, so as to understand the progress of the compilation. It should be noted that in the synchronization process of the above-mentioned compilation log, the synchronization cycle of each link can be the same or different, such as the task server uploads the compilation log to the log storage system according to the first cycle, the scheduling server reads the compilation log from the log storage system according to the second cycle, and returns it to the user end according to the third cycle.
[0051] Step S240: obtaining a compilation product obtained by the private compilation server processing the compilation data.
[0052] The compilation product mainly refers to the compilation file obtained by compiling the program source code. The task server can synchronously obtain the compilation product in the form of a data packet during the compilation process, or obtain the complete compilation product after the compilation is completed. In an optional implementation, the task server can obtain the compilation product through the above-mentioned proxy service. Obtaining the complete compilation product indicates that the compilation is completed.
[0053] In an optional embodiment, referring to the above Figure 2 As shown, the compilation method may further include the following steps:
[0054] Step S250: When it is determined that the private compilation server pre-configured for the user terminal is empty, the compilation data is processed to obtain a corresponding compilation product.
[0055] When the user end is not configured with a private compile server, the result of the task server searching for the private compile server is generally a null value. In this case, the compilation can be performed directly on the task server. In an optional implementation, the task server can establish a workspace, obtain corresponding tools, allocate corresponding resources, and then process the compilation data in the workspace to execute the compilation process and obtain the corresponding compilation product. Usually, such a method actually diverts the compilation task at the back end, that is, when the user end configures a private compile server, the compilation is performed on the private compile server, and when the user does not configure a private compile server, the compilation is performed on the task server, thereby reducing the pressure on the private compile server or the task server and improving the compilation efficiency.
[0056] In an optional embodiment, referring to the above Figure 2 As shown in the figure, after obtaining the compilation product, you can continue to perform the following steps:
[0057] Step S260, storing the compiled product in the product warehouse.
[0058] The product warehouse is used to store the compiled products for later use. The server can also open a specific interface associated with the product warehouse to facilitate the user to download the required compiled files by accessing the interface.
[0059] Figure 5 The flow of the compilation method executed by the entire compilation system as the main body is shown, which may include the following steps S510 to S530:
[0060] Step S510, the scheduling server receives a compilation request from the user terminal, determines a task server, and sends the compilation request to the task server;
[0061] Step S520, the task server obtains the required compilation data according to the compilation request, determines a private compilation server pre-configured for the user terminal, and calls the private compilation server to process the compilation data;
[0062] Step S530: the private compilation server obtains a compilation product by processing the compilation data, and returns the compilation product to the task server.
[0063] Based on the above, in this exemplary embodiment, on the one hand, by configuring a private compilation server for the user end, the compilation request of the user end can be processed in a targeted manner, which can improve the compilation efficiency and compilation quality. On the other hand, the resources required for the user compilation request are deployed on the private compilation server, and the compilation tool version is relatively fixed, which solves the problem of confusion in the compilation tool version in the related art and avoids the situation where the compilation fails due to the tool version. On the other hand, the service end can balance the pressure of various aspects when configuring the private compilation server for the user end, thereby improving the abnormal situation that may occur in the actual application (such as a large number of compilation requests of a certain language concurrently in a short period of time, by performing balanced deployment when configuring the private compilation server, it can prevent the concurrent requests from being concentrated on a few servers), and ensure the performance and efficiency of the compilation service.
[0064] The exemplary embodiment of the present disclosure also provides a compilation device, which can be deployed on a task server. Figure 6 As shown, the compiling device 600 may include:
[0065] A compile request acquisition module 610 is used to acquire a compile request initiated by a user terminal;
[0066] A compilation data acquisition module 620 is used to acquire required compilation data according to the above compilation request;
[0067] A calling module 630 is used to determine a private compile server pre-configured for the user terminal, and call the private compile server to process the above-mentioned compile data;
[0068] The compilation product acquisition module 640 is used to acquire the compilation product obtained by the private compilation server processing the compilation data.
[0069] In an optional implementation, the compile request acquisition module 610 is configured to:
[0070] A compile request sent from a scheduling server is received, where the compile request is sent from a user terminal to the scheduling server.
[0071] In an optional implementation, the compilation data acquisition module 620 is configured to:
[0072] Get the build parameters of the compilation request from the scheduling server;
[0073] Get the source code of the program to be compiled from the code repository, where the program to be compiled is the program in the compilation request.
[0074] In an optional implementation, the private compile server includes a private physical server, or a private container deployed on the compile server.
[0075] In an optional implementation, the compilation product acquisition module 640 is configured to:
[0076] When it is determined that the private compilation server preconfigured for the user terminal is empty, the compilation data is processed to obtain a corresponding compilation product.
[0077] In an optional implementation, the calling module 630 is configured to:
[0078] Create a workspace based on compiled data;
[0079] The private compile server is called to run the compilation data in the workspace through the proxy service set on the private compile server.
[0080] In an optional implementation, the calling module 630 is configured to:
[0081] Monitors the compilation log returned by the proxy service and returns the compilation log to the user end.
[0082] In an optional implementation, the compilation product acquisition module 640 is further configured to store the compilation product in a product warehouse after acquiring the compilation product.
[0083] The specific details of each part of the above-mentioned device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0084] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0085] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of this specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "exemplary method" section of this specification. The program product may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, an apparatus or a device or used in combination with it.
[0086] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0087] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0088] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0089] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0090] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above method. Figure 7 hereinafter, an electronic device 700 according to this exemplary embodiment of the present disclosure is described. Figure 7The electronic device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0091] like Figure 7 As shown, the electronic device 700 may be in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.
[0092] The storage unit 720 stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 710 can execute Figure 2 , Figure 3 , Figure 4 or Figure 5 The method steps shown, etc.
[0093] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 721 and / or a cache memory unit 722 , and may further include a read-only memory unit (ROM) 723 .
[0094] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, such program modules 725 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0095] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0096] The electronic device 700 may also communicate with one or more external devices 800 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0097] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary implementation of the present disclosure.
[0098] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiment of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0099] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0100] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0101] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A compilation method, executed by a task server, characterized in that: The compilation method comprises: Get the compilation request initiated by the user; Acquire required compilation data according to the compilation request; Determine a private compilation server pre-configured for the user terminal, and call the private compilation server to process the compilation data, wherein the private compilation server includes a private container deployed on the compilation server, and a compilation tool determined based on the user service is installed in the private container; Acquire a compilation product obtained by the private compilation server processing the compilation data; When it is determined that the private compilation server preconfigured for the user terminal is empty, the task server processes the compilation data to obtain a corresponding compilation product.
2. The method according to claim 1, characterized in that The obtaining of the compile request initiated by the user terminal includes: The compiling request sent from the scheduling server is received, wherein the compiling request is sent from the user terminal to the scheduling server.
3. The method according to claim 2, characterized in that The obtaining required compilation data according to the compilation request includes: Obtaining the construction parameters of the compilation request from the scheduling server; The source code of the program to be compiled is obtained from a code repository, where the program to be compiled is the program in the compilation request.
4. The method according to claim 1, characterized in that: The calling the private compilation server to process the compilation data includes: Establishing a workspace according to the compiled data; The private compile server is called to run the compiled data in the workspace through the proxy service set on the private compile server.
5. The method according to claim 4, characterized in that When calling the private compilation server to process the compilation data, the method further includes: The compilation log returned by the proxy service is monitored, and the compilation log is returned to the user end.
6. The method according to any one of claims 1 to 5, characterized in that: After obtaining the compilation product, the method further includes: The compiled product is stored in a product warehouse.
7. A compiling method, characterized in that: include: The scheduling server receives a compilation request from a user terminal, determines a task server, and sends the compilation request to the task server; The task server obtains required compilation data according to the compilation request, determines a private compilation server preconfigured for the user terminal, and calls the private compilation server to process the compilation data, wherein the private compilation server includes a private container deployed on the compilation server, and a compilation tool determined based on the user service is installed in the private container; The private compilation server obtains a compilation product by processing the compilation data, and returns the compilation product to the task server; When it is determined that the private compilation server preconfigured for the user terminal is empty, the task server processes the compilation data to obtain a corresponding compilation product.
8. A compiling device, deployed on a task server, characterized in that: The compiling device comprises: A compile request acquisition module, used to acquire a compile request initiated by a user terminal; A compilation data acquisition module, used to acquire required compilation data according to the compilation request; a calling module, configured to determine a private compile server preconfigured for the user terminal, and call the private compile server to process the compile data, wherein the private compile server includes a private container deployed on the compile server, and a compile tool determined based on the user service is installed in the private container; A compilation product acquisition module is used to acquire the compilation product obtained by the private compilation server processing the compilation data. The compilation product acquisition module is further configured to, when it is determined that the private compilation server pre-configured by the user terminal is empty, process the compilation data by the task server to obtain the corresponding compilation product.
9. A compilation system, characterized in that: It includes scheduling server, task server and private compilation server; among them, The scheduling server is used to receive a compilation request from a user terminal, determine a task server, and send the compilation request to the task server; The task server is configured to obtain required compilation data according to the compilation request, determine a private compilation server pre-configured for the user terminal, and call the private compilation server to process the compilation data, wherein the private compilation server includes a private container deployed on the compilation server, and a compilation tool determined based on the user service is installed in the private container; The private compilation server is used to obtain a compilation product by processing the compilation data and return the compilation product to the task server. The task server is also used for processing the compilation data by the task server to obtain the corresponding compilation product when it is determined that the private compilation server pre-configured for the user terminal is empty.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Remote software compilation method and system
CN107168765A