[go: up one dir, main page]

CN112052244A - Method and device for establishing model attribute, electronic equipment and storage medium - Google Patents

Method and device for establishing model attribute, electronic equipment and storage medium Download PDF

Info

Publication number
CN112052244A
CN112052244A CN202010937825.1A CN202010937825A CN112052244A CN 112052244 A CN112052244 A CN 112052244A CN 202010937825 A CN202010937825 A CN 202010937825A CN 112052244 A CN112052244 A CN 112052244A
Authority
CN
China
Prior art keywords
instance
classification
attribute
classification attribute
declaration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010937825.1A
Other languages
Chinese (zh)
Inventor
郑建华
钱玉莲
胡正扬
王锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Provincial Institute of Communications Planning Design and Research Co Ltd
Original Assignee
Zhejiang Provincial Institute of Communications Planning Design and Research 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 Zhejiang Provincial Institute of Communications Planning Design and Research Co Ltd filed Critical Zhejiang Provincial Institute of Communications Planning Design and Research Co Ltd
Priority to CN202010937825.1A priority Critical patent/CN112052244A/en
Publication of CN112052244A publication Critical patent/CN112052244A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/235Update request formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method and a device for establishing model attributes, electronic equipment and a storage medium, and relates to the technical field of data modeling, wherein the method for establishing the model attributes comprises the following steps: acquiring an original element instance and a corresponding classification attribute field from a specified database; generating a global classification attribute declaration based on the classification attribute field of the original element instance; generating an attribute instance based on the global classification attribute declaration; the property instance is added to the original element instance to generate a model element instance. According to the method and the device, the attribute fields in the model instances can be updated globally by updating the existing classification attribute declarations in the design files, the efficiency of updating the attributes of the model element instances can be improved, and the problem that the reconstructed models are deleted or the models are modified one by one inefficiently and manually is avoided.

Description

建立模型属性的方法、装置、电子设备及存储介质Method, apparatus, electronic device and storage medium for establishing model attributes

技术领域technical field

本申请涉及数据建模技术领域,具体而言,涉及一种建立模型属性的方法、装置、电子设备及存储介质。The present application relates to the technical field of data modeling, and in particular, to a method, apparatus, electronic device, and storage medium for establishing model attributes.

背景技术Background technique

在当今全球各地每天都在进行着的大量的工程项目建设,随着时代的发展,设计、采购、预制加工、施工建造、运维在同一个项目进行模型数据融合成为必然的发展趋势,例如使用三维BIM(建筑信息建模,Building Information Modeling)技术对各类工程项目进行三维建模、数据处理、数据传递等。现阶段在模型构建时,依靠人工手动创建和管理模型属性。例如,在BIM模型上附加属性作为类别、属性数据记录的载体,需要依靠工程师手工附加属性数据。如果模型属性字段变更,则要么一个个人工重新修改覆盖属性,要么删除模型重建,因此模型更新数据效率低下。A large number of engineering projects are being constructed every day all over the world. With the development of the times, it has become an inevitable development trend for design, procurement, prefabrication, construction, operation and maintenance to integrate model data in the same project. 3D BIM (Building Information Modeling) technology performs 3D modeling, data processing, and data transmission for various engineering projects. At this stage, during model construction, model properties are manually created and managed manually. For example, to attach attributes to a BIM model as a carrier for category and attribute data records, it is necessary to rely on engineers to manually attach attribute data. If the model attribute field changes, either one manually re-modifies the overlay attribute or deletes the model rebuild, so the model update data is inefficient.

发明内容SUMMARY OF THE INVENTION

本申请的实施例目的在于提供一种建立模型属性的方法、装置、电子设备及存储介质,以解决目前方法存在的模型更新数据效率低的问题。The purpose of the embodiments of the present application is to provide a method, apparatus, electronic device and storage medium for establishing model attributes, so as to solve the problem of low efficiency of model update data existing in the current method.

本申请的实施例提供了一种建立模型属性的方法,所述方法包括:Embodiments of the present application provide a method for establishing model attributes, the method comprising:

从指定数据库中获取原始元件实例以及所述原始元件实例的分类属性字段;Obtain the original component instance and the classification attribute field of the original component instance from the specified database;

基于所述原始元件实例以及所述分类属性字段生成全局分类属性声明;generating a global classification attribute declaration based on the original component instance and the classification attribute field;

基于所述分类属性字段以及所述全局分类属性声明生成属性实例;generating an attribute instance based on the classification attribute field and the global classification attribute declaration;

将所述属性实例添加在所述原始元件实例以生成模型元件实例。The attribute instance is added to the original element instance to generate a model element instance.

在上述实现过程中,当所述指定数据库中所述原始元件的分类属性更新时,只需更新全局分类属性声明,就能够完成与所述指定数据库中所述原始元件的分类属性更新相匹配的所述模型元件实例中的属性更新,能够提高所述模型元件实例中的分类属性更新的效率,避免了低效地人工删除重建模型或者一个个修改模型。In the above implementation process, when the classification attribute of the original element in the designated database is updated, only the global classification attribute declaration needs to be updated, and the classification attribute matching the classification attribute update of the original element in the designated database can be completed. The attribute update in the model element instance can improve the efficiency of the classification attribute update in the model element instance, and avoid inefficient manual deletion of reconstructed models or modification of models one by one.

可选地,所述基于所述分类属性字段以及所述全局分类属性声明生成属性实例,包括:Optionally, generating an attribute instance based on the classification attribute field and the global classification attribute declaration includes:

基于指定空间参数设置所述原始元件实例的元件模型;setting the component model of the original component instance based on the specified spatial parameters;

基于所述分类属性字段以及所述全局分类属性声明生成所述属性实例,将所述属性实例挂载于所述元件模型。The attribute instance is generated based on the classification attribute field and the global classification attribute declaration, and the attribute instance is mounted on the component model.

在上述实现过程中,由于所述元件模型中挂载有所述属性实例,在所述属性实例中包括有所述全局分类属性声明,当更改所述全局分类属性声明时,能够对元件模型中的元件实例的属性进行更新,以提高元件模型中的元件实例的属性进行更新的效率。In the above implementation process, since the attribute instance is mounted in the component model, and the global classification attribute declaration is included in the attribute instance, when the global classification attribute declaration is changed, The properties of the component instances are updated to improve the efficiency of updating the properties of the component instances in the component model.

可选地,所述基于所述原始元件实例以及所述分类属性字段生成全局分类属性声明之后,所述方法还包括:Optionally, after the global classification attribute declaration is generated based on the original component instance and the classification attribute field, the method further includes:

当分类属性声明集合中存在与所述原始元件实例对应的与全局分类属性声明不同分类属性声明时,将所述分类属性声明集合中与所述原始元件实例对应的分类属性声明替换为所述全局分类属性声明,所述分类属性声明集合包括所有模型元件实例的分类属性声明;When there is a classification attribute declaration corresponding to the original element instance in the classification attribute declaration set that is different from the global classification attribute declaration, replace the classification attribute declaration corresponding to the original element instance in the classification attribute declaration set with the global classification attribute declaration a classification attribute declaration, the set of classification attribute declarations includes the classification attribute declarations of all model element instances;

当所述分类属性声明集合中不存在与所述原始元件实例对应的分类属性声明时,在所述分类属性声明集合中添加所述全局分类属性声明。When the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, the global classification attribute declaration is added to the classification attribute declaration set.

在上述实现过程中,通过对比所述原始元件实例对应的不同分类属性声明与所述分类属性声明集合,对所述全局数据库集合进行添加或者替换以完成所述全局数据库集合的更新。In the above implementation process, the global database set is added or replaced by comparing different classification attribute declarations corresponding to the original component instance with the classification attribute declaration set to complete the update of the global database set.

可选地,在所述将所述属性实例添加在所述原始元件实例以生成模型元件实例之后,所述方法还包括:Optionally, after adding the attribute instance to the original element instance to generate a model element instance, the method further includes:

根据所述指定数据库中的所述原始元件实例的更新分类属性字段,获得更新分类属性声明集合;According to the updated classification attribute field of the original component instance in the specified database, obtain the updated classification attribute declaration set;

基于所述更新分类属性声明集合对所述模型元件实例中的所述全局分类属性声明进行更新,获得更新分类属性声明;updating the global classification attribute declaration in the model element instance based on the updated classification attribute declaration set to obtain an updated classification attribute declaration;

基于所述分类属性字段以及所述更新分类属性声明生成更新属性实例;generating an update attribute instance based on the classification attribute field and the update classification attribute declaration;

将所述原始元件实例中的所述指定属性实例替换为所述更新属性实例以更新所述模型元件实例。The specified attribute instance in the original element instance is replaced with the updated attribute instance to update the model element instance.

在上述实现过程中,通过分类属性声明集合的更新完成匹配所述指定数据库中的所述原始元件实例的分类属性更新,并基于分类属性声明集合的更新进行所述模型元件实例更新,不需要逐项更改所述模型元件实例以适应所述指定数据库中的所述原始元件实例的更新,能够提高更新所述模型元件实例更新的效率。In the above implementation process, the classification attribute update matching the original element instance in the specified database is completed through the update of the classification attribute declaration set, and the model element instance is updated based on the update of the classification attribute declaration set, and there is no need to update the model element instance one by one. The item modifies the model element instance to accommodate the update of the original element instance in the specified database, which can improve the efficiency of updating the model element instance update.

可选地,在所述从指定数据库中获取原始元件实例以及所述原始元件实例的分类属性字段之前,所述方法包括:Optionally, before obtaining the original component instance and the classification attribute field of the original component instance from the specified database, the method includes:

建立原始元件实例;Create an instance of the original component;

基于分类将所述原始元件实例入库到指定数据库。The original component instances are inventoried into a designated database based on the classification.

在上述实现过程中,在所述指定数据库中建立元件实例,便于在指定数据库中获取所述原始元件实例,并基于所述原始元件实例挂载所述全局分类属性声明,以便利用所述全局分类属性声明进行模型元件实例中属性的更新。In the above implementation process, a component instance is established in the specified database, so as to obtain the original component instance in the specified database, and the global classification attribute declaration is mounted based on the original component instance, so as to utilize the global classification Property declarations perform updates of properties in model element instances.

可选地,所述建立原始元件实例包括:Optionally, the creation of the original element instance includes:

定义原始元件基本信息,所述基本信息包括原始元件名称、原始元件描述、原始元件分类以及原始元件专业;Define the basic information of the original component, the basic information includes the name of the original component, the description of the original component, the classification of the original component, and the specialty of the original component;

定义原始元件的模型信息,所述模型信息包括模型名称以及模型文件名;Define the model information of the original element, the model information includes the model name and the model file name;

定义原始元件字段,所述原始元件字段从原始元件的父级的分类属性字段继承得到。A primitive element field is defined that is inherited from the class attribute field of the primitive element's parent.

在上述实现过程中,建立所述原始元件实例便于将用户信息进行归纳汇总,以便基于所述原始元件实例进行模型建立。In the above implementation process, establishing the original component instance is convenient for summarizing user information, so as to build a model based on the original component instance.

可选地,所述基于分类将所述原始元件实例入库到指定数据库,包括:Optionally, the storing the original component instance into a specified database based on the classification includes:

定义分类基本信息,所述分类基本信息包括分类名称、分类描述以及分类父级名称;Define basic classification information, where the basic classification information includes classification name, classification description, and classification parent name;

定义分类继承字段,所述继承字段为分类父级的属性字段;Define a classification inheritance field, the inheritance field is an attribute field of the classification parent;

定义分类自有字段,所述分类自有字段为分类特有字段,所述分类自有字段不能与所述分类父级名称相同;Define a category own field, the category own field is a category-specific field, and the category own field cannot be the same as the category parent name;

基于所述分类将所述原始元件实例入库到指定数据库。The original component instances are inventoried into a designated database based on the classification.

在上述实现过程中,定义分类能够将原始元件实例进行分类存储在所述指定数据库中,并便于基于分类属性字段以及所述全局分类属性声明生成属性实例,以达到更新全局分类属性声明便能够更新模型元件实例中分类属性的目的,以提高更新模型元件实例中分类属性的效率。In the above implementation process, defining the classification can classify and store the original component instance in the specified database, and facilitate the generation of attribute instances based on the classification attribute field and the global classification attribute declaration, so as to update the global classification attribute declaration. The purpose of classification attributes in model element instances to improve the efficiency of updating classification attributes in model element instances.

本申请的实施例提供了一种建立模型属性的装置,所述装置包括:An embodiment of the present application provides an apparatus for establishing model attributes, the apparatus comprising:

获取模块,用于从指定数据库中获取原始元件实例以及所述原始元件实例的分类属性字段;an obtaining module, used to obtain the original component instance and the classification attribute field of the original component instance from the specified database;

第一生成模块,用于基于所述原始元件实例以及所述分类属性字段生成全局分类属性声明;a first generation module, configured to generate a global classification attribute declaration based on the original component instance and the classification attribute field;

第二生成模块,用于基于所述分类属性字段以及所述全局分类属性声明生成属性实例;a second generation module, configured to generate an attribute instance based on the classification attribute field and the global classification attribute declaration;

添加模块,用于将所述属性实例添加在所述原始元件实例以生成模型元件实例。An add module is used to add the attribute instance to the original element instance to generate a model element instance.

在上述实现过程中,当所述指定数据库中所述原始元件的分类属性更新时,只需更新全局分类属性声明就能够完成与所述指定数据库中所述原始元件的分类属性更新相匹配的所述模型元件实例中的属性更新,能够提高所述模型元件实例中的分类属性更新的效率,避免了低效地人工删除重建模型或者一个个修改模型。In the above implementation process, when the classification attribute of the original element in the designated database is updated, only the global classification attribute declaration needs to be updated to complete all classification attributes that match the classification attribute update of the original element in the designated database. The attribute update in the model element instance can improve the efficiency of the classification attribute update in the model element instance, and avoid inefficient manual deletion of reconstructed models or modification of models one by one.

可选地,所述第二生成模块具体用于:Optionally, the second generation module is specifically used for:

基于指定空间参数设置所述原始元件实例的元件模型;setting the component model of the original component instance based on the specified spatial parameters;

基于所述分类属性字段以及所述全局分类属性声明生成所述属性实例,将所述属性实例挂载于所述元件模型。The attribute instance is generated based on the classification attribute field and the global classification attribute declaration, and the attribute instance is mounted on the component model.

在上述实现过程中,由于所述元件模型中挂载有所述属性实例,在所述属性实例中包括有所述全局分类属性声明,当更改所述全局分类属性声明时,能够对元件模型中的元件实例的属性进行更新,以提高元件模型中的元件实例的属性进行更新的效率。In the above implementation process, since the attribute instance is mounted in the component model, and the global classification attribute declaration is included in the attribute instance, when the global classification attribute declaration is changed, The properties of the component instances are updated to improve the efficiency of updating the properties of the component instances in the component model.

可选地,所述建立模型属性的装置还包括更新模块,所述更新模块具体用于:Optionally, the device for establishing model attributes further includes an update module, and the update module is specifically used for:

当分类属性声明集合中存在与所述原始元件实例对应的与全局分类属性声明不同分类属性声明时,将所述分类属性声明集合中与所述原始元件实例对应的分类属性声明替换为所述全局分类属性声明,所述分类属性声明集合包括所有模型元件实例的分类属性声明;When there is a classification attribute declaration corresponding to the original element instance in the classification attribute declaration set that is different from the global classification attribute declaration, replace the classification attribute declaration corresponding to the original element instance in the classification attribute declaration set with the global classification attribute declaration a classification attribute declaration, the set of classification attribute declarations includes the classification attribute declarations of all model element instances;

