CN116594632A - Compiling method, compiling device, computer device, storage medium and compiling system - Google Patents

Compiling method, compiling device, computer device, storage medium and compiling system Download PDF

Info

Publication number
CN116594632A
CN116594632A CN202310880049.XA CN202310880049A CN116594632A CN 116594632 A CN116594632 A CN 116594632A CN 202310880049 A CN202310880049 A CN 202310880049A CN 116594632 A CN116594632 A CN 116594632A
Authority
CN
China
Prior art keywords
compiling
program
target
server
function block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310880049.XA
Other languages
Chinese (zh)
Inventor
张湘东
谭华
张文安
贺赛娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202310880049.XA priority Critical patent/CN116594632A/en
Publication of CN116594632A publication Critical patent/CN116594632A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a compiling method, a compiling device, computer equipment, a storage medium and a compiling system. For use in a target server deployed with an integrated development environment and a compiled service agent, the method comprising: acquiring a function block program and a compiling environment identifier transmitted by the integrated development environment through the compiling service agent program, wherein the function block program is developed based on IEC 61499 standard; determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through the compiling service agent program, and uploading the functional block program to a target file in the target compiling environment; and controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program. The method can reduce the difficulty of realizing compiling.

Description

Compiling method, compiling device, computer device, storage medium and compiling system
Technical Field
The present application relates to the technical field of industrial internet, and in particular, to a compiling method, device, computer equipment, storage medium and compiling system.
Background
With the development of intelligent production, industrial production line hardware equipment and business processes are more and more complex, and development of new functional blocks is often required, so that cloud PLC (Programmable Logic Controller, programmable controller) is required to be compiled during running to support the new functional blocks.
In the conventional technology, a developer usually installs a compiling environment with the same version as a target device on a computer by a virtual machine to perform runtime compiling and basic testing.
However, the conventional technology has difficulty in maintaining the compiling environment, so that the compiling is difficult to realize.
Disclosure of Invention
The embodiment of the application provides a compiling method, a compiling device, computer equipment, a storage medium and a compiling system, which can reduce the difficulty of realizing compiling.
In a first aspect, the present application provides a compiling method for use in a target server, the target server being deployed with an integrated development environment and a compiling service agent, the method comprising: acquiring a function block program and a compiling environment identifier transmitted by an integrated development environment through a compiling service agent program, wherein the function block program is developed based on IEC 61499 standards; determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through a compiling service agent program, and uploading a function block program to a target file in the target compiling environment; and controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, the method further comprises: adding a compiling option to an initial compiling file in a target compiling environment based on a functional block program through a compiling service agent program to obtain a target compiling file; correspondingly, the compiling server is controlled to execute compiling on the function block program in the target file through the compiling service agent program, and the compiling server comprises: and controlling the compiling server to execute compiling on the function block program in the target file according to the target compiling file through the compiling service agent program.
In one embodiment, the function block program includes a tool library identifier, and adding, by the compiling service agent program, a compiling option to an initial compiling file in a target compiling environment based on the function block program includes: tool library identification is added to the initial compilation file by the compilation service agent based on the function block program.
In one embodiment, the method further comprises: and receiving and displaying the compiling error information sent by the compiling server through the compiling service agent program, wherein the compiling error information is generated by the compiling server when the compiling is performed on the function block program and errors occur.
In one embodiment, after the compiling server is controlled to perform compiling on the function block program in the target file by the compiling service agent program, the method further comprises: and receiving an execution file sent by the compiling server through the compiling service agent program, and transmitting the execution file back to the integrated development environment, wherein the execution file is generated after the compiling server compiles the functional block program.
In one embodiment, the number of function block programs transferred by the integrated development environment is multiple, wherein at least one function block program is sent by the integrated development environment after detecting a user selected trigger operation of the function block program.
In a second aspect, the present application provides a compiling apparatus provided in a target server, the target server being deployed with an integrated development environment and a compiling service agent program, the apparatus comprising: the acquisition module is used for acquiring the function block program and the compiling environment identifier transmitted by the integrated development environment through the compiling service agent program, wherein the function block program is developed based on IEC 61499 standard; the sending module is used for determining a target compiling environment from a plurality of compiling environments deployed in the compiling server based on the compiling environment identification through the compiling service agent program and uploading the functional block program to a target file in the target compiling environment; and the control module is used for controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, the apparatus further includes an adding module, configured to add, by the compiling service agent program, a compiling option to an initial compiling file in the target compiling environment based on the function block program, to obtain the target compiling file; correspondingly, the control module is specifically used for controlling the compiling server to execute compiling on the function block program in the target file according to the target compiling file through the compiling service agent program.
In one embodiment, the function block program includes a tool library identifier, and the adding module is specifically configured to add the tool library identifier to the initial compiled file based on the function block program through the compiling service agent program.
In one embodiment, the apparatus further includes a receiving module, configured to receive and display, by using the compiling service agent program, the compiling error information sent by the compiling server, where the compiling error information is generated by the compiling server when performing compiling on the function block program to generate an error.
In one embodiment, the receiving module is further configured to receive, by using the compiling service agent program, an execution file sent by the compiling server, and transmit the execution file back to the integrated development environment, where the execution file is generated after the compiling server compiles the function block program.
In one embodiment, the number of the function block programs transferred by the integrated development environment is multiple, and the sending module is further configured to send, through the integrated development environment, the function block program after detecting a triggering operation of a user on at least one function block program.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method according to any of the first aspects above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the first aspects above.
In a fifth aspect, the present application further provides a compiling system. The compiling system comprises a compiling server and a target server in the method according to any one of the first aspect, wherein the compiling server is deployed with a plurality of compiling environments.
In a sixth aspect, the application also provides a computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method according to any of the first aspects above.
The compiling method, the device, the computer equipment, the storage medium and the compiling system are used in the target server, the target server is provided with the integrated development environment and the compiling service agent program, the function block program and the compiling environment identification which are transmitted by the integrated development environment and are developed based on the IEC 61499 standard are obtained through the compiling service agent program, then the target compiling environment is determined from a plurality of compiling environments which are deployed in the compiling server based on the compiling environment identification through the compiling service agent program, the function block program is uploaded to a target file in the target compiling environment, and then the compiling server is controlled to execute compiling on the function block program in the target file through the compiling service agent program.
Drawings
FIG. 1 is an application environment diagram of a compilation method in one embodiment;
FIG. 2 is a schematic diagram of an application distributed deployment in one embodiment;
FIG. 3 is a flow diagram of a compilation method in one embodiment;
FIG. 4 is a schematic diagram of interactions between a target server and a compilation server in one embodiment;
FIG. 5 is a block diagram of a compiler apparatus in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The compiling method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the target server 101 communicates with the compiling server 102 via a network. The first data storage system and the second data storage system may store data that the target server 101 and the compiling server 102 need to process, respectively. The first data storage system may be integrated on the target server 101, or may be placed on a cloud or other network server; the second data storage system may be integrated on the compilation server 102 or may be located on a cloud or other network server. The target server 101 and the compiling server 102 may be implemented as separate servers or as a server cluster composed of a plurality of servers.
The IEC 61499 standard is an open automation system level modeling language, and along with the development of intelligent production and the decentralization of system control functions, the IEC 61499 standard has been paid more and more attention to the characteristics of distributed control, software and hardware decoupling, IT/OT (Information Technology/Operation Technology ) fusion and the like, and the industrial control system based on the IEC 61499 standard is greatly popularized at present.
The application development based on the IEC 61499 standard is realized in a low program mode, various functional blocks are used for constructing application logic through event and data connection, the IEC 61499 standard supports cross-operating system and distributed deployment, the application can be deployed on different operating systems such as Windows 32/64, linux 32/64 and Euler, and the application developed based on the IEC 61499 standard can be deployed on a cloud, a virtual machine, an industrial personal computer and a raspberry pie, even a singlechip, and the method has the advantages of high flexibility and convenience in computing power expansion.
As shown in fig. 2, an application distributed deployment schematic diagram is provided, where a Windows 32 system is deployed on a device 1 and a device 4, a Linux 64 system is deployed on a device 2 and a device 3, each of the application 1, the application 2 and the application 3 is composed of a plurality of functional blocks (i.e. functional block programs), and service logic is implemented between the functional blocks through event streams and data streams, where the application 1 is distributed on the device 1, the device 2 and the device 3, the application 2 is distributed on the device 3 and the device 4, and the application 3 is distributed on the device 1 and the device 2.
However, because the hardware equipment and the business flow of the industrial production line are changed differently, the requirements of all applications are difficult to meet only through standard functional blocks, and therefore, the development of a custom new functional block is often required, wherein each functional block consists of an external interface and an internal implementation, the external interface comprises input/output events and input/output variables, and an internal algorithm is implemented through a programming language or a functional block combination mode. The application development and running environment based on IEC 61499 standard comprises two parts, wherein the first part is to complete function block design, application flow arrangement and system deployment model definition by using IDE (Integrated Development Environment ), and the second part is to deploy the application to the running time of one or more devices according to the system deployment model definition.
For this reason, the cloud PLC needs to be compiled to support a new functional block during running, in the conventional technology, before being deployed on a target device, developers usually install a compiling environment in the same version as the target device on their own computer through a virtual machine to perform runtime compiling and basic testing, so that the following problems occur:
(1) The configuration of the compiling environment is complex, when the cloud PLC is to be compiled, a matched compiling tool chain and a third party tool library are required to be installed, and the compiling failure is likely to occur due to incorrect configuration. It is difficult for different developers to ensure that the compiling environments of various configurations are completely consistent, and compiling failure is easy to occur due to lack of components or inconsistent versions and the like.
(2) The cloud PLC can support different operating systems, and the specific use on what operating system is required to be determined according to the equipment or hardware peripheral driving requirements provided by an application party, for example, part of the motion control card only provides Windows driving and can only run on Windows; if the system has high real-time requirements, the system must run on Linux patched with real-time patches; if the cost is strictly checked, the system may need to run on a raspberry group or even a singlechip, and therefore, developers need to frequently switch the compiling environment or maintain the multi-version compiling environment.
(3) Different applications often use different operating systems, developers need to switch the compiling environments frequently, and the compiling environments are difficult to maintain, especially when a plurality of devices use different operating systems, a plurality of compiling environments need to be maintained simultaneously.
(4) Distributed application development often requires multi-person cooperation, and each person maintains own compiling environment to easily cause inconsistent compiling environment, so that the situation that compiling fails when programs of other persons are put on own compiling environment can cause difficulty in cooperation development.
(5) The IDE and the runtime compiling process are mutually independent, after the development of the functional block is completed by the IDE, a developer needs to manually upload the functional block program and manually compile the compiling file, the manually uploading functional block program is slower, the compiling file is large in workload, errors are easy to occur, and the compiling efficiency is low.
In summary, the conventional technology has two core problems, namely, the first is that the compiling environment is difficult to maintain, and the second is that the compiling efficiency is low, so that the difficulty of realizing compiling is high.
Based on the conventional technology, the embodiment of the application provides a compiling method, which is characterized in that a compiling service agent program is used for acquiring a functional block program and a compiling environment identifier which are transmitted by an integrated development environment and are developed based on IEC 61499 standard, then the compiling service agent program is used for determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identifier, uploading the functional block program to a target file in the target compiling environment, and then the compiling server is controlled by the compiling service agent program to execute compiling on the functional block program in the target file, so that a developer does not need to maintain the compiling environment on own computer and manually upload the functional block program, thereby solving the problems of difficult maintenance of the compiling environment and low compiling efficiency and further reducing the difficulty of realizing compiling.
It should be noted that the beneficial effects or the technical problems to be solved by the embodiments of the present application are not limited to this one, but may be other implicit or related problems, and particularly, reference may be made to the following description of embodiments.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
In one embodiment, as shown in fig. 3, a compiling method is provided, which is applied to the target server in fig. 1, where the target server is deployed with an integrated development environment and a compiling service agent, and the method may include the steps of:
step 301, obtaining a function block program and a compiling environment identifier transferred by the integrated development environment through a compiling service agent program, wherein the function block program is developed based on IEC 61499 standard.
Wherein, the integrated development environment, that is, the IDE, is an application program for providing a program development environment, and a developer can develop a function block program in the IDE based on the IEC 61499 standard. The compile environment identification includes a compile environment name and version.
Optionally, the IDE and the compiling service agent program may communicate through an automation interface, that is, after the IDE receives the compiling environment identifier input by the developer and detects the selected triggering operation for the function block program, the IDE automatically transmits the function block program to be compiled and the compiling environment identifier to the compiling service agent program through the automation interface, so that the compiling service agent program may acquire the function block program and the compiling environment identifier transmitted by the IDE.
In step 302, a target compiling environment is determined from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification by a compiling service agent program, and a function block program is uploaded to a target file in the target compiling environment.
The plurality of compiling environments may be Windows, linux, raspberry group, euler, etc. The implementation manner of deploying a plurality of compiling environments in the compiling server can be to install a plurality of virtual machines on one physical device and respectively install different compiling environments, so that the cost is saved. In addition, the compiling server can realize automatic maintenance without manual participation.
Optionally, the compiling service agent program has an automatic uploading function, that is, after the compiling service agent program determines the target compiling environment according to the compiling environment identifier, the function block program is automatically uploaded to a target file in the target compiling environment in the compiling server. In addition, it should be noted that the function block program is placed in one file, and the compiling service agent program uploads the function block program to the target file in the target compiling environment, and in fact, the compiling service agent program places the file to which the function block program belongs under a specified directory in the target compiling environment.
In this embodiment, the compiling service agent program determines a target compiling environment from a plurality of compiling environments deployed in the compiling server based on the compiling environment identifier, and uploads the function block program to a target file in the target compiling environment, that is, not only realizes the management of the multiple compiling environments of the compiling server, but also realizes the automatic uploading of the function block program.
Step 303, the compiling server is controlled by the compiling service agent program to execute compiling on the function block program in the target file.
Optionally, the compiling service agent program sends a compiling execution instruction to the compiling server, where the compiling execution instruction is used to instruct the compiling server to execute compiling on the function block program in the target file.
In summary, the function block program and the compiling environment identifier, which are transmitted by the integrated development environment and are developed based on the IEC 61499 standard, are obtained through the compiling service agent program, the target compiling environment is determined from a plurality of compiling environments deployed in the compiling server based on the compiling environment identifier, the function block program is uploaded to a target file in the target compiling environment, and then the compiling server is controlled to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, the method further comprises: adding a compiling option to an initial compiling file in a target compiling environment based on a functional block program through a compiling service agent program to obtain a target compiling file; correspondingly, the compiling server is controlled to execute compiling on the function block program in the target file through the compiling service agent program, and the compiling server comprises: and controlling the compiling server to execute compiling on the function block program in the target file according to the target compiling file through the compiling service agent program.
Optionally, the function block program includes a tool library identifier, and adding, by the compiling service agent program, a compiling option to an initial compiling file in the target compiling environment based on the function block program includes: tool library identification is added to the initial compilation file by the compilation service agent based on the function block program.
The number of tool library identifications included in the function block program may be plural, the tool library identifications include names and versions of tool libraries, and the tool libraries include compiling chain tools (such as CMAKE, gcc, g ++, etc.), third party tools (such as openssl, libcurl, libmodbus, etc.) on which the compiling server needs to rely for performing compiling, and third party hardware dynamic libraries (provided by hardware manufacturers) on which the function block program depends, so that the server needs to install tool libraries corresponding to the tool library identifications included in the function block program.
When the number of the function block programs is plural, the function block programs further include a compilation order, and the compilation order is used for the compilation server to execute compilation of the plural function block programs in the compilation order. Thus, adding a compilation option to an initial compilation file in a target compilation environment by a compilation service agent based upon a functional block program includes: the compilation order is added to the initial compilation file by the compilation service agent based on the function block program.
Thus, the compiling options include the compiling order, tool library identification, and the like, which are information necessary when compiling the function block program. Adding a compiling option to an initial compiling file in a target compiling environment based on a functional block program by a compiling service agent program, as follows:
FORTE_ADD_INCLUDE_DIRECTORIES(include);
FORTE_ADD_LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib);
forte_add_sourcefile_hcpp(utils);
forte_add_sourcefile_hcpp(ModbusServer)。
in this embodiment, the compiling service agent program adds the compiling options to the initial compiling file in the target compiling environment based on the function block program to obtain the target compiling file, thereby realizing automatic compiling of the compiling file and improving the compiling efficiency.
In one embodiment, the method further comprises: and receiving and displaying the compiling error information sent by the compiling server through the compiling service agent program, wherein the compiling error information is generated by the compiling server when the compiling is performed on the function block program and errors occur.
The compiling error information comprises information such as a function block program identifier, a position where an error occurs in the function block program and the like.
Optionally, in the process that the compiling server executes the compiling on the function block program in the target file according to the target compiling file, if the compiling is wrong, the compiling server stops compiling, outputs compiling error information and sends the compiling error information to the compiling service agent program, so that the compiling service agent program receives the compiling error information, and the compiling service agent program can display the compiling error information on an interface corresponding to the target server, or after receiving the compiling error information, the compiling service agent program sends the compiling error information to a mailbox of a developer so as to inform the developer, and therefore, how the compiling service agent program specifically displays the compiling error information is not limited.
In this embodiment, the compiling service agent program receives and displays the compiling error information sent by the compiling server, so that a developer can find out the compiling problem in time, and automatic monitoring of the compiling flow is realized.
In one embodiment, after the compiling server is controlled to perform compiling on the function block program in the target file by the compiling service agent program, the method further comprises: and receiving an execution file sent by the compiling server through the compiling service agent program, and transmitting the execution file back to the integrated development environment, wherein the execution file is generated after the compiling server compiles the functional block program.
The execution file comprises the compiled result of the execution of the function block program, and the result is used for deployment on the target device.
In one embodiment, the number of function block programs transferred by the integrated development environment is multiple, wherein at least one function block program is sent by the integrated development environment after detecting a user selected trigger operation of the function block program.
Alternatively, the multiple function block programs transferred by the IDE can be divided into two types, one type is a basic function block program, that is, a function block program required by all applications, for such a function block program, a developer (user) does not need to select, and the IDE automatically transfers such a function program to the compiling service agent program; the other type is a specific functional block program, namely, a functional block program required by the developed application, because functional blocks used by different applications are different and may not be required by other applications, for such functional block programs, a developer needs to select, and when the IDE detects that the developer triggers the selected functional block program, the selected functional block program is transferred.
In this embodiment, the IDE sends the selected function block program, so that the too much bulkiness in compiling can be avoided.
In summary, as shown in fig. 4, an interaction schematic diagram of a target server and a compiling server is provided, where the target server is deployed with an IDE and a compiling service agent, and the interaction steps are as follows:
step 401, the ide sends the function block program and the compiling environment identifier to the compiling service agent program.
In step 402, the compilation service agent determines a target compilation environment from a plurality of compilation environments deployed in a compilation server based on the compilation environment identification, wherein the plurality of compilation environments includes Windows, linux, raspberry group, euler, etc., and uploads the function block program to a target file in the target compilation environment.
In step 403, the compiling service agent program adds a compiling option to the initial compiling file in the target compiling environment based on the function block program, so as to obtain the target compiling file.
In step 404, the compiling service agent program sends an execution instruction to the compiling server, where the compiling execution instruction is used to instruct the compiling server to execute compiling on the function block program in the target file.
The compiling server sends the execution file to the compiling service agent program in step 405.
At step 406, the compilation service agent returns the execution file to the IDE.
It should be understood that, although the steps in the flowcharts of fig. 3 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 3 and 4 may include steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least some of the other steps or stages.
In one embodiment, as shown in fig. 5, a compiling apparatus is provided, which is disposed in a target server, the target server is deployed with an integrated development environment and a compiling service agent program, and the compiling apparatus 500 includes: an acquisition module 501, a transmission module 502 and a control module 503, wherein:
the obtaining module 501 is configured to obtain, by using a compilation service agent, a function block program and a compilation environment identifier that are transferred by the integrated development environment, where the function block program is developed based on the IEC 61499 standard.
And a sending module 502, configured to determine, by the compiling service agent program, a target compiling environment from a plurality of compiling environments deployed in the compiling server based on the compiling environment identifier, and upload the function block program to a target file in the target compiling environment.
And the control module 503 is used for controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, the compiling apparatus 500 further includes an adding module, configured to add, by the compiling service agent program, a compiling option to an initial compiling file in the target compiling environment based on the function block program, so as to obtain the target compiling file; correspondingly, the control module 503 is specifically configured to control, by using the compiling service agent program, the compiling server to perform compiling on the function block program in the target file according to the target compiling file.
In one embodiment, the function block program includes a tool library identifier, and the adding module is specifically configured to add the tool library identifier to the initial compiled file based on the function block program through the compiling service agent program.
In one embodiment, the compiling apparatus 500 further includes a receiving module, configured to receive and display, by using a compiling service agent program, compiling error information sent by a compiling server, where the compiling error information is generated by the compiling server when performing compiling on the function block program with an error.
In one embodiment, the receiving module is further configured to receive, by using the compiling service agent program, an execution file sent by the compiling server, and transmit the execution file back to the integrated development environment, where the execution file is generated after the compiling server compiles the function block program.
In one embodiment, the number of functional block programs transferred by the integrated development environment is multiple, and the sending module 502 is further configured to send, through the integrated development environment, the functional block program after detecting a triggering operation of the user on at least one functional block program.
For specific limitations of the compiling apparatus, reference may be made to the above limitations of the compiling method, and no further description is given here. Each of the modules in the compiling apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing function block programs, compiling environment identifiers, compiling error information and execution files. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a compiling method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a function block program and a compiling environment identifier transmitted by an integrated development environment through a compiling service agent program, wherein the function block program is developed based on IEC 61499 standards; determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through a compiling service agent program, and uploading a function block program to a target file in the target compiling environment; and controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, the processor when executing the computer program further performs the steps of: adding a compiling option to an initial compiling file in a target compiling environment based on a functional block program through a compiling service agent program to obtain a target compiling file; correspondingly, the compiling server is controlled by the compiling service agent program to execute compiling on the function block programs in the target file according to the target compiling file.
In one embodiment, the function block program includes a tool library identifier, and the processor when executing the computer program further performs the steps of: tool library identification is added to the initial compilation file by the compilation service agent based on the function block program.
In one embodiment, the processor when executing the computer program further performs the steps of: and receiving and displaying the compiling error information sent by the compiling server through the compiling service agent program, wherein the compiling error information is generated by the compiling server when the compiling is performed on the function block program and errors occur.
In one embodiment, the processor when executing the computer program further performs the steps of: and receiving an execution file sent by the compiling server through the compiling service agent program, and transmitting the execution file back to the integrated development environment, wherein the execution file is generated after the compiling server compiles the functional block program.
In one embodiment, the number of functional block programs transferred by the integrated development environment is a plurality, and the processor executes the computer program to further implement the following steps: and sending the function block program after detecting the selected triggering operation of the user on at least one function block program through the integrated development environment.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a function block program and a compiling environment identifier transmitted by an integrated development environment through a compiling service agent program, wherein the function block program is developed based on IEC 61499 standards; determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through a compiling service agent program, and uploading a function block program to a target file in the target compiling environment; and controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, the computer program when executed by the processor further performs the steps of: adding a compiling option to an initial compiling file in a target compiling environment based on a functional block program through a compiling service agent program to obtain a target compiling file; correspondingly, the compiling server is controlled by the compiling service agent program to execute compiling on the function block programs in the target file according to the target compiling file.
In one embodiment, the function block program includes a tool library identifier, and the computer program when executed by the processor further performs the steps of: tool library identification is added to the initial compilation file by the compilation service agent based on the function block program.
In one embodiment, the computer program when executed by the processor further performs the steps of: and receiving and displaying the compiling error information sent by the compiling server through the compiling service agent program, wherein the compiling error information is generated by the compiling server when the compiling is performed on the function block program and errors occur.
In one embodiment, the computer program when executed by the processor further performs the steps of: and receiving an execution file sent by the compiling server through the compiling service agent program, and transmitting the execution file back to the integrated development environment, wherein the execution file is generated after the compiling server compiles the functional block program.
In one embodiment, the number of functional block programs delivered by the integrated development environment is multiple, and the computer program when executed by the processor further implements the steps of: and sending the function block program after detecting the selected triggering operation of the user on at least one function block program through the integrated development environment.
In one embodiment, the application further provides a compiling system, which comprises a compiling server and the target server in the method embodiment, wherein the compiling server is deployed with a plurality of compiling environments.
The embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of:
acquiring a function block program and a compiling environment identifier transmitted by an integrated development environment through a compiling service agent program, wherein the function block program is developed based on IEC 61499 standards; determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through a compiling service agent program, and uploading a function block program to a target file in the target compiling environment; and controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
In one embodiment, a computer performs the steps of: adding a compiling option to an initial compiling file in a target compiling environment based on a functional block program through a compiling service agent program to obtain a target compiling file; correspondingly, the computer performs the steps of: and controlling the compiling server to execute compiling on the function block program in the target file according to the target compiling file through the compiling service agent program.
In one embodiment, the function block program includes a tool library identification, and the computer performs the steps of: tool library identification is added to the initial compilation file by the compilation service agent based on the function block program.
In one embodiment, a computer performs the steps of: and receiving and displaying the compiling error information sent by the compiling server through the compiling service agent program, wherein the compiling error information is generated by the compiling server when the compiling is performed on the function block program and errors occur.
In one embodiment, a computer performs the steps of: and receiving an execution file sent by the compiling server through the compiling service agent program, and transmitting the execution file back to the integrated development environment, wherein the execution file is generated after the compiling server compiles the functional block program.
In one embodiment, the number of functional block programs delivered by the integrated development environment is a plurality, and the computer performs the following steps: and sending the function block program after detecting the selected triggering operation of the user on at least one function block program through the integrated development environment.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (DynamicRandom Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A compilation method for use in a target server having an integrated development environment and a compilation service agent deployed thereon, the method comprising:
acquiring a function block program and a compiling environment identifier transmitted by the integrated development environment through the compiling service agent program, wherein the function block program is developed based on IEC 61499 standard;
determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through the compiling service agent program, and uploading the functional block program to a target file in the target compiling environment;
and controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
2. The method according to claim 1, wherein the method further comprises:
adding a compiling option to an initial compiling file in the target compiling environment based on the functional block program through the compiling service agent program to obtain a target compiling file;
correspondingly, the controlling, by the compiling service agent program, the compiling server to perform compiling on the function block program in the target file includes:
and controlling the compiling server to execute compiling on the function block program in the target file according to the target compiling file through the compiling service agent program.
3. The method of claim 2, wherein the function block program includes a tool library identification, the adding, by the compilation service agent program, a compilation option to an initial compilation file in the target compilation environment based upon the function block program, comprises:
and adding the tool library identification to the initial compiling file based on the functional block program through the compiling service agent program.
4. The method according to claim 1, wherein the method further comprises:
and receiving and displaying the compiling error information sent by the compiling server through the compiling service agent program, wherein the compiling error information is generated by the compiling server when the compiling is performed on the functional block program and errors occur.
5. The method according to claim 1, wherein after the compiling server is controlled to perform compiling on the function block program in the target file by the compiling service agent program, the method further comprises:
and receiving an execution file sent by the compiling server through the compiling service agent program, and returning the execution file to the integrated development environment, wherein the execution file is generated after the compiling server compiles the function block program.
6. The method of claim 1, wherein the integrated development environment communicates a plurality of the function block programs, wherein at least one of the function block programs is transmitted by the integrated development environment upon detecting a user selected trigger operation of the function block program.
7. A compiling apparatus, disposed in a target server, the target server deployed with an integrated development environment and a compiling service agent program, the apparatus comprising:
the acquisition module is used for acquiring the function block program and the compiling environment identifier transmitted by the integrated development environment through the compiling service agent program, wherein the function block program is developed based on IEC 61499 standards;
the sending module is used for determining a target compiling environment from a plurality of compiling environments deployed in a compiling server based on the compiling environment identification through the compiling service agent program, and uploading the functional block program to a target file in the target compiling environment;
and the control module is used for controlling the compiling server to execute compiling on the function block program in the target file through the compiling service agent program.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A compiling system comprising a compiling server and a target server in the method according to any one of claims 1 to 6, wherein the compiling server is deployed with a plurality of compiling environments.
CN202310880049.XA 2023-07-18 2023-07-18 Compiling method, compiling device, computer device, storage medium and compiling system Pending CN116594632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310880049.XA CN116594632A (en) 2023-07-18 2023-07-18 Compiling method, compiling device, computer device, storage medium and compiling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310880049.XA CN116594632A (en) 2023-07-18 2023-07-18 Compiling method, compiling device, computer device, storage medium and compiling system

Publications (1)

Publication Number Publication Date
CN116594632A true CN116594632A (en) 2023-08-15

Family

ID=87606648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310880049.XA Pending CN116594632A (en) 2023-07-18 2023-07-18 Compiling method, compiling device, computer device, storage medium and compiling system

Country Status (1)

Country Link
CN (1) CN116594632A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097531A1 (en) * 2003-09-26 2005-05-05 Jorg Fischer Method of compiling a source code program into a machine-readable target object program in a network environment
US20170123773A1 (en) * 2015-11-04 2017-05-04 International Business Machines Corporation Optimized compilation using an auto-tuned compiler as a service
CN109976748A (en) * 2019-02-28 2019-07-05 南京南瑞继保电气有限公司 A kind of program processing method, terminal, server and computer storage medium
CN111984261A (en) * 2019-05-24 2020-11-24 北京京东尚科信息技术有限公司 Compiling method and compiling system
CN112650500A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 Automatic compiling method and device adopting jupyter

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097531A1 (en) * 2003-09-26 2005-05-05 Jorg Fischer Method of compiling a source code program into a machine-readable target object program in a network environment
US20170123773A1 (en) * 2015-11-04 2017-05-04 International Business Machines Corporation Optimized compilation using an auto-tuned compiler as a service
CN109976748A (en) * 2019-02-28 2019-07-05 南京南瑞继保电气有限公司 A kind of program processing method, terminal, server and computer storage medium
CN111984261A (en) * 2019-05-24 2020-11-24 北京京东尚科信息技术有限公司 Compiling method and compiling system
CN112650500A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 Automatic compiling method and device adopting jupyter

Similar Documents

Publication Publication Date Title
CN110389900B (en) Distributed database cluster testing method and device and storage medium
US20150100832A1 (en) Method and system for selecting and executing test scripts
CN109324799A (en) A kind of code compiling method, computer installation and computer readable storage medium
CN110673923A (en) XWIKI system configuration method, system and computer equipment
US20110138353A1 (en) Procedure And Development Environment For Generation Of An Executable Overall Control Program
CN112631614A (en) Application deployment method and device, computer equipment and storage medium
CN115061717A (en) Application management method, application subscription method and related equipment
CN111158680A (en) Page construction method, device, equipment and storage medium
CN111324599A (en) Block chain experiment system and management method
CN114461182A (en) Method and device for pipeline construction, electronic equipment and computer readable storage medium
CN115328529A (en) Application management method and related equipment
CN112565416B (en) Cloud-native-based large-scale edge android equipment nanotube system and nanotube method thereof
CN112631600A (en) Software construction method and system based on Flutter
CN110806891B (en) Method and device for generating software version of embedded device
CN115632944B (en) Node configuration method, device, equipment, readable storage medium and server
CN116594632A (en) Compiling method, compiling device, computer device, storage medium and compiling system
CN113254158B (en) Deployment method and device of deep learning system
CN100359485C (en) Testing device and method for flush-bonding system
CN116107694A (en) Deployment method and device of k8s sub-cluster and storage medium
CN115495111A (en) Application deployment method, system, equipment and storage medium
CN110471767B (en) Equipment scheduling method
CN116157774A (en) Method and system for providing engineering of industrial equipment in cloud computing environment
US20240094694A1 (en) Virtual Deployment of Distributed Control Systems for Control Logic Testing
CN113254054B (en) Intelligent contract one-stop development system and method
CN114840260B (en) Composite baseboard management controller system and its producing method

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