Plug-in BIM model checking method and device
Through plug-in architecture and SPARQL query methods, the difficulty in developing and updating complex computational rules in the existing technology is solved, and the automation and flexibility of BIM model inspection is realized.
Patent Information
- Application Number
- CN202111412359.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-11-25
AI Technical Summary
The existing technology is difficult to effectively develop and update complex computational rules, resulting in frequent modification of the BIM model check engine kernel and cumbersome operation.
Using a plug-in architecture, by parsing SNL-based rule files, determining the plug-in identity and embedding it in the original inspection engine, using SPARQL statements to query the architectural semantic model, and reflecting the plug-in to realize the calculation of computational rules.
It realizes the automatic operation of the computational rule plug-in without changing the original inspection process, simplifying the development, update and expansion of rules and reducing operational complexity.
Smart Images

Figure CN114064696B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of building technology, and in particular to a plug-in type BIM model checking method and device. Background Art
[0002] BIM (Building Information Model) is a technology for building information applications based on three-dimensional models. It can be effectively applied to the planning, design, construction, and management of buildings and infrastructure. It is one of the most promising technologies in the building, engineering, and construction stages. In the process of promoting and implementing BIM technology, implementing building specification review based on BIM models plays an important role in promoting the progress and development of the BIM industry.
[0003] In the related art, the building code review tool BIMChecker can be used to review the BIM model to determine whether the building corresponding to the BIM model complies with the code. Figure 1 As shown, the BIMChecker tool is mainly composed of a rule base construction sub-tool, a semantic model conversion module, a BIM model checking engine and an output display module. The rule base construction sub-tool is used to provide users with an interface for writing natural language building code clauses into SNL (Structural Natural Language, building code description language) rules that are easy for computers to parse and execute, so that users can write SNL rules (which can be written with reference to the domain database), and automatically convert the SNL rules written by users into SPARQL statements for query. The semantic model conversion module is used to perform semantic extraction on the BIM model and obtain an OWL (Web Ontology Language, network ontology language) model containing the semantic content of the model. The BIM model checking engine is used to query the OWL model through SPARQL statements to determine whether the building meets the specifications, and transmit it to the output display module to display the inspection results.
[0004] In the application practice of existing computational rules and related clauses, computational rules are generally limited to general geometric calculations. There are 11 general computational rules built into the current engine, including proximity, distance, line relationship, spatial up and down relationship, etc. When compiling more complex SNL rules according to specifications, the existing computational rules usually cannot simply describe the content of these clauses. Or, the calculation content of the clause is highly limited and only applies to a certain specification, and there is a description conflict with other specifications. Under these conditions, computational rules are not suitable for implementation as BIMChecker inspection engine kernel modules. In addition, when construction industry companies conduct model reviews, specific geometric calculation algorithms often need to be dynamically adjusted according to the actual design content of the model. In order to meet the needs of each dynamic change, the engine kernel needs to be modified and the version re-released, which is cumbersome.
[0005] Therefore, it can be seen that how to provide a solution that is convenient for developing and updating complex computational rules is an urgent problem to be solved. Summary of the invention
[0006] The present invention provides a plug-in BIM model checking method and device, which can query whether the BIM model complies with the building code based on a computational rule plug-in that is easy to develop, update and expand. The specific technical solution is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a plug-in BIM model checking method, the method comprising:
[0008] By parsing a rule file based on a building rule description language SNL, determining a computational rule plug-in corresponding to a plug-in identifier contained in an SNL statement in the rule file, wherein the plug-in identifier is related to geometric calculation in the computational rule; the plug-in includes configuration information related to the plug-in identifier and executable geometric calculation related code;
[0009] Filling the plug-in with a preset universal code required to run the plug-in based on a target engine compatible with the original inspection engine, and parsing the preset universal code to embed the plug-in into the original inspection engine;
[0010] The building semantic model is queried by using the SPARQL statement generated by the SNL statement to obtain the model data required for the operation of the plug-in; the building semantic model is a model obtained by semantic extraction based on the building information model BIM model;
[0011] The plug-in is called according to the model data reflection to obtain the query result corresponding to the computational rule contained in the plug-in.
[0012] Optionally, by parsing a rule file based on a building rule description language SNL, determining a computational rule plug-in corresponding to a plug-in identifier included in an SNL statement in the rule file, includes:
[0013] By parsing the SNL-based rule file, it is determined whether the SNL statement contains a plug-in identifier, wherein the plug-in identifier includes a keyword determined based on the geometric calculation in the computational rule or a function defined based on the geometric calculation in the computational rule;
[0014] If the SNL statement contains a plug-in identifier, a computational rule plug-in corresponding to the plug-in identifier is searched.
[0015] Optionally, filling the plug-in with a preset universal code required to run the plug-in based on a target engine compatible with the original inspection engine, and parsing the preset universal code to embed the plug-in into the original inspection engine, including:
[0016] Supplement the plug-in class declaration related to the target engine and the functions related to the plug-in class to form a complete plug-in class;
[0017] Supplement the reference of the original inspection engine built-in object;
[0018] The plug-in class is parsed through the class loader in the target engine to generate a target object compatible with the original inspection engine.
[0019] Optionally, the method further includes:
[0020] The loading priorities of the computational rule plug-in bound to the SNL-based rule file, the global computational rule plug-in, and the original inspection engine built-in rules are reduced in sequence.
[0021] Optionally, the method further includes:
[0022] After all global computation rule plug-ins are loaded, a plug-in list containing relevant information of all global computation rule plug-ins is generated, wherein each global computation rule plug-in corresponds to a counter, and the initial value of the counter is 0;
[0023] When an inspection task is received, the counter of the global computational rule plug-in corresponding to the inspection task is increased by 1;
[0024] When it is determined that the inspection task is completed, the counter of the global computational rule plug-in corresponding to the inspection task is reduced by 1;
[0025] When loading the updated global computation rule plug-in, adding the updated global computation rule plug-in to the end of the plug-in list queue;
[0026] If it is detected that the counter of the original global computational rule plug-in corresponding to the updated global computational rule plug-in is 0, the updated global computational rule plug-in is used to execute the subsequently received inspection tasks.
[0027] Optionally, before filling the preset universal code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine, the method further includes:
[0028] Detecting whether the plug-in has a syntax error;
[0029] Filling the preset common code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine includes:
[0030] If there is no syntax error in the plug-in, the plug-in is filled with preset common codes required to run the plug-in based on a target engine compatible with the original inspection engine.
[0031] Optionally, the original inspection engine is a Java-based inspection engine, and the target engine is a Groovy engine.
[0032] In a second aspect, an embodiment of the present invention provides a plug-in BIM model checking device, the device comprising:
[0033] A determination unit is used to parse a rule file based on a building rule description language SNL to determine a computational rule plug-in corresponding to a plug-in identifier included in an SNL statement in the rule file, wherein the plug-in identifier is related to geometric calculation in the computational rule; the plug-in includes configuration information related to the plug-in identifier and executable geometric calculation related code;
[0034] an embedding unit, configured to fill the plug-in with a preset universal code required for running the plug-in based on a target engine compatible with the original inspection engine, and parse the preset universal code to embed the plug-in into the original inspection engine;
[0035] A query unit, configured to query a building semantic model through a SPARQL statement generated by the SNL statement, to obtain model data required for the operation of the plug-in; the building semantic model is a model obtained by semantic extraction based on a building information model (BIM) model;
[0036] The calling unit is used to reflectively call the plug-in according to the model data to obtain the query result corresponding to the computational rule contained in the plug-in.
[0037] Optionally, the determining unit includes:
[0038] A judgment module, used for parsing the SNL-based rule file to judge whether the SNL statement contains a plug-in identifier, wherein the plug-in identifier includes a keyword determined based on the geometric calculation in the computational rule or a function defined based on the geometric calculation in the computational rule;
[0039] A search module is used to search for a computational rule plug-in corresponding to a plug-in identifier if the SNL statement contains the plug-in identifier.
[0040] Optionally, the embedding unit includes:
[0041] A supplementary module, used to supplement the plug-in class declaration related to the target engine and the functions related to the plug-in class to form a complete plug-in class; and to supplement the references of the built-in objects of the original inspection engine;
[0042] The parsing module is used to parse the plug-in class through the class loader in the target engine to generate a target object compatible with the original inspection engine.
[0043] Optionally, the device further includes a loading unit, which is used to load in descending order of loading priority of a computational rule plug-in bound to an SNL-based rule file, a global computational rule plug-in, and a built-in rule of the original inspection engine.
[0044] Optionally, the device further comprises:
[0045] A generating unit, configured to generate a plug-in list including relevant information of all global computing rule plug-ins after all global computing rule plug-ins are loaded, wherein each global computing rule plug-in corresponds to a counter, and an initial value of the counter is 0;
[0046] A counting unit, configured to, upon receiving an inspection task, add 1 to the counter of the global computational rule plug-in corresponding to the inspection task; and, upon determining that the inspection task is completed, subtract 1 from the counter of the global computational rule plug-in corresponding to the inspection task;
[0047] An adding unit, configured to add the updated global computation rule plug-in to the end of the plug-in list when loading the updated global computation rule plug-in;
[0048] The updating unit is configured to use the updated global computational rule plug-in to execute a subsequently received inspection task if it is detected that the counter of the original global computational rule plug-in corresponding to the updated global computational rule plug-in is 0.
[0049] Optionally, the device further comprises:
[0050] a detection unit, configured to detect whether the plug-in has a syntax error before filling the plug-in with a preset common code required to run the plug-in based on a target engine compatible with the original inspection engine;
[0051] The embedding unit is used to fill the preset common code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine if there is no syntax error in the plug-in.
[0052] Optionally, the original inspection engine is a Java-based inspection engine, and the target engine is a Groovy engine.
[0053] In a third aspect, an embodiment of the present invention provides a storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described in the first aspect.
[0054] In a fourth aspect, an embodiment of the present invention provides an electronic device, including:
[0055] one or more processors;
[0056] a storage device for storing one or more programs,
[0057] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the first aspect.
[0058] As can be seen from the above content, a plug-in BIM model checking method and device provided by an embodiment of the present invention can develop a computational rule plug-in including configuration information associated with SNL and executable geometric calculation related code. The plug-in is easy to write, update and expand, and solves the problem of difficulty in developing, updating and expanding computational rules in the prior art. The specific implementation process of checking the BIM model for the computational rule plug-in is an intelligent process, which can specifically include: by parsing the rule file based on SNL, determining the computational rule plug-in corresponding to the plug-in identifier contained in the SNL statement in the rule file; filling the preset general code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine, and parsing the preset general code to embed the plug-in into the original inspection engine; querying the building semantic model through the SPARQL statement generated by the SNL statement to obtain the model data required for the plug-in to run; calling the plug-in according to the model data reflection to obtain the query result corresponding to the computational rule contained in the plug-in. Of course, any product or method implementing the present invention does not necessarily need to achieve all the advantages described above at the same time.
[0059] The innovative features of the embodiments of the present invention include:
[0060] 1. By first embedding the computational rule plug-in into the original inspection engine, and then querying the architectural semantic model with SPARQL statements to obtain the model data required by the computational rule plug-in, and finally implementing the operation of the computational rules by calling the plug-in through reflection, the computational rule plug-in is automatically run without changing the original inspection process.
[0061] 2. To avoid errors or conflicts when loading operations with the same named rules, you can set the priorities of different rules so that the loading priorities of the computational rule plug-in bound to the SNL-based rule file, the global computational rule plug-in, and the original inspection engine built-in rules are reduced in sequence.
[0062] 3. Bind counts of all loaded plug-ins and currently executed checks, monitor the global plug-in file storage path through WatchService, and reload the plug-in when it changes. When the current task is completed and the counter returns to zero, the old version of the plug-in is completely uninstalled. This not only ensures that when the platform computational rule plug-in is modified, it will not affect the model being checked and cause inconsistent results, but also ensures that the newly submitted model can use the latest version of the global plug-in for model checking in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.
[0064] Figure 1 A schematic diagram of a building code review tool structure provided for the prior art;
[0065] Figure 2 A flow chart of a plug-in BIM model checking method provided by an embodiment of the present invention;
[0066] Figure 3 A schematic diagram of a flow chart of embedding a plug-in into an original inspection flow provided by an embodiment of the present invention;
[0067] Figure 4 A schematic diagram of a parsing and execution plug-in provided by an embodiment of the present invention;
[0068] Figure 5 A schematic diagram of a computational rule plug-in and built-in rule priorities provided by an embodiment of the present invention;
[0069] Figure 6A flowchart of a computational rule plug-in and a built-in rule loading method provided by an embodiment of the present invention;
[0070] Figure 7 A schematic diagram of a plug-in syntax structure provided by an embodiment of the present invention;
[0071] Figure 8 A schematic diagram of a content function interface provided by a plug-in provided in an embodiment of the present invention;
[0072] Fig. 9 An overall architecture diagram of a BIM model intelligent inspection engine platform system provided by an embodiment of the present invention;
[0073] Fig.10 A functional module block diagram of a BIM model intelligent inspection engine platform system provided by an embodiment of the present invention;
[0074] Fig.11 A structural schematic diagram of a plug-in type BIM model checking device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0075] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0076] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0077] The present invention provides a plug-in BIM model checking method and device, which can query whether the BIM model complies with the building code based on a computational rule plug-in that is easy to develop, update and expand. The method provided by the embodiment of the present invention can be applied to any electronic device with computing capabilities, which can be a terminal or a server. In one implementation, the functional software implementing the method can exist in the form of a separate client software, or in the form of a plug-in of currently related client software, which is possible.
[0078] The embodiments of the present invention are described in detail below.
[0079] Figure 2 A flow chart of a plug-in BIM model checking method provided by an embodiment of the present invention. The method may include the following steps:
[0080] S100: Determine the computational rule plug-in corresponding to the plug-in identifier included in the SNL statement in the rule file by parsing the SNL-based rule file.
[0081] Structurally, SNL can be divided into simple sentences, complex sentences and conditional sentences.
[0082] Simple sentence = (prefix noun phrase (suffix noun phrase ((<and>|<or>) suffix noun phrase)*)|(prefix noun verb phrase ((<and>|<or>) verb phrase)*))
[0083] Complex sentence = simple sentence (<and> simple sentence)*
[0084] Conditional Sentences <if>(compound conditional sentence | there is a conditional sentence)
[0085] <then>(compound conditional sentence | there is a conditional sentence)
[0086] For example, the following text 1 is a general rule sample based on SNL, and text 2 is a SNL rule sample involving geometric calculations. It can be observed from the samples that SNL is easy to understand and can basically be read smoothly according to the word order of Chinese.
[0087] Text 1
[0088]
[0089] Text 2
[0090]
[0091] The plug-in identifier is related to the geometric calculation in the computational rule. The plug-in includes configuration information related to the plug-in identifier and executable geometric calculation related code. Specifically, the SNL-based rule file can be parsed to determine whether the SNL statement contains a plug-in identifier, and the plug-in identifier includes keywords determined based on the geometric calculation in the computational rule or a customized function based on the geometric calculation in the computational rule; if the SNL statement contains a plug-in identifier, the computational rule plug-in corresponding to the plug-in identifier is searched; if there is no plug-in identifier in the SNL statement, it is determined that the rule file has no associated computational rule plug-in.
[0092] Among them, there are mainly two types of keywords. For the first type, for example, if the SNL statement is "If the building has bedrooms, then the local clear height of the bedrooms>2100", "local clear height" can be configured as a calculation rule plug-in keyword, CP key = "local clear height". For the second category, for example, when special distance calculation is required and the engine's built-in (minimum / maximum) (horizontal / vertical) distance rules cannot meet the requirements, the "AB special distance" format can be defined as the calculation rule keyword. For example, if the SNL statement is "If the building has rooms, then the room-toilet special distance of the room is <100", the "AB special distance" keyword configured by the user will be used as one of the plug-in writing contents, recorded as CP key = "AB special distance".
[0093] For custom functions, a completely free keyword parsing interface can be provided, which can be implemented by users based on regular expressions, etc., denoted as CP func .
[0094] After determining the rule plug-in keywords provided by the user, the judgment of the computational rule plug-in can be targeted at keywords or custom judgment functions. After parsing the SNL statement, for each plug-in identifier, the SNL simple sentences for the plug-in are filtered out in order, and finally the SNL list that needs to call the external plug-in is obtained. It should be noted here that since the user provides multiple plug-in keywords CP key Or decision function CP func There is an order, so in the embodiment of the present invention, the plug-in file storage order is used for processing, that is, the plug-in with a higher order has a higher priority and is processed first. Under normal circumstances, users should avoid multiple plug-ins with the same keywords. After the plug-in is determined, the subject of the geometric calculation (hereinafter referred to as the entity) can also be extracted from the SNL statement according to the plug-in identifier for subsequent query use.
[0095] Below is the pseudo code for the above plugin determination and entity extraction algorithm.
[0096] Input: plugin_list computational rule plugin code text list, snl_list rule statement list
[0097] Output: snl_judge_map rule statement and plugin mapping table
[0098] 1: function plugin_judge(plugin_list,snl_list)
[0099] 2: judge_func_list = [] / / judgement function generated by high-order function
[0100] 3: snl_judge_map = {} / / Mapping of snl statements and plug-ins
[0101] 4: for plugin_text in plugin_list
[0102] 5: / / Plugin custom judgment function (Class III)
[0103] 6: custom_func←extract_judge_func(plugin_text)
[0104] 7: if text not null then
[0105] 8:judge_list.push(custom_func)
[0106] 9: else
[0107] 10: / / Plugin determination name (Type I, II)
[0108] 11:judge_list.push(text_judge(extract_judge_text(plugin_text)))
[0109] 12: end if
[0110] 13: for snl in snl_list
[0111] 14: for judge_func in judge_func_list
[0112] 15: is_computational←judge_func(snl)
[0113] 16: if is_computational then
[0114] 17: snl_judge_map.put(snl,judge_func)
[0115] 18: end if
[0116] 19: return snl_judge_map
[0117] 20: end function
[0118] S110: Filling the preset common code required to run the plug-in in the plug-in based on a target engine compatible with the original inspection engine, and parsing the preset common code to embed the plug-in into the original inspection engine.
[0119] After successfully determining the plug-in, the content of the plug-in needs to be embedded into the original inspection process. The specific embedding process includes: supplementing the plug-in class declaration related to the target engine and the functions related to the plug-in class to form a complete plug-in class; supplementing the references of the built-in objects of the original inspection engine, exposing the models, geometric calculations, auxiliary tools and other related engine internal classes and functions to the plug-in script; parsing the plug-in class through the class loader in the target engine to generate a target object compatible with the original inspection engine.
[0120] The target engine is an engine that is syntax-compatible with the original inspection engine. For example, when the original inspection engine is a Java-based inspection engine, the target engine may be a Groovy engine, the class loader in the target engine may be a GroovyClassLoader, and the target object may be a Java Class object.
[0121] Optionally, when errors exist in the plug-in content written by the user, computational rule checking for the building information model cannot be performed normally based on the plug-in. Therefore, before filling the preset common code required to run the plug-in in the plug-in based on a target engine compatible with the original check engine, it is possible to first detect whether the plug-in has syntax errors; if the plug-in does not have syntax errors, the preset common code required to run the plug-in is filled in the plug-in based on the target engine compatible with the original check engine; if the plug-in has syntax errors, a syntax error prompt message can be output so that the user can make corrections.
[0122] To sum up, combined with the syntax checking steps, the process of embedding the plug-in into the original checking process can be as follows: Figure 3 As shown in the figure, the reading plug-in can utilize the SNL parsing module of the BIMChecker intelligent inspection engine core, the built-in geometry processing module can be used to supplement the built-in object reference of the engine, and the cache loading standby of the plug-in can utilize the built-in computational rule operation module.
[0123] S120: querying the building semantic model through the SPARQL statement generated by the SNL statement to obtain the model data required for the plug-in to run.
[0124] The building semantic model is a model obtained by semantic extraction based on the building information model BIM model, such as the OWL (Web Ontology Language) model. After the plug-in is embedded in the original inspection process, the actual usage data of the plug-in (i.e., model data) can be extracted and processed first, and then the algorithm of the plug-in can be parsed and executed. The following is an analysis of the actual usage data required by the plug-in:
[0125] For built-in computational rules, the original inspection engine kernel will use the built-in computational rule framework to convert a rule such as "If S if and Then S then and "The rule paradigm shown in this article is transformed into an equivalent formula through multiple steps.
[0126] On this basis, in the external computational rule plug-in, in order to ensure the correctness of the original process, the computational rule plug-in should try not to modify the original process, only focus on the simple sentence where the computational rule is located, and reference the data required by the current computational rule when necessary. This design can process built-in rules and external plug-ins in the same process. The above formula can be divided into pure semantic query and computational rule processing parts by whether Sifcomp is included. At this time, the component data before entering the computational rule can be obtained through the engine SPARQL query, and the corresponding query-related internal data can also be directly obtained. After screening, the data exposed to the computational rule plug-in is shown in Table 1.
[0127] Table 1
[0128]
[0129] In this table, the most important data is the component ID or ID tuple that the plug-in needs to process, that is, the result of splitting the semantic query part of the SNL conditional sentence before entering the computational rule plug-in. The entity data is the entity list extracted from the plug-in by the engine according to the entity extraction method mentioned in S100, which is convenient for comparing the ID data. The Simple clause is a simple SNL sentence containing the current computational rule, or it can be overloaded as the entire SNL statement structure, which can be used by complex scenario plug-ins. SPLVars is also the corresponding component variable name when providing advanced SPARQL query functions, which is convenient for quickly constructing SPARQL statements.
[0130] In summary, the most important input data for the actual plug-in is the component list related to the calculation rules. Most customized requirements can be solved by querying and calculating the component list with specific geometric data. The rest of the data is optional, and specific plug-ins can be developed in depth when there are special needs.
[0131] S130: Reflectively calling the plug-in according to the model data to obtain query results corresponding to the computational rules included in the plug-in.
[0132] After determining the data extraction method of the plug-in and obtaining the data required by the computational rule plug-in, the key plug-in algorithm parsing execution part is reached. The purpose of using the Groovy scripting language in the embodiment of the present invention is to compile the plug-in written by the user and completely place it in the JVM environment of the running engine, reducing the overhead such as data transmission, and at the same time, taking advantage of the script form, the user can still call external programs for calculation. The above step S110 has mentioned the overall embedding process, such as Figure 4 The figure shows the process of using GroovyClassLoader to parse the plug-in algorithm script. With the advantages of Groovy language design, the engine can directly generate Class bytecode. The computational rule processing process directly constructs objects through Class, directly calls the calculation method through reflection of the extracted data, and runs the plug-in calculation process.
[0133] A plug-in BIM model checking method provided by an embodiment of the present invention can develop a computational rule plug-in including configuration information associated with SNL and executable geometric calculation related codes. The plug-in is easy to write, update and expand, and solves the problem of difficulty in developing, updating and expanding computational rules in the prior art. The specific implementation process of checking the BIM model for the computational rule plug-in is an intelligent process, which can specifically include: by parsing the rule file based on SNL, determining the computational rule plug-in corresponding to the plug-in identifier contained in the SNL statement in the rule file; filling the preset general code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine, and parsing the preset general code to embed the plug-in into the original inspection engine; querying the building semantic model through the SPARQL statement generated by the SNL statement to obtain the model data required for the plug-in to run; calling the plug-in according to the model data reflection to obtain the query result corresponding to the computational rule contained in the plug-in.
[0134] In one embodiment, a major advantage of computational rule plug-ins is that the scope can exist independently of the engine kernel. However, after being separated from the kernel, there are multiple options for the placement of the plug-in, and the corresponding scope of action is also different. The specifications existing within different enterprises, or the different understandings of the same specification by different enterprises, will cause inconsistencies in the final SNL rule compilation. For computational rule plug-ins that are strongly related to individual rules, they can be highly bound to SNL rules. And for different understandings of certain concepts by different local governments or enterprises themselves, or different threshold requirements for certain basic computational rule calculations such as distance, these semi-universal computational rule plug-ins can be used as global plug-ins.
[0135] Therefore, computational rules and their plug-ins are a three-layer structure, such as Figure 5 As shown. The loading priorities of the computational rule plug-in bound to the SNL-based rule file, the global computational rule plug-in, and the original inspection engine built-in rules are lowered in sequence. When there are rules with duplicate names, a high-priority implementation needs to be adopted. In this case, enterprises and end users can overwrite the original implementation with self-written computational rule plug-ins.
[0136] The logic for handling plugin loading is as follows Figure 6 As shown. When the platform starts, the global calculation rule plug-in will be read and loaded. When the model is uploaded and reviewed with the specification, the calculation rule plug-in text recorded in the uploaded SNL file is read and loaded. When processing the calculation rule, the plug-in items bound in SNL are searched first. If they cannot be found, the global plug-in loaded from the platform is searched, and finally the calculation rule built into the BC (i.e. BIMChecker) engine is searched. If the corresponding calculation rule cannot be found in the end, an error will be reported for the single rule, and the remaining checks will continue.
[0137] In one embodiment, related to the plug-in scope proposed above, the dynamic characteristics of the plug-in will also bring about update-related problems. Among them, the plug-in attached to the SNL file can be updated when the SNL file is modified. The built-in rules of the engine are as universal and stable as possible, and can only be updated when a new version is redeployed. The global plug-in between the two is equivalent to a compromise option, which does not need to be bound to each SNL, nor does it need to update the version and redeploy the entire platform. The resulting problem is that the global plug-in needs to support hot updates to reflect its advantages of universality and freedom of update.
[0138] The global plug-in hot update method proposed in the embodiment of the present invention is briefly introduced as follows: all loaded plug-ins are bound to the currently executed inspection and counted, and the global plug-in file storage path is monitored through WatchService. When the plug-in changes, it is reloaded. When the current task is completed and the counter is reset to zero, the old version plug-in is completely uninstalled. Specifically, after all global computational rule plug-ins are loaded, a plug-in list containing all global computational rule plug-in related information can be generated, wherein each global computational rule plug-in corresponds to a counter, and the initial value of the counter is 0; when the inspection task is received, the counter of the global computational rule plug-in corresponding to the inspection task is increased by 1; when it is determined that the inspection task is completed, the counter of the global computational rule plug-in corresponding to the inspection task is reduced by 1; when the updated global computational rule plug-in is loaded, the updated global computational rule plug-in is added to the end of the plug-in list; if it is detected that the counter of the original global computational rule plug-in corresponding to the updated global computational rule plug-in is 0, the updated global computational rule plug-in is used to execute the subsequent received inspection tasks.
[0139] Among them, in order to determine whether the current plug-in is an old version plug-in, it is necessary to determine whether the serial number of the plug-in in the plug-in list is less than the total number of old version plug-ins. If it is less, it is determined to be an old version plug-in. When the counter of the old version plug-in is 0, it means that the old version plug-in has no tasks to be processed. It can be uninstalled and replaced by the new version plug-in to handle subsequent inspection tasks. This ensures that when the platform computational rule plug-in is modified, it will not affect the model being checked, causing inconsistent results. At the same time, this method can ensure that the newly submitted model can use the latest version of the global plug-in for model inspection in a timely manner.
[0140] In one embodiment, in order to make the computational rule plug-in as universal as possible in both the stand-alone version and the platform side, the plug-in proposed in the embodiment of the present invention is based on a plain text script, which is convenient for being embedded in the SNL file in the form of a script, stored on the platform side, or supported as a stand-alone version in the form of a .comp file. The computational rule plug-in syntax is based on the Groovy syntax, with a small number of conventions, in the form of a DSL (Domain Specific Language) to provide a stronger secondary development capability for the inspection engine. The basic structure of the plug-in, as well as the plug-in syntax and tool functions are introduced below.
[0141] (I) Basic structure of plug-in
[0142] The plug-in exists in the basic form of readable code text. The computational rule plug-in proposed in the embodiment of the present invention is mainly divided into two parts from the functional point of view, the configuration part and the operation part. Among them, the configuration part is further divided into basic information configuration, entity extraction configuration, etc. Figure 7 The following is the basic structure of the plugin syntax. The configuration part declares the necessary and optional information such as the plugin identifier, name, and description in the form of script variables, and declares the entity extraction method in the form of string variables or functions. For the calculation part, the only restriction is the entry function compute(), which corresponds to the plugin data extraction content in the previous section. In addition, the calculation part can freely place other tool functions and other contents that need to be used. In this structure, the configuration and calculation parts also need to parse and call each other with the rule base SNL editor and the inspection engine kernel to a certain extent.
[0143] (II) Plugin syntax and tool functions
[0144] For each part of the above plug-in script, the specific syntax is introduced below.
[0145] The configuration part is shown in Text 3. The basic information syntax is designed to be concise, and a series of variables defined by strings are used to determine required and optional parameters.
[0146] Text Three
[0147]
[0148] In the plug-in judgment and entity extraction part, the plug-in judgment is based on full word matching or regular judgment, and entity extraction is divided into three categories, which can be implemented by default subject, regular extraction and custom function extraction. Text 4 is a grammar reference for various forms of judgment and entity extraction.
[0149] Text Four
[0150]
[0151] The above two parts of configuration information are separated by CONFIG START and END comments, followed by the calculation part of the plugin syntax, as described in Text 5. Among them, except for the compute() entry function which is mandatory, any tool class and function you write can be appended to the end of the plugin.
[0152] Text Five
[0153]
[0154] After clarifying the structure and specific syntax, in order to enable users to write computational rule plug-ins more conveniently, this work exposes a series of classes and methods to users that can be directly called in groovy scripts. The internal data structures and tool functions provided to users have been strictly screened, providing users with the necessary development capabilities while not exposing irrelevant data to avoid plug-ins from damaging the original data. Figure 8 The following is the data structure provided by the plug-in, which is mainly divided into rule-related and model-checking-related. The rule mainly provides the SNLSentence structure for the plug-in to use when parsing the whole sentence at an advanced level. The model-related data mainly provides semantic models, geometric models, and specification clause models. Through the exposed model-related functions, all the information of the component can be obtained during the plug-in writing stage to meet the needs of basic and advanced customized plug-in development.
[0155] In addition, due to the modification of the exposed interface, some classes and functions involved in the engine need to modify their visibility. Since the plug-in only needs to read during the model checking phase, the embodiment of the present invention adopts a data isolation method to provide only a data query interface to avoid accidental modification of the data by the plug-in and ensure the consistency of the model semantics and geometric data.
[0156] According to the above method embodiment, another embodiment of the present invention provides a BIM model intelligent inspection engine platform system, which is generally divided into a front-end model submission and inspection result display part, and a back-end platform inspection engine part. The overall software architecture is as follows: Fig. 9 As shown. Users can select the submitted model file and SNL rule base file through the web interface, and select a specific list of inspection clauses, and submit them to the platform backend for inspection. There is no need to wait online after submission. For models that take a relatively long time to check, the front-end web interface will display information such as the current inspection progress. The backend will process all models and specification data submitted by users, and during this period will process the calculation of all computational rule plug-in contents involved in SNL. After the model inspection is completed, the platform provides a front-end result display interface for users to view and download the report content.
[0157] The detailed functional module diagram of the platform implemented by the embodiment of the present invention is as follows Fig.10 As shown in the figure, the whole system is divided into the front-end display module, the front-end preprocessing module, the back-end computational rule plug-in module, and the back-end inspection engine module.
[0158] The front-end display module is used to implement the front-end interactive interface of the model checking platform. It includes the model list display interface module, the new review interface module, and the result query interface module. The three modules respectively implement all the contents from displaying the historical model checking request list stored in the current platform, to the SNL selection, model selection, and SNL clause selection interface of the new model check, and then to the detailed display interface of the submitted review results.
[0159] The front-end preprocessing module mainly includes the non-interactive interface display part of the front-end, including the front-end SNL clause content parser, the front-end model compression preprocessing module, and the data processing and upload module. The SNL clause parser module is responsible for parsing and simply displaying the SNL rule library content uploaded by the user on the front end. The model compression preprocessing module uses the DEFLATE algorithm to perform preprocessing operations such as compression on the module to be uploaded by the user. The data processing and upload module is responsible for processing all models and SNL data and communicating with the platform backend.
[0160] The backend computational rule plug-in module mainly includes the computational rule plug-in parsing module and the computational rule fusion module. The computational rule plug-in parsing module is responsible for parsing the computational rules input by the user and obtaining the required computational rule configuration and calculation logic. The computational rule fusion module is responsible for integrating the calculation of the plug-in end with the internal calculation of the engine, and fusing the error components, error values, etc., calculating the final fusion result, and finally incorporating it into the subsequent inspection report generation process.
[0161] The backend inspection engine module includes a platform multi-model inspection module, an integrity and consistency inspection module. It provides the function of multi-model simultaneous review for platformization, and then checks integrity and consistency respectively. Among them, the main goal of the integrity check is to verify whether the relevant attributes of the components involved in the clause are complete. The focus of the consistency check is whether the clause itself complies with the regulations.
[0162] The backend inspection engine is responsible for processing the BIM model, rule base file data, selected inspection clauses, inspection names and other text data provided by the frontend. At the same time, the backend needs to provide storage support for these input data and inspection result data. In terms of implementation, the backend interface is based on the Spring Boot framework and is designed in the form of RESTful API to provide support for data submission and result query of the frontend inspection. The frontend is based on React and implemented with the Axios network library as API support. A list of some key interfaces is shown in Table 2.
[0163] Table 2
[0164]
[0165]
[0166] In terms of inspection data storage, given the scale and application mode of the model, the system directly uses the file system as a way to store models and inspection clauses, and stores inspection-related metadata in JSON format. The model, inspection clause SNL, metadata, inspection results, etc. in the same inspection are stored in the same directory with UUID as the unique identifier in the form of files. Among them, the model and SNL clause files are stored in the form of original binary files, and the metadata and inspection results are stored in the form of JSON.
[0167] The following is an analysis of the computational rule plug-in using a real case:
[0168] In clause 3.6.4 of the Code for Fire Protection Design of Buildings, the calculation of "pressure relief area of plant building" is related to the plant building's length-to-width ratio, specific plant building use, etc. The calculation process is relatively complicated. The original SNL text can be simplified by using plug-ins, making it easier to update the calculation rules. The following introduces the entire plug-in from the perspective of enterprise users who conduct secondary development, from understanding, compilation to testing.
[0169] A1. Preparation of plug-in program for plant pressure relief area.
[0170] When compiling the plug-in related to pressure relief area in 3.6.4 of the fire protection specification, first read the clause again in detail. Since the original specification is too complicated in the classification of details such as factory storage materials, a typical example is used here for explanation. The formula for calculating the pressure relief area is: Among them, A is the pressure relief area, V is the volume of the plant, and C is the pressure relief ratio. The pressure relief ratio has different thresholds according to the explosive material hazard categories of the plant that have been modified in the original specification table.
[0171] When the plant's aspect ratio is greater than 3, it needs to be split into several segments with aspect ratios not greater than 3 and calculated separately. Starting with the SNL rule compilation, a series of different plant SNLs can be naturally written at this time. The following are two of them as examples:
[0172] Example 1: If the factory building's Name contains "food" or contains "leather", then the factory building's pressure relief ratio >= 0.03
[0173] Example 2: If the name of the plant contains "acetone" or contains "gasoline", then the pressure relief ratio of the plant is >= 0.11
[0174] In short, the pressure relief area refers to the total area of components that can easily "relieve pressure" during an explosion, that is, components such as doors and windows that can be "blown open". In summary, this specification refers to calculating whether the total area of doors and windows of a factory building is greater than the volume of the factory building multiplied by a coefficient related to the items in the factory building. When the factory building is too narrow and long (the aspect ratio is greater than 3), it is difficult to relieve pressure horizontally, so it needs to be split into multiple sections for separate calculations.
[0175] After designing the expected SNL statement style, users can start to select computational rule plug-in keywords. Here, using the three words "pressure relief ratio" directly as the fully matched plug-in keyword can meet the needs. According to the above plug-in syntax introduction, users can easily write the basic configuration of the plug-in and the entity extraction configuration information (non-important information such as remarks description has been omitted). The details are shown in Text 6:
[0176] Text 6
[0177]
[0178] After that, the user needs to write the specific calculation part. The calculation ideas can be naturally organized into the following steps:
[0179] a1. Automatically obtain factories that meet the screening criteria through SNL;
[0180] a2. Query and calculate the volume of the factory building through OWLModel;
[0181] a3. Query the doors and windows of the factory through the SPARQL interface;
[0182] a4. Query the area of doors and windows through OWLModel and sum them up;
[0183] a5. After calculation, compare the data in the pressure relief ratio table in the specification to determine whether the current factory building complies with the regulations and whether an error value is returned.
[0184] According to the above ideas, write the plug-in calculation part as shown in Text 7.
[0185] Text Seven
[0186]
[0187]
[0188] The plug-in for the pressure relief area of the plant is run and tested. After the plug-in is compiled, a test model is built using Revit to test the correctness of the run results. For example, a test model sample is a room of 9500mm×3500mm×4000mm, and its name is marked as "grain plant", which can correspond to the SNL of the above design. According to the specification table, the volume is 133m 2 For a grain factory, the pressure relief ratio should be 0.03. The total area calculated by extracting all doors and windows is 4.32m 2 Because its aspect ratio is less than 3, according to the above pressure relief area calculation formula, the actual pressure relief ratio C = 0.0166 < 0.03. This result does not meet the pressure relief area requirements and needs to be reported.
[0189] Compared with the original implementation, it is difficult for users to implement this specification before using the plug-in extension method in this article. One solution is to generate a large number of SNLs for different combinations of conditions. In terms of specific geometric calculations, the total component area function can be specially implemented from the perspective of engine and SNL customization. After the engine is customized, the total area of doors and windows is calculated again. However, the volume and aspect ratio of the plant need to be directly reflected in SNL through four arithmetic operations. The data in this case is then Cartesian producted with the plant category set, and the final SNL clauses will reach dozens, which is very redundant. Another solution is to implement the pressure relief ratio directly as a computational rule. Although it is theoretically feasible, this solution requires modifying the engine kernel to add built-in computational rules. Moreover, if these computational rules that are strongly related to a certain specification such as the fire protection specification are all implemented in the kernel, the kernel will be very bloated and prone to rule conflicts.
[0190] From this case, it can be found that the plug-in extension method introduced in the above embodiment can be checked without redeploying the new version of the BIMChecker engine kernel. For complex clauses, only simple rule plug-in definitions and algorithm constructions can be performed according to natural ideas. At the same time, the tool will not lose the fluent and natural ability of SNL to describe clauses, that is, SNL and computational rule plug-ins are complementary. Compared with other model checking tools that can only add clauses directly in the form of code or configuration data, the BIMChecker that implements this method has the advantages of simple writing and modification and strong customizability. In this way, the computational rules of new complex calculation clauses can be compiled and run, and the cost of deploying new rules can be effectively reduced. Finally, it can be learned from the experiment that this method still requires the plug-in writer to have a certain thinking ability similar to the SNL compilation work, and also requires a certain amount of learning. Compared with the complete inability to achieve this demand, or forcibly solving the problem through JAVA secondary development, the low difficulty of plug-in writing still has an overall advantage.
[0191] Corresponding to the above method embodiment, the embodiment of the present invention provides a plug-in BIM model checking device, such as Fig.11 As shown, the device may include:
[0192] The determining unit 20 is used to parse a rule file based on a building rule description language SNL to determine a computational rule plug-in corresponding to a plug-in identifier included in an SNL statement in the rule file, wherein the plug-in identifier is related to geometric calculation in the computational rule; the plug-in includes configuration information related to the plug-in identifier and executable geometric calculation related code;
[0193] An embedding unit 22, configured to fill the plug-in with a preset universal code required to run the plug-in based on a target engine compatible with the original inspection engine, and parse the preset universal code to embed the plug-in into the original inspection engine;
[0194] A query unit 24 is used to query a building semantic model through a SPARQL statement generated by the SNL statement to obtain model data required for the plug-in to run; the building semantic model is a model obtained by semantic extraction based on a building information model BIM model;
[0195] The calling unit 26 is used to reflectively call the plug-in according to the model data to obtain the query result corresponding to the computational rule included in the plug-in.
[0196] Optionally, the determining unit 20 includes:
[0197] A judgment module, used for parsing the SNL-based rule file to judge whether the SNL statement contains a plug-in identifier, wherein the plug-in identifier includes a keyword determined based on the geometric calculation in the computational rule or a function defined based on the geometric calculation in the computational rule;
[0198] A search module is used to search for a computational rule plug-in corresponding to a plug-in identifier if the SNL statement contains the plug-in identifier.
[0199] Optionally, the embedding unit 22 includes:
[0200] A supplementary module, used to supplement the plug-in class declaration related to the target engine and the functions related to the plug-in class to form a complete plug-in class; and to supplement the references of the built-in objects of the original inspection engine;
[0201] The parsing module is used to parse the plug-in class through the class loader in the target engine to generate a target object compatible with the original inspection engine.
[0202] Optionally, the device further includes a loading unit, which is used to load in descending order of loading priority of a computational rule plug-in bound to an SNL-based rule file, a global computational rule plug-in, and a built-in rule of the original inspection engine.
[0203] Optionally, the device further comprises:
[0204] A generating unit, configured to generate a plug-in list including relevant information of all global computing rule plug-ins after all global computing rule plug-ins are loaded, wherein each global computing rule plug-in corresponds to a counter, and an initial value of the counter is 0;
[0205] A counting unit, configured to, upon receiving an inspection task, add 1 to the counter of the global computational rule plug-in corresponding to the inspection task; and, upon determining that the inspection task is completed, subtract 1 from the counter of the global computational rule plug-in corresponding to the inspection task;
[0206] An adding unit, configured to add the updated global computation rule plug-in to the end of the plug-in list when loading the updated global computation rule plug-in;
[0207] The updating unit is configured to use the updated global computational rule plug-in to execute a subsequently received inspection task if it is detected that the counter of the original global computational rule plug-in corresponding to the updated global computational rule plug-in is 0.
[0208] Optionally, the device further comprises:
[0209] a detection unit, configured to detect whether the plug-in has a syntax error before filling the plug-in with a preset common code required to run the plug-in based on a target engine compatible with the original inspection engine;
[0210] The embedding unit is used to fill the preset universal code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine if there is no syntax error in the plug-in.
[0211] Optionally, the original inspection engine is a Java-based inspection engine, and the target engine is a Groovy engine.
[0212] Based on the above method embodiment, another embodiment of the present invention further provides a storage medium on which executable instructions are stored. When the instructions are executed by a processor, the processor implements the above method.
[0213] Based on the above method embodiment, another embodiment of the present invention further provides an electronic device, including:
[0214] one or more processors;
[0215] a storage device for storing one or more programs,
[0216] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0217] The above-mentioned system and device embodiments correspond to the method embodiments and have the same technical effects as the method embodiments. For specific descriptions, please refer to the method embodiments. The device embodiments are obtained based on the method embodiments. For specific descriptions, please refer to the method embodiment part, which will not be repeated here. It can be understood by those of ordinary skill in the art that the accompanying drawings are only schematic diagrams of one embodiment, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present invention.
[0218] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.< / then> < / if>
Claims
1. A plug-in BIM model checking method, characterized in that: The method comprises: By parsing a rule file based on a building rule description language SNL, determining a computational rule plug-in corresponding to a plug-in identifier contained in an SNL statement in the rule file, wherein the plug-in identifier is related to geometric calculation in the computational rule; the plug-in includes configuration information related to the plug-in identifier and executable geometric calculation related code; Filling the plug-in with a preset universal code required to run the plug-in based on a target engine compatible with the original inspection engine, and parsing the preset universal code to embed the plug-in into the original inspection engine; The building semantic model is queried by a SPARQL statement generated by the SNL statement to obtain the model data required for the plug-in to run; the building semantic model is a model obtained by semantic extraction based on a building information model (BIM) model; Reflectively calling the plug-in according to the model data to obtain a query result corresponding to the computational rule contained in the plug-in; The method further comprises: The loading priorities of the computational rule plug-in bound to the SNL-based rule file, the global computational rule plug-in, and the original inspection engine built-in rules are reduced in sequence; After all global computation rule plug-ins are loaded, a plug-in list containing relevant information of all global computation rule plug-ins is generated, wherein each global computation rule plug-in corresponds to a counter, and the initial value of the counter is 0; When an inspection task is received, the counter of the global computational rule plug-in corresponding to the inspection task is increased by 1; When it is determined that the inspection task is completed, the counter of the global computational rule plug-in corresponding to the inspection task is reduced by 1; When loading the updated global computation rule plug-in, adding the updated global computation rule plug-in to the end of the plug-in list queue; If it is detected that the counter of the original global computational rule plug-in corresponding to the updated global computational rule plug-in is 0, the updated global computational rule plug-in is used to execute the subsequently received inspection tasks.
2. The method according to claim 1, characterized in that By parsing a rule file based on a building rule description language SNL, determining a computational rule plug-in corresponding to a plug-in identifier included in an SNL statement in the rule file, including: By parsing the SNL-based rule file, it is determined whether the SNL statement contains a plug-in identifier, wherein the plug-in identifier includes a keyword determined based on the geometric calculation in the computational rule or a function defined based on the geometric calculation in the computational rule; If the SNL statement contains a plug-in identifier, a computational rule plug-in corresponding to the plug-in identifier is searched.
3. The method according to claim 1, characterized in that Filling a preset universal code required to run the plug-in in the plug-in based on a target engine compatible with the original inspection engine, and parsing the preset universal code to embed the plug-in into the original inspection engine, including: Supplement the plug-in class declaration related to the target engine and the functions related to the plug-in class to form a complete plug-in class; Supplement the reference of the original inspection engine built-in object; The plug-in class is parsed through the class loader in the target engine to generate a target object compatible with the original inspection engine.
4. The method according to claim 1, characterized in that Before filling the preset universal code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine, the method further includes: Detecting whether the plug-in has a syntax error; Filling the preset common code required to run the plug-in in the plug-in based on the target engine compatible with the original inspection engine includes: If there is no syntax error in the plug-in, the plug-in is filled with preset common codes required to run the plug-in based on a target engine compatible with the original inspection engine.
5. The method according to any one of claims 1 to 4, characterized in that The original inspection engine is a Java-based inspection engine, and the target engine is a Groovy engine.
6. A plug-in BIM model checking device, characterized in that: The device comprises: A determination unit is used to parse a rule file based on a building rule description language SNL to determine a computational rule plug-in corresponding to a plug-in identifier included in an SNL statement in the rule file, wherein the plug-in identifier is related to geometric calculation in the computational rule; the plug-in includes configuration information related to the plug-in identifier and executable geometric calculation related code; an embedding unit, configured to fill the plug-in with a preset universal code required for running the plug-in based on a target engine compatible with the original inspection engine, and parse the preset universal code to embed the plug-in into the original inspection engine; A query unit, configured to query a building semantic model through a SPARQL statement generated by the SNL statement, to obtain model data required for the plug-in to run; the building semantic model is a model obtained by semantic extraction based on a building information model (BIM) model; A calling unit, configured to reflectively call the plug-in according to the model data to obtain a query result corresponding to the computational rule contained in the plug-in; The device also includes a loading unit, which is used to load the computational rule plug-in bound to the SNL-based rule file, the global computational rule plug-in, and the original inspection engine built-in rule in descending order of loading priority; A generating unit, configured to generate a plug-in list including relevant information of all global computing rule plug-ins after all global computing rule plug-ins are loaded, wherein each global computing rule plug-in corresponds to a counter, and an initial value of the counter is 0; A counting unit, configured to, upon receiving an inspection task, add 1 to the counter of the global computational rule plug-in corresponding to the inspection task; and, upon determining that the inspection task is completed, subtract 1 from the counter of the global computational rule plug-in corresponding to the inspection task; An adding unit, configured to add the updated global computation rule plug-in to the end of the plug-in list when loading the updated global computation rule plug-in; The updating unit is configured to use the updated global computational rule plug-in to execute a subsequently received inspection task if it is detected that the counter of the original global computational rule plug-in corresponding to the updated global computational rule plug-in is 0.
7. A storage medium, characterized in that: Executable instructions are stored thereon, and when the instructions are executed by a processor, the processor implements the method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
BIM (Building Information Model) specification detection device and detection method based on semantic retrieval
CN107341209A
Building specification structured rule automatic generation device and method
CN111814434A