当所述分类属性声明集合中不存在与所述原始元件实例对应的分类属性声明时,在所述分类属性声明集合中添加所述全局分类属性声明。When the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, the global classification attribute declaration is added to the classification attribute declaration set.

在上述实现过程中,通过对比所述原始元件实例对应的不同分类属性声明与所述分类属性声明集合,对所述全局数据库集合进行添加或者替换改以完成所述全局数据库集合的更新。In the above implementation process, by comparing different classification attribute declarations corresponding to the original component instance with the classification attribute declaration set, the global database set is added or replaced to complete the update of the global database set.

可选地,所述建立模型属性的装置还包括更新模块,具体用于:Optionally, the device for establishing model attributes also includes an update module, which is specifically used for:

根据所述指定数据库中的所述原始元件实例的更新分类属性字段,获得更新分类属性声明集合;According to the updated classification attribute field of the original component instance in the specified database, obtain the updated classification attribute declaration set;

基于所述更新分类属性声明集合对所述模型元件实例中的所述全局分类属性声明进行更新,获得更新分类属性声明;updating the global classification attribute declaration in the model element instance based on the updated classification attribute declaration set to obtain an updated classification attribute declaration;

基于所述分类属性字段以及所述更新分类属性声明生成更新属性实例;generating an update attribute instance based on the classification attribute field and the update classification attribute declaration;

将所述原始元件实例中的所述指定属性实例替换为所述更新属性实例以更新所述模型元件实例。The specified attribute instance in the original element instance is replaced with the updated attribute instance to update the model element instance.

在上述实现过程中,通过分类属性声明集合的更新完成匹配所述指定数据库中的所述原始元件实例的分类属性更新,并基于分类属性声明集合的更新进行所述模型元件实例更新,不需要逐项更改所述模型元件实例以适应所述指定数据库中的所述原始元件实例的更新,能够提高更新所述模型元件实例更新的效率。In the above implementation process, the classification attribute update matching the original element instance in the specified database is completed through the update of the classification attribute declaration set, and the model element instance is updated based on the update of the classification attribute declaration set, and there is no need to update the model element instance one by one. The item modifies the model element instance to accommodate the update of the original element instance in the specified database, which can improve the efficiency of updating the model element instance update.

可选地,所述建立模型属性的装置还包括建立模块,所述建立模块用于:Optionally, the device for establishing model attributes further includes a building module, and the building module is used for:

建立元件实例;基于分类将所述元件实例入库到指定数据库。A component instance is created; the component instance is inventoried into a designated database based on the classification.

在上述实现过程中,在所述指定数据库中建立元件实例,便于在指定数据库中获取所述原始元件实例,并基于所述原始元件实例挂载所述全局分类属性声明,以便利用所述全局分类属性声明进行模型元件实例中属性的更新。In the above implementation process, a component instance is established in the specified database, so as to obtain the original component instance in the specified database, and the global classification attribute declaration is mounted based on the original component instance, so as to utilize the global classification Property declarations perform updates of properties in model element instances.

可选地,所述建立模块具体用于:Optionally, the establishment module is specifically used for:

定义原始元件基本信息,所述基本信息包括原始元件名称、原始元件描述、原始元件分类以及原始元件专业;Define the basic information of the original component, the basic information includes the name of the original component, the description of the original component, the classification of the original component, and the specialty of the original component;

定义原始元件的模型信息,所述模型信息包括模型名称以及模型文件名;Define the model information of the original element, the model information includes the model name and the model file name;

定义原始元件字段,所述原始元件字段从原始元件的父级的分类属性字段继承得到。A primitive element field is defined that is inherited from the class attribute field of the primitive element's parent.

在上述实现过程中,建立所述原始元件实例便于将用户信息进行归纳汇总,以便基于所述原始元件实例进行模型建立。In the above implementation process, establishing the original component instance is convenient for summarizing user information, so as to build a model based on the original component instance.

可选地,所述建立模块具体用于:Optionally, the establishment module is specifically used for:

定义分类基本信息,所述分类基本信息包括分类名称、分类描述以及分类父级名称;Define basic classification information, where the basic classification information includes classification name, classification description, and classification parent name;

定义分类继承字段,所述继承字段为分类父级的属性字段;Define a classification inheritance field, the inheritance field is an attribute field of the classification parent;

定义分类自有字段,所述分类自有字段为分类特有字段,所述分类自有字段不能与所述分类父级名称相同;Define a category own field, the category own field is a category-specific field, and the category own field cannot be the same as the category parent name;

基于所述分类将所述原始元件实例入库到指定数据库。The original component instances are inventoried into a designated database based on the classification.

在上述实现过程中,定义分类能够将原始元件实例进行分类存储在所述指定数据库中,并便于基于分类属性字段以及所述全局分类属性声明生成属性实例,以达到更新全局分类属性声明便能够更新模型元件实例中分类属性的目的,以提高更新模型元件实例中分类属性的效率。In the above implementation process, defining the classification can classify and store the original component instance in the specified database, and facilitate the generation of attribute instances based on the classification attribute field and the global classification attribute declaration, so as to update the global classification attribute declaration. The purpose of classification attributes in model element instances to improve the efficiency of updating classification attributes in model element instances.

本实施例还提供了一种存储介质,所述存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器运行时,执行上述任意方法中的步骤。This embodiment also provides a storage medium, where computer program instructions are stored in the storage medium, and when the computer program instructions are executed by a processor, the steps in any of the foregoing methods are executed.

本实施例还提供了一种电子设备,所述电子设备包括存储器和处理器,所述存储器中存储有程序指令,所述处理器运行所述程序指令时,执行上述任意方法中的步骤。This embodiment also provides an electronic device, the electronic device includes a memory and a processor, the memory stores program instructions, and when the processor executes the program instructions, the processor executes the steps in any of the foregoing methods.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, therefore It should not be regarded as a limitation of the scope. For those of ordinary skill in the art, other related drawings can also be obtained from these drawings without any creative effort.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.

图1为本申请实施例提供的一种建立模型属性的方法的流程图。FIG. 1 is a flowchart of a method for establishing a model attribute provided by an embodiment of the present application.

图2为本申请的实施例提供的一种生成属性实例步骤的流程图。FIG. 2 is a flowchart of a step of generating an attribute instance according to an embodiment of the present application.

图3为本申请的实施例提供的一种更新全局分类属性声明步骤的流程图。FIG. 3 is a flowchart of a step of updating a global classification attribute declaration provided by an embodiment of the present application.

图4为本申请的实施例提供的一种更新模型元件实例步骤的流程图。FIG. 4 is a flowchart of steps for updating a model element instance provided by an embodiment of the present application.

图5为本申请实施例提供的一种原始元件实例入库步骤的流程图。FIG. 5 is a flowchart of a procedure for storing an instance of an original element according to an embodiment of the present application.

图6为本申请实施例提供的一种建立原始元件实例步骤的流程图。FIG. 6 is a flowchart of steps for creating an instance of an original element according to an embodiment of the present application.

图7为本申请实施例提供的一种基于分类将原始元件实例入库到指定数据库步骤的流程图。FIG. 7 is a flowchart of a step of storing original component instances into a specified database based on classification, provided by an embodiment of the present application.

图8为本申请实施例提供的一种建立模型属性的装置示意图。FIG. 8 is a schematic diagram of an apparatus for establishing a model attribute according to an embodiment of the present application.

图例:60-建立模型属性的装置;601-获取模块;602-第一生成模块;603-第二生成模块;604-添加模块;605-更新模块;606-建立模块。Legend: 60-device for establishing model properties; 601-acquiring module; 602-first generating module; 603-second generating module; 604-adding module; 605-updating module; 606-creating module.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.

在本申请的描述中,需要说明的是,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In the description of the present application, it should be noted that the terms "first", "second" and the like are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

本申请的其他特征和优点将在随后的说明书阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请实施例而了解。本申请的目的和其他优点可通过在所写的说明书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in the description which follows, and, in part, will be apparent from the description, or may be learned by practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.

本申请的实施例提供了一种建立模型属性的方法,请参看图1,图1为图1为本申请实施例提供的一种建立模型属性的方法的流程图,所述方法分为以下步骤:An embodiment of the present application provides a method for establishing a model attribute. Please refer to FIG. 1. FIG. 1 is a flowchart of a method for establishing a model attribute provided by FIG. 1 in an embodiment of the present application. The method is divided into the following steps :

步骤S1:从指定数据库中获取原始元件实例以及原始元件实例对应的分类属性字段。Step S1: Obtain the original component instance and the classification attribute field corresponding to the original component instance from the specified database.

可以理解的是,指定数据库为存储原始元件实例的数据库,在指定数据库中,原始元件实例分类进行存储。原始元件实例是存放在数据库中的能够重复使用的组件,分类属性字段是用于对分类进行标识。例如用于标识分类的分类属性字段包括分类名称、分类描述、分类父级名称等。以AUTOCAD绘图举例来说,元件实例为元件数据库中的包括矩形元件实例等原始元件实例在内的各种原始元件实例,矩形元件实例的分类名称、分类描述、分类父级名称都是矩形元件实例的分类属性字段。在设计平台软件(如MicroStation)中打开创建的设计文件中,拖到设计文件中的各个组件就是原始元件实例。It can be understood that the designated database is a database for storing original component instances, and in the designated database, the original component instances are classified and stored. The original component instance is a reusable component stored in the database, and the category attribute field is used to identify the category. For example, a category attribute field used to identify a category includes category name, category description, category parent name, and the like. Taking AUTOCAD drawing as an example, a component instance is a variety of original component instances in the component database including original component instances such as rectangular component instances. The category name, category description, and category parent name of a rectangular component instance are all rectangular component instances. The categorical attribute field of . Open the created design file in design platform software (such as MicroStation), and each component dragged into the design file is the original component instance.

步骤S2:基于原始元件实例以及分类属性字段生成全局分类属性声明。Step S2: Generate a global classification attribute declaration based on the original component instance and the classification attribute field.

可以理解的是,全局分类属性声明用于原始元件实例的建立分类属性的相关信息,例如原始元件实例的分类属性字段的索引,即记录原始元件实例的分类属性字段、存储原始元件实例的分类属性字段的空间关系以及原始元件实例的空间关系。It can be understood that the global classification attribute declaration is used to establish the relevant information of the classification attribute of the original component instance, such as the index of the classification attribute field of the original component instance, that is, the classification attribute field of the original component instance is recorded, and the classification attribute of the original component instance is stored. The spatial relationship of the field and the spatial relationship of the original component instance.

作为一种实施方式,全局分类属性声明可以为分类schema,分类schema可以理解为表、索引、视图或存储过程等,分类schema是一种关于分类的表、索引、视图以及存储过程的集合。每个原始元件实例可以创建一个分类schema,所有的原始元件实例对应的分类schema组成一个集合就是分类schema集合,即分类属性声明集合。As an implementation manner, the global classification attribute declaration may be a classification schema, and the classification schema may be understood as a table, an index, a view, or a stored procedure, etc., and a classification schema is a collection of classified tables, indexes, views, and stored procedures. Each original component instance can create a classification schema, and all the classification schemas corresponding to the original component instances form a set, which is the classification schema set, that is, the classification attribute declaration set.

步骤S3:基于分类属性字段以及全局分类属性声明生成属性实例。Step S3: Generate an attribute instance based on the classification attribute field and the global classification attribute declaration.

请参看图2,图2为本申请的实施例提供的一种属性实例生成步骤的流程图。可选地,步骤S3包括以下分步骤:Please refer to FIG. 2 , which is a flowchart of a step of generating an attribute instance according to an embodiment of the present application. Optionally, step S3 includes the following sub-steps:

步骤S31:基于指定空间参数设置原始元件实例的元件模型。Step S31: Set the component model of the original component instance based on the specified space parameter.

在设计平台软件(例如MicroStation软件)中,在开发人员创建的设计文件中的指定位置或者指定方向(旋转角度)将元件模型进行放置,便于进行模型的开发设计。In the design platform software (such as MicroStation software), the component model is placed at the specified position or specified direction (rotation angle) in the design file created by the developer to facilitate the development and design of the model.

步骤S32:基于分类属性字段以及全局分类属性声明生成属性实例,将属性实例挂载于元件模型。Step S32: Generate an attribute instance based on the classification attribute field and the global classification attribute declaration, and mount the attribute instance on the component model.

可以理解的是,根据原始元件实例对应的分类属性字段和该原始元件实例对应的全局分类属性声明生成该原始元件实例的属性实例,该原始元件实例的属性实例中为该原始元件实例的对应分类的实例。全局分类属性声明可以为分类schema,当分类schema中的分类的表、索引、视图以及存储过程的集合发生改变时,分类schema所对应的原始元件实例的属性实例发生变化,则原始元件实例对应的分类属性字段发生相应的改变。分类schema可以看作原始元件实例的全局变量,分类schema中分类属性的表、索引等发生变化,元件模型中分类属性对应进行变化,能够避免逐一更改元件模型中分类属性,能够提高更改元件模型的分类属性的效率。It can be understood that the attribute instance of the original element instance is generated according to the classification attribute field corresponding to the original element instance and the global classification attribute declaration corresponding to the original element instance, and the attribute instance of the original element instance is the corresponding classification of the original element instance. instance. The global classification attribute declaration can be a classification schema. When the set of classification tables, indexes, views, and stored procedures in the classification schema changes, and the attribute instance of the original component instance corresponding to the classification schema changes, the corresponding The classification attribute field changes accordingly. The classification schema can be regarded as the global variable of the original component instance. The table and index of the classification attributes in the classification schema change, and the classification attributes in the component model change correspondingly, which can avoid changing the classification attributes in the component model one by one, and can improve the efficiency of changing the component model. Efficiency of categorical properties.

传统方式中,在开发人员在设计平台软件中创建的元件模型的分类属性进行调整时,需要基于调整后的分类属性对其他元件模型的分类属性进行手动修改。可选地,本实施例能够基于全局分类属性声明与分类属性声明集合的更新实现相同分类属性在全局所有元件模型上的更新。In the traditional way, when the developer adjusts the classification attributes of the component models created in the design platform software, it is necessary to manually modify the classification attributes of other component models based on the adjusted classification attributes. Optionally, this embodiment can implement the update of the same classification attribute on all global component models based on the update of the global classification attribute declaration and the classification attribute declaration set.

请参看图3,图3为本申请的实施例提供的一种更新全局分类属性声明步骤的流程图。可选地,在步骤S2之后,建立模型属性的方法还包括步骤S6,步骤S6包括以下分步骤:Please refer to FIG. 3, which is a flowchart of a step of updating a global classification attribute declaration provided by an embodiment of the present application. Optionally, after step S2, the method for establishing model attributes further includes step S6, and step S6 includes the following sub-steps:

步骤S61:当分类属性声明集合中存在与原始元件实例对应的与全局分类属性声明不同分类属性声明时,将分类属性声明集合中与原始元件实例对应的分类属性声明替换为全局分类属性声明,分类属性声明集合包括所有模型元件实例的分类属性声明。Step S61: when there is a classification attribute declaration corresponding to the original component instance and different from the global classification attribute declaration in the classification attribute declaration set, replace the classification attribute declaration corresponding to the original component instance in the classification attribute declaration set with the global classification attribute declaration, and classify The property declaration collection includes the classed property declarations for all model element instances.

可以理解的是,分类属性声明集合为元件模型中存在的分类属性声明,分类属性声明集合中包括不同的分类属性声明,当分类属性声明集合中存在与原始元件实例对应的与全局分类属性声明不同分类属性声明时,原始元件实例对应的分类属性声明发生改变,因此需要将分类属性声明集合中与原始元件实例对应的分类属性声明替换为全局分类属性声明,全局分类属性声明为原始元件实例当下对应的分类属性声明。It can be understood that the classification attribute declaration set is the classification attribute declaration existing in the component model, and the classification attribute declaration set includes different classification attribute declarations. When a classification attribute is declared, the classification attribute declaration corresponding to the original component instance changes. Therefore, it is necessary to replace the classification attribute declaration corresponding to the original component instance in the classification attribute declaration set with the global classification attribute declaration, and the global classification attribute declaration corresponds to the original component instance. The classification attribute declaration of .

步骤S62:当分类属性声明集合中不存在与原始元件实例对应的分类属性声明时,在分类属性声明集合中添加全局分类属性声明。Step S62: When there is no classification attribute declaration corresponding to the original element instance in the classification attribute declaration set, add a global classification attribute declaration to the classification attribute declaration set.

可以理解的是,当分类属性声明集合中不存在与原始元件实例对应的分类属性声明时,将原始元件实例对应的分类属性声明添加在分类属性声明集合中作为全局分类属性声明以更新分类属性声明集合。It can be understood that when the classification attribute declaration corresponding to the original component instance does not exist in the classification attribute declaration set, the classification attribute declaration corresponding to the original component instance is added to the classification attribute declaration set as a global classification attribute declaration to update the classification attribute declaration. gather.

请继续参看图1,步骤S4:将属性实例添加在原始元件实例以生成模型元件实例。Please continue to refer to FIG. 1, step S4: adding the attribute instance to the original component instance to generate the model component instance.

请参看图4,图4为本申请的实施例提供的一种更新模型元件实例步骤的流程图。步骤S5分为以下分步骤:Please refer to FIG. 4 , which is a flowchart of steps for updating an instance of a model element provided by an embodiment of the present application. Step S5 is divided into the following sub-steps:

步骤S51:根据指定数据库中的原始元件实例的更新分类属性字段,获得更新分类属性声明集合。Step S51: Obtain the updated classification attribute declaration set according to the updated classification attribute field of the original component instance in the designated database.

可以理解的是,原始元件实例的更新包括增加原始元件实例的字段、修改字段名称或者删除某一字段或者去掉指定数据库中的某一分类,当指定数据库中的原始元件实例的分类属性字段发生更新时,对应更新分类属性声明集合中分类属性的索引、链表等以适应原始元件实例的分类属性字段的改变。It can be understood that the update of the original component instance includes adding a field of the original component instance, modifying the field name or deleting a certain field or removing a certain category in the specified database, when the category attribute field of the original component instance in the specified database is updated. , correspondingly update the index, linked list, etc. of the classification attribute in the classification attribute declaration set to adapt to the change of the classification attribute field of the original component instance.

步骤S52:基于更新分类属性声明集合对模型元件实例中的全局分类属性声明进行更新,获得更新分类属性声明。Step S52: Update the global classification attribute declaration in the model element instance based on the updated classification attribute declaration set to obtain the updated classification attribute declaration.

可以理解的是,指定数据库中原始元件实例的分类属性发生变化,更新分类属性声明集合中分类属性的索引、链表后,添加在模型元件实例中的属性实例对应的分类属性声明进行适应性更新后得到更新分类属性声明。It can be understood that when the classification attribute of the original component instance in the specified database changes, after updating the index and linked list of the classification attribute in the classification attribute declaration set, the classification attribute declaration corresponding to the attribute instance added in the model component instance is adaptively updated. Get the updated classification attribute declaration.

作为一种实施方式,当指定数据库中的原始元件实例的分类属性字段更新时,原始元件实例对应的分类schema中的分类属性对应进行更新得到更新分类schema,分类属性声明集合也对应完成分类属性更新,获得更新分类属性声明就需要基于更新分类schema,因此在这种实施方式中步骤S51可以省略,步骤S52中基于更新分类schema对模型元件实例中的全局分类属性声明进行更新,获得更新分类属性声明。As an embodiment, when the classification attribute field of the original component instance in the designated database is updated, the classification attribute in the classification schema corresponding to the original component instance is updated correspondingly to obtain the updated classification schema, and the classification attribute declaration set also completes the classification attribute update correspondingly , obtaining the updated classification attribute declaration needs to be based on the updated classification schema, so in this embodiment, step S51 can be omitted. In step S52, the global classification attribute declaration in the model element instance is updated based on the updated classification schema to obtain the updated classification attribute declaration .

步骤S53:基于分类属性字段以及更新分类属性声明生成更新属性实例。Step S53: Generate an updated attribute instance based on the classification attribute field and the updated classification attribute declaration.

可以理解的是,属性实例是基于分类属性字段以及所述全局分类属性声明生成的,当原始元件实例对应的全局分类属性声明更新时,以原始元件实例对应的全局分类属性声明以及分类属性字段为基础生成的属性实例相应进行更新得到更新属性实例。It can be understood that the attribute instance is generated based on the classification attribute field and the global classification attribute declaration. When the global classification attribute declaration corresponding to the original component instance is updated, the global classification attribute declaration and the classification attribute field corresponding to the original component instance are The attribute instance generated by the base is updated accordingly to obtain the updated attribute instance.

步骤S54:将原始元件实例中的属性实例替换为更新属性实例以更新模型元件实例。Step S54: Replace the attribute instance in the original element instance with the updated attribute instance to update the model element instance.

可以理解的是,属性实例添加在原始元件实例上生成模型元件实例,当属性实例更新为更新属性实例,模型元件实例对应发生更新得到更新模型元件实例。It can be understood that the attribute instance is added on the original element instance to generate a model element instance, and when the attribute instance is updated to an updated attribute instance, the model element instance is updated correspondingly to obtain an updated model element instance.

请参看图5,图5为本申请实施例提供的一种原始元件实例入库步骤的流程图。步骤S0包括以下分步骤:Please refer to FIG. 5 . FIG. 5 is a flowchart of a step of storing an instance of an original component according to an embodiment of the present application. Step S0 includes the following sub-steps:

步骤S01:建立原始元件实例。Step S01: Create an original component instance.

请参看图6,图6为本申请实施例提供的一种建立原始元件实例步骤的流程图。可选地,步骤S01分为以下分步骤:Please refer to FIG. 6. FIG. 6 is a flowchart of steps for creating an instance of an original element provided by an embodiment of the present application. Optionally, step S01 is divided into the following sub-steps:

步骤S011:定义原始元件基本信息,基本信息包括原始元件名称、原始元件描述、原始元件分类以及原始元件专业。Step S011 : define basic information of the original component, the basic information includes the name of the original component, the description of the original component, the classification of the original component, and the specialty of the original component.

可以理解的是,在指定数据库中的原始元件是根据用户提供的信息建立的,元件名称用于标识不同的元件实例,原始元件描述用于解释元件的作用和功能,原始元件分类用于对原始元件进行分类,原始元件专业例如在工程项目建模时暖通的排水数据等。It can be understood that the original components in the specified database are established based on the information provided by the user, the component name is used to identify different component instances, the original component description is used to explain the role and function of the component, and the original component classification is used to classify the original components. The components are classified, and the original components are specialized, such as the drainage data of HVAC when modeling the engineering project.

步骤S012:定义原始元件的模型信息,模型信息包括模型名称以及模型文件名。Step S012: Define model information of the original component, where the model information includes a model name and a model file name.

可以理解的是,在进行绘图设计的时候,模型信息包括3D模型文件名称、3D模型、2D模型文件名称、2D模型文件。It can be understood that, during the drawing design, the model information includes a 3D model file name, a 3D model, a 2D model file name, and a 2D model file.

步骤S013:定义原始元件字段,原始元件字段从原始元件的父级的分类属性字段继承得到。Step S013: Define an original element field, which is inherited from the classification attribute field of the parent of the original element.

可以理解的是,原始元件的字段从原始元件的父级的分类属性字段继承得到,原始元件的字段的默认值可以与原始元件的父级的分类属性字段不同。It can be understood that the field of the original element is inherited from the category attribute field of the parent of the original element, and the default value of the field of the original element may be different from the category attribute field of the parent of the original element.

请继续参看图5,步骤S02:基于分类将原始元件实例入库到指定数据库。Please continue to refer to FIG. 5, step S02: Inventory the original component instance into a designated database based on the classification.

可以理解的是,定义分类实际上是构建分类词典,基于分类词典将原始元件实例进行分类。其中,定义分类包括定义原始元件实例的分类声明以及基于原始元件的分类声明建立原始原件实例对应的分类属性字段。It can be understood that defining a classification is actually building a classification dictionary based on which the original component instances are classified. Wherein, defining the classification includes defining a classification declaration of the original component instance and establishing a classification attribute field corresponding to the original original instance based on the classification declaration of the original component.

请参看图7,图7为本申请实施例提供的一种基于分类将原始元件实例入库到指定数据库步骤的流程图。可选地,步骤S02分为以下分步骤:Please refer to FIG. 7. FIG. 7 is a flowchart of a step of storing an original component instance into a specified database based on classification according to an embodiment of the present application. Optionally, step S02 is divided into the following sub-steps:

步骤S021:定义分类基本信息,分类基本信息包括分类名称、分类描述以及分类父级名称。Step S021: Define basic classification information, where the basic classification information includes a classification name, a classification description, and a classification parent name.

步骤S022:定义分类继承字段,继承字段为分类父级的属性字段。Step S022: Define a classification inheritance field, and the inheritance field is an attribute field of the classification parent.

步骤S023:定义分类自有字段,分类自有字段为分类特有字段,分类自有字段不能与分类父级名称相同。Step S023 : define a category own field, the category own field is a category specific field, and the category own field cannot be the same as the category parent name.

步骤S024:基于分类将原始元件实例入库到指定数据库。Step S024: Inventory the original component instance into a designated database based on the classification.

可以理解的是,步骤S021、步骤S022、步骤S023、步骤S024实际是构建分类词典,分类词典是基于用户提供的信息建立的,定义分类基本信息,其中,分类基本信息包括分类名称、分类描述以及分类父级名称,定义分类的标识、功能以及继承关系。定义分类继承字段即定义分类的父级的属性字段。定义分类自有字段,分类自有字段为分类特有字段能够作为来自同一父级的不同分类的区别点,定义分类自有字段不能与父级字段重名。步骤S024中基于分类将原始元件实例存储到指定数据库中。It can be understood that step S021, step S022, step S023, and step S024 are actually constructing a classification dictionary. The classification dictionary is established based on the information provided by the user and defines the basic classification information, wherein the basic classification information includes the classification name, classification description and The name of the category parent, which defines the identification, function, and inheritance relationship of the category. Defining a category inheritance field defines the attribute field of the category's parent. Define the own field of the category, which is a category-specific field and can be used as the distinguishing point of different categories from the same parent. In step S024, the original component instance is stored in the designated database based on the classification.

请参看图8,图8为本申请实施例提供的一种建立模型属性的装置示意图。建立模型属性的装置60包括:Please refer to FIG. 8 , which is a schematic diagram of an apparatus for establishing model attributes provided by an embodiment of the present application. The means 60 for establishing model attributes includes:

获取模块601,用于从指定数据库中获取原始元件实例以及原始元件实例的分类属性字段。The obtaining module 601 is configured to obtain the original component instance and the classification attribute field of the original component instance from a specified database.

第一生成模块602,用于基于原始元件实例以及分类属性字段生成全局分类属性声明。The first generation module 602 is configured to generate a global classification attribute declaration based on the original component instance and the classification attribute field.

第二生成模块603,用于基于分类属性字段以及全局分类属性声明生成属性实例。The second generating module 603 is configured to generate an attribute instance based on the classification attribute field and the global classification attribute declaration.

添加模块604,用于将属性实例添加在原始元件实例以生成模型元件实例。An adding module 604 is used to add the attribute instance to the original element instance to generate the model element instance.

可选地,第二生成模块603具体用于:Optionally, the second generation module 603 is specifically used for:

基于指定空间参数设置原始元件实例的元件模型,基于分类属性字段以及全局分类属性声明生成属性实例,将属性实例挂载于元件模型。Set the component model of the original component instance based on the specified space parameters, generate the attribute instance based on the classification attribute field and the global classification attribute declaration, and mount the attribute instance on the component model.

可选地,第二生成模块603具体用于:Optionally, the second generation module 603 is specifically used for:

当分类属性声明集合中存在与原始元件实例对应的与全局分类属性声明不同分类属性声明时,将分类属性声明集合中与原始元件实例对应的分类属性声明替换为全局分类属性声明,分类属性声明集合包括所有模型元件实例的分类属性声明。When there is a classification attribute declaration corresponding to the original component instance in the classification attribute declaration set that is different from the global classification attribute declaration, replace the classification attribute declaration corresponding to the original component instance in the classification attribute declaration set with the global classification attribute declaration, and the classification attribute declaration set Includes class attribute declarations for all model element instances.

当分类属性声明集合中不存在与原始元件实例对应的分类属性声明时,在分类属性声明集合中添加全局分类属性声明。When the classification attribute declaration corresponding to the original component instance does not exist in the classification attribute declaration set, the global classification attribute declaration is added to the classification attribute declaration set.

可选地,建立模型属性的装置60还包括更新模块605,更新模块605具体用于:Optionally, the apparatus 60 for establishing model attributes further includes an update module 605, and the update module 605 is specifically used for:

根据指定数据库中的原始元件实例的更新分类属性字段,获得更新分类属性声明集合。Obtains a collection of updated classification attribute declarations based on the updated classification attribute field of the original component instance in the specified database.

基于更新分类属性声明集合对模型元件实例中的全局分类属性声明进行更新,获得更新分类属性声明。The global classification attribute declaration in the model element instance is updated based on the updated classification attribute declaration set to obtain the updated classification attribute declaration.

基于分类属性字段以及更新分类属性声明生成更新属性实例。Generates an update attribute instance based on the taxonomy attribute field and the update taxonomy attribute declaration.

将原始元件实例中的指定属性实例替换为更新属性实例以更新模型元件实例。Replaces the specified property instance in the original component instance with the updated property instance to update the model component instance.

可选地,建立模型属性的装置60还包括建立模块606,建立模块606用于:Optionally, the apparatus 60 for establishing model attributes further includes a establishing module 606, and the establishing module 606 is used for:

建立原始元件实例,基于分类将原始元件实例入库到指定数据库。Create the original component instance, and store the original component instance into the specified database based on the classification.

可选地,建立模块606具体用于:Optionally, the establishment module 606 is specifically used for:

定义原始元件基本信息,所述基本信息包括原始元件名称、原始元件描述、原始元件分类以及原始元件专业。Define the basic information of the original component, the basic information includes the original component name, the original component description, the original component classification, and the original component specialty.

定义原始元件的模型信息,模型信息包括模型名称以及模型文件名。Define the model information of the original component, the model information includes the model name and the model file name.

定义原始元件字段,原始元件字段从原始元件的父级的分类属性字段继承得到。Defines the original component field, which is inherited from the class attribute field of the parent of the original component.

可选地,建立模块606具体用于:Optionally, the establishment module 606 is specifically used for:

定义分类基本信息,分类基本信息包括分类名称、分类描述以及分类父级名称;Define basic classification information, including classification name, classification description, and classification parent name;

定义分类继承字段,继承字段为分类父级的属性字段;Define the classification inheritance field, the inheritance field is the attribute field of the classification parent;

定义分类自有字段,分类自有字段为分类特有字段,分类自有字段不能与分类父级名称相同。Defines a category's own field. The category's own field is a category-specific field, and the category's own field cannot be the same as the name of the category's parent.

基于分类将原始元件实例入库到指定数据库。Inventory the original component instance to the specified database based on the classification.

本实施例还提供了一种电子设备,所述电子设备包括存储器和处理器,所述存储器中存储有程序指令,所述处理器运行所述程序指令时,执行上述任意方法中的步骤。This embodiment also provides an electronic device, the electronic device includes a memory and a processor, the memory stores program instructions, and when the processor executes the program instructions, the processor executes the steps in any of the foregoing methods.

本实施例还提供了一种存储介质,所述存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器运行时,执行上述任意方法中的步骤。This embodiment also provides a storage medium, where computer program instructions are stored in the storage medium, and when the computer program instructions are executed by a processor, the steps in any of the foregoing methods are executed.

可选地,所述电子设备可以是个人电脑(personal computer,PC)、平板电脑、智能手机、个人数字助理(personal digital assistant,PDA)等电子设备。Optionally, the electronic device may be an electronic device such as a personal computer (personal computer, PC), a tablet computer, a smart phone, a personal digital assistant (personal digital assistant, PDA).

综上所述,本申请的实施例提供了一种建立模型属性的方法、装置、电子设备及存储介质,涉及建立模型技术领域,所述方法包括:从指定数据库中获取原始元件实例以及所述原始元件实例的分类属性字段;基于所述原始元件实例以及所述分类属性字段生成全局分类属性声明;基于所述分类属性字段以及所述全局分类属性声明生成属性实例;将所述属性实例添加在所述原始元件实例以生成模型元件实例。In summary, the embodiments of the present application provide a method, apparatus, electronic device, and storage medium for establishing model attributes, which relate to the technical field of model establishment. A classification attribute field of the original element instance; generating a global classification attribute declaration based on the original element instance and the classification attribute field; generating an attribute instance based on the classification attribute field and the global classification attribute declaration; adding the attribute instance in the The original component instance to generate the model component instance.

在上述实现过程中,当在所述指定数据库中所述原始元件的属性更新时,只需更新全局分类属性声明就能够完成与所述指定数据库中所述原始元件的属性更新相匹配的所述模型元件实例中的属性更新,能够提高所述模型元件实例中的属性更新的效率,避免了低效地人工删除重建模型或者一个个修改模型。In the above implementation process, when the attribute of the original element in the designated database is updated, only the global classification attribute declaration needs to be updated to complete the update of the attribute matching the attribute update of the original element in the designated database. The attribute update in the model element instance can improve the efficiency of the attribute update in the model element instance, and avoid inefficient manual deletion of reconstructed models or modification of models one by one.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的框图显示了根据本申请的多个实施例的设备的可能实现的体系架构、功能和操作。在这点上,框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图中的每个方框、以及框图的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed device may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, the block diagrams in the accompanying drawings show the architecture, functions and operations of possible implementations of the apparatus according to various embodiments of the present application. In this regard, each block in the block diagrams may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function(s) . It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams, and combinations in the block diagrams, can be implemented by special purpose hardware-based systems that perform the specified functions or actions, or by combinations of special purpose hardware and computer instructions.

另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。因此本实施例还提供了一种可读取存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器读取并运行时,执行区块数据存储方法中任一项所述方法中的步骤。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Therefore, this embodiment also provides a readable storage medium with computer program instructions stored in it, and when the computer program instructions are read and executed by a processor, execute any one of the block data storage methods in the method. A step of. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims (10)

1.一种建立模型属性的方法,其特征在于,所述方法包括:1. a method for establishing model attributes, characterized in that the method comprises: 从指定数据库中获取原始元件实例以及所述原始元件实例对应的分类属性字段;Obtain the original component instance and the classification attribute field corresponding to the original component instance from the specified database; 基于所述原始元件实例以及所述分类属性字段生成指定全局分类属性声明;generating a specified global classification attribute declaration based on the original component instance and the classification attribute field; 基于所述分类属性字段以及所述全局分类属性声明生成属性实例;generating an attribute instance based on the classification attribute field and the global classification attribute declaration; 将所述属性实例添加在所述原始元件实例以生成模型元件实例。The attribute instance is added to the original element instance to generate a model element instance. 2.根据权利要求1所述的方法,其特征在于,所述基于所述分类属性字段以及所述全局分类属性声明生成属性实例,包括:2. The method according to claim 1, wherein the generating an attribute instance based on the classification attribute field and the global classification attribute declaration comprises: 基于指定空间参数设置所述原始元件实例的元件模型;setting the component model of the original component instance based on the specified spatial parameters; 基于所述分类属性字段以及所述全局分类属性声明生成所述属性实例,将所述属性实例挂载于所述元件模型。The attribute instance is generated based on the classification attribute field and the global classification attribute declaration, and the attribute instance is mounted on the component model. 3.根据权利要求2所述的方法,其特征在于,在所述基于所述原始元件实例以及所述分类属性字段生成全局分类属性声明之后,所述方法还包括:3. The method according to claim 2, characterized in that, after the global classification attribute declaration is generated based on the original component instance and the classification attribute field, the method further comprises: 当设计文件的分类属性声明集合中存在与所述原始元件实例对应的与所述全局分类属性声明不同分类属性声明时,将所述分类属性声明集合中与所述原始元件实例对应的分类属性声明替换为所述全局分类属性声明,所述分类属性声明集合包括所有模型元件实例的分类属性声明;When there is a classification attribute declaration corresponding to the original component instance and different from the global classification attribute declaration in the classification attribute declaration set of the design file, declare the classification attribute corresponding to the original component instance in the classification attribute declaration set replaced by the global classification attribute declaration, the set of classification attribute declarations comprising the classification attribute declarations of all model element instances; 当所述分类属性声明集合中不存在与所述原始元件实例对应的分类属性声明时,在所述分类属性声明集合中添加所述全局分类属性声明。When the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, the global classification attribute declaration is added to the classification attribute declaration set. 4.根据权利要求3所述的方法,其特征在于,在所述将所述属性实例添加在所述原始元件实例以生成模型元件实例之后,所述方法还包括:4. The method according to claim 3, wherein after the adding the attribute instance to the original component instance to generate a model component instance, the method further comprises: 根据所述指定数据库中的所述原始元件实例的更新分类属性字段,获得更新分类属性声明集合;According to the updated classification attribute field of the original component instance in the specified database, obtain the updated classification attribute declaration set; 基于所述更新分类属性声明集合对所述模型元件实例中的所述全局分类属性声明进行更新,获得更新分类属性声明;updating the global classification attribute declaration in the model element instance based on the updated classification attribute declaration set to obtain an updated classification attribute declaration; 基于所述分类属性字段以及所述更新分类属性声明生成更新属性实例;generating an update attribute instance based on the classification attribute field and the update classification attribute declaration; 将所述原始元件实例中的指定属性实例替换为所述更新属性实例以更新所述模型元件实例。The model element instance is updated by replacing the specified attribute instance in the original element instance with the updated attribute instance. 5.根据权利要求1所述的方法,其特征在于,在所述从指定数据库中获取原始元件实例以及所述原始元件实例的分类属性字段之前,所述方法包括:5. The method according to claim 1, characterized in that, before acquiring the original component instance and the classification attribute field of the original component instance from a specified database, the method comprises: 建立原始元件实例;Create an instance of the original component; 基于分类将所述原始元件实例入库到指定数据库。The original component instances are inventoried into a designated database based on the classification. 6.根据权利要求5所述的方法,其特征在于,所述建立原始元件实例包括:6. The method of claim 5, wherein the creating an instance of an original element comprises: 定义原始元件基本信息,所述基本信息包括原始元件名称、原始元件描述、原始元件分类以及原始元件专业;Define the basic information of the original component, the basic information includes the name of the original component, the description of the original component, the classification of the original component, and the specialty of the original component; 定义原始元件的模型信息,所述模型信息包括模型名称以及模型文件名;Define the model information of the original element, the model information includes the model name and the model file name; 定义原始元件字段,所述原始元件字段从原始元件的父级的分类属性字段继承得到。A primitive element field is defined that is inherited from the class attribute field of the primitive element's parent. 7.根据权利要求5所述的方法,其特征在于,所述基于分类将所述原始元件实例入库到指定数据库,包括:7. The method according to claim 5, wherein the storing the original component instance into a specified database based on the classification comprises: 定义分类基本信息,所述分类基本信息包括分类名称、分类描述以及分类父级名称;Define basic classification information, where the basic classification information includes classification name, classification description, and classification parent name; 定义分类继承字段,所述继承字段为分类父级的属性字段;Define a classification inheritance field, the inheritance field is an attribute field of the classification parent; 定义分类自有字段,所述分类自有字段为分类特有字段,所述分类自有字段不能与所述分类父级名称相同;Define a category own field, the category own field is a category-specific field, and the category own field cannot be the same as the category parent name; 基于所述分类将所述原始元件实例入库到指定数据库。The original component instances are inventoried into a designated database based on the classification. 8.一种建立模型属性的装置,其特征在于,所述装置包括:8. A device for establishing model attributes, wherein the device comprises: 获取模块,用于从指定数据库中获取原始元件实例以及所述原始元件实例的分类属性字段;an obtaining module, used to obtain the original component instance and the classification attribute field of the original component instance from the specified database; 第一生成模块,用于基于所述原始元件实例以及所述分类属性字段生成全局分类属性声明;a first generation module, configured to generate a global classification attribute declaration based on the original component instance and the classification attribute field; 第二生成模块,用于基于所述分类属性字段以及所述全局分类属性声明生成属性实例;a second generation module, configured to generate an attribute instance based on the classification attribute field and the global classification attribute declaration; 添加模块,用于将所述属性实例添加在所述原始元件实例以生成模型元件实例。An add module is used to add the attribute instance to the original element instance to generate a model element instance. 9.一种电子设备,其特征在于,所述电子设备包括存储器和处理器,所述存储器中存储有程序指令,所述处理器运行所述程序指令时,执行权利要求1-7中任一项所述方法中的步骤。9. An electronic device, characterized in that the electronic device comprises a memory and a processor, wherein program instructions are stored in the memory, and when the processor executes the program instructions, executes any one of claims 1-7 Steps in the method described in item. 10.一种存储介质,其特征在于,所述存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器运行时,执行权利要求1-7中任一项所述方法中的步骤。10. A storage medium, wherein the storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps in the method according to any one of claims 1-7 are executed .
CN202010937825.1A 2020-09-08 2020-09-08 Method and device for establishing model attribute, electronic equipment and storage medium Pending CN112052244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010937825.1A CN112052244A (en) 2020-09-08 2020-09-08 Method and device for establishing model attribute, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010937825.1A CN112052244A (en) 2020-09-08 2020-09-08 Method and device for establishing model attribute, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112052244A true CN112052244A (en) 2020-12-08

Family

ID=73610978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010937825.1A Pending CN112052244A (en) 2020-09-08 2020-09-08 Method and device for establishing model attribute, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112052244A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113742815A (en) * 2021-08-02 2021-12-03 上海建工四建集团有限公司 IFC submodel fusion method

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060161556A1 (en) * 2005-01-14 2006-07-20 International Business Machines Corporation Abstract record timeline rendering/display
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
US20090119277A1 (en) * 2007-11-07 2009-05-07 Richard Dean Dettinger Differentiation of field attributes as value constraining versus record set constraining
CN104794572A (en) * 2015-04-20 2015-07-22 罗志华 Building design data information and experience sharing platform
CN108829746A (en) * 2018-05-24 2018-11-16 青岛海信网络科技股份有限公司 A kind of master data management system and device of database based on memory
CN109918832A (en) * 2019-03-21 2019-06-21 中铁四局集团有限公司 Modeling method and device for expressway tunnel project
CN111026777A (en) * 2019-12-13 2020-04-17 中国南方电网有限责任公司 Entity class code generation method and device, computer equipment and storage medium
CN111061817A (en) * 2019-12-16 2020-04-24 华云数据有限公司 Adaptive service construction system, method and computer readable medium
CN111125731A (en) * 2019-12-11 2020-05-08 支付宝(杭州)信息技术有限公司 A business processing method, device and device based on verifiable statement
CN111291441A (en) * 2020-02-18 2020-06-16 浙江源创建筑智能科技有限公司 Intelligent building integration method and system based on object modeling drive

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060161556A1 (en) * 2005-01-14 2006-07-20 International Business Machines Corporation Abstract record timeline rendering/display
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
US20090119277A1 (en) * 2007-11-07 2009-05-07 Richard Dean Dettinger Differentiation of field attributes as value constraining versus record set constraining
CN104794572A (en) * 2015-04-20 2015-07-22 罗志华 Building design data information and experience sharing platform
CN108829746A (en) * 2018-05-24 2018-11-16 青岛海信网络科技股份有限公司 A kind of master data management system and device of database based on memory
CN109918832A (en) * 2019-03-21 2019-06-21 中铁四局集团有限公司 Modeling method and device for expressway tunnel project
CN111125731A (en) * 2019-12-11 2020-05-08 支付宝(杭州)信息技术有限公司 A business processing method, device and device based on verifiable statement
CN111026777A (en) * 2019-12-13 2020-04-17 中国南方电网有限责任公司 Entity class code generation method and device, computer equipment and storage medium
CN111061817A (en) * 2019-12-16 2020-04-24 华云数据有限公司 Adaptive service construction system, method and computer readable medium
CN111291441A (en) * 2020-02-18 2020-06-16 浙江源创建筑智能科技有限公司 Intelligent building integration method and system based on object modeling drive

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113742815A (en) * 2021-08-02 2021-12-03 上海建工四建集团有限公司 IFC submodel fusion method
CN113742815B (en) * 2021-08-02 2024-06-04 上海建工四建集团有限公司 IFC submodel fusion method

Similar Documents

Publication Publication Date Title
US11797558B2 (en) Generating data transformation workflows
CN111213137B (en) Alignment of source infrastructure data with BIS concept patterns
KR102782536B1 (en) Automatic layout of visualizations based on graph data
US11144516B2 (en) Reversible data transforms
US20130144893A1 (en) Systems and Methods for Extraction of Concepts for Reuse-based Schema Matching
US10540628B2 (en) Hierarchical business rule model
CN104685467A (en) Graphically representing programming attributes
KR20130130706A (en) Managing data set objects in a dataflow graph that represents a computer program
CN113420532B (en) A page file conversion method, device, electronic device and storage medium
US11106743B2 (en) Binding traits to case nodes
CN108363684A (en) List creation method, device and server
CN114138719A (en) Method, system, equipment and storage medium for managing platform data set
CN113392068A (en) Data processing method, device and system
JP2010515998A (en) Modeling classification objects
CN107273425B (en) ORM framework-based database development method and device
CN112052244A (en) Method and device for establishing model attribute, electronic equipment and storage medium
Parmar et al. MongoDB as an efficient graph database: An application of document oriented NOSQL database
CN115437703A (en) Business process arranging method, device, equipment and storage medium
CN114138716A (en) Method, device, electronic device and storage medium for storing objects
CN102289448A (en) Accessing entities of data access layer
CN112597100B (en) A file management method and device based on object proxy tag
Vágner Store and visualize EER in neo4j
CN115576923A (en) SQL and document conversion method, system, electronic device and storage medium
CN115437704A (en) Business process orchestration method, device, device and storage medium
CN107463625B (en) Data structure establishing method, system and device based on meta-model and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: No. 928, yuhangtang Road, Xihu District, Hangzhou City, Zhejiang Province 310031

Applicant after: Zhejiang shuzhijiaoyuan Technology Co.,Ltd.

Address before: No. 928, yuhangtang Road, Xihu District, Hangzhou City, Zhejiang Province 310031

Applicant before: ZHEJIANG PROVINCIAL INSTITUTE OF COMMUNICATIONS PLANNING DESIGN & RESEARCH Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201208