CN110134405A - A kind of method and device flexibly uploading data to manufacturing execution system - Google Patents

A kind of method and device flexibly uploading data to manufacturing execution system Download PDF

Info

Publication number
CN110134405A
CN110134405A CN201910313514.5A CN201910313514A CN110134405A CN 110134405 A CN110134405 A CN 110134405A CN 201910313514 A CN201910313514 A CN 201910313514A CN 110134405 A CN110134405 A CN 110134405A
Authority
CN
China
Prior art keywords
data
application domain
execution system
manufacturing execution
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.)
Granted
Application number
CN201910313514.5A
Other languages
Chinese (zh)
Other versions
CN110134405B (en
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.)
Fujian Nebula Electronics Co Ltd
Original Assignee
Fujian Nebula Electronics Co 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 Fujian Nebula Electronics Co Ltd filed Critical Fujian Nebula Electronics Co Ltd
Priority to CN201910313514.5A priority Critical patent/CN110134405B/en
Publication of CN110134405A publication Critical patent/CN110134405A/en
Application granted granted Critical
Publication of CN110134405B publication Critical patent/CN110134405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/54Link editing before load time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-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 present invention provides a kind of method for flexibly uploading data to manufacturing execution system, including saving data format required for manufacturing execution system using the mode of class, and is compiled into dll file using compilation tool;On-the-flier compiler uploads the core code of data and the kernel program of dynamic generation upload data;The kernel program of dynamic generation is executed in secondary Application Domain by way of Application Domain loading procedure collection, after secondary Application Domain has executed, passes through Application Domain Uninstaller collection.The present invention also provides devices corresponding to a kind of method.Data program is uploaded to upload data to different manufacturing execution systems by one the invention has the advantages that can realize, is reduced exploitation, the debugging cost of program, is reduced the maintenance workload for uploading data, increases the stability for uploading data program.

Description

A kind of method and device flexibly uploading data to manufacturing execution system
Technical field
The present invention relates to computer fields, refer in particular to a kind of method and dress that data are flexibly uploaded to manufacturing execution system It sets.
Background technique
While test equipment is sold to client, can all there be matched test program to sell to client, client passes through survey Try the operation data that program reads equipment.But client has the manufacture that the operation data of equipment is uploaded to oneself toward contact Execution system (MES) carries out the demand of purpose data classifying, data analysis.Therefore, it as the supplement of test program, will develop special Upload data program come upload test data to client manufacturing execution system (MES).But system used in different clients It makes that execution system is often different, transmits format, content of data etc. and be also not quite similar, sometimes the manufacturing execution system of client has been It is docked and the interface confirmed can also change, this causes to upload the frequent change of data program needs or even develop again.
Previous way is to dock manufacturing execution system (MES) used in client by staff to scene, depending on Situation modification or again exploitation upload data program, and the data of test are required with manufacturing execution system (MES) Format carries out data transmission.After the completion of exploitation/modification, also to be debugged to data program is uploaded.
But there are following problems for previous this way: one is need to arrange staff go on business to scene into Row docking, exploitation/modification, debugging, generate higher human cost and time cost;Although some similar softwares can be used Method for reflection is gone on business to reduce, and shortens the development cycle, but the manufacturing execution system (MES) of some clients is not suitable for again, and is used The method of reflection is comparatively laborious, there is certain limitation.Secondly the program for being different client's upload is different from, version is more, It causes the maintenance workload to program big, and is easy to produce BUG if debugging is insufficient, the production work of equipment is also generated Certain influence.
Summary of the invention
One of the technical problem to be solved in the present invention is to provide a kind of flexibly to manufacturing execution system upload data Method can be realized by this method and upload data program by one to upload data to different manufacturing execution systems, reduced The exploitation of program, debugging cost reduce the maintenance workload for uploading data, increase the stability for uploading data program.
The present invention is realized in one of technical problem: a kind of side flexibly uploading data to manufacturing execution system Method, described method includes following steps:
Step S1, data format required for manufacturing execution system is saved using the mode of class, and uses compiling Tool is compiled into dll file;
Step S2, on-the-flier compiler uploads the core code of data and the kernel program of dynamic generation upload data;
Step S3, by the kernel program of dynamic generation in secondary application program by way of Application Domain loading procedure collection It is executed in domain, after secondary Application Domain has executed, passes through Application Domain Uninstaller collection.
Further, in the step S1, the compilation tool is Visual Studio developing instrument.
Further, in the step S2, the on-the-flier compiler uploads the core code of data specifically: will first upload The core code of data is stored in the form of text, and when executing, then being obtained by parsing bytecode can be on target machine The executable file of operation;The core code is used to the class example in dll file being melted into data object, and by data object It is uploaded to manufacturing execution system.
Further, in the step S2, when on-the-flier compiler uploads the core code of data, it is related to also set up compiling Path, including the file outgoing route after compiling, the code text that needs the dll file of data quoted and needs to compile Part.
Further, in the step S3, described to pass through Application Domain Uninstaller collection specifically: by applying journey Secondary Application Domain is destroyed in sequence domain, while destroying the kernel program of dynamic generation.
The second technical problem to be solved by the present invention is to provide a kind of flexibly to manufacturing execution system upload data Device can be realized by the device and upload data program by one to upload data to different manufacturing execution systems, reduced The exploitation of program, debugging cost reduce the maintenance workload for uploading data, increase the stability for uploading data program.
The present invention is realized in the twos' of technical problem: a kind of dress flexibly uploading data to manufacturing execution system It sets, described device includes data storage module, on-the-flier compiler module and program execution module;
The data storage module, for protecting data format required for manufacturing execution system using the mode of class It deposits, and is compiled into dll file using compilation tool;
The on-the-flier compiler module uploads the core code of data for on-the-flier compiler and dynamic generation uploads data Kernel program;
Described program execution module, for the kernel program of dynamic generation to be passed through to the side of Application Domain loading procedure collection Formula executes in secondary Application Domain, after secondary Application Domain has executed, passes through Application Domain Uninstaller collection.
Further, in the data storage module, the compilation tool is Visual Studio developing instrument.
Further, in the on-the-flier compiler module, the on-the-flier compiler uploads the core code of data specifically: first The core code for uploading data is stored in the form of text, when executing, then being obtained by parsing bytecode can be in mesh The executable file run on mark machine;The core code is used to the class example in dll file being melted into data object, and will count Manufacturing execution system is uploaded to according to object.
Further, in the on-the-flier compiler module, when on-the-flier compiler uploads the core code of data, volume is also set up Relevant path is translated, including the file outgoing route after compiling, generation for needing the dll file of data quoted and needs to compile Code file.
Further, described to pass through Application Domain Uninstaller collection specifically: to pass through in described program execution module Application Domain destroys secondary Application Domain, while destroying the kernel program of dynamic generation.
The present invention has the advantage that
1, the present invention can be achieved to upload data program by one to upload data to different manufacturing execution systems, reduce The exploitation of program, debugging cost reduce the maintenance workload for uploading data, increase the stability for uploading data program;
2, it is succinct to upload mathematical logic code, clear thinking does not use that huge size of code of reflection mode;
3, using Application Domain (AppDomain) mode, program friendliness is improved, and occupies less resource;
4, by on-the-flier compiler mode, make calling program that modularization may be implemented, program flexibility is significantly greatly increased.
Detailed description of the invention
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is a kind of execution flow chart for the method that data are flexibly uploaded to manufacturing execution system of the present invention.
Fig. 2 is the schematic diagram that setting compiles relevant path in the specific embodiment of the invention.
Specific embodiment
It please refers to shown in Fig. 1 to Fig. 2, the present invention is a kind of flexibly to the preferable of the method for manufacturing execution system upload data Embodiment, described method includes following steps:
Step S1, data format required for manufacturing execution system (MES) is saved using the mode of class, i.e., it will be objective Data format required for the manufacturing execution system at family combines in a unit in the way of class, and class (class) is most basic C# type, it is a data structure, and is compiled into dll file using compilation tool;
Step S2, on-the-flier compiler uploads the core code (UpLoad.cs) of data and the core of dynamic generation upload data Heart program;
Step S3, by the kernel program of dynamic generation by way of Application Domain (AppDomain) loading procedure collection It is executed in secondary Application Domain, after secondary Application Domain has executed, passes through Application Domain Uninstaller collection.
The Application Domain (AppDomain) is primarily used to realize each Application Domain in same process (AppDomain) isolation between can have multiple Application Domains (AppDomain) in one process, and each application It is mutually isolated between process field (AppDomain).Pass through the side of Application Domain (AppDomain) loading procedure collection in the present invention Kernel program is placed on the purpose executed in secondary Application Domain by formula: in order to keep the kernel program of dynamic generation controllable, and such as There is exception in fruit pair program, will not have an impact to main program.
The pair Application Domain refers to one that primary application program domain (AppDomain) is generated secondary Application Domain (AppDomain), two Application Domains belong in same system process.
In the step S1, the compilation tool is Visual Studio developing instrument, that is to say, that can be passed through Visual Studio developing instrument compiles out MesData.dll file.Certainly, the present invention is not limited to this, specific real Shi Shi can also compile out dll file using customized compilation tool.
In the step S2, the on-the-flier compiler uploads the core code of data specifically: will first upload the core of data Heart code is stored in the form of text, when executing, then by parsing bytecode obtain capable of running on target machine can It executes file (such as upload.exe file);The core code is used to the class example in dll file being melted into data object, and Data object is uploaded to manufacturing execution system.So-called compiling is exactly that machine can be known the compilation of source code of a program Other object code (i.e. executable file).The flexibility of software can be greatly increased in the present invention using on-the-flier compiler.
In the step S2, when on-the-flier compiler uploads the core code of data, the relevant path of compiling, packet are also set up The code file that the dll file and needs for the data that file outgoing route, needs after including compiling are quoted compile.
In the step S3, described to pass through Application Domain Uninstaller collection specifically: to be destroyed by Application Domain Secondary Application Domain, while destroying the kernel program of dynamic generation.
A kind of preferred embodiment of device flexibly uploading data to manufacturing execution system of the invention, described device include Data storage module, on-the-flier compiler module and program execution module;
The data storage module, for data format required for manufacturing execution system (MES) to be used to the mode of class It is saved, i.e., data format required for the manufacturing execution system by client combines in a unit in the way of class, class It (class) is most basic C# type, it is a data structure, and is compiled into dll file using compilation tool;
The on-the-flier compiler module uploads core code (UpLoad.cs) and the dynamic life of data for on-the-flier compiler At the kernel program for uploading data;
Described program execution module, for adding the kernel program of dynamic generation by Application Domain (AppDomain) The mode for carrying procedure set executes in secondary Application Domain, after secondary Application Domain has executed, is unloaded by Application Domain Procedure set.
The Application Domain (AppDomain) is primarily used to realize each Application Domain in same process (AppDomain) isolation between can have multiple Application Domains (AppDomain) in one process, and each application It is mutually isolated between process field (AppDomain).Pass through the side of Application Domain (AppDomain) loading procedure collection in the present invention Kernel program is placed on the purpose executed in secondary Application Domain by formula: in order to keep the kernel program of dynamic generation controllable, and such as There is exception in fruit pair program, will not have an impact to main program.
The pair Application Domain refers to one that primary application program domain (AppDomain) is generated secondary Application Domain (AppDomain), two Application Domains belong in same system process.
In the data storage module, the compilation tool is Visual Studio developing instrument, that is to say, that can be with MesData.dll file is compiled out by Visual Studio developing instrument.Certainly, the present invention is not limited to this, is having When body is implemented, dll file can also be compiled out using customized compilation tool.
In the on-the-flier compiler module, the on-the-flier compiler uploads the core code of data specifically: will first upload number According to core code store in the form of text, execute when, then by parsing bytecode obtain to transport on target machine Capable executable file (such as upload.exe file);The core code is used to the class example in dll file being melted into data Object, and data object is uploaded to manufacturing execution system.It is machine that so-called compiling, which is exactly the compilation of source code of a program, The identifiable object code of device (i.e. executable file).The flexibility of software can be greatly increased in the present invention using on-the-flier compiler.
In the on-the-flier compiler module, when on-the-flier compiler uploads the core code of data, it is relevant to also set up compiling Path, including the file outgoing route after compiling, the code file that needs the dll file of data quoted and needs to compile.
It is described to pass through Application Domain Uninstaller collection specifically: to pass through application program in described program execution module Secondary Application Domain is destroyed in domain, while destroying the kernel program of dynamic generation.
In short, the invention has the following beneficial effects:
1, the present invention can be achieved to upload data program by one to upload data to different manufacturing execution systems, reduce The exploitation of program, debugging cost reduce the maintenance workload for uploading data, increase the stability for uploading data program;
2, it is succinct to upload mathematical logic code, clear thinking does not use that huge size of code of reflection mode;
3, using Application Domain (AppDomain) mode, program friendliness is improved, and occupies less resource;
4, by on-the-flier compiler mode, make calling program that modularization may be implemented, program flexibility is significantly greatly increased.
Although specific embodiments of the present invention have been described above, those familiar with the art should be managed Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, it is familiar with this The technical staff in field should be covered of the invention according to modification and variation equivalent made by spirit of the invention In scope of the claimed protection.

Claims (10)

1. a kind of method for flexibly uploading data to manufacturing execution system, it is characterised in that: described method includes following steps:
Step S1, data format required for manufacturing execution system is saved using the mode of class, and uses compilation tool It is compiled into dll file;
Step S2, on-the-flier compiler uploads the core code of data and the kernel program of dynamic generation upload data;
Step S3, by the kernel program of dynamic generation by way of Application Domain loading procedure collection in secondary Application Domain It executes, after secondary Application Domain has executed, passes through Application Domain Uninstaller collection.
2. a kind of method for flexibly uploading data to manufacturing execution system according to claim 1, it is characterised in that: In the step S1, the compilation tool is Visual Studio developing instrument.
3. a kind of method for flexibly uploading data to manufacturing execution system according to claim 1, it is characterised in that: In the step S2, the on-the-flier compiler uploads the core code of data specifically: will first upload the core code of data with text The storage of this form obtains the executable file that can be run on target machine when executing, then by parsing bytecode;Institute Core code is stated for the class example in dll file to be melted into data object, and data object is uploaded to manufacturing execution system.
4. a kind of method for flexibly uploading data to manufacturing execution system according to claim 1, it is characterised in that: In the step S2, when on-the-flier compiler uploads the core code of data, the relevant path of compiling is also set up, after compiling The code file that the dll file and needs for the data that file outgoing route, needs are quoted compile.
5. a kind of method for flexibly uploading data to manufacturing execution system according to claim 1, it is characterised in that: It is described to pass through Application Domain Uninstaller collection in the step S3 specifically: secondary application program is destroyed by Application Domain Domain, while destroying the kernel program of dynamic generation.
6. a kind of device for flexibly uploading data to manufacturing execution system, it is characterised in that: described device includes that data save Module, on-the-flier compiler module and program execution module;
The data storage module, for data format required for manufacturing execution system to be saved using the mode of class, And dll file is compiled into using compilation tool;
The on-the-flier compiler module uploads the core code of data and the core of dynamic generation upload data for on-the-flier compiler Program;
Described program execution module, for by the kernel program of dynamic generation by way of Application Domain loading procedure collection It is executed in secondary Application Domain, after secondary Application Domain has executed, passes through Application Domain Uninstaller collection.
7. a kind of device for flexibly uploading data to manufacturing execution system according to claim 6, it is characterised in that: In the data storage module, the compilation tool is Visual Studio developing instrument.
8. a kind of device for flexibly uploading data to manufacturing execution system according to claim 6, it is characterised in that: In the on-the-flier compiler module, the on-the-flier compiler uploads the core code of data specifically: will first upload the core generation of data Code is stored in the form of text, can be performed when executing, then through what parsing bytecode obtained to run on target machine File;The core code is used to the class example in dll file being melted into data object, and data object is uploaded to manufacture and is held Row system.
9. a kind of device for flexibly uploading data to manufacturing execution system according to claim 6, it is characterised in that: In the on-the-flier compiler module, when on-the-flier compiler uploads the core code of data, the relevant path of compiling is also set up, including compile The code file that the dll file and needs for the data that file outgoing route, needs after translating are quoted compile.
10. a kind of device for flexibly uploading data to manufacturing execution system according to claim 6, it is characterised in that: It is described to pass through Application Domain Uninstaller collection in described program execution module specifically: to be destroyed by Application Domain secondary Application Domain, while destroying the kernel program of dynamic generation.
CN201910313514.5A 2019-04-18 2019-04-18 Method and device for flexibly uploading data to manufacturing execution system Active CN110134405B (en)

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 true CN110134405A (en) 2019-08-16
CN110134405B 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 (5)

* Cited by examiner, † Cited by third party
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
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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
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
CN110134405B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
US10402208B2 (en) Adaptive portable libraries
US8756572B2 (en) Debugger-set identifying breakpoints after coroutine yield points
CN105718251B (en) Multilingual SDK automates realization method and system
EP2827253B1 (en) Metaphor based language fuzzing of computer code
US8752020B2 (en) System and process for debugging object-oriented programming code leveraging runtime metadata
CN111796831B (en) Compiling method and device for multi-chip compatibility
US20130318504A1 (en) Execution Breakpoints in an Integrated Development Environment for Debugging Dataflow Progrrams
Gligoric et al. Automated migration of build scripts using dynamic analysis and search-based refactoring
CN106909510A (en) A kind of method and server for obtaining test case
US9304893B1 (en) Integrated software development and test case management system
US9003382B2 (en) Efficient just-in-time compilation
CN107025167B (en) Method and apparatus for data flow analysis using compiler type information in processor trace logs
CN112905447B (en) Test method and system for block chain virtual machine
US9117020B2 (en) Determining control flow divergence due to variable value difference
US9396095B2 (en) Software verification
De Macedo et al. Webassembly versus javascript: Energy and runtime performance
CN106484608B (en) A kind of kernel fault localization method, device and computer
CN102722438A (en) Kernel debugging method and equipment
Ghosh et al. A systematic review on program debugging techniques
EP3619612B1 (en) Temporary de-optimization of target functions in a cloud debugger
CN103631585A (en) Method and system for developing application program
Ghosh et al. Effective spectrum-based technique for software fault finding
CN110134405A (en) A kind of method and device flexibly uploading data to manufacturing execution system
Lavoie et al. A case study of TTCN-3 test scripts clone analysis in an industrial telecommunication setting
US20150007139A1 (en) Optimizing error parsing in an integrated development environment

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