节点文献

面向MES的数据持久层框架的设计与实现

Designing and Implementation of Data Persistent Layer Frame Orient Manufacturing Execution System

【作者】 高飞

【导师】 刘卫宁;

【作者基本信息】 重庆大学 , 计算机系统结构, 2007, 硕士

【摘要】 MES(Manufacturing Execution System)是实施企业敏捷制造战略和实现车间生产敏捷化的基本技术手段。与一般系统不同,MES的构建过程有三个难点需要考虑:(1)系统数据处理量巨大,实时性高,对性能要求极为苛刻,必须通过高度优化的SQL语句(或存储过程)才能达到系统性能设计指标。(2)系统的数据来源多样化,对于不同的数据,应能提供统一的调用接口,以保持系统的可移植性和可扩展性。(3)系统的数据模型比较复杂,通常情况下不能对其进行任意的修改。针对以上三个原则,论文提出了基于改进DAO(Data Access Object)设计模7式的SQL层面上映射的持久层框架,较好解决了MES构建中数据采集与交换带来的系统瓶颈;提高了系统的实时性、可伸缩性和可维护性。论文针对MES构建需求,在分析比较现有应用中各种持久层解决方案的基础上,进一步对当前优秀持久层框架—ORM(Object Relation Mapping)的对象关系映射方法及相关机制进行了深入研究。论文借鉴ORM实现机制,并参考MES本身应用的特点,提出了基于SQL映射的持久层框架,相对Hibernate等提供“全自动”ORM实现了POJO(Plain Ordinary Java Object)和数据库表之间的映射,以及SQL的自动生成和执行而言。本设计的着力点,则在于POJO与SQL之间的映射关系。数据库操作在映射文件中加以定义,从而将数据存储逻辑从上层逻辑代码中独立出来,而底层数据操作的SQL可配置化,使得我们可以控制最终的数据操作方式,通过SQL的优化获得最佳的数据库执行效能,这在依赖SQL自动生成的“全自动”ORM机制中是所难以实现的。为提高系统的可移植性和可扩展性论文引入了改进的DAO设计模式。最后对整个框架的具体设计实现进行了详细的分析。面向MES的持久层框架部分研究成果已经在一家制造企业中实施,在实际的系统应用中系统得到了很好的改进和优化,并且取得了很好的使用效果。该系统的实施案例能为MES在类似企业中的实施提供参考,同时,实践证明,基于SQL映射的持久层框架具有很高的实用价值,值得我们进一步研究和推广。

【Abstract】 Manufacturing Execution System is the basic technical skills implementing the agile manufacturing strategy and realizing the agile shop production. To distinguish with the general system, the process of constructing MES followed three design points: (1) a huge amount of data processing, real-time high performance requirements of extremely harsh. Through highly optimized SQL statements (or stored procedure) in order to achieve design performance targets.(2) diversification of the sources of data, different data, it should be able to provide a unified invoking interface, Maintain the portability and scalability of the system .(3) The data model of the system is rather complicated , under normal circumstances, not its arbitrary changes. In light of the three principles, based on the improved DAO design pattern of the SQL level mapping persistence layer framework is given out by this paper. This frame is better solving the MES Construction Data Acquisition and the exchange of system bottlenecks; improve the system’s real-time performance; System scalability and maintenance management has been upgraded.Aiming at the particular industry application background of MES, this dissertation firstly analyzes and compares the various solving approaches of persistent layer in the current application. Then make a deep research for the methods of object relational mapping and its relevant mechanism of ORM, which refers to the existing outstanding persistent frame. The ORM implementing mechanism combined with the reference of the characteristics of the MES are used for reference by this paper. Then a persistent framework based on the SQL mapping is given out.Compare with the Hibernate, which provide a automatic ORM, realizing the mapping of POJO and database table and the auto-generation of SQL and implementation is concerned.The focus point of this paper lie on the mapping relation of pojo and SQL. Database operation in mapping documents to be defined so as the data storage logic can be independent from the top logic code, and the bottom of the SQL data manipulation can be configurable.This allows us to control the ultimate data operation.The best performance can be obtained through SQL optimazation.This reliance on automatic SQL generation which is refered to as automatic ORM mechanish is elusive. To improve the portability and scalability of the system, this paper introduced an improved DAO design pattern. Finally, the entire framework of achieving specific design for a detailed analysis. Some research results of the model of persistent framework orient Manufacturing Execution System has been put into practice in a manufacturing company.By improvement and optimization in practice, results are satisfactory. Our system’s success can be used as referee in other enterprise. Practice also proved that the persistent layer framework based on sql mapping is valuable in practicability and valuable for further research and popularize.

  • 【网络出版投稿人】 重庆大学
  • 【网络出版年期】2007年 05期
  • 【分类号】TP311.52
  • 【被引频次】2
  • 【下载频次】156
节点文献中: