CN101303646A - A Modeling Method for Telecommunications Domain Based on Executable Meta-Language - Google Patents
A Modeling Method for Telecommunications Domain Based on Executable Meta-Language Download PDFInfo
- Publication number
- CN101303646A CN101303646A CNA2008100508348A CN200810050834A CN101303646A CN 101303646 A CN101303646 A CN 101303646A CN A2008100508348 A CNA2008100508348 A CN A2008100508348A CN 200810050834 A CN200810050834 A CN 200810050834A CN 101303646 A CN101303646 A CN 101303646A
- Authority
- CN
- China
- Prior art keywords
- model
- xkl
- language
- meta
- domain
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000013507 mapping Methods 0.000 claims abstract description 14
- 238000012795 verification Methods 0.000 claims abstract description 13
- 238000010586 diagram Methods 0.000 claims description 23
- 230000002776 aggregation Effects 0.000 claims description 11
- 238000004220 aggregation Methods 0.000 claims description 11
- 230000003068 static effect Effects 0.000 claims description 11
- 230000006399 behavior Effects 0.000 claims description 8
- 230000000694 effects Effects 0.000 claims description 2
- 230000002093 peripheral effect Effects 0.000 claims description 2
- 230000000007 visual effect Effects 0.000 claims description 2
- 238000007689 inspection Methods 0.000 claims 1
- 230000008569 process Effects 0.000 abstract description 11
- 238000007726 management method Methods 0.000 abstract description 8
- 230000008901 benefit Effects 0.000 abstract description 2
- 230000003542 behavioural effect Effects 0.000 description 6
- 230000009471 action Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 241000220317 Rosa Species 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 235000019580 granularity Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000010977 jade Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
本发明的基于可执行元语言的电信领域建模方法属于电信网络管理的技术领域,具体涉及电信领域网络设备、网络性能、网络故障的建模方法和模型正确性的验证方法。建模过程的实现核心是适合电信领域的可执行元语言xKL;它指导元建模过程,描述并动态实例化领域模型,验证和执行实例化后的模型,使得生成的模型具有可执行性。本发明具有以下优点:具有良好的伸缩性和适应性;具有良好的重用性;对象模型的可执行性;领域模型可以在系统需求和底层实现之间建立起良好的映射关系;可以缩短产品投放市场的时间,改善、提高产品质量,提高客户满意度。
The telecommunications field modeling method based on executable metalanguage of the present invention belongs to the technical field of telecommunications network management, and specifically relates to a modeling method of network equipment, network performance, and network failure in the telecommunications field and a verification method of model correctness. The core of the modeling process is the executable meta-language xKL suitable for the telecommunications field; it guides the meta-modeling process, describes and dynamically instantiates the domain model, verifies and executes the instantiated model, and makes the generated model executable. The present invention has the following advantages: good scalability and adaptability; good reusability; executable object model; domain model can establish a good mapping relationship between system requirements and underlying implementation; can shorten product delivery Time to market, improve, improve product quality, and increase customer satisfaction.
Description
技术领域 technical field
本发明属于电信网络管理的技术领域,具体涉及电信领域网络设备、网络性能、网络故障的建模方法和模型正确性的验证方法。The invention belongs to the technical field of telecommunication network management, and in particular relates to a modeling method of network equipment, network performance and network failure in the telecommunication field and a verification method of model correctness.
背景技术 Background technique
随着电信产业的飞速发展,各电信运营商之间的竞争日趋激烈,快速发展的用户群、多样化的业务以及经营竞争环境对电信企业的服务质量提出更高、更新的要求。面对市场挑战,电信运营商需要提高管理效率,提高网络管理水平。因而,建设一套跨平台的网络综合管理系统势在必行,该平台能够从全网的高度,直观、综合、快速地对运营商电信业务网运行质量进行分析评判,进行故障发现、定位与排除,分析业务和客户影响性。在电信领域,网络设备多样化,网络业务多样化,领域建模的思想能够从根本上解决目前电信网络管理新业务、新设备不断发展给建设网络管理系统带来的问题。With the rapid development of the telecommunication industry, the competition among various telecommunication operators is becoming increasingly fierce, and the rapidly developing user group, diversified business and business competition environment put forward higher and newer requirements for the service quality of telecommunication enterprises. Facing market challenges, telecom operators need to improve management efficiency and network management level. Therefore, it is imperative to build a cross-platform integrated network management system. This platform can intuitively, comprehensively and quickly analyze and judge the operation quality of the operator's telecommunication service network from the height of the entire network, and perform fault discovery, location and monitoring. Exclude, analyze business and customer impact. In the telecommunications field, network equipment is diversified and network services are diversified. The idea of domain modeling can fundamentally solve the problems brought about by the continuous development of new services and new equipment in the current telecommunications network management to the construction of network management systems.
目前,流行的面向对象建模工具有Rational公司开发的Rational Rose。国内的有北大青鸟面向对象建模工具。这些建模工具基于一个共同的建模语言——统一建模语言。统一建模语言是对象管理组织发起的一个面向对象建模语言标准,目前已经成为了面向对象建模的标准。统一建模语言通过类、对象、关系等描述系统的静态结构信息,通过序列图、状态转换图等描述系统的动态行为。这种抽象化的对软件系统地描述方便了开发人员之间思想的交流,也为文档处理提供了方便。统一建模语言是一个非常成功的建模语言,为软件过程的标准化、提高软件开发的效率做出了巨大的贡献。但是在实际应用的过程中也遇到了问题。最重要的问题就是统一建模语言目前还仅仅是应用在软件过程中的分析、设计阶段,使用该建模语言建立的模型是不可执行的,分析设计人员只能人工检验模型的正确性,这为模型的设计、代码的实现都带来了隐患。Currently, the popular object-oriented modeling tool is Rational Rose developed by Rational Corporation. There are Beida Jade Bird object-oriented modeling tools in China. These modeling tools are based on a common modeling language - Unified Modeling Language. The Unified Modeling Language is an object-oriented modeling language standard initiated by the Object Management Organization, and has now become the standard for object-oriented modeling. The unified modeling language describes the static structure information of the system through classes, objects, relationships, etc., and describes the dynamic behavior of the system through sequence diagrams and state transition diagrams. This abstract description of the software system facilitates the exchange of ideas between developers, and also provides convenience for document processing. Unified Modeling Language is a very successful modeling language, which has made great contributions to the standardization of software process and the improvement of the efficiency of software development. However, problems have also been encountered in the process of practical application. The most important problem is that the unified modeling language is only applied in the analysis and design stages of the software process at present. The models established by using this modeling language are not executable, and the analysts and designers can only manually check the correctness of the models. It brings hidden dangers to the design of the model and the implementation of the code.
发明内容: Invention content:
本发明要解决的技术问题是,提供了一种基于可执行元语言的电信领域建模方法,并解决目前电信领域中领域模型建立后无法验证的问题。The technical problem to be solved by the present invention is to provide a modeling method in the telecommunication field based on the executable meta-language, and solve the problem that the field model in the telecommunication field cannot be verified after being established.
模型是本发明所构建的系统的功能、行为和结构的形式化表示,通过把领域模型表示成可执行模型,可以在领域层次测试模型的正确性,而不用考虑平台相关的问题,这样,领域模型永远不会因为技术的变化而过时,从而做到了可不断发展和可复用。The model is the formal representation of the function, behavior and structure of the system constructed by the present invention. By expressing the domain model as an executable model, the correctness of the model can be tested at the domain level without considering platform-related issues. In this way, the domain The model will never become obsolete due to technological changes, so it can be continuously developed and reused.
一种基于可执行元语言的电信领域建模方法,该方法包括以下步骤:A method for modeling the telecommunications domain based on executable meta-language, the method includes the following steps:
a)基于元对象设施(MOF)对统一建模语言进行扩展设计了一种适合电信领域的可执行元模型语言——xKL语言,并设计构建了基于xKL语言的建模工具和验证工具。a) Based on the extension of the Unified Modeling Language based on the Meta Object Facility (MOF), an executable metamodel language suitable for the telecommunications field—xKL language is designed, and the modeling tools and verification tools based on the xKL language are designed and constructed.
b)收集电信领域相关信息,把它们整合成领域模型并用可视化的组件描述成类图结构;用xKL填充类图中的约束以及静态语义部分,生成完整的图形化领域模型。b) Collect relevant information in the telecommunications field, integrate them into a domain model and describe it as a class diagram structure with visual components; use xKL to fill the constraints and static semantic parts in the class diagram to generate a complete graphical domain model.
c)将图形化领域模型映射到完全基于xKL文本的电信领域模型。c) Mapping the graphical domain model to the telecommunications domain model completely based on xKL text.
d)从电信领域模型出发,根据需要解决的问题,选择领域模型中的类进行实例化,生成基于xKL的内存动态可操作对象,并将领域模型中类之间关系实例化为xKL内存对象之间的关系,形成对象模型。d) Starting from the telecom domain model, according to the problems to be solved, select the classes in the domain model for instantiation, generate memory dynamic operable objects based on xKL, and instantiate the relationship between classes in the domain model as xKL memory objects Relationships among objects form an object model.
e)执行领域模型中基于xKL的约束,验证对象模型中对象之间是否满足应有的约束,若不满足,则按照相应的约束动态修改模型,并返回修改的结果。e) Execute the xKL-based constraints in the domain model, verify whether the objects in the object model meet the due constraints, if not, dynamically modify the model according to the corresponding constraints, and return the modified results.
f)向模型中特定的对象发送指令,使其执行相应的方法,检验方法执行的效果。f) Send an instruction to a specific object in the model to make it execute the corresponding method, and check the effect of the method execution.
所述的xKL语言由静态语法元模型和动态行为元模型组成,如图1所示。静态语法元模型是扩展了EMOF元模型,定义了表示模型所需的结构;动态行为元模型是对OCL做了外围扩展,形成了xOCL语言,xOCL定义了对模型的操作。The xKL language is composed of a static syntax meta-model and a dynamic behavior meta-model, as shown in FIG. 1 . The static grammatical metamodel extends the EMOF metamodel and defines the structure required to represent the model; the dynamic behavioral metamodel extends the OCL peripherally to form the xOCL language, and xOCL defines the operation of the model.
从图1可知,xKL语言的组成更具体的叙述是:As can be seen from Figure 1, a more specific description of the composition of the xKL language is:
1、静态语法元模型。EMOF是MOF2.0的基本核心,静态语法元模型通过扩展EMOF元模型,形成了xKL语言的语法结构部分。为了适应平台无关性的需求,它仅定义了一个模型所需要的结构,没有给出任何模型行为的规范。1. Static syntax metamodel. EMOF is the basic core of MOF2.0, and the static grammatical metamodel forms the grammatical structure part of the xKL language by extending the EMOF metamodel. In order to meet the requirements of platform independence, it only defines the structure required by a model, and does not give any specification of model behavior.
2、动态行为元模型。行为元模型对OCL作了外围扩展,形成了xOCL语言。xOCL规范完全基于UML和MOF的核心定义,这使得它可以被应用到MOF和UML中。由于EMOF是不可执行的,因此需要添加一些行为元素,通过在OCL语言中添加对模型的一些操作形成行为元模型,结构模型和行为模型通过在类的操作体中书写行为语句进行联系。2. Dynamic Behavior Metamodel. Behavioral meta-model makes peripheral extensions to OCL and forms xOCL language. The xOCL specification is completely based on the core definitions of UML and MOF, which makes it applicable to MOF and UML. Since EMOF is non-executable, some behavioral elements need to be added, and the behavioral metamodel is formed by adding some operations on the model in the OCL language. The structural model and the behavioral model are connected by writing behavioral statements in the operating body of the class.
基于xKL语言的建模工具和验证工具的系统架构如图2所示。图2中,最底层为Java虚拟机JVM部分,为可执行元模型的虚拟机提供基本指令支持。可执行元模型的核心语义的一部分和基本的输入输出采用Java实现,而其余扩展部分可由可执行元模型自身实现。可执行元模型虚拟机基于JVM实现,可执行虚拟机对可执行元核语言xKL的模型提供虚拟解释执行环境。xKL在EMOF虚拟机上提供基本的可执行模型概念,其它的可执行元模型基于xKL实现。xOCL提供约束语言,用于可执行元模型及其描述的其它模型语言提供抽象语法概念形式良好的关系的约束或模型查询功能。The system architecture of modeling tools and verification tools based on xKL language is shown in Figure 2. In Fig. 2, the bottom layer is the Java virtual machine JVM part, which provides basic instruction support for the virtual machine of the executable metamodel. Part of the core semantics and basic input and output of the executable meta-model are implemented in Java, while the rest of the extended parts can be realized by the executable meta-model itself. The executable meta-model virtual machine is implemented based on JVM, and the executable virtual machine provides a virtual interpretation and execution environment for the model of the executable meta-kernel language xKL. xKL provides the basic executable model concept on the EMOF virtual machine, and other executable meta-models are implemented based on xKL. xOCL provides a constraint language, and other modeling languages for the executable meta-model and its description provide a well-formed relational constraint or model query function of abstract syntax concepts.
领域信息主要来源于已有标准,已有系统,领域专家,需求手册等。Domain information mainly comes from existing standards, existing systems, domain experts, requirements manuals, etc.
所述的领域模型,包括从电信领域内抽象出来的概念,即类和类之间的关系。类之间的关系主要有继承、关联、聚合。继承关系是一般类与特殊类的关系,父类可以描述所有子类之间所有共同的属性和操作。关联是类之间的连接关系,使一个关联端知道另一个关联端的属性和方法,分为单向和双向关联。聚合是单向关联关系的一个特例,表示一个关联端拥有另一个关联端。The domain model includes concepts abstracted from the telecommunications domain, namely classes and relationships between classes. The relationships between classes mainly include inheritance, association, and aggregation. The inheritance relationship is the relationship between a general class and a special class, and the parent class can describe all common attributes and operations among all subclasses. Association is a connection relationship between classes, so that one association end knows the properties and methods of another association end, which can be divided into one-way and two-way associations. Aggregation is a special case of a unidirectional relationship, meaning that one end of the association owns the other end.
类图中的约束包括两种:类中的约束和方法中的约束,前一种约束描述为类中的成员,后一种描述为方法中的前置条件和后置条件。The constraints in the class diagram include two types: constraints in the class and constraints in the method. The former constraint is described as a member in the class, and the latter is described as the precondition and postcondition in the method.
所述的将图形化领域模型映射到完全基于xKL文本的电信领域模型,是一种图文法到文本文法的静态映射,主要有:图文法中的类元素映射到xKL中的class;聚合映射到xKL中的attribute;关联映射到xKL中的reference;继承映射到xKL中的inherits关系;其它文法填充元素(约束和方法等)直接原始映射到xKL文法中。The mapping of the graphical domain model to the telecommunications domain model based entirely on xKL text is a static mapping from graphic grammar to text grammar, mainly including: mapping of class elements in graphic grammar to classes in xKL; aggregation Mapped to the attribute in xKL; association is mapped to the reference in xKL; inheritance is mapped to the inherits relationship in xKL; other grammar filling elements (constraints and methods, etc.) are directly mapped to the xKL grammar.
所述的类之间关系,可以实例化为xKL内存对象之间的关系,即,是将原有的关联关系实例化为xKL内存对象之间的引用关系,将原有的聚合关系实例化为xKL内存对象之间的属性关系。The relationship between the classes can be instantiated as a relationship between xKL memory objects, that is, the original association relationship is instantiated as a reference relationship between xKL memory objects, and the original aggregation relationship is instantiated as Attribute relationships between xKL memory objects.
在形成对象模型之后,应当进行验证过程,在领域层次测试模型的正确性,把领域模型表示成可执行模型。After forming the object model, a verification process should be carried out to test the correctness of the model at the domain level and express the domain model as an executable model.
所述的验证,是验证对象模型中对象之间是否满足应有的约束,包括语法映射、约束检查和方法执行。The said verification is to verify whether the objects in the object model satisfy the due constraints, including syntax mapping, constraint checking and method execution.
采用以上架构建立的元模型和对象模型都是可验证的,保证了当用户需求发生变化时,可以在PIM层次验证模型的正确性。建模过程中模型可执行性主要表现在以下方面:The meta-model and object model established by using the above architecture are verifiable, which ensures that the correctness of the model can be verified at the PIM level when user requirements change. Model executable in the modeling process is mainly manifested in the following aspects:
1、领域模型可验证性和正确性1. Domain model verifiability and correctness
建立领域模型主要有三个步骤:创建基于图文法领域框架模型;使用xKL文法对图元素的内容填充;最后把同时混有图元素和xKL文法的类图映射到完全基于xKL文法的领域模型。首先,领域模型可验证性可以全部转化为xKL元语言的文法验证,显然xKL元语言的文法是可验证的;其次,领域模型的正确性关键在于框架模型中图形元素到xKL文法映射是否是一一对应且正确,由于xKL元语言是完全基于MOF的,而MOF中对元数据给出了相应的图文法示例,本发明使用的图元素也是参考MOF规范文档的。There are three main steps to establish a domain model: create a domain framework model based on graph grammar; use xKL grammar to fill the content of graph elements; finally, map the class diagram mixed with graph elements and xKL grammar to a domain model completely based on xKL grammar. First, the verifiability of the domain model can be fully transformed into the grammar verification of the xKL meta-language. Obviously, the grammar of the xKL meta-language is verifiable. One-to-one correspondence and correctness, since the xKL metalanguage is completely based on MOF, and MOF provides corresponding graph-grammar examples for metadata, and the graph elements used in the present invention also refer to MOF specification documents.
2、模型的动态可执行性2. Dynamic Executability of the Model
模型的最终表示形式是一个对象图,它逻辑上描述了这个模型中的对象以及对象之间的关系。模型是否动态可执行主要表现为:模型中对象之间满足的约束能够动态得到验证;对象自身的信息能够根据需要动态修改;不同对象之间能够相互协作模拟模型特定的工作流程。在模型中要实现以上动作,则必须将这些动作翻译成可执行指令在机器上运行。由前面可知,模型的对象图是通过xKL生成的,这就为模型的可执行性映射为xKL的可行性提供了条件,而相应的模型所执行的动作可以映射为xKL语言的动作语义。综上,根据xKL是可执行性,不难得出模型的动态可执行性。The final representation of the model is an object graph, which logically describes the objects in the model and the relationships between them. Whether the model is dynamically executable is mainly manifested in: the constraints satisfied by the objects in the model can be dynamically verified; the information of the object itself can be dynamically modified as needed; different objects can cooperate with each other to simulate the specific workflow of the model. To realize the above actions in the model, these actions must be translated into executable instructions to run on the machine. It can be seen from the above that the object graph of the model is generated by xKL, which provides conditions for the feasibility of the model's executable mapping to xKL, and the actions performed by the corresponding model can be mapped to the action semantics of the xKL language. In summary, according to xKL is executable, it is not difficult to get the dynamic executable of the model.
综上,整个建模过程的实现核心是可执行元语言xKL。它指导元建模过程,描述并动态实例化领域模型,验证和执行实例化后的模型,使得生成的模型具有可执行性。In summary, the core of the whole modeling process is the executable meta-language xKL. It guides the meta-modeling process, describes and dynamically instantiates the domain model, verifies and executes the instantiated model, and makes the generated model executable.
实施该方法建立电信领域模型及其实现该方法的软件具有以下优点:Implementing this method to establish a model in the telecommunications domain and the software for implementing this method have the following advantages:
1.具有良好的伸缩性和适应性。可以根据通信领域的不同情况,通过修改模型及模型之间的关系重新生成新的领域模型,形成新的领域应用。1. Has good scalability and adaptability. According to different situations in the communication field, a new domain model can be regenerated by modifying the model and the relationship between the models to form a new domain application.
2.具有良好的重用性。一个完整的领域模型可以是多个小的领域模型的组合,是低耦合的,每个小的领域模型都具有独立的完整逻辑,都可以实现不同程度和不同粒度的重用,还可以通过一定程度的修改迁移到相近的领域中。2. Has good reusability. A complete domain model can be a combination of multiple small domain models, which is low-coupling. Each small domain model has independent and complete logic, which can be reused to different degrees and different granularities, and can also be reused to a certain extent. Modifications migrated to similar domains.
3.对象模型的可执行性。在内存中实例化创建的对象模型,并可以模拟方法的执行,通过方法之间的调用实现程序功能的模拟。3. Executability of the object model. The created object model is instantiated in the memory, and the execution of the method can be simulated, and the simulation of the program function can be realized through the call between the methods.
4.领域模型可以在系统需求和底层实现之间建立起良好的映射关系,这不仅满足了需求分析人员、开发人员的需要,也提高了模型之间的可追踪性以及建模结果的可复用性。4. The domain model can establish a good mapping relationship between system requirements and underlying implementation, which not only meets the needs of requirements analysts and developers, but also improves the traceability between models and the reproducibility of modeling results usability.
5.可以缩短产品投放市场的时间,改善、提高产品质量,提高客户满意度。5. It can shorten the time for products to be put on the market, improve and improve product quality, and increase customer satisfaction.
6.与背景技术相比较,本发明设计了一种适合电信领域的可执行元模型语言——xKL语言;采用了元建模、建模的两步的建模方法;经过验证的过程,证明建模方法在电信领域的可执行性。6. Compared with the background technology, the present invention designs a kind of executable meta-model language suitable for the field of telecommunication---xKL language; Adopt the two-step modeling method of meta-modeling and modeling; Through the verified process, prove The implementability of modeling methods in the field of telecommunications.
附图说明 Description of drawings
图1是本发明的可执行元语言xKL的形成过程图。Fig. 1 is a diagram of the formation process of the executable metalanguage xKL of the present invention.
图2是本发明的基于xKL语言的建模工具和验证工具的系统架构图。Fig. 2 is a system architecture diagram of the xKL language-based modeling tool and verification tool of the present invention.
图3是本发明的一个具体的网络领域元模型结构图。FIG. 3 is a structural diagram of a specific network domain meta-model of the present invention.
图4是本发明的一个具体的网络领域对象图。Fig. 4 is a specific network domain object diagram of the present invention.
具体实施方式 Detailed ways
实施例1建立元模型Example 1 Establishing a meta-model
首先,领域专家和建模人员对领域知识进行抽象,通过领域工具建立领域元模型。包括建立领域概念和领域关系以及领域约束,还包括模型元素呈现的图标,复杂模型元素内部结构的视图等等。First, domain experts and modelers abstract domain knowledge and establish domain metamodels through domain tools. Including the establishment of domain concepts and domain relationships and domain constraints, as well as icons presented by model elements, views of the internal structure of complex model elements, and so on.
图3是一个具体的网络领域元模型。Figure 3 is a specific network domain meta-model.
该元模型说明,一个网络拓扑图包括一个或者多个元模型元素:路由器(Router)、交换机、主机(Host),此外,各元素之间的关系也需要作为一种元建模元素包含进来,包括关联关系和聚合关系。一个路由器和交换机可以包含一个或者多个端口(Port),采用聚合关系表示,而路由器和交换机、交换机和服务器之间的链路,采用关联关系进行表示。同时需要对元模型中的元素进行约束。如路由器需要作为整个网络的核心设备,需要采用双CPU引擎的路由器,而且路由器要求配备快速以太网口。因此路由器上的约束可以写成The meta-model shows that a network topology diagram includes one or more meta-model elements: router (Router), switch, host (Host). In addition, the relationship between each element also needs to be included as a meta-modeling element. Including association relationship and aggregation relationship. A router and a switch may contain one or more ports (Port), which are represented by an aggregation relationship, and links between a router and a switch, and a switch and a server are represented by an association relationship. At the same time, the elements in the meta-model need to be constrained. If the router needs to be the core device of the entire network, a router with dual CPU engines is required, and the router is required to be equipped with a fast Ethernet port. So the constraints on the router can be written as
Router.CPUNum==2Router.CPUNum==2
Router.fastEthNum==1Router.fastEthNum==1
同理,在交换机上的约束是要求有2个快速以太网口,Similarly, the constraint on the switch is that there are two Fast Ethernet ports,
Switch.fastEthNum==2Switch.fastEthNum==2
实施例2建立模型Embodiment 2 builds a model
建模时,可以根据领域元模型所建立的各种类型元素及其关系来建立相应的模型对象。When modeling, corresponding model objects can be established according to various types of elements and their relationships established by the domain meta-model.
如图4所示,建立了一个网络模型,即网络核心采用了2台CoreBuilder9000,它们是通过2条千兆以太网链路互连在一起的,这样即提高了可靠性,又增加了2个设备之间的带宽。每台CoreBuilder 3500通过2条光纤快速以太网链路分别连至不同的CoreBuilder 9000,所有的服务器均插有2块网卡,分别接不同的核心交换机上,从而形成一个高可靠和高带宽的网络骨干。当想要在路由器之间,交换机和路由器之间建立链路时,领域模型工具的约束验证器将进行验证,保证这种不符合领域元模型的建模行为不会发生。从而保证了建立的模型遵循领域知识。As shown in Figure 4, a network model is established, that is, the network core uses 2 CoreBuilder9000s, which are interconnected through 2 Gigabit Ethernet links, which improves reliability and adds 2 bandwidth between devices. Each CoreBuilder 3500 is connected to different CoreBuilder 9000 through 2 optical fiber fast Ethernet links, and all servers are inserted with 2 network cards, which are respectively connected to different core switches, thus forming a network backbone with high reliability and high bandwidth . When you want to establish a link between routers, switches and routers, the constraint validator of the domain model tool will perform verification to ensure that this modeling behavior that does not conform to the domain meta-model will not occur. This ensures that the established model follows the domain knowledge.
实施例3验证模型的正确性Embodiment 3 verifies the correctness of the model
(1)语法映射(1) Syntax mapping
对网络领域模型图进行语法映射,将它映射成xKL表示的逻辑图,这部分功能由图形元素到文本元素的转换器实现,转换后的代码如下:Carry out grammatical mapping on the network domain model diagram, and map it into a logic diagram represented by xKL. This part of the function is realized by a converter from graphic elements to text elements. The converted code is as follows:
abstract class Device{ abstract class Device{
//表示Device与Port之间的聚合关系 //Represents the aggregation relationship between Device and Port
attribute ports:Port[1..*] attribute ports: Port[1..*]
attribute deviceType:String attribute deviceType: String
}}
class Router extends Device{class Router extends Device{
attribute cpuNum:Integerattribute cpuNum:Integer
property fastEthNum:Integerproperty fastEthNum:Integer
getter is doGetter is do
this.ports.each{e|` ` ` ` ` ` ` ` this.ports.each{e|
if(e instanceof FastEthernet)If(e instanceof FastEthernet)
result:=result+1result:=result+1
}}
endend
//Router到Switch的关联,且指定自己的参与角色名为//Association from Router to Switch, and specify your participating role name as
routersrouters
reference switches:Switch[1..*]#routersreference switches:Switch[1..*]#routers
//Router中CPU数量满足的约束//Constraints satisfied by the number of CPUs in Router
constraint cpuNumConstraint is doconstraint cpuNumConstraint is do
this.cpuNum==2this.cpuNum==2
endend
//Router中快速以太网数量满足的约束//Constraints satisfied by the number of Fast Ethernet in Router
constraint fastEthNumConstraint is doconstraint fastEthNumConstraint is do
this.fastEthNum==1this.fastEthNum==1
endend
//设置Router中的CPU数量//Set the number of CPUs in Router
operation setCPUNum(num:Integer):voidoperation setCPUNum(num:Integer):void
//前提条件:设置的数量应该满足非负的隐形约束// Precondition: The set quantity should satisfy the non-negative invisible constraint
pre notPositiveInput is doPre notPositiveInput is do
num>0num>0
endend
isis
dodo
this.cpuNum=num`` this.cpuNum=num
endend
//获取Router中的CPU数量// Get the number of CPUs in the Router
operation getCPUNum():Integeroperation getCPUNum():Integer
//后置条件:获取的数量应该满足非负的隐形约束//Post-condition: The obtained quantity should satisfy the non-negative invisible constraint
post notPositiveOutput is doPost notPositiveOutput is do
num>0num>0
endend
isis
dodo
result=num result = num
endend
.....................
}}
class Switch extends Device{class Switch extends Device{
attribute fastEthNum:Integer attribute fastEthNum:Integer
//Switch到Router的关联,且指定自己的参与角色名为//Switch-to-Router association, and specify your participating role name
switchesswitch
reference routers:Router[1..*]#switchesreference routers:Router[1..*]#switches
constraint fastEthNumConstraint is do constraint fastEthNumConstraint is do
this.fastEthNumConstraint==1** this.fastEthNumConstraint==1
endend
.....................
}}
class Sever extends Device{class Sever extends Device{
attribute fastEthNum:Integer attribute fastEthNum:Integer
.....................
}}
class Port{class Port{
.....................
}}
接下来由xKL的语法检查器自动检查生成的xKL代码,从而取代对图形化类图的语法检查。程序自动生成语法检查的结果,以文字报告的方式显示给元建模人员,报告的内容包括被创建的类的数量,关系的数量,约束的数量等,以及它们的明细单。若语法检查产生错误,则报告中给出修改的建议,并将错误自动定位到相应的图形元素上。例如Router::setCPUNum()方法体中“num>0”修改为“nun>0”,系统提示“undefined variable“nun”!”并将图元素Sever显示为红色。Next, the xKL syntax checker automatically checks the generated xKL code, thereby replacing the syntax check on the graphical class diagram. The program automatically generates the result of syntax checking and displays it to the meta-modeller in the form of a text report. The content of the report includes the number of created classes, the number of relationships, the number of constraints, etc., and their list. If an error occurs in the grammar check, suggestions for modification will be given in the report, and the error will be automatically located on the corresponding graphic element. For example, in the Router::setCPUNum() method body, "num>0" is changed to "nun>0", and the system prompts "undefined variable "nun"!" and displays the graph element Sever in red.
(2)约束检查(2) Constraint check
建立模型时,根据领域模型中的类创建相应对象,例如创建一个HWRouter对象coreRouterL,创建一个CiscoRouter对象coreRouterR等等。创建模型之后,可以实时检查coreRouterL和coreRouterR所满足约束,验证约束的动作翻译成如下代码:When building a model, create corresponding objects according to the classes in the domain model, for example, create a HWRouter object coreRouterL, create a CiscoRouter object coreRouterR, and so on. After the model is created, the constraints satisfied by coreRouterL and coreRouterR can be checked in real time, and the action of verifying the constraints is translated into the following code:
//设置coreRouterL的CPU数量//Set the number of CPUs for coreRouterL
coreRouterL.setCPUNum(2) coreRouterL.setCPUNum(2)
.........
doDo
//获得coreRouterL的快速以太网口数量// Obtain the number of Fast Ethernet ports of coreRouterL
coreRouterL.fastEthNum.gettercoreRouterL.fastEthNum.getter
//检查coreRouterL所有的约束成员// Check all constraint members of coreRouterL
coreRouterL.checkConstraintscoreRouterL. checkConstraints
//捕获验证产生的异常信息// Capture the exception information generated by verification
rescue(err:ConstraintException)Rescue(err:ConstraintException)
//处理验证产生的异常// Handle exceptions generated by verification
stdio.writeln(err.toString)stdio.writeln(err.toString)
stdio.write(err.message)stdio.write(err.message)
endend
同理,可以按相同方式处理coreRouterR和其它设备满足的约束。根据被捕获的异常信息,相应地修正模型图,甚至修改领域模型图来达到目的。若根据需要,需要升级网络硬件设施,例如要求coreRouterR的快速以太网口数量达到3个,则需要修该领域模型图,使得Router的快速以太网口数量满足数量约束3;然后再修正模型中coreRouterR实际连接的以太网口数量;接着再验证模型的约束。Similarly, constraints satisfied by coreRouterR and other devices can be handled in the same way. According to the captured abnormal information, the model diagram is corrected accordingly, and even the domain model diagram is modified to achieve the goal. If it is necessary to upgrade the network hardware facilities, for example, the number of Fast Ethernet ports of coreRouterR is required to reach 3, the model diagram of this field needs to be revised so that the number of Fast Ethernet ports of Router meets the quantity constraint 3; and then coreRouterR in the model is corrected The number of Ethernet ports actually connected; then verify the constraints of the model.
(3)方法执行(3) Method execution
模型图展现的是一张内存对象图,可以直接通过模型图上的元素,调用模型中对应对象的方法,例如coreRouterR具有方法getCPUNum(),则可以通过鼠标事件激活它的调用。The model diagram shows a memory object diagram, and the method of the corresponding object in the model can be called directly through the elements on the model diagram. For example, coreRouterR has the method getCPUNum(), and its call can be activated through the mouse event.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2008100508348A CN101303646B (en) | 2008-06-18 | 2008-06-18 | A Modeling Method for Telecommunications Domain Based on Executable Meta-Language |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2008100508348A CN101303646B (en) | 2008-06-18 | 2008-06-18 | A Modeling Method for Telecommunications Domain Based on Executable Meta-Language |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101303646A true CN101303646A (en) | 2008-11-12 |
| CN101303646B CN101303646B (en) | 2010-07-28 |
Family
ID=40113563
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2008100508348A Expired - Fee Related CN101303646B (en) | 2008-06-18 | 2008-06-18 | A Modeling Method for Telecommunications Domain Based on Executable Meta-Language |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101303646B (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102270130A (en) * | 2011-06-27 | 2011-12-07 | 浙江工业职业技术学院 | Formal description method for adaptive software architecture during operation |
| CN103166793A (en) * | 2013-01-31 | 2013-06-19 | 北京佳讯飞鸿电气股份有限公司 | Service configuration method based on meta-model |
| CN103873297A (en) * | 2014-03-14 | 2014-06-18 | 浪潮通信信息系统有限公司 | Processing method for reverse inheritance modeling of data acquisition and processing system |
| CN103955369A (en) * | 2014-04-28 | 2014-07-30 | 中国人民解放军理工大学 | Software fuzzy self-adaptation modeling tool construction method based on expanded UML (Unified Modeling Language) |
| CN109359331A (en) * | 2018-09-07 | 2019-02-19 | 华东师范大学 | A CPS Dynamic Behavior Modeling and Simulation Method Based on Executable Domain-Specific Modeling Language xSHS |
| CN112765360A (en) * | 2019-10-21 | 2021-05-07 | 富士施乐株式会社 | Information processing apparatus, recording medium, and information processing method |
| CN113867786A (en) * | 2021-10-09 | 2021-12-31 | 咪咕文化科技有限公司 | Domain model identification method, device, device and storage medium |
| CN114677459A (en) * | 2022-04-01 | 2022-06-28 | 南京财经大学 | A method for generating logical graphs based on graph grammar |
| CN116414376A (en) * | 2023-03-01 | 2023-07-11 | 杭州华望系统科技有限公司 | A Domain Metamodel Construction Method Based on General Modeling Language |
-
2008
- 2008-06-18 CN CN2008100508348A patent/CN101303646B/en not_active Expired - Fee Related
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102270130A (en) * | 2011-06-27 | 2011-12-07 | 浙江工业职业技术学院 | Formal description method for adaptive software architecture during operation |
| CN103166793A (en) * | 2013-01-31 | 2013-06-19 | 北京佳讯飞鸿电气股份有限公司 | Service configuration method based on meta-model |
| CN103873297A (en) * | 2014-03-14 | 2014-06-18 | 浪潮通信信息系统有限公司 | Processing method for reverse inheritance modeling of data acquisition and processing system |
| CN103955369A (en) * | 2014-04-28 | 2014-07-30 | 中国人民解放军理工大学 | Software fuzzy self-adaptation modeling tool construction method based on expanded UML (Unified Modeling Language) |
| CN103955369B (en) * | 2014-04-28 | 2017-05-17 | 中国人民解放军理工大学 | Software fuzzy self-adaptation modeling tool construction method based on expanded UML (Unified Modeling Language) |
| CN109359331B (en) * | 2018-09-07 | 2023-06-27 | 华东师范大学 | CPS Dynamic Behavior Modeling and Simulation Method Based on Executable Domain Specific Modeling Language xSHS |
| CN109359331A (en) * | 2018-09-07 | 2019-02-19 | 华东师范大学 | A CPS Dynamic Behavior Modeling and Simulation Method Based on Executable Domain-Specific Modeling Language xSHS |
| CN112765360A (en) * | 2019-10-21 | 2021-05-07 | 富士施乐株式会社 | Information processing apparatus, recording medium, and information processing method |
| CN113867786A (en) * | 2021-10-09 | 2021-12-31 | 咪咕文化科技有限公司 | Domain model identification method, device, device and storage medium |
| CN113867786B (en) * | 2021-10-09 | 2025-08-26 | 咪咕文化科技有限公司 | Domain model identification method, device, equipment and storage medium |
| CN114677459A (en) * | 2022-04-01 | 2022-06-28 | 南京财经大学 | A method for generating logical graphs based on graph grammar |
| CN116414376A (en) * | 2023-03-01 | 2023-07-11 | 杭州华望系统科技有限公司 | A Domain Metamodel Construction Method Based on General Modeling Language |
| CN116414376B (en) * | 2023-03-01 | 2023-09-15 | 杭州华望系统科技有限公司 | A domain metamodel construction method based on general modeling language |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101303646B (en) | 2010-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Cottenier et al. | The motorola WEAVR: Model weaving in a large industrial context | |
| CN101303646A (en) | A Modeling Method for Telecommunications Domain Based on Executable Meta-Language | |
| Voelter | Language and IDE Modularization and Composition with MPS | |
| US10114861B2 (en) | Expandable ad hoc domain specific query for system management | |
| CN103942086B (en) | The method of the establishment based on AADL, analysis and emulation hybrid system model | |
| Mens et al. | Evolving software architecture descriptions of critical systems | |
| CN103198009A (en) | Universal testing method, system and corresponding device | |
| CN111859834B (en) | A UVM-based verification platform development method, system, terminal and storage medium | |
| US20150220325A1 (en) | Agile framework for vertical application development and delivery | |
| CN101645013A (en) | Plug-in type service management system and method of integrated service management platform | |
| CN106649103A (en) | Android application program automatically black box testing method and system | |
| CN104899037B (en) | A kind of intrusive mood ash box assembling verification method based on model | |
| US10459698B2 (en) | Framework for generating adapters in an integrated development environment | |
| Remenska et al. | From UML to process algebra and back: An automated approach to model-checking software design artifacts of concurrent systems | |
| CN100417075C (en) | Interface Test Method | |
| Amirat et al. | Automatic generation of PROMELA code from sequence diagram with imbricate combined fragments | |
| CN115291840A (en) | Model-driven block chain development life cycle development method | |
| CN112784417B (en) | A SysML-based avionics distributed joint simulation method and system | |
| US10606569B2 (en) | Declarative configuration elements | |
| CN116415665A (en) | Conversion method and conversion device of end-side push model | |
| CN100478879C (en) | Method for service logic mapping onto applied language discribed by XML language | |
| Park et al. | A component model supporting decomposition and composition of consumer electronics software product lines | |
| CN114461524A (en) | Interface access testing method and device, electronic equipment and storage medium | |
| CN108595166B (en) | A method and system for implementing a distributed Internet of Things application execution engine | |
| Skazhenik et al. | Debugger for declarative DSL for telecommunication |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100728 Termination date: 20150618 |
|
| EXPY | Termination of patent right or utility model |