CN110134405B - Method and device for flexibly uploading data to manufacturing execution system - Google Patents
Method and device for flexibly uploading data to manufacturing execution system Download PDFInfo
- Publication number
- CN110134405B CN110134405B CN201910313514.5A CN201910313514A CN110134405B CN 110134405 B CN110134405 B CN 110134405B CN 201910313514 A CN201910313514 A CN 201910313514A CN 110134405 B CN110134405 B CN 110134405B
- Authority
- CN
- China
- Prior art keywords
- data
- application program
- compiling
- domain
- program
- 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
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
- G06F8/44—Encoding
- G06F8/447—Target code generation
-
- 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/54—Link editing before load time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/62—Uninstallation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a method for flexibly uploading data to a manufacturing execution system, which comprises the steps of storing a data format required by the manufacturing execution system in a class mode, and compiling the data format into a DLL file by using a compiling tool; dynamically compiling a core code of the uploaded data and dynamically generating a core program of the uploaded data; and executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set through the application program domain, and unloading the program set through the application program domain after the secondary application program domain is executed. The invention also provides a device corresponding to the method. The invention has the advantages that: the data can be uploaded to different manufacturing execution systems through one data uploading program, development and debugging cost of the program is reduced, maintenance workload of the data uploading is reduced, and stability of the data uploading program is improved.
Description
Technical Field
The present invention relates to the field of computers, and more particularly, to a method and apparatus for flexibly uploading data to a manufacturing execution system.
Background
When the testing equipment is sold to a customer, a matched testing program is sold to the customer, and the customer reads the running data of the equipment through the testing program. However, customers often have a need to upload the operation data of the equipment to their own Manufacturing Execution System (MES) for data aggregation and data analysis. Therefore, in addition to the test program, a specialized upload data program is developed to upload the test data to the customer's Manufacturing Execution System (MES). However, the manufacturing execution systems used by different clients are often different, the format, content, etc. of the transmitted data are also different, and sometimes the interfaces that the manufacturing execution systems of the clients have docked and confirmed are also changed, which results in the need to frequently change or even re-develop the data uploading program.
In the past, a worker goes to the site to interface with a Manufacturing Execution System (MES) used by a customer, and an upload data program is modified or re-developed according to the situation, so that the tested data can be transmitted in a format required by the MES. After the development/modification is completed, the uploaded data program is debugged.
However, the conventional method has the following problems: one is that it is necessary to arrange for the staff to go on business to carry out docking, development/modification, and debugging, which results in higher labor cost and time cost; although some similar software can reduce business trips and shorten development cycles by using a reflection method, some Manufacturing Execution Systems (MES) of customers are not applicable, and the reflection method is complicated and has certain limitations. And secondly, programs uploaded by different clients are different, versions are multiple, the workload of program maintenance is large, and if debugging is insufficient, BUG is easy to generate, and certain influence is caused on the production work of equipment.
Disclosure of Invention
One of the technical problems to be solved by the present invention is to provide a flexible method for uploading data to a manufacturing execution system, by which data can be uploaded to different manufacturing execution systems by one upload data program, so that the development and debugging costs of the program are reduced, the maintenance workload of the upload data is reduced, and the stability of the upload data program is increased.
The invention realizes one of the technical problems as follows: a method of flexibly uploading data to a manufacturing execution system, the method comprising the steps of:
s1, storing a data format required by a manufacturing execution system in a class mode, and compiling the data format into a DLL file by using a compiling tool;
s2, dynamically compiling a core code of the uploaded data and dynamically generating a core program of the uploaded data;
and S3, executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set through the application program domain, and unloading the program set through the application program domain after the secondary application program domain is executed.
Further, in the step S1, the compiling tool is a Visual Studio development tool.
Further, in step S2, the core code for dynamically compiling the uploaded data is specifically: storing the core code of the uploaded data in a text form, and obtaining an executable file capable of running on a target machine by analyzing the byte code during execution; the core code is used to instantiate classes in the DLL file into data objects and upload the data objects to the manufacturing execution system.
Further, in step S2, when dynamically compiling the core code of the uploaded data, a compiling related path is also set, including a compiled file output path, a DLL file of data to be referred to, and a code file to be compiled.
Further, in the step S3, the uninstalling the program set through the application domain specifically includes: and destroying the secondary application program domain through the application program domain, and simultaneously destroying the dynamically generated core program.
The second technical problem to be solved by the present invention is to provide a flexible data uploading device for manufacturing execution systems, which can upload data to different manufacturing execution systems by using one data uploading program, thereby reducing the development and debugging costs of the program, reducing the maintenance workload of the uploaded data, and increasing the stability of the data uploading program.
The invention realizes the second technical problem in the following way: the device comprises a data storage module, a dynamic compiling module and a program execution module;
the data storage module is used for storing the data format required by the manufacturing execution system in a class mode and compiling the data format into a DLL file by using a compiling tool;
the dynamic compiling module is used for dynamically compiling the core code of the uploaded data and dynamically generating the core program of the uploaded data;
and the program execution module is used for executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set through the application program domain, and unloading the program set through the application program domain after the secondary application program domain is executed.
Further, in the data saving module, the compiling tool is a Visual Studio development tool.
Further, in the dynamic compiling module, the core code for dynamically compiling the uploaded data is specifically: storing the core code of the uploaded data in a text form, and obtaining an executable file capable of running on a target machine by analyzing the byte code during execution; the core code is used to instantiate classes in the DLL file into data objects and upload the data objects to the manufacturing execution system.
Furthermore, in the dynamic compiling module, when dynamically compiling the core code of the uploaded data, a compiling related path is also set, including a compiled file output path, a DLL file of data to be referred to and a code file to be compiled.
Further, in the program execution module, the uninstalling the program set through the application domain specifically includes: and destroying the secondary application program domain through the application program domain, and simultaneously destroying the dynamically generated core program.
The invention has the following advantages:
1. the invention can realize that the data is uploaded to different manufacturing execution systems through one data uploading program, thereby reducing the development and debugging cost of the program, reducing the maintenance workload of the uploaded data and increasing the stability of the data uploading program;
2. the uploaded data logic code is simple, clear in thought and free of huge code quantity in a reflection mode;
3. an application domain (AppDomain) mode is used, so that the program friendliness is improved, and less resources are occupied;
4. through a dynamic compiling mode, the modularization of the program can be realized, and the flexibility of the program is greatly improved.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a flowchart illustrating a method for uploading data to a manufacturing execution system according to the present invention.
FIG. 2 is a diagram illustrating a path setup associated with compilation according to an embodiment of the present invention.
Detailed Description
Referring to fig. 1-2, a preferred embodiment of a method for uploading data to a manufacturing execution system according to the present invention comprises the following steps:
s1, storing a data format required by a Manufacturing Execution System (MES) in a class mode, namely combining the data format required by the manufacturing execution system of a client in a unit in a class mode, wherein a class (class) is a most basic C # type which is a data structure and is compiled into a DLL file by using a compiling tool;
s2, dynamically compiling a core code (UpLoad. Cs) of the uploaded data and dynamically generating a core program of the uploaded data;
and S3, executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set through the application program domain (AppDomain), and unloading the program set through the application program domain after the secondary application program domain is executed.
The application program domain (AppDomain) is mainly used for realizing the isolation among the application program domains (AppDomain) in the same process, a plurality of application program domains (AppDomain) can exist in one process, and each application program domain (AppDomain) is isolated from each other. The invention puts the core program in the secondary application program domain to execute by loading the program set through the application program domain (AppDomain), and aims to: in order to control the dynamically generated core program, if the secondary program is abnormal, the main program is not influenced.
The secondary application program domain refers to a secondary application program domain (AppDomain) generated by a main application program domain (AppDomain), and the two application program domains belong to the same system process.
In step S1, the compiling tool is a Visual Studio development tool, that is, the mesdata. Of course, the invention is not limited thereto, and in specific implementation, a custom compiling tool can be used to compile the DLL file.
In step S2, the core code of the dynamically compiled upload data is specifically: storing the core code of the uploaded data in a text form, and when the core code is executed, analyzing the byte code to obtain an executable file (such as an upload. Exe file) capable of running on a target machine; the core code is used to instantiate classes in the DLL file into data objects and upload the data objects to the manufacturing execution system. So-called compilation is the compilation of the source code of a program into machine-recognizable object code (i.e., executable files). The use of dynamic compilation in the present invention greatly increases the flexibility of the software.
In step S2, when dynamically compiling the core code of the uploaded data, a compiling related path is further set, including a compiled file output path, a DLL file of data to be referred to, and a code file to be compiled.
In the step S3, the uninstalling the program set through the application domain specifically includes: and destroying the secondary application program domain through the application program domain, and simultaneously destroying the dynamically generated core program.
The invention discloses a device for flexibly uploading data to a manufacturing execution system, which comprises a data storage module, a dynamic compiling module and a program execution module;
the data storage module is used for storing the data format required by a Manufacturing Execution System (MES) in a class mode, namely, the data format required by the manufacturing execution system of a client is combined in a unit in a class mode, wherein the class (class) is the most basic C # type, is a data structure and is compiled into a DLL file by using a compiling tool;
the dynamic compiling module is used for dynamically compiling a core code (UpLoad.cs) of the uploaded data and dynamically generating a core program of the uploaded data;
the program execution module is used for executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set through an application program domain (AppDomain), and unloading the program set through the application program domain after the secondary application program domain is executed.
The application program domain (AppDomain) is mainly used for realizing the isolation among the application program domains (AppDomain) in the same process, a plurality of application program domains (AppDomain) can exist in one process, and each application program domain (AppDomain) is isolated from each other. The invention puts the core program in the secondary application program domain to execute by loading the program set through the application program domain (AppDomain), and aims to: in order to control the dynamically generated core program, if the secondary program is abnormal, the main program is not influenced.
The auxiliary application program domain refers to an auxiliary application program domain (AppDomain) generated by a main application program domain (AppDomain), and the two application program domains belong to the same system process.
In the data saving module, the compiling tool is a Visual Studio development tool, that is, the MesData.dll file can be compiled through the Visual Studio development tool. Of course, the invention is not limited thereto, and in specific implementation, a custom compiling tool can be used to compile the DLL file.
In the dynamic compiling module, the core code of the dynamic compiling upload data is specifically: storing a core code of uploaded data in a text form, and obtaining an executable file (such as an upload. Exe file) capable of running on a target machine by analyzing byte codes during execution; the core code is used to instantiate classes in the DLL file into data objects and upload the data objects to the manufacturing execution system. So-called compilation is the compilation of a program's source code into machine-recognizable object code (i.e., executable files). The use of dynamic compilation in the present invention can greatly increase the flexibility of the software.
In the dynamic compiling module, when dynamically compiling the core code of the uploaded data, a compiling related path is also set, wherein the compiling related path comprises a compiled file output path, a DLL file of the data to be quoted and a code file to be compiled.
In the program execution module, the uninstalling the program set through the application domain specifically includes: and destroying the secondary application program domain through the application program domain, and simultaneously destroying the dynamically generated core program.
In summary, the invention has the following beneficial effects:
1. the invention can realize that the data is uploaded to different manufacturing execution systems through one data uploading program, thereby reducing the development and debugging cost of the program, reducing the maintenance workload of the uploaded data and increasing the stability of the data uploading program;
2. the uploaded data logic code is concise, clear in thought and free of huge code amount in a reflection mode;
3. an application domain (AppDomain) mode is used, so that the program friendliness is improved, and fewer resources are occupied;
4. through a dynamic compiling mode, the program can be modularized, and the flexibility of the program is greatly improved.
While specific embodiments of the invention have been described, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, as equivalent modifications and variations as will be made by those skilled in the art in light of the spirit of the invention are intended to be included within the scope of the appended claims.
Claims (4)
1. A method for flexibly uploading data to a manufacturing execution system, the method comprising: the method comprises the following steps:
s1, storing a data format required by a manufacturing execution system in a class mode, and compiling the data format into a DLL file by using a compiling tool;
s2, dynamically compiling a core code of the uploaded data and dynamically generating a core program of the uploaded data;
the core code for dynamically compiling the uploaded data specifically comprises the following steps: storing the core code of the uploaded data in a text form, and obtaining an executable file capable of running on a target machine by analyzing byte codes during execution; the core code is used for instantiating classes in the DLL file into data objects and uploading the data objects to a manufacturing execution system;
when dynamically compiling the core code of the uploaded data, setting a compiling related path which comprises a compiled file output path, a DLL file of the data to be quoted and a code file to be compiled;
s3, executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set through the application program domain, and unloading the program set through the application program domain after the secondary application program domain is executed;
the uninstalling program set through the application program domain specifically comprises the following steps: destroying the secondary application program domain through the application program domain, and simultaneously destroying the dynamically generated core program;
the secondary application program domain refers to a secondary application program domain generated by the main application program domain, and the secondary application program domain and the main application program domain belong to the same system process.
2. The flexible method of uploading data to a manufacturing execution system of claim 1, wherein: in the step S1, the compiling tool is a Visual Studio development tool.
3. An apparatus for flexibly uploading data to a manufacturing execution system, the apparatus comprising: the device comprises a data storage module, a dynamic compiling module and a program executing module;
the data storage module is used for storing the data format required by the manufacturing execution system in a class mode and compiling the data format into a DLL file by using a compiling tool;
the dynamic compiling module is used for dynamically compiling the core code of the uploaded data and dynamically generating the core program of the uploaded data;
the core code for dynamically compiling the uploaded data specifically comprises the following steps: storing the core code of the uploaded data in a text form, and obtaining an executable file capable of running on a target machine by analyzing byte codes during execution; the core code is used for instantiating classes in the DLL file into data objects and uploading the data objects to a manufacturing execution system;
when dynamically compiling the core code of the uploaded data, setting a compiling related path which comprises a compiled file output path, a DLL file of the data to be quoted and a code file to be compiled;
the program execution module is used for executing the dynamically generated core program in the secondary application program domain in a mode of loading the program set in the application program domain, and unloading the program set in the application program domain after the secondary application program domain is executed;
the uninstalling program set through the application program domain specifically comprises the following steps: destroying the secondary application program domain through the application program domain, and simultaneously destroying the dynamically generated core program;
the auxiliary application program domain refers to an auxiliary application program domain generated by the main application program domain, and the auxiliary application program domain and the main application program domain belong to the same system process.
4. The flexible apparatus of claim 3, wherein the means for uploading data to the manufacturing execution system comprises: in the data storage module, the compiling tool is a Visual Studio development tool.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910313514.5A CN110134405B (en) | 2019-04-18 | 2019-04-18 | Method and device for flexibly uploading data to manufacturing execution system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910313514.5A CN110134405B (en) | 2019-04-18 | 2019-04-18 | Method and device for flexibly uploading data to manufacturing execution system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110134405A CN110134405A (en) | 2019-08-16 |
CN110134405B true CN110134405B (en) | 2022-11-11 |
Family
ID=67570347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910313514.5A Active CN110134405B (en) | 2019-04-18 | 2019-04-18 | Method and device for flexibly uploading data to manufacturing execution system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110134405B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106354082A (en) * | 2015-07-16 | 2017-01-25 | 西门子公司 | Knowledge-based programmable logic controller with flexible in-field knowledge management and analytics |
CN106375481A (en) * | 2016-11-09 | 2017-02-01 | 江麓机电集团有限公司 | Distributed ERP and MES data synchronous connection system and data communication method |
CN108008983A (en) * | 2017-09-30 | 2018-05-08 | 浙江中控软件技术有限公司 | Multi-interface data processing method based on one process |
CN109634681A (en) * | 2018-11-15 | 2019-04-16 | 福建星云电子股份有限公司 | A kind of method and device uploading data to manufacturing execution system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100070890A1 (en) * | 2008-09-12 | 2010-03-18 | International Business Machines Corporation | Method for Providing a Manufacturing Execution System (MES) Service to Third Parties |
-
2019
- 2019-04-18 CN CN201910313514.5A patent/CN110134405B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106354082A (en) * | 2015-07-16 | 2017-01-25 | 西门子公司 | Knowledge-based programmable logic controller with flexible in-field knowledge management and analytics |
CN106375481A (en) * | 2016-11-09 | 2017-02-01 | 江麓机电集团有限公司 | Distributed ERP and MES data synchronous connection system and data communication method |
CN108008983A (en) * | 2017-09-30 | 2018-05-08 | 浙江中控软件技术有限公司 | Multi-interface data processing method based on one process |
CN109634681A (en) * | 2018-11-15 | 2019-04-16 | 福建星云电子股份有限公司 | A kind of method and device uploading data to manufacturing execution system |
Also Published As
Publication number | Publication date |
---|---|
CN110134405A (en) | 2019-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10540262B2 (en) | Using edit and continue to dynamically set and unset optimizations in source code while debugging | |
US9697109B2 (en) | Dynamically configurable test doubles for software testing and validation | |
US20150100945A1 (en) | Resuming a software build process | |
US20110126179A1 (en) | Method and System for Dynamic Patching Software Using Source Code | |
US8752020B2 (en) | System and process for debugging object-oriented programming code leveraging runtime metadata | |
US8930923B2 (en) | Generating debugging extension source code utilizing debugging information | |
US9645911B2 (en) | System and method for debugging firmware/software by generating trace data | |
JP2000181725A (en) | Method and system for altering executable code and giving addition function | |
WO2019005228A1 (en) | Automated source code adaption to inject features between platform versions | |
US8347278B2 (en) | Instrumenting a compiled software routine for augmentation | |
US9117020B2 (en) | Determining control flow divergence due to variable value difference | |
US20200301676A1 (en) | Framework for GPU Code Generation and Debugging | |
Rodriguez et al. | Increasing automation in the backporting of Linux drivers using Coccinelle | |
US20080127061A1 (en) | Method and system for editing code | |
CN109144849B (en) | Embedded software debugging method | |
CN110134405B (en) | Method and device for flexibly uploading data to manufacturing execution system | |
US10545740B2 (en) | Distributed agent to collect input and output data along with source code for scientific kernels of single-process and distributed systems | |
US11573787B1 (en) | Hot reloading a running application with an unsaved source code change | |
CN108885574B (en) | System for monitoring and reporting performance and correctness issues at design, compilation, and runtime | |
CN113778451B (en) | File loading method, file loading device, computer system and computer readable storage medium | |
CN114174983B (en) | Method and system for optimized automatic verification of advanced constructs | |
US9870257B1 (en) | Automation optimization in a command line interface | |
CN114968751A (en) | Program debugging method and program debugging device of code-free development platform | |
US20240329983A1 (en) | Development environment integrated with infrastructure cost estimation system | |
US20230244592A1 (en) | System and Method for Developing, Testing and Debugging Software for Microcontrollers |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |