Building data management method and device, equipment, medium and product
By standardizing and generating memory layouts for multi-source BIM data, the problem of custom attribute extension in multi-source BIM data integration is solved, improving component instantiation efficiency and attribute retrieval efficiency, and meeting the extension needs of custom components.
Patent Information
- Application Number
- CN202511094859.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-21
AI Technical Summary
In multi-source BIM data integration applications, existing technologies cannot extend custom attributes, resulting in low component instantiation efficiency and a lack of unified data definition standards, which affects the subsequent application value of the data.
By acquiring initial attribute data from multi-source building information models, standardizing the data using preset data definition templates, generating standard attribute data, and generating instantiated objects based on memory layout, the system supports the extension of custom attributes and efficient instantiation of components.
It enables convenient extension of custom attributes for multi-source BIM models, improves component instantiation efficiency, reduces memory consumption and disk usage, and supports efficient attribute retrieval and modification.
Smart Images

Figure CN120995548A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of building engineering, and in particular to a building data management method, device, equipment, medium and product. BACKGROUND
[0002] In the scene of multi-source building information modeling (BIM) data integration application, the integrated BIM model may come from different BIM software, resulting in that the integrated model does not have a unified data definition standard and complete data definition, thereby there are problems such as non-uniform data types and non-uniform data attributes. These non-uniform problems result in that the BIM data cannot be used in subsequent applications, thereby limiting the value of the BIM data.
[0003] At present, the existing multi-source BIM data management method usually performs standardized processing on BIM data of different data formats based on an industry basic standard, and directly generates corresponding instantiation objects according to the standardized BIM data. However, in the prior art, the definition of data is limited to the industry basic standard, which is not conducive to the expansion of custom attributes. Moreover, there is no any auxiliary reference for the instantiation of components, resulting in low instantiation efficiency of components. SUMMARY
[0004] The present application provides a building data management method, device, equipment, medium and product, which can realize convenient expansion of custom attributes of multi-source BIM models, and can improve the instantiation efficiency of components.
[0005] According to an aspect of the present application, a building data management method is provided, comprising:
[0006] obtaining multi-source building information models, and obtaining initial attribute data of each component according to the multi-source building information models;
[0007] performing standardized processing on each initial attribute data according to a preset data definition template, obtaining standardized attribute data of each component, and obtaining a memory layout corresponding to each component according to the standardized attribute data;
[0008] generating an instantiation object corresponding to each component according to the memory layout corresponding to each component, and storing each instantiation object to a local memory.
[0009] According to another aspect of the present application, a building data management device is provided, comprising:
[0010] an attribute data obtaining module configured to obtain multi-source building information models, and obtain initial attribute data of each component according to the multi-source building information models;
[0011] The memory layout obtaining module is configured to perform standardization processing on the initial attribute data of each component according to a preset data definition template, to obtain standard attribute data of each component, and to obtain a memory layout corresponding to each component according to the standard attribute data.
[0012] The instantiated object generating module is configured to generate an instantiated object corresponding to each component according to the memory layout corresponding to each component, and to store each instantiated object into a local memory.
[0013] According to another aspect of the present application, an electronic device is provided, which comprises:
[0014] at least one processor; and
[0015] a memory connected to the at least one processor in communication; wherein
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the building data management method according to any one of the embodiments of the present application.
[0017] According to another aspect of the present application, a computer readable storage medium is provided, which stores a computer program for enabling a processor to perform the building data management method according to any one of the embodiments of the present application when executed by the processor.
[0018] According to another aspect of the present application, a computer program product is provided, which comprises a computer program for enabling a processor to perform the building data management method according to any one of the embodiments of the present application when executed by the processor.
[0019] The technical solution of the embodiments of the present application obtains a multi-source building information model, and obtains initial attribute data of each component according to the multi-source building information model; performs standardization processing on each initial attribute data according to a preset data definition template, to obtain standard attribute data of each component, and obtains a memory layout corresponding to each component according to the standard attribute data; generates an instantiated object corresponding to each component according to the memory layout corresponding to each component, and stores each instantiated object into a local memory; through setting a self-defined data definition template, convenient expansion of self-defined attributes of a multi-source BIM model can be realized, and through setting a memory layout to assist instantiation of components, instantiation efficiency of the components can be improved.
[0020] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative efforts based on these drawings should be within the protection scope of the present application.
[0022] Figure 1 is a flow chart of a building data management method according to the first embodiment of the present application;
[0023] Figure 2 is a flow chart of a memory layout generation method according to the first embodiment of the present application;
[0024] Figure 3 is a flow chart of a building data management method according to the second embodiment of the present application;
[0025] Figure 4 is a flow chart of an instantiation object generation method according to the second embodiment of the present application;
[0026] Figure 5 is a structural schematic diagram of a building data management device according to the third embodiment of the present application;
[0027] Figure 6 is a structural schematic diagram of an electronic device implementing the building data management method of the embodiments of the present application. DETAILED DESCRIPTION
[0028] In order to make the person in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts should be within the protection scope of the present application.
[0029] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment one
[0031] Figure 1 A flowchart of a building data management method is provided for the first embodiment of the present application. This embodiment can be applied to the effective management of multi-source BIM data in a multi-source BIM data integration application scenario. The method can be executed by a building data management device, which can be realized in the form of hardware and / or software. Typically, the building data management device can be configured in an electronic device, such as a computer device or a server, etc. As shown in the figure, the method comprises: Figure 1
[0032] S110, obtaining multi-source building information model, and obtaining initial attribute data of each component according to the multi-source building information model.
[0033] In this embodiment, each component and the corresponding initial attribute data of each component can be extracted from the multi-source BIM. The initial attribute data corresponding to different components can be in the same format or different formats.
[0034] S120, standardizing each initial attribute data according to a preset data definition template, obtaining standard attribute data of each component, and obtaining memory layout corresponding to each component according to the standard attribute data.
[0035] The preset data definition template can be a standard data format of the component. Optionally, the preset data definition template can include component definition, attribute definition, attribute type definition, and / or attribute value definition. The attribute type includes basic type, array type, structure type (struct), and / or string type (string). The basic type can include integer type (int), single-precision floating point type (float), double-precision floating point type (double), and the like. In addition, the attribute type also supports mechanisms such as type nesting and inheritance. The attribute type is a data type of an attribute value. Through the preset data definition template, the needs of the business user for customizing and expanding the component can be met, so that the business user can quickly supplement and expand the integrated model.
[0036] In the embodiment, based on the preset data definition template, content data corresponding to each definition can be extracted from the initial attribute data of the component, to obtain attribute data corresponding to each attribute. For example, the attribute data can include attribute number, attribute type, attribute value, and attribute name. Then, the attribute data corresponding to each attribute can be combined to obtain standard attribute data of the component. Further, the memory layout corresponding to the component can be generated according to the attribute data corresponding to each attribute in the standard attribute data and a preset memory layout template.
[0037] For example, the memory layout template can include attribute type, attribute value, and memory offset. When generating the memory layout, the field values corresponding to each field can be extracted from the attribute data corresponding to each attribute, and the field values corresponding to each attribute can be combined to obtain the final memory layout.
[0038] Optionally, obtaining the memory layout corresponding to each component according to the standard attribute data can include:
[0039] According to the standard attribute data, obtaining attribute number, attribute name, attribute type, and attribute value corresponding to each attribute of each component, and according to the attribute type, obtaining memory offset corresponding to each attribute;
[0040] According to the attribute number, attribute name, attribute type, attribute value, and memory offset corresponding to each attribute, generating the memory layout corresponding to each component.
[0041] In an optional example, the flow of the memory layout generation method can be as follows Figure 2As shown, the left side is the standard attribute data, and the right side is the memory layout mapped from the standard attribute data. The memory layout includes an attribute number, an attribute type, an attribute value, a memory offset, and an attribute name field, each field corresponds to a column, and each attribute corresponds to a row. The memory offset is used to indicate the writing position of the attribute value in the instantiated object. For example, for the attribute key2, the corresponding memory offset is 4, indicating that the corresponding attribute value is written from the 5th byte.
[0042] It should be noted that the memory offset is related to the attribute type of the previous attribute, and the attribute type corresponds to the byte number one by one. In this embodiment, when obtaining the memory offset corresponding to the current attribute, first, the attribute types corresponding to the previous attributes are obtained, and the byte numbers corresponding to the previous attributes are obtained according to the correspondence between the attribute types and the byte numbers; then, the byte numbers corresponding to the previous attributes are added to obtain a sum value as the memory offset corresponding to the current attribute. Alternatively, the attribute type and the memory offset corresponding to the previous attribute can be obtained, and the byte number corresponding to the previous attribute can be obtained according to the correspondence between the attribute type and the byte number; then, the byte number corresponding to the previous attribute and the corresponding memory offset are added to obtain a sum value as the memory offset corresponding to the current attribute.
[0043] Specifically, first, the attribute number, attribute name, attribute type, and attribute value corresponding to each attribute are parsed from the standard attribute data; then, the memory offset corresponding to each attribute is obtained according to the attribute type corresponding to each attribute and the preset correspondence between the attribute type and the byte number; finally, a table can be generated as the memory layout according to the attribute number, attribute name, attribute type, attribute value, and memory offset corresponding to each attribute according to the format of the memory layout template.
[0044] The above setting has the benefit of efficiently obtaining the memory layout and providing data support for component instantiation.
[0045] S130, according to the memory layout corresponding to each of the components, generating an instantiated object corresponding to each of the components, and storing each of the instantiated objects to the local memory.
[0046] In this embodiment, based on the memory layout, a corresponding instance memory can be directly allocated to each attribute to quickly generate an instantiated object. Specifically, based on the memory offset in the memory layout corresponding to the component, a corresponding instance byte can be allocated to each attribute, and according to the attribute type in the memory layout, the attribute value or the memory address of the attribute value corresponding to the attribute can be written to the corresponding instance byte to obtain the instantiated object. Further, the instantiated object can be written to the local memory.
[0047] Optionally, generating the instantiation object corresponding to each component according to the memory layout corresponding to each component can comprise:
[0048] According to the memory layout corresponding to the current component, obtaining the attribute type, attribute value and memory offset corresponding to each attribute of the current component, and according to the attribute type, obtaining the layout type corresponding to each attribute of the current component;
[0049] According to the layout type, attribute value and memory offset corresponding to each attribute of the current component, generating the instantiation object corresponding to the current component.
[0050] In the embodiment, when instantiating the component, first, the attribute type, attribute value and memory offset corresponding to each attribute can be extracted from the memory layout corresponding to the component. Then, according to the attribute type corresponding to each attribute and the preset corresponding relationship between the attribute type and the layout type, the layout type corresponding to each attribute can be obtained. Further, according to the layout type corresponding to each attribute, the attribute value or the memory address of the attribute value can be written into the instantiation memory position corresponding to the memory offset, so as to obtain the instantiation object corresponding to the component.
[0051] The layout type can comprise a fixed memory layout and a dynamic memory layout. The fixed memory layout is a fixed attribute layout corresponding to a memory size, and the dynamic memory layout is an attribute layout corresponding to a dynamically changing memory size. The attribute type corresponding to the fixed memory layout is a basic type, and the attribute type corresponding to the dynamic memory layout comprises an array type, a structure type and a string type.
[0052] The above setting has the advantages of effectively improving the instantiation efficiency of the component and improving the retrieval and modification efficiency of the attribute.
[0053] Optionally, generating the instantiation object corresponding to the current component according to the layout type, attribute value and memory offset corresponding to each attribute of the current component can comprise:
[0054] According to the memory offset corresponding to the current attribute, obtaining the memory start position corresponding to the current attribute;
[0055] If the layout type corresponding to the current attribute is a fixed memory layout, determining that the value corresponding to the memory start position is the attribute value corresponding to the current attribute;
[0056] If the layout type corresponding to the current attribute is a dynamic memory layout, determining that the value corresponding to the memory start position is the memory address of the attribute value corresponding to the current attribute;
[0057] According to the value corresponding to each memory start position, generating the instantiation object corresponding to the current component.
[0058] In the embodiment, when instantiation is performed, for the attribute of the fixed memory layout, the corresponding attribute value is directly recorded, and for the attribute of the dynamic memory layout, the memory address of the corresponding attribute value is recorded instead of the specific attribute value. Specifically, first, the write start byte corresponding to the current attribute is determined as the memory start position according to the memory offset corresponding to the current attribute; then, if the layout type corresponding to the current attribute is the fixed memory layout, the attribute value is directly written from the memory start position, and if the layout type is the dynamic memory layout, the memory address of the attribute value is written from the memory start position. The memory address of the attribute value can be set in advance. After the writing of all attributes is completed, the instantiation object corresponding to the current component is obtained.
[0059] The above setting has the benefit that by storing only the attribute value or the memory address in the instantiation object, the memory consumption and the disk occupation are ensured to be small, and the utilization rate of the storage resource is improved.
[0060] The technical scheme of the embodiment of the application acquires a multi-source building information model, and acquires initial attribute data of each component according to the multi-source building information model; standardizes each initial attribute data according to a preset data definition template to acquire standard attribute data of each component, and acquires a memory layout corresponding to each component according to the standard attribute data; generates an instantiation object corresponding to each component according to the memory layout corresponding to each component, and stores each instantiation object in a local memory; through setting of a self-defined data definition template, convenient expansion of self-defined attributes of the multi-source BIM model can be realized, and through setting of the memory layout, instantiation of the component can be assisted, and the instantiation efficiency of the component can be improved.
[0061] Embodiment two
[0062] Figure 3 A flowchart of a building data management method provided by the embodiment two of the application, the embodiment is a further refinement of the above technical scheme, and the technical scheme in the embodiment can be combined with one or more of the above embodiments. As shown in the embodiment, the method comprises: Figure 3
[0063] S210, a multi-source building information model is acquired, and initial attribute data of each component is acquired according to the multi-source building information model.
[0064] S220, each initial attribute data is standardized according to a preset data definition template to acquire standard attribute data of each component, and according to the standard attribute data, an attribute number, an attribute name, an attribute type and an attribute value corresponding to each attribute of each component are acquired, and according to the attribute type, a memory offset corresponding to each attribute is acquired.
[0065] S230, generating the memory layout corresponding to each component according to the attribute number, attribute name, attribute type, attribute value and memory offset corresponding to each attribute, and obtaining the attribute type, attribute value and memory offset corresponding to each attribute of the current component according to the memory layout corresponding to the current component, and obtaining the layout type corresponding to each attribute of the current component according to the attribute type.
[0066] S240, obtaining the memory start position corresponding to the current attribute according to the memory offset corresponding to the current attribute.
[0067] S250, if the layout type corresponding to the current attribute is fixed memory layout, determining that the value corresponding to the memory start position is the attribute value corresponding to the current attribute; if the layout type corresponding to the current attribute is dynamic memory layout, determining that the value corresponding to the memory start position is the memory address of the attribute value corresponding to the current attribute.
[0068] S260, generating the instantiated object corresponding to the current component according to the value corresponding to each memory start position, and storing each instantiated object to the local memory.
[0069] In a specific example, the flow of the instantiation object generation method can be as shown in Figure 4 The attribute types corresponding to the attributes key1, key2 and key3 are int, float and double respectively, which are basic types, so the layout types corresponding to them are all fixed memory layout; while the attribute types corresponding to the attributes key4, key5 and key6 are struct, string and string respectively, so the layout types corresponding to them are dynamic memory layout. When generating the instantiated object, the writing of the attribute values is performed in the order of key1 to key6 according to the memory offset. Among them, for the fixed memory layout of key1, key2 and key3, the attribute values are directly written, and for the dynamic memory layout of key4, key5 and key6, the memory addresses of the attribute values are written instead of the specific attribute values.
[0070] S270, in response to the retrieval operation on the target attribute of the target component, obtaining the target memory layout and the target instantiated object corresponding to the target component, and obtaining the target memory offset and the target attribute type corresponding to the target attribute according to the target memory layout.
[0071] In this embodiment, when it is necessary to read the attribute value corresponding to the target attribute of the target component, the target memory layout and the target instantiated object corresponding to the target component can be first found from the local memory, and then the target memory layout is parsed to extract the target memory offset and the target attribute type corresponding to the target attribute.
[0072] S280, according to the target attribute type, if it is detected that the layout type corresponding to the target attribute is a fixed memory layout, the attribute value corresponding to the target attribute is directly obtained from the target instantiated object according to the target memory offset.
[0073] Specifically, first, the layout type corresponding to the target attribute is obtained according to the extracted target attribute type and the preset corresponding relationship between the attribute type and the layout type; then, if it is determined that the layout type is a fixed memory layout, the byte number corresponding to the target attribute is obtained according to the target attribute type and the preset corresponding relationship between the attribute type and the byte number, and the attribute value corresponding to the target attribute is extracted from the target instantiated object according to the target memory offset and the determined byte number.
[0074] S290, according to the target attribute type, if it is detected that the layout type corresponding to the target attribute is a dynamic memory layout, the target memory address is obtained from the target instantiated object according to the target memory offset, and the attribute value corresponding to the target attribute is obtained according to the target memory address.
[0075] In another case, if it is determined that the layout type corresponding to the target attribute is a dynamic memory layout, the target memory address corresponding to the attribute value can be extracted from the target instantiated object according to the target memory offset and the determined byte number, and the specific attribute value can be found in the local memory according to the target memory address. It should be noted that for the attribute of the dynamic memory layout, the target memory address can include the specific position and length of the attribute value in the structure or the string, so that the specific attribute value can be found according to the memory address.
[0076] Optionally, after generating the instantiated object corresponding to the component, the plurality of instantiated objects can be spliced and the spliced instantiated object can be serialized, for example, binary conversion, in response to the selection and integration operation of the user on the instantiated object, to obtain sequence data. Meanwhile, according to the byte length corresponding to each instantiated object, the byte offset corresponding to each instantiated object can be obtained. When it is necessary to retrieve the attribute value corresponding to the attribute of a certain component from the sequence data, the instantiated object can be found from the sequence data according to the byte offset corresponding to the instantiated object corresponding to the component, and the corresponding attribute value can be found from the instantiated object according to the memory layout corresponding to the component.
[0077] The embodiment realizes an extension method for a BIM model self-defined component, a user can define the component without coding, and rich BIM model information is expanded. Secondly, the embodiment manages the memory layout after the self-defined component is loaded into the memory, and is divided into fixed memory layout and dynamic memory layout, the memory layout can support the rapid instantiation of the self-defined component, and only the attribute value is stored in the instance, so that the small memory consumption and the disk occupation are ensured. Finally, based on the memory layout mechanism, the instance space size is directly allocated, and the attribute retrieval can be directly performed on the persistent binary block data generated after instantiation, since the memory layout records the clear memory layout information of the attribute value, so the retrieval efficiency is high. Overall, the embodiment designs a self-defined component template and the corresponding memory layout mechanism, greatly improves the instantiation efficiency, reduces the memory size of the generated instance, supports the rapid retrieval of the persistent binary block data, and meets the expansion demand and efficiency requirement of the self-defined component in the business.
[0078] The technical scheme of the embodiment of the application, after generating the instantiation object corresponding to the component and storing the instantiation object into the local memory, in response to the retrieval operation of the target attribute of the target component, the target memory layout and the target instantiation object corresponding to the target component are acquired, and the target memory offset and the target attribute type corresponding to the target attribute are acquired according to the target memory layout; according to the target attribute type, if it is detected that the layout type corresponding to the target attribute is the fixed memory layout, the attribute value corresponding to the target attribute is directly acquired from the target instantiation object according to the target memory offset; according to the target attribute type, if it is detected that the layout type corresponding to the target attribute is the dynamic memory layout, the target memory address is acquired from the target instantiation object according to the target memory offset, and the attribute value corresponding to the target attribute is acquired according to the target memory address; the direct or indirect retrieval of the attribute value is realized based on the memory layout, and the retrieval efficiency of the attribute value can be significantly improved.
[0079] It should be noted that the existing multi-source BIM model has the problems of component and attribute confusion or missing, which cannot be effectively utilized by subsequent business, so it is necessary for users to customize standard data types and attributes, quickly supplement and expand the integrated model, and ensure that the expanded model has a small storage volume, which can support the needs of efficient data retrieval, filtering and other needs of subsequent business. In view of the above problems and needs, the embodiment designs a general BIM component and attribute expansion framework, which can automatically parse a preset data definition template, generate a memory layout of a custom component based on the template file, and the memory layout includes the definition of various attribute types, including basic types (such as int, float, double, etc.), array types, string types, structures, etc., and supports nested definition of types, which can meet the expansion needs of custom components of business users. The memory layout includes two types, one is a fixed layout for immutable memory, for example, basic types, etc.; the other is a dynamic layout for variable memory, for example, array, structure, string, etc. Through this memory layout, the instantiation efficiency of custom components can be effectively improved, and the retrieval and modification efficiency of attributes can be improved.
[0080] Secondly, the embodiment proposes a data instantiation and retrieval mechanism based on the memory layout of the custom component. In the traditional BIM system supporting custom components and attributes, instantiating a custom component will clone a complete data based on the template, and in actual scenarios, the integrated BIM model has a large data size, and repeated cloning of each data will consume a large memory, and will also occupy a large disk when persisting, and the serialization and deserialization of data will consume a lot of time, and data retrieval must be performed on the deserialized data.
[0081] The embodiment instantiates based on the memory layout of the custom component, and the instantiated data only includes the attribute values of the custom component, without including the component definition, thereby ensuring a small memory consumption and disk occupation. The instantiation process includes instantiation of the fixed memory layout, which can directly allocate memory based on the memory layout to accommodate fixed-size attribute values, with extremely high efficiency; for dynamic memory layout, only a minimum data memory of the type needs to be generated during instantiation, and the attribute values can be dynamically expanded during editing. The embodiment also supports quick retrieval of attributes of the persisted data of the instantiated object. After generating the instantiated object based on the memory layout, the memory layout is still retained, and the direct retrieval of the attributes of the fixed memory layout and the indirect retrieval of the attributes of the dynamic memory layout can be realized based on the memory layout, without the need for deserialization of the binary data, which significantly improves the data retrieval efficiency, avoids all custom expansion data deserialization operations, and greatly reduces the memory occupation.
[0082] Embodiment three
[0083] Figure 5 A structural schematic diagram of a building data management device provided by embodiment three of the present application is shown in the figure. As shown in the figure, the device comprises an attribute data acquisition module 310, a memory layout acquisition module 320 and an instantiation object generation module 330; wherein, Figure 5
[0084] The attribute data acquisition module 310 is configured to acquire a multi-source building information model, and acquire initial attribute data of each component according to the multi-source building information model.
[0085] The memory layout acquisition module 320 is configured to perform standardized processing on each of the initial attribute data according to a preset data definition template, acquire standardized attribute data of each of the components, and acquire a memory layout corresponding to each of the components according to the standardized attribute data.
[0086] The instantiation object generation module 330 is configured to generate an instantiation object corresponding to each of the components according to the memory layout corresponding to each of the components, and store each of the instantiation objects into a local memory.
[0087] The technical solution of the embodiment of the present application acquires a multi-source building information model, and acquires initial attribute data of each component according to the multi-source building information model; performs standardized processing on each of the initial attribute data according to a preset data definition template, acquires standardized attribute data of each of the components, and acquires a memory layout corresponding to each of the components according to the standardized attribute data; generates an instantiation object corresponding to each of the components according to the memory layout corresponding to each of the components, and stores each of the instantiation objects into a local memory; through setting a self-defined data definition template, convenient expansion of self-defined attributes of a multi-source BIM model can be realized, and through setting a memory layout to assist instantiation of components, instantiation efficiency of the components can be improved.
[0088] Optionally, the preset data definition template comprises component definition, attribute definition, attribute type definition and / or attribute value definition, and the attribute type comprises a basic type, an array type, a structure type and / or a string type.
[0089] Optionally, the memory layout acquisition module 320 is specifically configured to acquire attribute numbers, attribute names, attribute types and attribute values corresponding to each attribute of each of the components according to the standardized attribute data, and acquire a memory offset corresponding to each attribute according to the attribute type.
[0090] The memory layout corresponding to each of the components is generated according to the attribute numbers, the attribute names, the attribute types, the attribute values and the memory offset corresponding to each attribute.
[0091] Optionally, the instantiation object generation module 330 comprises:
[0092] The layout type obtaining unit is configured to obtain the attribute type, the attribute value and the memory offset corresponding to each attribute of the current component according to the memory layout corresponding to the current component, and obtain the layout type corresponding to each attribute of the current component according to the attribute type;
[0093] The instantiated object generating unit is configured to generate the instantiated object corresponding to the current component according to the layout type, the attribute value and the memory offset corresponding to each attribute of the current component.
[0094] Optionally, the instantiated object generating unit is specifically configured to obtain the memory start position corresponding to the current attribute according to the memory offset corresponding to the current attribute.
[0095] If the layout type corresponding to the current attribute is the fixed memory layout, the value corresponding to the memory start position is determined as the attribute value corresponding to the current attribute.
[0096] If the layout type corresponding to the current attribute is the dynamic memory layout, the value corresponding to the memory start position is determined as the memory address of the attribute value corresponding to the current attribute.
[0097] According to the value corresponding to each memory start position, the instantiated object corresponding to the current component is generated.
[0098] Optionally, the building data management apparatus further comprises:
[0099] The target attribute retrieving module is configured to, in response to a retrieving operation on a target attribute of a target component, obtain the target memory layout and the target instantiated object corresponding to the target component, and obtain the target memory offset and the target attribute type corresponding to the target attribute according to the target memory layout.
[0100] The first attribute value obtaining module is configured to, according to the target attribute type, if it is detected that the layout type corresponding to the target attribute is the fixed memory layout, directly obtain the attribute value corresponding to the target attribute from the target instantiated object according to the target memory offset.
[0101] The second attribute value obtaining module is configured to, according to the target attribute type, if it is detected that the layout type corresponding to the target attribute is the dynamic memory layout, obtain the target memory address from the target instantiated object according to the target memory offset, and obtain the attribute value corresponding to the target attribute according to the target memory address.
[0102] The building data management apparatus provided in the embodiments of the present application can execute the building data management method provided in any of the embodiments of the present application, and has the function modules and beneficial effects corresponding to the execution method.
[0103] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0104] Embodiment Four
[0105] Figure 6 A structural schematic diagram of an electronic device 40 that can be used to implement embodiments of the present application is shown. The electronic device 40 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the present application described and / or claimed in this document.
[0106] As shown in Figure 6 The electronic device 40 includes at least one processor 41, and a memory, such as a Read-Only Memory (ROM) 42, a Random Access Memory (RAM) 43, etc., connected to the at least one processor 41 in communication, where the memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes according to the computer programs stored in the Read-Only Memory 42 or loaded into the Random Access Memory 43 from the storage unit 48. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An Input / Output (I / O) interface 45 is also connected to the bus 44.
[0107] A plurality of components in the electronic device 40 are connected to the I / O interface 45, including an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as a display of various components, a speaker, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunications networks.
[0108] The processor 41 can be various general and / or special purpose processing components having processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, central processing units, graphics processing units, various specialized artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any appropriate processors, controllers, microcontrollers, and the like. The processor 41 executes the various methods and processes described above, such as the management method of building data.
[0109] In some embodiments, the management method of building data can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded onto the RAM 43 and executed by the processor 41, one or more steps of the management method of building data described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to perform the management method of building data by any other appropriate means, such as by means of firmware.
[0110] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits, application specific standard products, chips, microprocessors, computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0111] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0112] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disc read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0113] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device 40 having a display device (e.g., a cathode ray tube or a liquid crystal display) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device 40. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0114] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network, a wide area network, a blockchain network, and the Internet.
[0115] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server.
[0116] The embodiment can also include a computer program product including a computer program which, when executed by a processor, implements the method for managing building data provided by any of the embodiments of the present application.
[0117] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present application. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application are achieved, which are not limited herein.
[0118] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for managing building data, characterized in that, include: Obtain a multi-source building information model, and based on the multi-source building information model, obtain the initial attribute data of each component; The initial attribute data of each component is standardized according to the preset data definition template to obtain the standard attribute data of each component, and the memory layout corresponding to each component is obtained according to the standard attribute data. Based on the memory layout corresponding to each component, an instantiated object corresponding to each component is generated, and each instantiated object is stored in local memory.
2. The method according to claim 1, characterized in that, The preset data definition template includes component definition, attribute definition, attribute type definition and / or attribute value definition. Attribute types include basic types, array types, structure types and / or string types.
3. The method according to claim 2, characterized in that, Based on the standard attribute data, obtain the memory layout corresponding to each component, including: Based on the standard attribute data, obtain the attribute number, attribute name, attribute type and attribute value corresponding to each attribute of each component, and obtain the memory offset corresponding to each attribute based on the attribute type; Based on the attribute number, attribute name, attribute type, attribute value, and memory offset of each attribute, generate the memory layout corresponding to each component.
4. The method according to claim 3, characterized in that, Based on the memory layout corresponding to each component, generate instantiated objects corresponding to each component, including: Based on the memory layout corresponding to the current component, obtain the attribute type, attribute value and memory offset of each attribute of the current component, and based on the attribute type, obtain the layout type of each attribute of the current component. Based on the layout type, attribute value, and memory offset of each attribute of the current component, generate an instantiated object corresponding to the current component.
5. The method according to claim 4, characterized in that, Based on the layout type, attribute value, and memory offset of each attribute of the current component, generate an instantiated object corresponding to the current component, including: Based on the memory offset corresponding to the current attribute, obtain the starting memory location corresponding to the current attribute; If the layout type corresponding to the current attribute is a fixed memory layout, then the value corresponding to the starting position of the memory is determined to be the attribute value corresponding to the current attribute. If the layout type corresponding to the current attribute is dynamic memory layout, then the value corresponding to the memory start position is determined to be the memory address of the attribute value corresponding to the current attribute. Based on the values corresponding to the starting positions of each memory location, generate the instantiated object corresponding to the current component.
6. The method according to claim 5, characterized in that, Also includes: In response to a retrieval operation on the target attribute of a target component, the target memory layout and target instantiated object corresponding to the target component are obtained, and the target memory offset and target attribute type corresponding to the target attribute are obtained based on the target memory layout; Based on the target attribute type, if it is detected that the layout type corresponding to the target attribute is a fixed memory layout, then based on the target memory offset, the attribute value corresponding to the target attribute is directly obtained from the target instantiated object; If the layout type corresponding to the target attribute is detected to be a dynamic memory layout, then the target memory address is obtained from the target instantiated object according to the target memory offset, and the attribute value corresponding to the target attribute is obtained according to the target memory address.
7. A building data management device, characterized in that, include: The attribute data acquisition module is used to acquire a multi-source building information model and, based on the multi-source building information model, acquire the initial attribute data of each component. The memory layout acquisition module is used to standardize the initial attribute data according to the preset data definition template, obtain the standard attribute data of each component, and obtain the memory layout corresponding to each component according to the standard attribute data. The instantiation object generation module is used to generate instantiation objects corresponding to each component according to the memory layout of each component, and store each instantiation object in local memory.
8. An electronic device, characterized in that, The electronic device includes: At least one processor, and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the building data management method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for managing building data as described in any one of claims 1-6.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method for managing building data according to any one of claims 1-6.