A Method, Device, Medium and Equipment for Synchronizing Data Based on BIM Model
Through distributed architecture design and real-time communication protocol, the problems of data redundancy and conflict in BIM model management are solved, realizing the instant synchronization and accuracy of BIM data, and reducing time costs.
Patent Information
- Application Number
- CN202411565899.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-11-05
AI Technical Summary
In the traditional BIM model management method, centralized data storage leads to data redundancy and conflict, making it difficult to achieve real-time updates and synchronization, and cannot meet the needs of complex projects.
It adopts a distributed architecture design, and processes building data through real-time communication protocols, compression algorithms and encryption algorithms, sets up data mapping rules and event listeners, integrates conflict detection algorithms and version control systems to ensure real-time data interaction and synchronization between the BIM main model and the sub-model.
It effectively reduces the risk of data redundancy and conflict, reduces time costs, realizes instant synchronous updates and accuracy of BIM data, and provides reasonable resource allocation.
Smart Images

Figure CN119135701B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, medium and equipment for synchronizing data based on a BIM model. Background Art
[0002] In the application process of Building Information Modeling (BIM) technology, data consistency and real-time updating have always been important challenges faced by the industry. Traditional BIM model management methods usually adopt a centralized data storage and update strategy, that is, all BIM data are stored on a central server and managed and updated by professionals. However, with the expansion of project scale and complexity, all BIM data in the centralized data management method is stored on one server. Different professionals or departments may generate data redundancy or conflicts when editing and updating data, which increases the difficulty of data management and maintenance. As the project progresses, BIM data needs to be continuously updated to reflect the latest status of the project. However, due to delays in data transmission and processing, traditional centralized management methods find it difficult to achieve real-time updating and synchronization of BIM data, resulting in data inconsistency and lag. Traditional centralized management methods find it difficult to support the creation and management of multiple sub-models and are difficult to meet the needs of complex projects. Summary of the Invention
[0003] In response to the above technical problems, the technical solution adopted by the present invention is a method for synchronizing data based on a BIM model, which includes the following steps:
[0004] A BIM master model and several BIM sub-models corresponding to the BIM master model are obtained, wherein the BIM sub-models include specific part models obtained from the BIM master model and information on professional fields corresponding to the specific part models.
[0005] Setting a real-time communication protocol, wherein setting the real-time communication protocol includes: confirming a protocol format, confirming a data transmission strategy, confirming an optimization strategy, and confirming a network adaptability mechanism.
[0006] According to the protocol format corresponding to the real-time communication protocol, the building data is encoded and decoded through compression algorithm and encryption algorithm.
[0007] Data mapping rules corresponding to each BIM sub-model are set, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic and error handling strategy.
[0008] Based on the API or plug-in provided by the BIM software, event listeners are integrated in the BIM master model and each BIM sub-model to obtain building data change events.
[0009] According to the data mapping rules corresponding to the BIM sub-model and the acquired building data change events, the building data synchronization process is triggered and executed, wherein the building data synchronization process is to confirm the building data content and target model that need to be synchronized according to the type and scope of the building data change event. The target model is the model acquired from the BIM main model and each BIM sub-model.
[0010] The conflict detection algorithm is confirmed based on the rule engine, wherein the conflict detection algorithm is a conditional judgment based on data or a regular expression based on business logic.
[0011] Get integrated version control system into BIM software to record change set information for each change in the version control system.
[0012] The present invention also provides a device for synchronizing data based on a BIM model, the device comprising:
[0013] The first execution module is used to obtain a BIM main model and several BIM sub-models corresponding to the BIM main model, wherein the BIM sub-models include specific part models obtained from the BIM main model and information on professional fields corresponding to the specific part models.
[0014] The second execution module is configured to set a real-time communication protocol, wherein the setting of the real-time communication protocol includes: confirming a protocol format, confirming a data transmission strategy, confirming an optimization strategy, and confirming a network adaptability mechanism.
[0015] The third execution module is used to encode and decode the building data through a compression algorithm and an encryption algorithm according to a protocol format corresponding to the real-time communication protocol.
[0016] The fourth execution module is used to set data mapping rules corresponding to each BIM sub-model, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic and error handling strategy.
[0017] The fifth execution module is used to integrate event listeners in the BIM main model and each BIM sub-model based on the API or plug-in provided by the BIM software to obtain building data change events.
[0018] The sixth execution module is used to trigger the execution of the building data synchronization process according to the data mapping rules corresponding to the BIM sub-model and the obtained building data change event, wherein the building data synchronization process is to confirm the building data content and target model that need to be synchronized according to the type and scope of the building data change event, and the target model is the model obtained from the BIM main model and each BIM sub-model.
[0019] The seventh execution module is used to confirm the conflict detection algorithm based on the rule engine, wherein the conflict detection is performed on the building data change event through the conflict detection algorithm.
[0020] The eighth execution module is used to obtain an integrated version control system integrated into the BIM software to record the change set information of each change in the version control system.
[0021] The present invention also provides a non-transitory computer-readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned method of synchronizing data based on a BIM model.
[0022] The present invention also provides an electronic device comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0023] The present invention has at least the following beneficial effects: obtaining a BIM master model and several BIM sub-models corresponding to the BIM master model, setting a real-time communication protocol, encoding and decoding building data using a compression algorithm and an encryption algorithm according to a protocol format corresponding to the real-time communication protocol, setting data mapping rules corresponding to each BIM sub-model, integrating event listeners in the BIM master model and each BIM sub-model based on an API or plug-in provided by the BIM software to obtain building data change events, triggering the execution of a building data synchronization process based on the data mapping rules corresponding to the BIM sub-model and the obtained building data change events, confirming a conflict detection algorithm based on a rule engine, obtaining an integrated version control system and integrating it into the BIM software to record the change set information of each change in the version control system. It can be seen that through a distributed architecture design, the system stores BIM data in a dispersed manner on multiple nodes, effectively reducing the risk of data redundancy and conflict, reducing time costs, avoiding resource waste, and achieving reasonable resource allocation. At the same time, by setting a real-time communication protocol, real-time data interaction between the BIM master model and each sub-model is guaranteed, achieving instant synchronous update of design data, and improving the accuracy of BIM data. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flow chart of a method for synchronizing data based on a BIM model provided in the first embodiment of the present invention;
[0026] Figure 2 This is a flowchart of S200 provided in the first embodiment of the present invention;
[0027] Figure 3 This is a flowchart of S700 provided in the first embodiment of the present invention;
[0028] Figure 4 A schematic diagram of the structure of a device for synchronizing data based on a BIM model provided in the second embodiment of the present invention;
[0029] Figure 5 A schematic structural diagram of a second execution module 2 provided in the second embodiment of the present invention;
[0030] Figure 6 This is a structural diagram of the seventh execution module 7 provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Example 1:
[0034] This embodiment provides a method for synchronizing data based on a BIM model, the method comprising the following steps: Figure 1 As shown:
[0035] S100: Acquire a BIM master model and several BIM sub-models corresponding to the BIM master model, wherein the BIM sub-models include specific part models acquired from the BIM master model and information on professional fields corresponding to the specific part models.
[0036] Specifically, the BIM sub-model can be understood as a refinement of a specific part of the main model, such as the structural model, electromechanical model, curtain wall model, etc. Each sub-model inherits some basic data from the main model, such as spatial location and building outline, to ensure the consistency and coordination of all models in physical space. While inheriting the basic data of the main model, the sub-model also adds detailed information in the professional field corresponding to the inherited part of the main model, such as the size, material, and load of structural components, or the model, location, and pipeline layout of electromechanical equipment. These detailed information may only exist in the form of summary or reference in the main model, but are fully described in the sub-model.
[0037] Specifically, the BIM master model is divided based on data structure, wherein the data structure is confirmed based on the type corresponding to the building data, for example: project level, building level, system level, component level and other data structures.
[0038] Specifically, S100 also includes the following steps:
[0039] S101, obtaining a plurality of building elements in a BIM master model, attributes corresponding to each building element, and association relationships between the building elements.
[0040] Specifically, the building elements, the attributes corresponding to each building element, and the association relationships between the building elements are obtained through the automatic extraction function of the BIM software and manual settings, for example: clearly specifying which floors are adjacent to a certain wall, or which furniture and equipment are contained in a certain room.
[0041] S102, verifying the BIM master model using a specific verification tool, including: BIM model integrity verification, building element attribute verification, BIM model standardization verification, and building data redundancy detection.
[0042] Specifically, the integrity of the BIM model is to ensure that all necessary model components (such as walls, floor slabs, beams and columns, etc.) have been created and correctly placed, and the standardization of the BIM model is to confirm that the BIM model complies with industry standards and modeling specifications, such as naming rules, layer settings, etc.
[0043] S103, correcting abnormal data obtained through verification, wherein the abnormal data includes incomplete BIM model data, incorrect attributes of building elements, non-standard BIM model, and redundant building data.
[0044] S104: Re-check and review using the specific verification tool to obtain the BIM master model.
[0045] S200, setting a real-time communication protocol, wherein setting the real-time communication protocol includes: confirming a protocol format, confirming a data transmission strategy, confirming an optimization strategy, and confirming a network adaptability mechanism.
[0046] Specifically, the protocol format includes a message header format and a message body format, wherein the message header format includes a message type, a version number, sender and receiver identifiers, and the message body format includes data content and data format.
[0047] Specifically, S200 also includes the following steps: Figure 2 As shown:
[0048] S201, when the BIM master model and the BIM sub-model are connected and perform data synchronization for the first time, all data in the BIM master model are transferred to the corresponding BIM sub-model.
[0049] S202, when the connection between the BIM master model and the BIM sub-model is established and it is not the first data synchronization, differential building data is obtained, wherein the differential building data is the changed data obtained when any data in the BIM master model and each BIM sub-model is compared with the historical snapshot or when any data in the BIM master model and each BIM sub-model is compared with the data of the last synchronization.
[0050] S203: Send the compressed differential building data to the BIM master model or the BIM sub-model through a data transmission protocol, and merge the differential building data with the local data to update the local model.
[0051] Specifically, the data transmission protocols include TCP / IP and WebSocket.
[0052] Specifically, the optimization strategy includes a data transmission frequency optimization strategy and a bandwidth occupancy optimization strategy.
[0053] Furthermore, the data transmission frequency optimization strategy is to perform full data synchronization when the BIM main model or BIM sub-model is in idle time or low-load period, and at the same time, check and synchronize the data that has changed since the last synchronization at every preset time interval.
[0054] Furthermore, those skilled in the art know that the preset time can be selected according to actual needs, which falls within the scope of protection of the present invention and will not be described in detail here.
[0055] Specifically, the bandwidth occupancy optimization strategy is to distribute data transmission requests to multiple servers for processing, and at the same time, introduce a cache mechanism during the data transmission process to cache frequently accessed data locally or on intermediate nodes.
[0056] Furthermore, when the data needs to be accessed again, it can be directly obtained from the cache without retransmission, thereby reducing bandwidth usage.
[0057] Specifically, the network adaptability mechanism includes a fault tolerance mechanism and a retransmission mechanism, wherein the mechanism includes redundancy design, error detection and recovery, and protocol layer fault tolerance.
[0058] Furthermore, the redundant design includes data redundancy and equipment redundancy. The data redundancy uses coding technology to add redundant information to the data, and the equipment redundancy is achieved by deploying spare devices, such as coding technology such as error correction codes, and spare devices such as routers.
[0059] Furthermore, the error detection and recovery is to detect errors in data transmission using a checksum or CRC method, and request data retransmission or switch to a backup device after detecting an error to restore normal data transmission or service.
[0060] Furthermore, the protocol layer fault tolerance includes implementing fault tolerance mechanisms at different layers of the network protocol, such as the data link layer, the network layer, the transport layer, and other different layers.
[0061] Specifically, those skilled in the art know that any retransmission mechanism setting in the prior art falls within the protection scope of the present invention and will not be described in detail here.
[0062] S300, encoding and decoding the building data using a compression algorithm and an encryption algorithm according to a protocol format corresponding to the real-time communication protocol.
[0063] Specifically, the building data is original data that needs to be transmitted.
[0064] Specifically, in a specific embodiment, S300 further includes the following steps:
[0065] S301: The sender compresses the original building data to be transmitted using the LZ77 algorithm.
[0066] S302: The sender encrypts the compressed original building data using the AES encryption algorithm and sends it to the receiver.
[0067] S303: The receiving party decrypts the received original building data encrypted by the AES encryption algorithm by using the AES decryption algorithm.
[0068] S304: The receiver decompresses the original building data decrypted by the AES decryption algorithm through the inverse process of the LZ77 algorithm to obtain the original building data sent by the sender.
[0069] Specifically, S300 also includes the following steps:
[0070] S31 : Determine a concurrency mode based on the type of encoding and decoding task and the concurrency requirement of the encoding and decoding task, wherein the concurrency mode includes a multi-threaded processing mode and an asynchronous processing mode.
[0071] Specifically, S31 also includes the following steps:
[0072] S311, split the encoding and decoding task into several tasks, each task corresponding to a separate thread.
[0073] S312: Manage each thread through a thread pool, wherein the size of the thread pool is set according to the number of CPU cores in the system and the IO intensity of the encoding and decoding tasks.
[0074] Specifically, the size of the thread pool is represented by the number of threads. For IO-intensive tasks, the number of threads can be set to about twice the number of CPU cores; for compute-intensive tasks, the number of threads can be set to the number of CPU cores plus one.
[0075] S313: partition the data to be encoded and decoded, and each thread processes data of one or more partitions.
[0076] Specifically, the asynchronous processing mode includes: using an asynchronous programming model to write encoding and decoding logic, using an event-driven approach to process encoding and decoding tasks, and introducing a message queue to implement asynchronous processing of encoding and decoding tasks.
[0077] S32, confirming the concurrent architecture, wherein the concurrent architecture includes: task splitting, thread pool management, data partitioning, synchronization and mutual exclusion.
[0078] S33, based on concurrent architecture, implements concurrent encoding and decoding logic through programming languages and frameworks.
[0079] S34, test the concurrent encoding and decoding logic to verify the correctness and performance of the concurrent encoding and decoding logic.
[0080] Specifically, when the concurrent encoding and decoding logic does not meet the preset conditions, the concurrent architecture is optimized. Those skilled in the art know that the preset conditions, i.e., the range of correctness and performance, can be adjusted according to actual needs, which falls within the scope of protection of the present invention and will not be repeated here.
[0081] Furthermore, those skilled in the art know that the selection of optimization processing methods can be carried out according to actual needs, all of which fall within the scope of protection of the present invention and will not be repeated here, such as adjusting the thread pool size, optimizing the data partitioning strategy, etc.
[0082] From the above content, it can be seen that by setting up a real-time communication protocol, real-time data interaction between the BIM main model and each sub-model is guaranteed, instant synchronous update of design data is achieved, and the accuracy of BIM data is improved.
[0083] S400: Setting data mapping rules corresponding to each BIM sub-model, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic and error handling strategy.
[0084] S500, based on the API or plug-in provided by the BIM software, integrates event listeners in the BIM master model and each BIM sub-model to obtain building data change events.
[0085] S600, triggering the execution of the building data synchronization process according to the data mapping rules corresponding to the BIM sub-model and the acquired building data change event, wherein the building data synchronization process is to confirm the building data content and target model that need to be synchronized according to the type and scope of the building data change event, and the target model is the model acquired from the BIM main model and each BIM sub-model.
[0086] Specifically, the building data synchronization process can be understood as: when the BIM main model data changes, the corresponding data in the BIM sub-model is changed synchronously; when the BIM sub-model data changes, the corresponding data in the BIM main model is changed synchronously.
[0087] Specifically, the building data synchronization process can automatically perform operations such as data push, pull, and merge to ensure that the data between the main model and the sub-model remains consistent.
[0088] S700: confirming a conflict detection algorithm based on a rule engine, wherein conflict detection is performed on a building data change event using the conflict detection algorithm.
[0089] Specifically, S700 also includes the following steps: Figure 3 As shown:
[0090] S701 , confirming several conflict monitoring algorithms based on business requirements, wherein the conflict monitoring algorithms are conditional judgments based on data or regular expressions based on business logic.
[0091] S702: Acquire target data related to conflict detection, wherein the target data includes records in a database, objects in a memory, and responses from an external system.
[0092] S703 , using a rule engine to match the conflict monitoring algorithm with the target data to obtain a target detection rule, wherein the target detection rule is a rule that is obtained from the conflict monitoring algorithm and can trigger a conflict.
[0093] S704: Identify building data change events according to target detection rules, obtain target conflicts in the building data change events, and resolve the target conflicts, wherein the target conflicts include data level and business logic level.
[0094] Specifically, for example, two orders attempt to occupy the same inventory at the data level, and two approval processes have mutually exclusive conditions at the logical level.
[0095] Specifically, the method for resolving target conflicts includes manual strategies and automatic strategies. The manual strategy provides users with operation options such as modifying data, merging data, and deleting data. The automatic strategy is formulated based on business rules, priorities, and resource availability factors, such as undoing operations, adjusting data, notifying relevant personnel, and other solutions.
[0096] Furthermore, those skilled in the art know that the selection of automatic strategies can be performed according to actual needs, which all fall within the scope of protection of the present invention and will not be described in detail here.
[0097] S800, obtain an integrated version control system integrated into the BIM software to record change set information of each change in the version control system.
[0098] From the above, we can see that through distributed architecture design, the system stores BIM data in multiple nodes in a dispersed manner, effectively reducing the risk of data redundancy and conflict, reducing time costs, avoiding resource waste, and achieving rational resource allocation.
[0099] This embodiment 1 can obtain a BIM master model and several BIM sub-models corresponding to the BIM master model, set a real-time communication protocol, encode and decode building data using a compression algorithm and an encryption algorithm according to the protocol format corresponding to the real-time communication protocol, set data mapping rules corresponding to each BIM sub-model, integrate event listeners into the BIM master model and each BIM sub-model based on the API or plug-in provided by the BIM software to obtain building data change events, trigger the execution of the building data synchronization process based on the data mapping rules corresponding to the BIM sub-model and the obtained building data change events, confirm the conflict detection algorithm based on the rule engine, obtain the integrated version control system and integrate it into the BIM software to record the change set information of each change in the version control system. It can be seen that through the distributed architecture design, the system stores BIM data in a dispersed manner on multiple nodes, effectively reducing the risk of data redundancy and conflict, reducing time costs, avoiding resource waste, and achieving reasonable resource allocation. At the same time, by setting a real-time communication protocol, real-time data interaction between the BIM master model and each sub-model is guaranteed, achieving instant synchronous update of design data, and improving the accuracy of BIM data.
[0100] Example 2:
[0101] like Figure 4 As shown, this embodiment provides a device for synchronizing data based on a BIM model, the device comprising:
[0102] The first execution module 1 is used to obtain a BIM main model and several BIM sub-models corresponding to the BIM main model, wherein the BIM sub-models include specific part models obtained from the BIM main model and information on professional fields corresponding to the specific part models.
[0103] Specifically, the BIM sub-model can be understood as a refinement of a specific part of the main model, such as the structural model, electromechanical model, curtain wall model, etc. Each sub-model inherits some basic data from the main model, such as spatial location and building outline, to ensure the consistency and coordination of all models in physical space. While inheriting the basic data of the main model, the sub-model also adds detailed information in the professional field corresponding to the inherited part of the main model, such as the size, material, and load of structural components, or the model, location, and pipeline layout of electromechanical equipment. These detailed information may only exist in the form of summary or reference in the main model, but are fully described in the sub-model.
[0104] Specifically, the BIM master model is divided based on data structure, wherein the data structure is confirmed based on the type corresponding to the building data, for example: project level, building level, system level, component level and other data structures.
[0105] Specifically, the first execution module 1 further includes:
[0106] The first acquisition module is used to acquire a number of building elements in the BIM main model, the attributes corresponding to each building element, and the association relationship between the building elements.
[0107] Specifically, the building elements, the attributes corresponding to each building element, and the association relationships between the building elements are obtained through the automatic extraction function of the BIM software and manual settings, for example: clearly specifying which floors a certain wall is adjacent to, or which furniture and equipment a certain room contains.
[0108] The second acquisition module is used to verify the BIM master model through a specific verification tool, wherein the verification includes: BIM model integrity verification, building element attribute verification, BIM model standardization verification and building data redundancy detection.
[0109] Specifically, the integrity of the BIM model is to ensure that all necessary model components (such as walls, floor slabs, beams and columns, etc.) have been created and correctly placed, and the standardization of the BIM model is to confirm that the BIM model complies with industry standards and modeling specifications, such as naming rules, layer settings, etc.
[0110] The third acquisition module is used to correct the abnormal data obtained through verification, wherein the abnormal data includes incomplete BIM model data, incorrect attributes of building elements, non-standard BIM model and redundant building data.
[0111] The fourth acquisition module is used to re-inspect and review using the specific verification tool to obtain the BIM master model.
[0112] The second execution module 2 is configured to set a real-time communication protocol, wherein the setting of the real-time communication protocol includes: confirming a protocol format, confirming a data transmission strategy, confirming an optimization strategy, and confirming a network adaptability mechanism.
[0113] Specifically, the protocol format includes a message header format and a message body format, wherein the message header format includes a message type, a version number, sender and receiver identifiers, and the message body format includes data content and data format.
[0114] Specifically, such as Figure 5 As shown, the second execution module 2 further includes:
[0115] The data transmission module 21 is used to transmit all data in the BIM master model to the corresponding BIM sub-model when the BIM master model establishes a connection with the BIM sub-model and performs the first data synchronization.
[0116] The differential building data acquisition module 22 is used to obtain differential building data when the BIM master model and the BIM sub-model establish a connection and it is not the first data synchronization, wherein the differential building data is the changed data obtained when any data in the BIM master model and each BIM sub-model is compared with the historical snapshot or when any data in the BIM master model and each BIM sub-model is compared with the data of the last synchronization.
[0117] The data merging and acquiring module 23 is used to send the compressed difference building data to the BIM main model or the BIM sub-model through the data transmission protocol, and merge the difference building data with the local data to update the local model.
[0118] Specifically, the data transmission protocols include TCP / IP and WebSocket.
[0119] Specifically, the optimization strategy includes a data transmission frequency optimization strategy and a bandwidth occupancy optimization strategy.
[0120] Furthermore, the data transmission frequency optimization strategy is to perform full data synchronization when the BIM main model or BIM sub-model is in idle time or low-load period, and at the same time, check and synchronize the data that has changed since the last synchronization at every preset time interval.
[0121] Furthermore, those skilled in the art know that the preset time can be selected according to actual needs, which falls within the scope of protection of the present invention and will not be described in detail here.
[0122] Specifically, the bandwidth occupancy optimization strategy is to distribute data transmission requests to multiple servers for processing, and at the same time, introduce a cache mechanism during the data transmission process to cache frequently accessed data locally or on intermediate nodes.
[0123] Furthermore, when the data needs to be accessed again, it can be directly obtained from the cache without retransmission, thereby reducing bandwidth usage.
[0124] Specifically, the network adaptability mechanism includes a fault tolerance mechanism and a retransmission mechanism, wherein the mechanism includes redundancy design, error detection and recovery, and protocol layer fault tolerance.
[0125] Furthermore, the redundant design includes data redundancy and equipment redundancy. The data redundancy uses coding technology to add redundant information to the data, and the equipment redundancy is achieved by deploying spare devices, such as coding technology such as error correction codes, and spare devices such as routers.
[0126] Furthermore, the error detection and recovery is to detect errors in data transmission using a checksum or CRC method, and request data retransmission or switch to a backup device after detecting an error to restore normal data transmission or service.
[0127] Furthermore, the protocol layer fault tolerance includes implementing fault tolerance mechanisms at different layers of the network protocol, such as the data link layer, the network layer, the transport layer, and other different layers.
[0128] Specifically, those skilled in the art know that any retransmission mechanism setting in the prior art falls within the protection scope of the present invention and will not be described in detail here.
[0129] The third execution module 3 is used to encode and decode the building data through a compression algorithm and an encryption algorithm according to the protocol format corresponding to the real-time communication protocol.
[0130] Specifically, in a specific embodiment, the third execution module 3 further includes:
[0131] The first intermediate module is used by the sender to compress the original building data to be transmitted using the LZ77 algorithm.
[0132] The second intermediate module is used by the sender to encrypt the compressed original building data using the AES encryption algorithm and then send it to the receiver.
[0133] The third intermediate module is used for the receiver to decrypt the original building data encrypted by the AES encryption algorithm using the AES decryption algorithm.
[0134] The fourth intermediate module is used for the receiver to decompress the original building data decrypted by the AES decryption algorithm through the inverse process of the LZ77 algorithm to obtain the original building data sent by the sender.
[0135] Specifically, the third execution module 3 further includes:
[0136] The concurrent mode acquisition module is used to determine the concurrent mode based on the type of encoding and decoding tasks and the concurrency requirements of the encoding and decoding tasks, wherein the concurrent mode includes a multi-threaded processing mode and an asynchronous processing mode.
[0137] Specifically, the concurrent mode acquisition module further includes:
[0138] The first key module is used to split the encoding and decoding task into several tasks, each task corresponding to a separate thread.
[0139] The second key module is used to manage each thread through a thread pool, wherein the size of the thread pool is set according to the number of CPU cores in the system and the IO intensity of the encoding and decoding tasks.
[0140] Specifically, the size of the thread pool is represented by the number of threads. For IO-intensive tasks, the number of threads can be set to about twice the number of CPU cores; for compute-intensive tasks, the number of threads can be set to the number of CPU cores plus one.
[0141] The third key module is used to partition the data to be encoded and decoded, and each thread processes data from one or more partitions.
[0142] Specifically, the asynchronous processing mode includes: using an asynchronous programming model to write encoding and decoding logic, using an event-driven approach to process encoding and decoding tasks, and introducing a message queue to implement asynchronous processing of encoding and decoding tasks.
[0143] The concurrent architecture acquisition module is used to confirm the concurrent architecture, wherein the concurrent architecture includes: task splitting, thread pool management, data partitioning, synchronization and mutual exclusion.
[0144] The encoding and decoding logic acquisition module is used to implement concurrent encoding and decoding logic based on a concurrent architecture through programming languages and frameworks.
[0145] The codec logic verification module is used to test the concurrent codec logic and verify its correctness and performance. Specifically, when the concurrent codec logic does not meet the preset conditions, the concurrent architecture is optimized. Those skilled in the art will appreciate that the preset conditions, i.e., correctness and performance, can be adjusted based on actual needs, and all of this falls within the scope of protection of the present invention and will not be further described here.
[0146] Furthermore, those skilled in the art know that the selection of optimization processing methods can be carried out according to actual needs, all of which fall within the scope of protection of the present invention and will not be repeated here, such as adjusting the thread pool size, optimizing the data partitioning strategy, etc.
[0147] From the above content, it can be seen that by setting up a real-time communication protocol, real-time data interaction between the BIM main model and each sub-model is guaranteed, instant synchronous update of design data is achieved, and the accuracy of BIM data is improved.
[0148] The fourth execution module 4 is used to set data mapping rules corresponding to each BIM sub-model, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic and error handling strategy.
[0149] The fifth execution module 5 is used to integrate event listeners in the BIM main model and each BIM sub-model based on the API or plug-in provided by the BIM software to obtain building data change events.
[0150] The sixth execution module 6 is used to trigger the execution of the building data synchronization process according to the data mapping rules corresponding to the BIM sub-model and the acquired building data change event, wherein the building data synchronization process is to confirm the building data content and target model that need to be synchronized according to the type and scope of the building data change event, and the target model is the model acquired from the BIM main model and each BIM sub-model.
[0151] Specifically, the building data synchronization process can be understood as: when the BIM main model data changes, the corresponding data in the BIM sub-model is changed synchronously; when the BIM sub-model data changes, the corresponding data in the BIM main model is changed synchronously.
[0152] Specifically, the building data synchronization process can automatically perform operations such as data push, pull, and merge to ensure that the data between the main model and the sub-model remains consistent.
[0153] The seventh execution module 7 is used to confirm the conflict detection algorithm based on the rule engine, wherein the conflict detection is performed on the building data change event through the conflict detection algorithm.
[0154] Specifically, such as Figure 6As shown, the seventh execution module 7 further includes:
[0155] The conflict monitoring algorithm acquisition module 71 is used to confirm a number of conflict monitoring algorithms based on business requirements, wherein the conflict monitoring algorithms are conditional judgments based on data or regular expressions based on business logic.
[0156] The target data acquisition module 72 is used to acquire target data related to conflict detection, wherein the target data includes records in the database, objects in the memory, and responses from the external system.
[0157] The target detection rule acquisition module 73 is used to use a rule engine to match the conflict monitoring algorithm with the target data to obtain a target detection rule, wherein the target detection rule is a rule that can trigger a conflict and is obtained from the conflict monitoring algorithm.
[0158] The conflict identification module 74 is used to identify building data change events according to target detection rules, obtain target conflicts in building data change events and resolve target conflicts, wherein the target conflicts include data level and business logic level.
[0159] Specifically, for example, two orders attempt to occupy the same inventory at the data level, and two approval processes have mutually exclusive conditions at the logical level.
[0160] Specifically, the method for resolving target conflicts includes manual strategies and automatic strategies. The manual strategy provides users with operation options such as modifying data, merging data, and deleting data. The automatic strategy is formulated based on business rules, priorities, and resource availability factors, such as undoing operations, adjusting data, notifying relevant personnel, and other solutions.
[0161] Furthermore, those skilled in the art know that the selection of automatic strategies can be performed according to actual needs, which all fall within the scope of protection of the present invention and will not be described in detail here.
[0162] The eighth execution module 8 is used to obtain an integrated version control system integrated into the BIM software to record the change set information of each change in the version control system.
[0163] From the above, we can see that through distributed architecture design, the system stores BIM data in multiple nodes in a dispersed manner, effectively reducing the risk of data redundancy and conflict, reducing time costs, avoiding resource waste, and achieving rational resource allocation.
[0164] Example 3,
[0165] An embodiment of the present invention provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the steps:
[0166] A BIM master model and several BIM sub-models corresponding to the BIM master model are obtained, wherein the BIM sub-models include specific part models obtained from the BIM master model and information on professional fields corresponding to the specific part models.
[0167] Setting a real-time communication protocol, wherein setting the real-time communication protocol includes: confirming a protocol format, confirming a data transmission strategy, confirming an optimization strategy, and confirming a network adaptability mechanism.
[0168] According to the protocol format corresponding to the real-time communication protocol, the building data is encoded and decoded through compression algorithm and encryption algorithm.
[0169] Data mapping rules corresponding to each BIM sub-model are set, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic and error handling strategy.
[0170] Based on the API or plug-in provided by the BIM software, event listeners are integrated in the BIM master model and each BIM sub-model to obtain building data change events.
[0171] According to the data mapping rules corresponding to the BIM sub-model and the acquired building data change events, the building data synchronization process is triggered and executed, wherein the building data synchronization process is to confirm the building data content and target model that need to be synchronized according to the type and scope of the building data change event. The target model is the model acquired from the BIM main model and each BIM sub-model.
[0172] The conflict detection algorithm is confirmed based on the rule engine, wherein the conflict detection algorithm is a conditional judgment based on data or a regular expression based on business logic.
[0173] Get integrated version control system into BIM software to record change set information for each change in the version control system.
[0174] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0175] Those skilled in the art will clearly understand that for the sake of convenience and brevity in description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0176] Example 4:
[0177] An embodiment of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium in the third embodiment of the present invention.
[0178] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as a preferred embodiment as above, it is not intended to limit the present invention. Any technician familiar with the present profession can make some changes or modifications to equivalent embodiments of the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for synchronizing data based on a BIM model, characterized in that: The method comprises the following steps: Acquire a BIM master model and several BIM sub-models corresponding to the BIM master model, wherein the BIM sub-models include specific part models acquired from the BIM master model and information on professional fields corresponding to the specific part models; Setting a real-time communication protocol, wherein the setting of the real-time communication protocol includes: confirming the protocol format, confirming the data transmission strategy, confirming the optimization strategy and confirming the network adaptability mechanism, wherein the optimization strategy includes the data transmission frequency optimization strategy and the broadband occupancy optimization strategy, wherein the data transmission frequency optimization strategy is to synchronize the entire data when the BIM main model or the BIM sub-model is in idle time or low-load period, and at the same time, check and synchronize the data that has changed since the last synchronization at every preset time interval, and the broadband occupancy optimization strategy is to disperse the data transmission request to multiple servers for processing, and at the same time, introduce a cache mechanism in the data transmission process to cache frequently accessed data locally or intermediate nodes, the network adaptability mechanism includes a fault tolerance mechanism and a retransmission mechanism, the fault tolerance mechanism includes redundancy design, error detection and recovery, and protocol layer fault tolerance, the redundancy design includes data redundancy and device redundancy, the data redundancy uses coding technology to add redundant information to the data, the device redundancy is achieved by deploying spare devices, the error detection and recovery uses a checksum or CRC method to detect errors in data transmission, and after detecting an error, requests data retransmission or switches to a spare device to restore normal data transmission or service, the protocol layer fault tolerance includes implementing fault tolerance mechanisms at different levels of the network protocol, and setting the data transmission strategy in the real-time communication protocol includes the following steps: When the BIM master model and the BIM sub-model are connected and synchronized for the first time, all data in the BIM master model will be transferred to the corresponding BIM sub-model; When the connection between the BIM master model and the BIM sub-model is established but it is not the first data synchronization, differential building data is obtained, wherein the differential building data is the changed data obtained when any data in the BIM master model and each BIM sub-model is compared with the historical snapshot or when any data in the BIM master model and each BIM sub-model is compared with the data of the last synchronization; The compressed differential building data is sent to the BIM master model or BIM sub-model via a data transmission protocol, and the differential building data and local data are merged to update the local model; According to the protocol format corresponding to the real-time communication protocol, the building data is encoded and decoded using a compression algorithm and an encryption algorithm, wherein encoding and decoding the building data using the compression algorithm and the encryption algorithm includes the following steps: The sender compresses the original building data to be transmitted using the LZ77 algorithm; The sender encrypts the compressed original building data using the AES encryption algorithm and sends it to the receiver; The receiving party decrypts the original building data encrypted by the AES encryption algorithm using the AES decryption algorithm; The receiver decompresses the original building data decrypted by the AES decryption algorithm through the inverse process of the LZ77 algorithm to obtain the original building data sent by the sender. The encoding and decoding of the building data by using a compression algorithm and an encryption algorithm according to the protocol format corresponding to the real-time communication protocol further includes the following steps: Based on the type of encoding and decoding tasks and the concurrency requirements of the encoding and decoding tasks, determining a concurrency mode, wherein the concurrency mode includes a multi-threaded processing mode and an asynchronous processing mode, wherein based on the type of encoding and decoding tasks and the concurrency requirements of the encoding and decoding tasks, determining the concurrency mode further includes the following steps: Split the encoding and decoding tasks into several tasks, each task corresponds to a separate thread; Each thread is managed through a thread pool, where the size of the thread pool is set according to the number of CPU cores in the system and the IO intensity of the encoding and decoding tasks. The size of the thread pool is expressed by the number of threads; The data to be encoded and decoded is partitioned, and each thread processes the data of one or more partitions; The asynchronous processing mode includes: using an asynchronous programming model to write encoding and decoding logic, using an event-driven approach to process encoding and decoding tasks, and introducing a message queue to implement asynchronous processing of encoding and decoding tasks; Confirm the concurrent architecture, where the concurrent architecture includes: task splitting, thread pool management, data partitioning, synchronization and mutual exclusion; Based on the concurrent architecture, concurrent encoding and decoding logic is implemented through programming languages and frameworks; Test the concurrent encoding and decoding logic to verify its correctness and performance; Setting data mapping rules corresponding to each BIM sub-model, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic and error handling strategy; Based on the API or plug-in provided by the BIM software, integrate event listeners in the BIM master model and each BIM sub-model to obtain building data change events; According to the data mapping rules corresponding to the BIM sub-models and the acquired building data change events, the building data synchronization process is triggered. The building data synchronization process is to determine the building data content and target model to be synchronized based on the type and scope of the building data change events. The target model is the model acquired from the BIM master model and each BIM sub-model; Confirming a conflict detection algorithm based on a rule engine, wherein the conflict detection algorithm is a conditional judgment based on data or a regular expression based on business logic; Get integrated version control system into BIM software to record change set information for each change in the version control system.
2. The method for synchronizing data based on a BIM model according to claim 1, characterized in that: The BIM master model is divided based on a data structure, wherein the data structure is confirmed based on a type corresponding to the building data.
3. The method for synchronizing data based on a BIM model according to claim 1, characterized in that: Obtaining a BIM master model and several BIM sub-models corresponding to the BIM master model includes the following steps: Obtain several building elements in the BIM master model, the attributes corresponding to each building element, and the relationship between building elements; Verify the BIM master model using a specific verification tool, including: BIM model integrity verification, building element attribute verification, BIM model standardization verification, and building data redundancy detection; Correct the abnormal data obtained during verification; Re-check and review using the specific verification tool to obtain the BIM master model.
4. The method for synchronizing data based on a BIM model according to claim 1, characterized in that: The conflict detection algorithm based on the rule engine includes the following steps: Confirming several conflict detection algorithms based on business requirements, wherein the conflict detection algorithms are conditional judgments based on data or regular expressions based on business logic; Acquiring target data related to conflict detection, wherein the target data includes records in a database, objects in a memory, and responses from an external system; Using a rule engine to match the conflict detection algorithm with the target data to obtain a target detection rule, wherein the target detection rule is a rule that can trigger a conflict obtained from the conflict detection algorithm; Building data change events are identified according to target detection rules, target conflicts in the building data change events are obtained and the target conflicts are resolved, wherein the target conflicts include data level and business logic level.
5. A device for synchronizing data based on a BIM model, characterized in that: The device comprises: A first execution module is configured to obtain a BIM master model and a plurality of BIM sub-models corresponding to the BIM master model, wherein the BIM sub-models include specific part models obtained from the BIM master model and information on professional fields corresponding to the specific part models; The second execution module is used to set the real-time communication protocol, wherein the setting of the real-time communication protocol includes: confirming the protocol format, confirming the data transmission strategy, confirming the optimization strategy and confirming the network adaptability mechanism, wherein the optimization strategy includes the data transmission frequency optimization strategy and the broadband occupancy optimization strategy, wherein the data transmission frequency optimization strategy is to synchronize the entire data when the BIM main model or the BIM sub-model is in idle time or low load period, and at the same time, check and synchronize the data that has changed since the last synchronization at every preset time interval, and the broadband occupancy optimization strategy is to disperse the data transmission request to multiple servers for processing, and at the same time, introduce a cache mechanism in the data transmission process to synchronize the frequency. Frequently accessed data is cached locally or on an intermediate node. The network adaptability mechanism includes a fault tolerance mechanism and a retransmission mechanism. The fault tolerance mechanism includes redundancy design, error detection and recovery, and protocol layer fault tolerance. The redundancy design includes data redundancy and device redundancy. The data redundancy uses coding technology to add redundant information to the data. The device redundancy is achieved by deploying spare devices. The error detection and recovery uses a checksum or CRC method to detect errors in data transmission, and after detecting an error, requests data retransmission or switches to a spare device to restore normal data transmission or service. The protocol layer fault tolerance includes implementing fault tolerance mechanisms at different layers of the network protocol. The second execution module also includes: The data transmission module is used to transfer all data in the BIM master model to the corresponding BIM sub-model when the BIM master model and the BIM sub-model are connected and synchronized for the first time; A differential building data acquisition module is used to acquire differential building data when the connection between the BIM master model and the BIM sub-model is established but it is not the first data synchronization, wherein the differential building data is the changed data acquired when any data in the BIM master model and each BIM sub-model is compared with the historical snapshot or when any data in the BIM master model and each BIM sub-model is compared with the data of the last synchronization; A data merging and acquiring module is used to send the compressed differential building data to the BIM master model or BIM sub-model through a data transmission protocol, and merge the differential building data with the local data to update the local model; A third execution module is configured to encode and decode the building data using a compression algorithm and an encryption algorithm according to a protocol format corresponding to the real-time communication protocol, wherein the third execution module further includes: The first intermediate module is used by the sender to compress the original building data to be transmitted using the LZ77 algorithm; The second intermediate module is used by the sender to encrypt the compressed original building data using the AES encryption algorithm and then send it to the receiver; The third intermediate module is used for the receiver to decrypt the original building data encrypted by the AES encryption algorithm using the AES decryption algorithm; The fourth intermediate module is used for the receiver to decompress the original building data decrypted by the AES decryption algorithm through the inverse process of the LZ77 algorithm to obtain the original building data sent by the sender; The third execution module further includes: A concurrent mode acquisition module is used to determine the concurrent mode based on the type of encoding and decoding tasks and the concurrent requirements of the encoding and decoding tasks, wherein the concurrent mode includes a multi-threaded processing mode and an asynchronous processing mode, wherein the concurrent mode acquisition module further includes: Split the encoding and decoding tasks into several tasks, each task corresponds to a separate thread; Each thread is managed through a thread pool, where the size of the thread pool is set according to the number of CPU cores in the system and the IO intensity of the encoding and decoding tasks. The size of the thread pool is expressed by the number of threads; The data to be encoded and decoded is partitioned, and each thread processes the data of one or more partitions; The asynchronous processing mode includes: using an asynchronous programming model to write encoding and decoding logic, using an event-driven approach to process encoding and decoding tasks, and introducing a message queue to implement asynchronous processing of encoding and decoding tasks; A concurrent architecture acquisition module is used to confirm the concurrent architecture, wherein the concurrent architecture includes: task splitting, thread pool management, data partitioning, synchronization and mutual exclusion; The encoding and decoding logic acquisition module is used to implement concurrent encoding and decoding logic based on a concurrent architecture through programming languages and frameworks; The codec logic verification module is used to test the concurrent codec logic and verify the correctness and performance of the concurrent codec logic; a fourth execution module, configured to set data mapping rules corresponding to each BIM sub-model, wherein the data mapping rules include building element identification, building data type matching strategy, data conversion logic, conditional logic, and error handling strategy; The fifth execution module is used to integrate event listeners in the BIM master model and each BIM sub-model to obtain building data change events based on the API or plug-in provided by the BIM software; a sixth execution module, configured to trigger execution of a building data synchronization process based on data mapping rules corresponding to the BIM sub-models and the acquired building data change events, wherein the building data synchronization process is to determine the building data content and target model to be synchronized based on the type and scope of the building data change events, wherein the target model is a model acquired from the BIM master model and each BIM sub-model; a seventh execution module, configured to confirm a conflict detection algorithm based on a rule engine, wherein conflict detection is performed on the building data change event by the conflict detection algorithm; The eighth execution module is used to obtain an integrated version control system integrated into the BIM software to record the change set information of each change in the version control system.
6. The device for synchronizing data based on a BIM model according to claim 5, characterized in that: The BIM master model is divided based on a data structure, wherein the data structure is confirmed based on a type corresponding to the building data.
7. The device for synchronizing data based on a BIM model according to claim 5, characterized in that: The first execution module further includes: The first acquisition module is used to obtain a number of building elements in the BIM master model, the attributes corresponding to each building element, and the association relationship between the building elements; The second acquisition module is used to verify the BIM master model using a specific verification tool, wherein the verification includes: BIM model integrity verification, building element attribute verification, BIM model standardization verification, and building data redundancy detection; A third acquisition module is used to correct abnormal data obtained through verification, wherein the abnormal data includes incomplete BIM model data, incorrect attributes of building elements, non-standard BIM model data, and redundant building data; The fourth acquisition module is used to re-inspect and review using the specific verification tool to obtain the BIM master model.
8. The device for synchronizing data based on a BIM model according to claim 5, characterized in that: The seventh execution module further includes: A conflict detection algorithm acquisition module is used to confirm several conflict detection algorithms based on business requirements, wherein the conflict detection algorithm is a conditional judgment based on data or a regular expression based on business logic; A target data acquisition module, configured to acquire target data related to conflict detection, wherein the target data includes records in a database, objects in memory, and responses from an external system; A target detection rule acquisition module is used to use a rule engine to match the conflict detection algorithm with the target data to obtain a target detection rule, wherein the target detection rule is a rule that can trigger a conflict obtained from the conflict detection algorithm; The conflict identification module is used to identify building data change events according to target detection rules, obtain target conflicts in building data change events and resolve target conflicts, wherein the target conflicts include data level and business logic level.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the method for synchronizing data based on a BIM model as described in any one of claims 1 to 4.
10. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Multi-node task asynchronous cooperative processing method
CN111309458A
Lithium ion battery thermal runaway detection and inhibition method
CN117199588A