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
classification
instance
attribute
classification attribute
model
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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

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 and device for establishing model attribute, electronic equipment and storage medium
Technical Field
The present application relates to the field of data modeling technologies, and in particular, to a method and an apparatus for establishing model attributes, an electronic device, and a storage medium.
Background
With the development of the times, a great amount of engineering project construction is carried out every day around the world, and with the development of the times, model data is integrated into a necessary development trend in the same project by design, purchase, prefabrication processing, construction and operation and maintenance, for example, three-dimensional Modeling, data processing, data transmission and the like are carried out on various engineering projects by using a three-dimensional Building Information Modeling (BIM) technology. At present, the model attributes are manually created and managed manually by people during model building. For example, attaching attributes to the BIM model as a carrier for category, attribute data records requires manual attachment of attribute data by an engineer. If the model attribute field changes, either the overlay attributes are manually re-modified one by one or the model reconstruction is deleted, so the model update data is inefficient.
Disclosure of Invention
Embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for establishing a model attribute, so as to solve a problem of low efficiency of updating data of a model in a current method.
An embodiment of the present application provides a method for establishing a model attribute, the method including:
acquiring an original element instance and a classification attribute field of the original element instance from a specified database;
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 to the original element instance to generate a model element instance.
In the implementation process, when the classification attribute of the original element in the specified database is updated, only the global classification attribute statement needs to be updated, so that the attribute updating in the model element instance matched with the classification attribute updating of the original element in the specified database can be completed, the efficiency of updating the classification attribute in the model element instance can be improved, and the inefficient manual deletion of a reconstructed model or the individual modification of models is avoided.
Optionally, the generating an attribute instance based on the classification attribute field and the global classification attribute declaration includes:
setting an element model of the original element instance based on specified spatial parameters;
and generating the attribute instance based on the classification attribute field and the global classification attribute declaration, and mounting the attribute instance on the element model.
In the implementation process, because the attribute instance is hung in the element model, and the attribute instance includes the global classification attribute statement, when the global classification attribute statement is changed, the attribute of the element instance in the element model can be updated, so that the efficiency of updating the attribute of the element instance in the element model is improved.
Optionally, after generating a global classification attribute declaration based on the original element instance and the classification attribute field, the method further includes:
when a classification attribute declaration different from the global classification attribute declaration corresponding to the original element instance exists in a classification attribute declaration set, replacing the classification attribute declaration corresponding to the original element instance in the classification attribute declaration set with the global classification attribute declaration, wherein the classification attribute declaration set comprises classification attribute declarations of all model element instances;
and when the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, adding the global classification attribute declaration in the classification attribute declaration set.
In the implementation process, the global database set is added or replaced by comparing different classification attribute declarations corresponding to the original element instances with the classification attribute declaration set so as to complete the updating of the global database set.
Optionally, after the adding the property instance to the original element instance to generate a model element instance, the method further comprises:
obtaining an updated classification attribute declaration set according to the updated classification attribute field of the original element instance in the specified database;
updating the global classification attribute statement in the model element instance based on the updated classification attribute statement set to obtain an updated classification attribute statement;
generating an update attribute instance based on the classification attribute field and the update classification attribute declaration;
replacing the specified property instance in the original element instance with the updated property instance to update the model element instance.
In the implementation process, the updating of the classification attribute matched with the original element instance in the specified database is completed through the updating of the classification attribute declaration set, the updating of the model element instance is carried out based on the updating of the classification attribute declaration set, the model element instance does not need to be changed item by item to adapt to the updating of the original element instance in the specified database, and the updating efficiency of the model element instance can be improved.
Optionally, before the obtaining of the original component instance and the classification attribute field of the original component instance from the specified database, the method includes:
establishing an original element example;
and warehousing the original element examples to a specified database based on the classification.
In the implementation process, the element instance is established in the specified database, so that the original element instance is conveniently obtained in the specified database, and the global classification attribute declaration is mounted based on the original element instance, so that the attribute in the model element instance is updated by using the global classification attribute declaration.
Optionally, the creating an original element instance includes:
defining original element basic information, wherein the basic information comprises an original element name, an original element description, an original element classification and an original element specialty;
defining model information of an original element, wherein the model information comprises a model name and a model file name;
defining an original element field inherited from a classification attribute field of a parent of the original element.
In the implementation process, the original element instance is established, so that the user information can be summarized and summarized, and the model establishment can be performed based on the original element instance.
Optionally, the binning the raw component instances into a specified database based on classification includes:
defining basic information of classification, wherein the basic information of classification comprises a classification name, a classification description and a classification parent-level name;
defining a classification inheritance field, wherein the inheritance field is an attribute field of a classification parent level;
defining a classification owned field, wherein the classification owned field is a classification specific field, and the classification owned field cannot be the same as the classification parent name;
binning the raw component instances into a specified database based on the classification.
In the implementation process, the definition classification can store the original element instances in the designated database in a classified manner, and is convenient for generating the attribute instances based on the classification attribute fields and the global classification attribute declarations, so that the purpose of updating the classification attributes in the model element instances by updating the global classification attribute declarations can be achieved, and the efficiency of updating the classification attributes in the model element instances can be improved.
An embodiment of the present application provides an apparatus for establishing model attributes, the apparatus including:
the system comprises an acquisition module, a classification module and a classification module, wherein the acquisition module is used for acquiring an original element instance and a classification attribute field of the original element instance from a specified database;
a first generation module for generating a global classification attribute declaration based on the original element instance and the classification attribute field;
a second generation module for generating an attribute instance based on the classification attribute field and the global classification attribute declaration;
an adding module for adding the attribute instance to the original element instance to generate a model element instance.
In the implementation process, when the classification attribute of the original element in the specified database is updated, the attribute updating in the model element instance matched with the classification attribute updating of the original element in the specified database can be completed only by updating the global classification attribute statement, so that the efficiency of updating the classification attribute in the model element instance can be improved, and the inefficient manual deletion of a reconstructed model or the inefficient manual modification of models one by one is avoided.
Optionally, the second generating module is specifically configured to:
setting an element model of the original element instance based on specified spatial parameters;
and generating the attribute instance based on the classification attribute field and the global classification attribute declaration, and mounting the attribute instance on the element model.
In the implementation process, because the attribute instance is hung in the element model, and the attribute instance includes the global classification attribute statement, when the global classification attribute statement is changed, the attribute of the element instance in the element model can be updated, so that the efficiency of updating the attribute of the element instance in the element model is improved.
Optionally, the apparatus for establishing model attributes further includes an update module, where the update module is specifically configured to:
when a classification attribute declaration different from the global classification attribute declaration corresponding to the original element instance exists in a classification attribute declaration set, replacing the classification attribute declaration corresponding to the original element instance in the classification attribute declaration set with the global classification attribute declaration, wherein the classification attribute declaration set comprises classification attribute declarations of all model element instances;
and when the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, adding the global classification attribute declaration in the classification attribute declaration set.
In the implementation process, the global database set is added or replaced by comparing different classification attribute declarations corresponding to the original element instances with the classification attribute declaration set, so as to complete the updating of the global database set.
Optionally, the apparatus for establishing model attributes further includes an update module, specifically configured to:
obtaining an updated classification attribute declaration set according to the updated classification attribute field of the original element instance in the specified database;
updating the global classification attribute statement in the model element instance based on the updated classification attribute statement set to obtain an updated classification attribute statement;
generating an update attribute instance based on the classification attribute field and the update classification attribute declaration;
replacing the specified property instance in the original element instance with the updated property instance to update the model element instance.
In the implementation process, the updating of the classification attribute matched with the original element instance in the specified database is completed through the updating of the classification attribute declaration set, the updating of the model element instance is carried out based on the updating of the classification attribute declaration set, the model element instance does not need to be changed item by item to adapt to the updating of the original element instance in the specified database, and the updating efficiency of the model element instance can be improved.
Optionally, the apparatus for building model attributes further includes a building module, where the building module is configured to:
establishing an element instance; binning the component instances into a specified database based on the classification.
In the implementation process, the element instance is established in the specified database, so that the original element instance is conveniently obtained in the specified database, and the global classification attribute declaration is mounted based on the original element instance, so that the attribute in the model element instance is updated by using the global classification attribute declaration.
Optionally, the establishing module is specifically configured to:
defining original element basic information, wherein the basic information comprises an original element name, an original element description, an original element classification and an original element specialty;
defining model information of an original element, wherein the model information comprises a model name and a model file name;
defining an original element field inherited from a classification attribute field of a parent of the original element.
In the implementation process, the original element instance is established, so that the user information can be summarized and summarized, and the model establishment can be performed based on the original element instance.
Optionally, the establishing module is specifically configured to:
defining basic information of classification, wherein the basic information of classification comprises a classification name, a classification description and a classification parent-level name;
defining a classification inheritance field, wherein the inheritance field is an attribute field of a classification parent level;
defining a classification owned field, wherein the classification owned field is a classification specific field, and the classification owned field cannot be the same as the classification parent name;
binning the raw component instances into a specified database based on the classification.
In the implementation process, the definition classification can store the original element instances in the designated database in a classified manner, and is convenient for generating the attribute instances based on the classification attribute fields and the global classification attribute declarations, so that the purpose of updating the classification attributes in the model element instances by updating the global classification attribute declarations can be achieved, and the efficiency of updating the classification attributes in the model element instances can be improved.
The present embodiment also provides a storage medium having stored therein computer program instructions, which when executed by a processor, perform the steps of any of the above methods.
The present embodiment also provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores program instructions, and the processor executes the program instructions to perform the steps of any of the above methods.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Fig. 1 is a flowchart of a method for establishing a model attribute according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a step of generating an attribute instance according to an embodiment of the present application.
Fig. 3 is a flowchart of a step of updating a global classification attribute declaration provided by an embodiment of the present application.
FIG. 4 is a flowchart of example steps for updating model elements, provided in an embodiment of the present application.
Fig. 5 is a flowchart of a step of binning an original component instance according to an embodiment of the present disclosure.
Fig. 6 is a flowchart of a step of creating an original component instance according to an embodiment of the present application.
Fig. 7 is a flowchart of a step of binning original component instances into a specified database based on classification according to an embodiment of the present application.
Fig. 8 is a schematic diagram of an apparatus for establishing a model attribute according to an embodiment of the present disclosure.
Legend: 60-means for establishing model attributes; 601-an obtaining module; 602-a first generation module; 603-a second generation module; 604-add module; 605-an update module; 606-building module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
In the description of the present application, it is noted that the terms "first", "second", and the like are used merely for distinguishing between descriptions and are not intended to indicate or imply relative importance.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the 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.
An embodiment of the present application provides a method for establishing a model attribute, please refer to fig. 1, where fig. 1 is a flowchart of the method for establishing a model attribute provided in the embodiment of the present application, and the method includes the following steps:
step S1: and acquiring the original element instance and the classification attribute field corresponding to the original element instance from the specified database.
It will be appreciated that the designated database is the database that stores the original component instances in which the original component instance classifications are stored. The original component instance is a reusable component stored in a database and the category attribute field is used to identify the category. For example, the classification attribute field for identifying a classification includes a classification name, a classification description, a classification parent name, and the like. For example, the auto cad drawing is used for drawing, the component instance is various original component instances including an original component instance such as a rectangular component instance in the component database, and the classification name, the classification description and the classification parent name of the rectangular component instance are all classification attribute fields of the rectangular component instance. In the design file created by opening in the design platform software (such as MicroStation), each component dragged into the design file is an original element instance.
Step S2: a global classification attribute declaration is generated based on the original element instance and the classification attribute fields.
It will be appreciated that the global classification attribute declares relevant information for establishing classification attributes of the original component instance, such as an index of the classification attribute field of the original component instance, i.e., a spatial relationship that records the classification attribute field of the original component instance, the classification attribute field storing the original component instance, and the spatial relationship of the original component instance.
As an embodiment, the global classification attribute declaration may be a classification schema, which may be understood as a table, an index, a view, a stored procedure, or the like, and the classification schema is a collection of tables, indexes, views, and stored procedures related to classification. Each original component instance can create a classification schema, and the classification schemas corresponding to all the original component instances form a set, namely a classification schema set, namely a classification attribute declaration set.
Step S3: an attribute instance is generated based on the classification attribute field and the global classification attribute declaration.
Referring to fig. 2, fig. 2 is a flowchart of an attribute example generation step provided by an embodiment of the present application. Optionally, step S3 includes the following substeps:
step S31: the component model of the original component instance is set based on the specified spatial parameters.
In the design platform software (such as MicroStation software), the component model is placed at a specified position or in a specified direction (rotation angle) in a design file created by a developer, so that the development and design of the model are facilitated.
Step S32: and generating an attribute instance based on the classification attribute field and the global classification attribute declaration, and loading the attribute instance to the element model.
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 classified instance of the original element instance. The global classification attribute declaration may be a classification schema, and when a collection of a table, an index, a view, and a storage procedure of a classification in the classification schema is changed, an attribute instance of an original component instance corresponding to the classification schema is changed, so that a classification attribute field corresponding to the original component instance is changed correspondingly. The classification schema can be regarded as a global variable of an original component example, a table, an index and the like of classification attributes in the classification schema change, and the classification attributes in the component model change correspondingly, so that the classification attributes in the component model can be prevented from being changed one by one, and the efficiency of changing the classification attributes of the component model can be improved.
In the conventional method, when a developer adjusts the classification attribute of a component model created in the design platform software, the classification attribute of another component model needs to be manually modified based on the adjusted classification attribute. Optionally, the present embodiment can implement the update of the same classification attribute on the global all-element model based on the update of the global classification attribute declaration and the set of classification attribute declarations.
Referring to fig. 3, fig. 3 is a flowchart of a step of updating a global classification attribute declaration according to 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:
step S61: and when the classification attribute declaration set has a classification attribute declaration which is different from the global classification attribute declaration and corresponds to the original element instance, replacing the classification attribute declaration which corresponds to the original element instance in the classification attribute declaration set with the global classification attribute declaration, wherein the classification attribute declaration set comprises the classification attribute declarations of all the model element instances.
It can be understood that the classification attribute declaration set is a classification attribute declaration existing in the component model, the classification attribute declaration set includes different classification attribute declarations, when a classification attribute declaration corresponding to the original component instance and different classification attribute declarations corresponding to the global classification attribute declaration exist in the classification attribute declaration set, the classification attribute declaration corresponding to the original component instance is changed, so that the classification attribute declaration corresponding to the original component instance in the classification attribute declaration set needs to be replaced by the global classification attribute declaration, and the global classification attribute declaration is a classification attribute declaration corresponding to the original component instance at present.
Step S62: and when the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, adding a global classification attribute declaration in the classification attribute declaration set.
It can be appreciated that when a classification attribute declaration corresponding to the original element instance does not exist in the set of classification attribute declarations, the classification attribute declaration corresponding to the original element instance is added in the set of classification attribute declarations as a global classification attribute declaration to update the set of classification attribute declarations.
Continuing with fig. 1, step S4: the property instance is added to the original element instance to generate a model element instance.
Referring to fig. 4, fig. 4 is a flowchart illustrating exemplary steps for updating model elements according to an embodiment of the present application. Step S5 is divided into the following substeps:
step S51: an updated set of classification attribute declarations is obtained based on the updated classification attribute field of the original element instance in the specified database.
It is to be understood that the updating of the original component instance includes adding a field of the original component instance, modifying a field name or deleting a field or removing a class in the specified database, and when the class attribute field of the original component instance in the specified database is updated, the index, linked list, etc. of the class attribute in the class attribute declaration set is correspondingly updated to adapt to the change of the class attribute field of the original component instance.
Step S52: and updating the global classification attribute statement in the model element instance based on the updated classification attribute statement set to obtain an updated classification attribute statement.
It can be understood that the classification attribute of the original element instance in the designated database changes, the index and the linked list of the classification attribute in the classification attribute declaration set are updated, and the classification attribute declaration corresponding to the attribute instance in the model element instance is added for adaptive updating to obtain the updated classification attribute declaration.
As an implementation manner, 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 an updated classification schema, the classification attribute declaration set also completes the update of the classification attribute correspondingly, and the obtaining of the updated classification attribute declaration needs to be based on the updated classification schema, so that step S51 may be omitted in this implementation manner, and step S52 updates the global classification attribute declaration in the model component instance based on the updated classification schema to obtain the updated classification attribute declaration.
Step S53: an update attribute instance is generated based on the classification attribute field and the update 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, and when the global classification attribute declaration corresponding to the original component instance is updated, the attribute instance generated based on the global classification attribute declaration corresponding to the original component instance and the classification attribute field is correspondingly updated to obtain an updated attribute instance.
Step S54: and replacing 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 addition generates a model element instance on the original 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.
Referring to fig. 5, fig. 5 is a flowchart illustrating a step of warehousing original device instances according to an embodiment of the present application. Step S0 includes the following substeps:
step S01: an original element instance is created.
Referring to fig. 6, fig. 6 is a flowchart of a step of creating an original component instance according to an embodiment of the present application. Optionally, step S01 is divided into the following substeps:
step S011: defining original element basic information, wherein the basic information comprises original element names, original element descriptions, original element classifications and original element specialties.
It will be appreciated that the raw elements in the specified database are built from information provided by the user, the element names are used to identify different instances of the elements, the raw element descriptions are used to explain the role and function of the elements, the raw element classifications are used to classify the raw elements, the raw element specializes such as warm-up drainage data when modeling the engineering project, etc.
Step S012: and defining model information of the original element, wherein the model information comprises a model name and a model file name.
It is understood that, when the drawing design is performed, the model information includes a 3D model file name, a 3D model, a 2D model file name, and a 2D model file.
Step S013: an original element field is defined, which is inherited from the classification property field of the parent of the original element.
It will be appreciated that the fields of the original element are inherited from the classification property field of the parent of the original element, and the default values for the fields of the original element may be different from the classification property field of the parent of the original element.
Continuing with fig. 5, step S02: the raw component instances are binned into a designated database based on the classification.
It will be appreciated that defining a classification is actually building a classification dictionary based on which the original component instances are classified. Defining the classification comprises defining a classification statement of the original element instance and establishing a classification attribute field corresponding to the original element instance based on the classification statement of the original element.
Referring to fig. 7, fig. 7 is a flowchart illustrating a step of binning original component instances into a specified database based on classification according to an embodiment of the present application. Optionally, step S02 is divided into the following substeps:
step S021: defining basic information of classification, wherein the basic information of classification comprises a classification name, a classification description and a classification parent-level name.
Step S022: defining a classification inheritance field, wherein the inheritance field is an attribute field of a classification parent level.
Step S023: and defining a classified self-contained field, wherein the classified self-contained field is a classified specific field, and the classified self-contained field cannot be the same as the classified parent-level name.
Step S024: the raw component instances are binned into a designated database based on the classification.
It is understood that step S021, step S022, step S023 and step S024 are actually building a classification dictionary, which is built based on information provided by the user and defines basic classification information, wherein the basic classification information includes a classification name, a classification description and a classification parent name, and defines identification, functions and inheritance relationships of the classification. The define class inherit field is the attribute field that defines the parent of the class. The self-contained field of the defined classification can be used as a distinguishing point of different classifications from the same parent level, and the self-contained field of the defined classification cannot be renamed with the field of the parent level. The raw component instances are stored in a specified database based on the classification in step S024.
Referring to fig. 8, fig. 8 is a schematic diagram of an apparatus for establishing model attributes according to an embodiment of the present disclosure. The means 60 for establishing model attributes comprises:
the obtaining module 601 is configured to obtain the original component instance and the classification attribute field of the original component instance from the specified database.
A first generating module 602, configured to generate a global classification property declaration based on the original component instance and the classification property field.
A second generating module 603, configured to generate an attribute instance based on the classification attribute field and the global classification attribute declaration.
An adding module 604 for adding the property instance to the original element instance to generate a model element instance.
Optionally, the second generating module 603 is specifically configured to:
setting an element model of an original element instance based on specified spatial parameters, generating an attribute instance based on a classification attribute field and a global classification attribute declaration, and loading the attribute instance on the element model.
Optionally, the second generating module 603 is specifically configured to:
and when the classification attribute declaration set has a classification attribute declaration which is different from the global classification attribute declaration and corresponds to the original element instance, replacing the classification attribute declaration which corresponds to the original element instance in the classification attribute declaration set with the global classification attribute declaration, wherein the classification attribute declaration set comprises the classification attribute declarations of all the model element instances.
And when the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, adding a global classification attribute declaration in the classification attribute declaration set.
Optionally, the apparatus 60 for building model attributes further includes an updating module 605, where the updating module 605 is specifically configured to:
an updated set of classification attribute declarations is obtained based on the updated classification attribute field of the original element instance in the specified database.
And updating the global classification attribute statement in the model element instance based on the updated classification attribute statement set to obtain an updated classification attribute statement.
An update attribute instance is generated based on the classification attribute field and the update classification attribute declaration.
The specified property instance in the original element instance is replaced with an updated property instance to update the model element instance.
Optionally, the apparatus 60 for building model attributes further includes a building module 606, and the building module 606 is configured to:
and establishing original component examples, and warehousing the original component examples to a specified database based on classification.
Optionally, the establishing module 606 is specifically configured to:
defining original element basic information, wherein the basic information comprises original element names, original element descriptions, original element classifications and original element specialties.
And defining model information of the original element, wherein the model information comprises a model name and a model file name.
An original element field is defined, which is inherited from the classification property field of the parent of the original element.
Optionally, the establishing module 606 is specifically configured to:
defining basic information of classification, wherein the basic information of classification comprises a classification name, a classification description and a classification parent-level name;
defining a classification inheritance field, wherein the inheritance field is an attribute field of a classification parent level;
and defining a classified self-contained field, wherein the classified self-contained field is a classified specific field, and the classified self-contained field cannot be the same as the classified parent-level name.
The raw component instances are binned into a designated database based on the classification.
The present embodiment also provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores program instructions, and the processor executes the program instructions to perform the steps of any of the above methods.
The present embodiment also provides a storage medium having stored therein computer program instructions, which when executed by a processor, perform the steps of any of the above methods.
Alternatively, the electronic device may be a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), or other electronic devices.
To sum up, the embodiment of the present application provides a method, an apparatus, an electronic device and a storage medium for establishing a model attribute, and relates to the technical field of model establishment, wherein the method comprises: acquiring an original element instance and a classification attribute field of the original element instance from a specified database; 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 to the original element instance to generate a model element instance.
In the implementation process, when the attribute of the original element in the specified database is updated, the attribute updating in the model element instance matched with the attribute updating of the original element in the specified database can be completed only by updating the global classification attribute statement, so that the efficiency of attribute updating in the model element instance can be improved, and the inefficient manual deletion of a reconstructed model or the inefficient individual modification of models is avoided.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices 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 comprises 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 shown 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 will also be noted that each block of the block diagrams, and combinations of blocks in the block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Therefore, the present embodiment further provides a readable storage medium, in which computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the computer program instructions perform the steps of any of the block data storage methods. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of building model attributes, the method comprising:
acquiring an original element instance and a classification attribute field corresponding to the original element instance from a specified database;
generating a specified 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 to the original element instance to generate a model element instance.
2. The method of claim 1, wherein generating an attribute instance based on the classification attribute field and the global classification attribute declaration comprises:
setting an element model of the original element instance based on specified spatial parameters;
and generating the attribute instance based on the classification attribute field and the global classification attribute declaration, and mounting the attribute instance on the element model.
3. The method of claim 2, wherein after the generating a global classification attribute declaration based on the original element instance and the classification attribute field, the method further comprises:
when a classification attribute declaration set of the design file has a classification attribute declaration different from the global classification attribute declaration corresponding to the original element instance, replacing the classification attribute declaration corresponding to the original element instance in the classification attribute declaration set with the global classification attribute declaration, wherein the classification attribute declaration set comprises classification attribute declarations of all model element instances;
and when the classification attribute declaration corresponding to the original element instance does not exist in the classification attribute declaration set, adding the global classification attribute declaration in the classification attribute declaration set.
4. The method of claim 3, wherein after said adding said property instance to said original element instance to generate a model element instance, said method further comprises:
obtaining an updated classification attribute declaration set according to the updated classification attribute field of the original element instance in the specified database;
updating the global classification attribute statement in the model element instance based on the updated classification attribute statement set to obtain an updated classification attribute statement;
generating an update attribute instance based on the classification attribute field and the update classification attribute declaration;
replacing the specified property instance in the original element instance with the updated property instance to update the model element instance.
5. The method of claim 1, wherein prior to said retrieving from a specified database an original component instance and a classification attribute field of the original component instance, the method comprises:
establishing an original element example;
and warehousing the original element examples to a specified database based on the classification.
6. The method of claim 5, wherein the creating the primitive element instance comprises:
defining original element basic information, wherein the basic information comprises an original element name, an original element description, an original element classification and an original element specialty;
defining model information of an original element, wherein the model information comprises a model name and a model file name;
defining an original element field inherited from a classification attribute field of a parent of the original element.
7. The method of claim 5, wherein the binning the raw component instances into a specified database based on classification comprises:
defining basic information of classification, wherein the basic information of classification comprises a classification name, a classification description and a classification parent-level name;
defining a classification inheritance field, wherein the inheritance field is an attribute field of a classification parent level;
defining a classification owned field, wherein the classification owned field is a classification specific field, and the classification owned field cannot be the same as the classification parent name;
binning the raw component instances into a specified database based on the classification.
8. An apparatus for building model attributes, the apparatus comprising:
the system comprises an acquisition module, a classification module and a classification module, wherein the acquisition module is used for acquiring an original element instance and a classification attribute field of the original element instance from a specified database;
a first generation module for generating a global classification attribute declaration based on the original element instance and the classification attribute field;
a second generation module for generating an attribute instance based on the classification attribute field and the global classification attribute declaration;
an adding module for adding the attribute instance to the original element instance to generate a model element instance.
9. An electronic device comprising a memory having stored therein program instructions and a processor that, when executed, performs the steps of the method of any of claims 1-7.
10. A storage medium having stored thereon computer program instructions for executing the steps of the method according to any one of claims 1 to 7 when executed by a processor.
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 中铁四局集团有限公司 A kind of modeling method and device of freeway 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 支付宝(杭州)信息技术有限公司 Business processing method, device and equipment 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 中铁四局集团有限公司 A kind of modeling method and device of freeway tunnel project
CN111125731A (en) * 2019-12-11 2020-05-08 支付宝(杭州)信息技术有限公司 Business processing method, device and equipment 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 (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

Similar Documents

Publication Publication Date Title
US10860635B2 (en) Visualizing relationships between data elements
Auer et al. Triplify: light-weight linked data publication from relational databases
US8352443B1 (en) Representing scene description in databases
US8140545B2 (en) Data organization and evaluation using a two-topology configuration
CA2584326C (en) Managing related data objects
KR101665152B1 (en) Extending collaboration capabilities to external data
US10990577B2 (en) Service registry for saving and restoring a faceted selection
CA2884365C (en) Graphically representing programming attributes
US9218409B2 (en) Method for generating and using a reusable custom-defined nestable compound data type as database qualifiers
CN112749194A (en) Visualized data processing method and device, electronic equipment and readable storage medium
US7668888B2 (en) Converting object structures for search engines
US9495475B2 (en) Method of representing an XML schema definition and data within a relational database management system using a reusable custom-defined nestable compound data type
KR20130130706A (en) Managing data set objects in a dataflow graph that represents a computer program
US20160259831A1 (en) Methodology supported business intelligence (BI) software and system
WO2007136959A2 (en) Apparatus and method for recursively rationalizing data source queries
US20100131565A1 (en) Method for creating a self-configuring database system using a reusable custom-defined nestable compound data type
US10540628B2 (en) Hierarchical business rule model
CN112052244A (en) Method and device for establishing model attribute, electronic equipment and storage medium
US20070067254A1 (en) Business model data management
JP2007293874A (en) Method and apparatus for compressed storage of document
Sarjoughian et al. System modeling with mixed object and data models.
JP2007323677A (en) Method for generating object integrated management system
RU2787261C1 (en) System and method for engineering data management
Masson et al. Defining Referential Integrity Constraints in Graph-oriented Datastores.
Pérez-Álvarez et al. Modeling Support for Domain-Specific Application Definition

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

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.

CB02 Change of applicant information