CN107656739B - Code compiling method and device based on windows system - Google Patents
Code compiling method and device based on windows system Download PDFInfo
- Publication number
- CN107656739B CN107656739B CN201711084626.5A CN201711084626A CN107656739B CN 107656739 B CN107656739 B CN 107656739B CN 201711084626 A CN201711084626 A CN 201711084626A CN 107656739 B CN107656739 B CN 107656739B
- Authority
- CN
- China
- Prior art keywords
- snapshot
- compiling
- identifier
- cloud host
- control system
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000004590 computer program Methods 0.000 claims description 17
- 238000004891 communication Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
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)
- Devices For Executing Special Programs (AREA)
Abstract
The embodiment of the invention provides a code compiling method and device based on a windows system, wherein a compiling environment identifier input by a user is received, a snapshot identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier, the use state of a cloud host is obtained, a compiling instruction is sent to the cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier, so that the cloud host obtains a source code, the snapshot is started to obtain the corresponding compiling environment to compile the source code, and storage information of a compiling file is sent back to a central control system to be stored after compiling is successful, so that the same cloud host is configured with a plurality of sets of compiling environments, compiling can be carried out concurrently, and compiling efficiency and cloud host use efficiency are improved.
Description
Technical Field
The invention relates to the technical field of software development, in particular to a code compiling method and device based on a windows system.
Background
In software development, when an application program or a driver needs to be issued, a source code needs to be compiled into a specified file, and compiling environments for different languages and different platforms depend on are different.
In order to reduce the compiling time of developers, various compiling environments required to be used for development are pre-configured in a cloud terminal, and each compiling environment corresponds to one cloud host. When compiling is developed, a needed environment is selected autonomously for compiling. The scheme solves the problem that the complicated work of independently maintaining different compiling environments for each development can lead to unlimited increase of cloud hosts, difficult maintenance and low use efficiency of the cloud hosts.
Disclosure of Invention
The invention provides a code compiling method and device based on a windows system, which are used for solving the problem that a cloud host is difficult to maintain and low in utilization rate in the existing compiling process.
In a first aspect, an embodiment of the present invention provides a code compiling method based on a windows system, including:
the central control system receives a compiling environment identifier input by a user, and determines a snapshot identifier corresponding to the input compiling environment identifier according to the corresponding relation between the compiling environment identifier and the snapshot identifier, wherein each compiling environment has a unique compiling environment identifier;
the central control system acquires the use state of a cloud host, sends a compiling instruction to the cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host can acquire a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, and sends out storage information of a compiled file after compiling is successful;
and the central control system receives and stores the storage information of the compiled file sent by the cloud host.
Optionally, the method further comprises:
sending a compiling instruction to a cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state so that the cloud host can acquire a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, generating a memory snapshot according to a user request after the compiling is failed, and sending the memory snapshot;
and receiving and storing the memory snapshot sent by the cloud host.
In a second aspect, an embodiment of the present invention provides a code compiling method based on a windows system, including:
the method comprises the steps that a cloud host receives a compiling instruction sent by a central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by a central control system receiving user, and an identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, clears the compiling environment after compiling is successful, and sends storage information of a compiled file to the central control system so that the central control system stores the storage information of the compiled file.
Optionally, the method further comprises:
the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling is failed, and sends the memory snapshot to the central control system so that the central control system stores the memory snapshot.
In a third aspect, an embodiment of the present invention provides a code compiling apparatus based on a windows system, including:
the identification module is used for receiving compiling environment identification input by a user, determining snapshot identification corresponding to the input compiling environment identification according to the corresponding relation between the compiling environment identification and the snapshot identification, and each compiling environment has a unique compiling environment identification;
the sending module is used for obtaining the use state of a cloud host, sending a compiling instruction to the cloud host which stores the snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host can obtain a source code, starting the snapshot to obtain a corresponding compiling environment to compile the source code, and sending out the storage information of a compiled file after the compiling is successful;
and the first receiving module is used for receiving and storing the storage information of the compiled file sent by the cloud host.
Optionally, the sending module is further configured to send a compiling instruction to a cloud host that stores a snapshot corresponding to the snapshot identifier and is in an idle state, so that the cloud host obtains a source code, starts the snapshot to obtain a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling fails, and sends the memory snapshot;
the first receiving module is further configured to receive and store the memory snapshot sent by the cloud host.
In a fourth aspect, an embodiment of the present invention provides a code compiling apparatus based on a windows system, including:
the second receiving module is used for receiving a compiling instruction sent by the central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by the central control system receiving a user, and the identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
and the execution module is used for acquiring a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, clearing the compiling environment after compiling is successful, and sending the storage information of the compiled file to the central control system so that the central control system stores the storage information of the compiled file.
Optionally, the execution module is further configured to obtain a source code, start the snapshot to obtain a corresponding compiling environment to compile the source code, generate a memory snapshot according to a user request after the compiling fails, and send the memory snapshot to the central control system, so that the central control system stores the memory snapshot.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, a bus, and a computer program stored on the memory and executable on the processor;
the processor and the memory complete mutual communication through the bus;
the processor, when executing the computer program, implements the method as described above.
In a sixth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method as described above.
According to the technical scheme, the code compiling method and device based on the windows system provided by the embodiment of the invention have the advantages that by receiving the compiling environment identification input by the user, the snapshot identification corresponding to the input compiling environment identification is determined according to the corresponding relation between the compiling environment identification and the snapshot identification, and the compiling instruction is sent to the cloud host which stores the snapshot corresponding to the snapshot identification and is in an idle state, so that the cloud host can obtain the source code, the snapshot is started to obtain the corresponding compiling environment to compile the source code, and the storage information of the compiling file is sent back to the central control system to be stored after the compiling is successful, so that the configuration of multiple sets of compiling environments by the same cloud host is realized, the compiling can be carried out simultaneously, and the compiling efficiency and the using efficiency of the cloud host are improved.
Drawings
Fig. 1 is a schematic flowchart of a code compiling method based on a windows system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a code compiling method based on a windows system according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for compiling code based on a windows system according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for compiling code based on a windows system according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a code compiling apparatus based on a windows system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a code compiling apparatus based on a windows system according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Fig. 1 shows that an embodiment of the present invention provides a code compiling method based on a windows system, including:
s11, the central control system receives a compiling environment identifier input by a user, a snapshot identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier, and each compiling environment has a unique compiling environment identifier;
s12, the central control system acquires the use state of a cloud host, sends a compiling instruction to the cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier, so that the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, and sends out storage information of a compiled file after compiling is successful;
and S13, the central control system receives and stores the storage information of the compiled file sent by the cloud host.
With respect to the above steps S11-S13, it should be noted that, in the embodiment of the present invention, the central control system and the cloud host belong to a complete cloud compiling system. The cloud compiling system is a code compiling system aiming at the windows system. Different languages, and different compiling environments that are dependent on different platforms are different, and for this reason, each compiling environment has a unique compiling environment identifier. Each compiling environment is stored on the cloud host in a snapshot mode, and each snapshot corresponds to a unique snapshot mark. Different tools or different versions of the same tool can be stored on the same cloud host, so that the quantity of the cloud hosts cannot be infinitely increased.
The user inputs the compiling identification of the compiling environment to be used, the central control system receives the compiling identification, and the snapshot identification corresponding to the input compiling environment identification is determined according to the corresponding relation between the compiling environment identification and the snapshot identification. The central control system can know the use states of all the cloud hosts through the virtualization platform, wherein the use states comprise snapshot information stored in the cloud hosts and the current idle or working state of the cloud hosts. And sending a compiling instruction to the cloud host with the first sequence according to the preset sequence of the idle cloud hosts, wherein the compiling instruction comprises the obtained snapshot identifier, so that the selected cloud host can start the corresponding snapshot according to the snapshot identifier.
The cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, and sends storage information of a compiled file to the central control system after compiling is successful, and the central control system receives and stores the storage information of the compiled file sent by the cloud host. The storage information includes a storage path of the compiled file, compilation information, and the like.
According to the code compiling method based on the windows system, the compiling environment identification input by the user is received, the snapshot identification corresponding to the compiling environment identification is determined according to the corresponding relation between the compiling environment identification and the snapshot identification, the compiling instruction is sent to the cloud host which stores the snapshot corresponding to the snapshot identification and is in the idle state, so that the cloud host can obtain the source code, the snapshot is started to obtain the corresponding compiling environment to compile the source code, the storage information of the compiled file is sent back to the central control system to be stored after the compiling is successful, the configuration of multiple sets of compiling environments of the same cloud host is achieved, the compiling can be carried out concurrently, and the compiling efficiency and the using efficiency of the cloud host are improved.
Fig. 2 shows that an embodiment of the present invention provides a code compiling method based on a windows system, including:
s21, the central control system receives a compiling environment identifier input by a user, a snapshot identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier, and each compiling environment has a unique compiling environment identifier;
s22, the central control system acquires the use state of a cloud host, sends a compiling instruction to the cloud host which stores the snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling fails, and sends the memory snapshot;
and S23, the central control system receives and stores the memory snapshot sent by the cloud host.
For the above steps S21 to S23, it should be noted that, in the embodiment of the present invention, a process of sending the editing instruction to the cloud host by the master control system is described in detail in the above embodiment, and is not described herein again,
the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling is failed, and sends the memory snapshot to the central control system, and the central control system receives and stores the memory snapshot sent by the cloud host. Here, the memory snapshot is a status record of an error occurring in the compiling process, according to a request preset by a user.
According to the code compiling method based on the windows system, the compiling environment identification input by the user is received, the snapshot identification corresponding to the compiling environment identification is determined according to the corresponding relation between the compiling environment identification and the snapshot identification, the compiling instruction is sent to the cloud host which stores the snapshot corresponding to the snapshot identification and is in the idle state, so that the cloud host can obtain the source code, the snapshot is started to obtain the corresponding compiling environment to compile the source code, the memory snapshot is generated according to the user request after the compiling is failed, the memory snapshot is sent back to the central control system to be stored, the configuration of multiple sets of compiling environments of the same cloud host is achieved, the compiling can be carried out concurrently, and the compiling efficiency and the using efficiency of the cloud host are improved.
Fig. 3 shows a code compiling method based on a windows system according to an embodiment of the present invention, including:
s31, the cloud host receives a compiling instruction sent by the central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by the central control system receiving a user, and the identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
and S32, the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, clears the compiling environment after compiling is successful, and sends the storage information of the compiled file to the central control system so that the central control system stores the storage information of the compiled file.
For step S31 and step S32, it should be noted that the method is described in a scheme that takes the cloud host as an execution subject, and the execution principle is described in detail in the foregoing embodiments and is not described herein again.
According to the code compiling method based on the windows system, the cloud host receives a compiling instruction sent by the central control system, the source code is obtained, the snapshot is started to obtain the corresponding compiling environment to compile the source code, the compiling environment is cleared after the compiling is successful, and the storage information of the compiled file is sent to the central control system, so that the central control system stores the storage information of the compiled file, the configuration of multiple sets of compiling environments on the same cloud host is realized, the compiling can be performed concurrently, and the compiling efficiency and the using efficiency of the cloud host are improved.
Fig. 4 shows a code compiling method based on a windows system according to an embodiment of the present invention, including:
s41, the cloud host receives a compiling instruction sent by the central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by the central control system receiving a user, and the identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
s42, the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling fails, and sends the memory snapshot to the central control system so that the central control system stores the memory snapshot.
For step S41 and step S42, it should be noted that the method is described in a scheme that takes the cloud host as an execution subject, and the execution principle is described in detail in the foregoing embodiments and is not described herein again.
According to the code compiling method based on the windows system, the cloud host receives a compiling instruction sent by the central control system, the source code is obtained, the snapshot is started to obtain a corresponding compiling environment to compile the source code, the memory snapshot is generated according to the user request after the compiling is failed, and the memory snapshot is sent to the central control system, so that the central control system stores the memory snapshot, a plurality of sets of compiling environments configured on the same cloud host are achieved, the compiling can be carried out concurrently, and the compiling efficiency and the cloud host use efficiency are improved.
Fig. 5 shows a code compiling apparatus based on a windows system according to an embodiment of the present invention, which includes an identifying module 51, a sending module 52, and a first receiving module 53, where:
the identification module 51 is configured to receive a compiling environment identifier input by a user, and determine a snapshot identifier corresponding to the input compiling environment identifier according to a correspondence between the compiling environment identifier and the snapshot identifier, where each compiling environment has a unique compiling environment identifier;
the sending module 52 is configured to obtain a use state of a cloud host, send a compiling instruction to the cloud host in an idle state and storing a snapshot corresponding to the snapshot identifier according to the use state and the snapshot identifier, so that the cloud host obtains a source code, start the snapshot to obtain a corresponding compiling environment, compile the source code, and send storage information of a compiled file after compiling is successful; generating a memory snapshot according to a user request after the compiling is failed, and sending the memory snapshot;
a first receiving module 53, configured to receive and store storage information of the compiled file sent by the cloud host; and the memory snapshot is also used for receiving and storing the memory snapshot sent by the cloud host.
Since the principle of the apparatus according to the embodiment of the present invention is the same as that of the method according to the above embodiment, further details are not described herein for further explanation.
It should be noted that, in the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).
According to the code compiling device based on the windows system, provided by the embodiment of the invention, the compiling environment identification input by a user is received, the snapshot identification corresponding to the input compiling environment identification is determined according to the corresponding relation between the compiling environment identification and the snapshot identification, and a compiling instruction is sent to the cloud host which stores the snapshot corresponding to the snapshot identification and is in an idle state, so that the cloud host acquires a source code, the snapshot is started to acquire the corresponding compiling environment to compile the source code, and the storage information of a compiled file is sent back to the central control system for storage after the compiling is successful; and generating a memory snapshot according to a user request after the compiling fails, and sending the memory snapshot back to the central control system for storage, so that the configuration of multiple sets of compiling environments for the same cloud host is realized, the compiling can be performed concurrently, and the compiling efficiency and the cloud host use efficiency are improved.
Fig. 6 shows a code compiling apparatus based on the windows system according to an embodiment of the present invention, which includes a second receiving film 61 and an executing module 62, where:
the second receiving module 61 is configured to receive a compiling instruction sent by the central control system, where the compiling instruction includes a snapshot identifier, the snapshot identifier is a compiling environment identifier input by the central control system receiving a user, and an identifier corresponding to the input compiling environment identifier is determined according to a corresponding relationship between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
the execution module 62 is configured to obtain a source code, start the snapshot to obtain a corresponding compiling environment to compile the source code, clear the compiling environment after compiling is successful, and send storage information of a compiled file to the central control system, so that the central control system stores the storage information of the compiled file; the central control system is further used for acquiring a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, generating a memory snapshot according to a user request after the compiling is failed, and sending the memory snapshot to the central control system so that the central control system stores the memory snapshot.
Since the principle of the apparatus according to the embodiment of the present invention is the same as that of the method according to the above embodiment, further details are not described herein for further explanation.
It should be noted that, in the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).
According to the code compiling device based on the windows system, the compiling instruction sent by the central control system is received through the cloud, the source code is obtained, the snapshot is started to obtain the corresponding compiling environment to compile the source code, the memory snapshot is generated according to the user request after the compiling fails, the memory snapshot is sent to the central control system, the central control system stores the memory snapshot and generates the memory snapshot according to the user request after the compiling fails, the memory snapshot is sent to the central control system to be stored, the fact that the same cloud host configures a plurality of sets of compiling environments is achieved, the compiling can be conducted concurrently, and the compiling efficiency and the using efficiency of the cloud host are improved.
Fig. 7 shows an electronic device provided in an embodiment of the present invention, including: a first processor 701, a first memory 702, a first bus 703 and a computer program stored on the first memory and executable on the first processor;
the first processor and the first memory are communicated with each other through the first bus;
the first processor, when executing the computer program, implements a method as described above, for example comprising: receiving compiling environment identification input by a user, and determining snapshot identification corresponding to the input compiling environment identification according to the corresponding relation between the compiling environment identification and the snapshot identification, wherein each compiling environment has a unique compiling environment identification; acquiring a use state of a cloud host, sending a compiling instruction to the cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host acquires a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, and sending out storage information of a compiled file after compiling is successful; and receiving and storing the storage information of the compiled file sent by the cloud host.
An embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, and when executed by a processor, the computer program implements the method as described above, for example, including: receiving compiling environment identification input by a user, and determining snapshot identification corresponding to the input compiling environment identification according to the corresponding relation between the compiling environment identification and the snapshot identification, wherein each compiling environment has a unique compiling environment identification; acquiring a use state of a cloud host, sending a compiling instruction to the cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host acquires a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, and sending out storage information of a compiled file after compiling is successful; and receiving and storing the storage information of the compiled file sent by the cloud host.
Fig. 8 shows an electronic device provided in an embodiment of the present invention, including: a first processor 801, a first memory 802, a first bus 803, and a computer program stored on the first memory and executable on the first processor;
the first processor and the first memory are communicated with each other through the first bus;
the first processor, when executing the computer program, implements a method as described above, for example comprising: receiving a compiling instruction sent by a central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by a central control system receiving user, and an identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; and acquiring a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, clearing the compiling environment after compiling is successful, and sending the storage information of the compiled file to the central control system so that the central control system stores the storage information of the compiled file.
An embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, and when executed by a processor, the computer program implements the method as described above, for example, including: receiving a compiling instruction sent by a central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by a central control system receiving user, and an identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; and acquiring a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, clearing the compiling environment after compiling is successful, and sending the storage information of the compiled file to the central control system so that the central control system stores the storage information of the compiled file.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Those of ordinary skill in the art will understand that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions and scope of the present invention as defined in the appended claims.
Claims (12)
1. A code compiling method based on a windows system is characterized by comprising the following steps:
the central control system receives a compiling environment identifier input by a user, and determines a snapshot identifier corresponding to the input compiling environment identifier according to the corresponding relation between the compiling environment identifier and the snapshot identifier, wherein each compiling environment has a unique compiling environment identifier, each compiling environment is stored on the cloud host in a snapshot form, and each snapshot corresponds to the unique snapshot identifier; different compiling environments are stored on the same cloud host;
the central control system acquires the use state of a cloud host, sends a compiling instruction to the cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host can acquire a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, and sends out storage information of a compiled file after compiling is successful;
and the central control system receives and stores the storage information of the compiled file sent by the cloud host.
2. The method of claim 1, further comprising:
sending a compiling instruction to a cloud host which stores a snapshot corresponding to the snapshot identifier and is in an idle state so that the cloud host can acquire a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, generating a memory snapshot according to a user request after the compiling is failed, and sending the memory snapshot;
and receiving and storing the memory snapshot sent by the cloud host.
3. A code compiling method based on a windows system is characterized by comprising the following steps:
the method comprises the steps that a cloud host receives a compiling instruction sent by a central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by a central control system receiving user, and an identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, clears the compiling environment after compiling is successful, and sends storage information of a compiled file to the central control system so that the central control system stores the storage information of the compiled file.
4. The method of claim 3, further comprising:
the cloud host acquires a source code, starts the snapshot to acquire a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling is failed, and sends the memory snapshot to the central control system so that the central control system stores the memory snapshot.
5. A code compiling apparatus based on a windows system, comprising:
the identification module is used for receiving compiling environment identification input by a user, determining snapshot identification corresponding to the input compiling environment identification according to the corresponding relation between the compiling environment identification and the snapshot identification, wherein each compiling environment has a unique compiling environment identification, each compiling environment is stored on the cloud host in a snapshot form, and each snapshot corresponds to the unique snapshot identification; different compiling environments are stored on the same cloud host;
the sending module is used for obtaining the use state of a cloud host, sending a compiling instruction to the cloud host which stores the snapshot corresponding to the snapshot identifier and is in an idle state according to the use state and the snapshot identifier so that the cloud host can obtain a source code, starting the snapshot to obtain a corresponding compiling environment to compile the source code, and sending out the storage information of a compiled file after the compiling is successful;
and the first receiving module is used for receiving and storing the storage information of the compiled file sent by the cloud host.
6. The apparatus according to claim 5, wherein the sending module is further configured to send a compiling instruction to a cloud host that stores the snapshot corresponding to the snapshot identifier and is in an idle state, so that the cloud host obtains a source code, starts the snapshot to obtain a corresponding compiling environment to compile the source code, generates a memory snapshot according to a user request after the compiling fails, and sends out the memory snapshot;
the first receiving module is further configured to receive and store the memory snapshot sent by the cloud host.
7. A code compiling apparatus based on a windows system, comprising:
the second receiving module is used for receiving a compiling instruction sent by the central control system, wherein the compiling instruction comprises a snapshot identifier, the snapshot identifier is a compiling environment identifier input by the central control system receiving a user, and the identifier corresponding to the input compiling environment identifier is determined according to the corresponding relation between the compiling environment identifier and the snapshot identifier; the cloud host is a host which stores a snapshot corresponding to the snapshot identifier and is in an idle state;
and the execution module is used for acquiring a source code, starting the snapshot to acquire a corresponding compiling environment to compile the source code, clearing the compiling environment after compiling is successful, and sending the storage information of the compiled file to the central control system so that the central control system stores the storage information of the compiled file.
8. The apparatus of claim 7, wherein the execution module is further configured to obtain a source code, start the snapshot to obtain a corresponding compiling environment to compile the source code, generate a memory snapshot according to a user request after the compiling fails, and send the memory snapshot to the central control system, so that the central control system stores the memory snapshot.
9. An electronic device, comprising: a first processor, a first memory, a first bus, and a computer program stored on the first memory and executable on the first processor;
the first processor and the first memory are communicated with each other through the first bus;
the first processor, when executing the computer program, implements the method of any of claims 1-2.
10. A non-transitory computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the method of any one of claims 1-2.
11. An electronic device, comprising: a second processor, a second memory, a second bus, and a computer program stored on the second memory and executable on the second processor;
the second processor and the second memory complete mutual communication through the second bus;
the second processor, when executing the computer program, implements the method of any of claims 3-4.
12. A non-transitory computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the method of any one of claims 3-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711084626.5A CN107656739B (en) | 2017-11-07 | 2017-11-07 | Code compiling method and device based on windows system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711084626.5A CN107656739B (en) | 2017-11-07 | 2017-11-07 | Code compiling method and device based on windows system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107656739A CN107656739A (en) | 2018-02-02 |
CN107656739B true CN107656739B (en) | 2021-03-12 |
Family
ID=61120549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711084626.5A Active CN107656739B (en) | 2017-11-07 | 2017-11-07 | Code compiling method and device based on windows system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107656739B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109976748A (en) * | 2019-02-28 | 2019-07-05 | 南京南瑞继保电气有限公司 | A kind of program processing method, terminal, server and computer storage medium |
CN111752572B (en) * | 2020-06-29 | 2023-03-14 | 百度在线网络技术(北京)有限公司 | Compiling method, device, equipment and storage medium |
CN115080151B (en) * | 2022-07-22 | 2023-07-14 | 平安银行股份有限公司 | APP starting flow control method, computer readable storage medium and terminal |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101290581B (en) * | 2008-05-16 | 2011-09-14 | 北京星网锐捷网络技术有限公司 | Compiling system and method |
CN101667134B (en) * | 2009-09-23 | 2013-06-05 | 中兴通讯股份有限公司 | Method for constructing compiling system and compiling system constructing device |
US8959484B2 (en) * | 2012-06-21 | 2015-02-17 | Microsoft Corporation | System for hosted, shared, source control build |
CN103514004B (en) * | 2012-06-28 | 2016-12-21 | 联想(北京)有限公司 | System environment management method under Windows system and device |
CN105867990A (en) * | 2015-11-20 | 2016-08-17 | 乐视云计算有限公司 | Software development integration method and device thereof |
CN105893105A (en) * | 2016-03-29 | 2016-08-24 | 乐视控股(北京)有限公司 | Compiling system and method for multiple compiling platforms |
CN106095522A (en) * | 2016-06-03 | 2016-11-09 | 北京奇虎科技有限公司 | A kind of method realizing distributed compilation and distributed compilation system |
CN106648597A (en) * | 2016-10-10 | 2017-05-10 | 许继集团有限公司 | Multi-user concurrent remote compiling engine architecture |
-
2017
- 2017-11-07 CN CN201711084626.5A patent/CN107656739B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107656739A (en) | 2018-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108121543B (en) | Software code compiling processing method and device | |
CN107656739B (en) | Code compiling method and device based on windows system | |
CN109324799A (en) | A kind of code compiling method, computer installation and computer readable storage medium | |
KR102100323B1 (en) | Method and server for the service of machine learning platform | |
CN104246702A (en) | Workflow compilation | |
CN112305924B (en) | Control method and device of household appliance, electronic equipment and storage medium | |
CN107203535B (en) | Information query method and device | |
CN111459835A (en) | Service debugging method and device, electronic equipment and computer readable storage medium | |
CN112769706B (en) | Componentized routing method and system | |
CN105760289A (en) | Debugging method and device of embedded system | |
CN109992501A (en) | The availability inspection of small routine can use small routine list generation method and device | |
CN112631600A (en) | Software construction method and system based on Flutter | |
CN113495723B (en) | Method, device and storage medium for calling functional component | |
WO2024152655A1 (en) | Cloud-native-based workflow orchestration method and apparatus, device, and medium | |
CN108234174B (en) | Management method and device of virtual network function | |
CN110209565A (en) | A kind of metadata schema adjustment method and its device | |
CN110597613A (en) | Task processing method, device, equipment and computer readable storage medium | |
CN111858020B (en) | User resource limiting method and device and computer storage medium | |
CN112685040A (en) | Method, device, equipment and storage medium for generating interface file in android system | |
CN101971562B (en) | Method, device and system for controlling automatic running process performance | |
CN109766088B (en) | Program generation method, program generation device, data processing method and server | |
CN110782040A (en) | Method, device, equipment and medium for training tasks of pitorch | |
CN110968351A (en) | BIOS configuration method and device | |
CN113626007B (en) | Application method and device of connector model and server | |
CN112445607B (en) | Method and device for executing method function by application program |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Room 332, 3 / F, Building 102, 28 xinjiekouwei street, Xicheng District, Beijing 100088 Applicant after: QAX Technology Group Inc. Address before: 100015 15, 17 floor 1701-26, 3 building, 10 Jiuxianqiao Road, Chaoyang District, Beijing. Applicant before: BEIJING QIANXIN TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |