Label reasoning method and device for rule review, equipment, medium and program
By constructing a multi-dimensional and multi-level label system and logical reasoning method, the labels of engineering specification clauses are automatically generated, which solves the problems of low classification efficiency and error-proneness in the existing technology, and realizes the precise classification and efficient automatic processing of standard clauses.
Patent Information
- Application Number
- CN202510190828.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-06-17
AI Technical Summary
The existing technology lacks systematic classification methods, which leads to low classification efficiency and error-proneness in engineering specifications, and cannot meet the needs of multi-dimensional complex classification in actual scenarios.
By building a multi-dimensional and multi-level label system, combining logical reasoning and keyword matching, automatically generates the labels of clauses and SNL to achieve accurate classification and efficient automated processing of standardized clauses.
It realizes accurate classification and efficient automated processing of engineering specifications, improves classification accuracy and efficiency, and reduces the time and cost of manual classification.
Smart Images

Figure CN120162583A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of digitalization of engineering specifications, and particularly to a label reasoning method, device, equipment, medium and program for rule review. Background Art
[0002] Engineering specifications are usually formulated by national standards, industry standards or local standards, and have legal effect. They aim to standardize the management of all aspects in the engineering construction process to improve the engineering quality, enhance safety, and achieve standardized unity. Due to the ambiguity and vagueness in understanding the specification clauses described in natural language, it is difficult for machines to directly understand the clause content through the natural language description method. Therefore, the technology of specification digitalization has emerged. Specification digitalization is to convert the specification clauses from natural language description into structured language that can be understood by computers. Through specification digitalization, the clause content can be uniformly expressed in a standardized structure, eliminating the ambiguity and duality problems in understanding, and facilitating machines to understand, automatically parse and process information. In addition, specification digitalization is beneficial to compliance review. The compliance review in the field of engineering construction refers to checking whether all aspects of the project meet the specification requirements of the country, industry and local. Based on the digitalized specification clauses, combined with a review engine, automatic compliance inspection of construction drawings or BIM models can be realized, improving the accuracy, integrity and efficiency of the review work.
[0003] In the related art, in order to meet the requirement of converting the domain rules description for building specifications into structured language that can be understood by computers, SNL (Structural Natural Language) is usually adopted, that is, rules are written in structural natural language and a rule library is established. Through SNL, the clauses described in natural language can be expressed as conditional sentences or compound sentences.
[0004] However, although the related art has been able to achieve the digitalization of specification clauses to a certain extent, there are still some deficiencies in practical applications. First, the current specification digitalization technology lacks a systematic classification method and cannot meet the requirements of multi-dimensional complex classification in actual scenarios, affecting the classification accuracy and applicability. Second, the existing technology mainly relies on manual classification of specification clauses one by one, which requires a large amount of time and labor costs, and there are problems such as inconsistent judgment criteria and human operation errors, which need to be solved urgently. Summary of the Invention
[0005] This application provides a label reasoning method, device, equipment, medium and program for rule review to solve the problems of lack of systematic classification method, low efficiency and easy error in manual classification in the background art, and realizes the accurate classification and efficient automatic processing of engineering specification clauses.
[0006] The first aspect embodiment of the present application provides a label inference method for rule review, including the following steps:
[0007] Obtain at least one engineering specification clause, and convert the at least one engineering specification clause into a structured natural language format to obtain at least one rule file, where the at least one engineering specification clause is written in natural language;
[0008] Add a predefined label architecture to each rule file, and traverse each SNL in each rule file, and generate an SNL label corresponding to each SNL according to the matching result of each SNL and the predefined term set;
[0009] Infer and generate a clause label corresponding to each clause according to the SNL label corresponding to each SNL.
[0010] According to an embodiment of the present application, when inferring and generating a clause label corresponding to each clause according to the SNL label corresponding to each SNL, it further includes:
[0011] Judge whether there is a conflict between the SNL labels corresponding to multiple SNLs under the current clause;
[0012] If there is a conflict between the SNL labels corresponding to multiple SNLs under the current clause, determine the clause label corresponding to the current clause based on the predefined priority rule according to the SNL labels corresponding to multiple SNLs under the current clause, otherwise, merge the SNL labels corresponding to multiple SNLs under the current clause to obtain the clause label corresponding to the current clause.
[0013] According to an embodiment of the present application, after generating a clause label corresponding to each clause, it further includes:
[0014] Obtain the current review requirement;
[0015] Screen out the target clause and target SNL that match the current review requirement from the clause labels corresponding to each clause and the SNL labels corresponding to each SNL;
[0016] Conduct a compliance review according to the target clause and target SNL.
[0017] According to an embodiment of the present application, the generating an SNL label corresponding to each SNL according to the matching result of each SNL and the predefined term set includes:
[0018] Identify the keywords in each SNL;
[0019] Match the keywords in each SNL with the terms in the predefined term set to obtain a matching result;
[0020] Generate an SNL tag corresponding to each SNL according to the matching result.
[0021] According to an embodiment of the present application, the predefined tag architecture adopts the YAML format, and the predefined tag architecture includes at least one first-level tag, and each first-level tag includes at least one second-level tag.
[0022] According to the tag inference method for rule review in the embodiment of the present application, convert the engineering specification clauses into a structured natural language format to obtain a rule file; add the predefined tag architecture to each rule file, and traverse each SNL in each rule file, generate an SNL tag corresponding to each SNL according to the matching result of each SNL and the predefined term set, and infer and generate a clause tag corresponding to each clause. Thus, the problems of lack of a systematic classification method, low efficiency and easy error in manual classification in the background art are solved, and the accurate classification and efficient automatic processing of engineering specification clauses are realized.
[0023] An embodiment of the second aspect of the present application provides a tag inference device for rule review, including:
[0024] An acquisition module, configured to acquire at least one engineering specification clause, and convert the at least one engineering specification clause into a structured natural language format to obtain at least one rule file, wherein the at least one engineering specification clause is written in natural language;
[0025] A processing module, configured to add the predefined tag architecture to each rule file, and traverse each SNL in each rule file, and generate an SNL tag corresponding to each SNL according to the matching result of each SNL and the predefined term set;
[0026] An inference module, configured to infer and generate a clause tag corresponding to each clause according to the SNL tag corresponding to each SNL.
[0027] According to an embodiment of the present application, when inferring and generating a clause tag corresponding to each clause according to the SNL tag corresponding to each SNL, the inference module is further configured to:
[0028] Determine whether there is a conflict between the SNL tags corresponding to multiple SNLs under the current clause;
[0029] If there are conflicts among the SNL tags corresponding to multiple SNLs under the current clause, the clause tag corresponding to the current clause is determined based on the SNL tags corresponding to multiple SNLs under the current clause according to a predefined priority rule; otherwise, the SNL tags corresponding to multiple SNLs under the current clause are merged to obtain the clause tag corresponding to the current clause.
[0030] According to an embodiment of the present application, after generating the clause tag corresponding to each clause, the inference module is further configured to:
[0031] Obtain the current review requirement;
[0032] Screen out the target clause and target SNL that match the current review requirement from the clause tags corresponding to each clause and the SNL tags corresponding to each SNL;
[0033] Conduct a compliance review according to the target clause and target SNL.
[0034] According to an embodiment of the present application, the processing module is configured to:
[0035] Identify the keywords in each SNL;
[0036] Match the keywords in each SNL with the terms in a predefined term set to obtain a matching result;
[0037] Generate the SNL tag corresponding to each SNL according to the matching result.
[0038] According to an embodiment of the present application, the predefined tag architecture adopts the YAML format, and the predefined tag architecture includes at least one first-level tag, and each first-level tag includes at least one second-level tag.
[0039] The tag inference device for rule review according to the embodiment of the present application converts the engineering specification clauses into a structured natural language format to obtain a rule file; adds the predefined tag architecture to each rule file, traverses each SNL in each rule file, generates the SNL tag corresponding to each SNL according to the matching result of each SNL and the predefined term set, and infers and generates the clause tag corresponding to each clause. Thus, the problems of lack of a systematic classification method, low efficiency and easy error in manual classification in the background art are solved, and the accurate classification and efficient automatic processing of engineering specification clauses are realized.
[0040] The third - aspect embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the program to implement the label inference method for rule review as described in the above - mentioned embodiment.
[0041] The fourth - aspect embodiment of the present application provides a computer - readable storage medium, on which a computer program is stored. The program is executed by a processor to implement the label inference method for rule review as described in the above - mentioned embodiment.
[0042] The fifth - aspect embodiment of the present application provides a computer program product, including a computer program. The computer program is executed by a processor to implement the label inference method for rule review as described in the above - mentioned embodiment.
[0043] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. Description of the Drawings
[0044] The above - mentioned and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:
[0045] Figure 1 It is a schematic diagram of an example of a specification document based on SNL in the related art;
[0046] Figure 2 It is a flowchart of a label inference method for rule review provided according to an embodiment of the present application;
[0047] Figure 3 It is a partial schematic diagram of the YAML format of a label tree structure according to an embodiment of the present application;
[0048] Figure 4 It is a partial schematic diagram of the XML format of a label tree structure according to an embodiment of the present application;
[0049] Figure 5 It is a schematic diagram of clause - label assignment according to an embodiment of the present application;
[0050] Figure 6 It is a schematic diagram of SNL - label assignment according to an embodiment of the present application;
[0051] Figure 7 It is a flowchart of a label inference method for rule review provided according to an embodiment of the present application;
[0052] Figure 8 It is a block schematic diagram of a label inference device for rule review according to an embodiment of the present application;
[0053] Figure 9 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Specific embodiments
[0054] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application and should not be construed as limiting the present application.
[0055] The following describes a label inference method, apparatus, device, medium, and program for rule review according to an embodiment of the present application with reference to the accompanying drawings.
[0056] Before introducing the label inference method for rule review of the embodiments of the present application, a brief introduction to the SNL structured natural language writing rules in the related art will be given first.
[0057] Specifically, taking Clause 5.1.2 in the "General Code for Fire Prevention of Buildings" as an example, "The fire resistance rating of underground and semi-underground buildings (rooms) shall be Grade I", which can be expressed in SNL as: If the number of floors of the building_underground < 0; then the underground fire resistance rating of the building equals "Grade I".
[0058] Generally, a single clause described in natural language cannot be simply expressed completely by one sentence of SNL. Therefore, a clause can be disassembled into multiple SNL expression sentences. For example, Article 4.3.3 in the "Code for Fire Protection Design of Buildings" stipulates: "The layout of store business halls, public exhibition halls, etc. shall comply with the following provisions: 1. For buildings with a fire resistance rating of Grade I or II, they shall be arranged on the second floor and above underground floors; 2. For buildings with a fire resistance rating of Grade III, they shall be arranged on the first floor or the second floor; 3. For buildings with a fire resistance rating of Grade IV, they shall be arranged on the first floor." This clause involves the layout requirements of store business halls, public exhibition halls, etc. under various scenarios and can be disassembled into multiple SNLs to express more precisely and clearly. Based on the SNL language, the specification is digitized, and the formed XML rule file is as Figure 1 shown.
[0059] Those skilled in the art can understand that although the existing specification digitization technology can convert specification clauses into rule files that can be processed by a computer, there are still the following deficiencies in actual applications:
[0060] (1) Lack of multi-dimensional classification system: Most of the existing technologies fail to classify the content of clauses in-depth and refined. Taking the patent CN107220431A, "A data review method and system based on specification clauses and digital models" as an example, this patent only involves digitizing the specification clauses and does not discuss the classification and annotation of clauses. The patent CN110298568A, "A review method based on digitized review specification clauses", although proposes to classify clauses based on data content (such as by area, quantity, slope, spatial connection, noise insulation, etc.) and building component content (such as beams, columns, walls, etc.), but this patent only stays at the description level of the classification basis, does not further explain the actual classification operation steps, nor provides a specific rule classification method, only describes the classification basis and the uses after classification. In addition, the classification basis of data content and building component types proposed by this patent is insufficient to meet the complex requirements in building codes, lacking a multi-dimensional, hierarchical, and fine-grained classification design for clauses.
[0061] (2) Lack of functions of automatic reasoning and classification: The current technology has not proposed a solution for automatically reasoning and generating classifications, and still relies on manual classification of clauses one by one. Manual classification requires a large amount of time and labor costs, and there are also problems such as inconsistent judgment criteria and human operation errors. Implementing automatic classification can automatically judge the clause content and generate appropriate categories, thereby improving the classification efficiency and accuracy.
[0062] Based on the lack of a systematic classification method in the existing specification digitization technology, it is difficult to meet the complex classification requirements in actual scenarios in multiple dimensions (such as building types, professional categories, document requirements, etc.), which affects the classification accuracy and applicability. Engineering specifications often need to be classified according to the specific requirements of different objects (such as residential buildings, factories) and scenarios (such as fire protection, HVAC). Therefore, this application provides a unified classification framework by constructing a multi-dimensional and multi-level label system to support accurate classification in complex scenarios.
[0063] In addition, the existing specification digitization technology mainly relies on manual parsing of clauses and label assignment, which is difficult to handle the processing requirements of a large number of engineering specification clauses. This method is inefficient, costly, and prone to inconsistent classification results due to human errors. Therefore, this application realizes efficient classification processing by designing an automated label generation method.
[0064] The following details a label reasoning method for rule review proposed in this application.
[0065] Specifically, Figure 2 is a schematic flow diagram of a label reasoning method for rule review provided in an embodiment of this application.
[0066] As Figure 2As shown, the label inference method for rule review includes the following steps:
[0067] In step S201, at least one engineering specification clause is obtained, and at least one engineering specification clause is converted into a structured natural language format to obtain at least one rule file, wherein at least one engineering specification clause is written in natural language.
[0068] Specifically, in the embodiment of the present application, at least one engineering specification clause written in natural language can be extracted from existing paper or electronic specification documents, and at least one engineering specification clause written in natural language is converted into a structured natural language format understandable by a computer by using SNL to obtain at least one rule file.
[0069] In step S202, a predefined label system structure is added to each rule file, and each SNL in each rule file is traversed, and an SNL label corresponding to each SNL is generated according to the matching result of each SNL and the predefined term set.
[0070] Among them, in some embodiments, the predefined label system structure adopts the YAML format, and the predefined label system structure includes at least one first-level label, and each first-level label includes at least one second-level label.
[0071] Specifically, the present invention proposes a multi-dimensional and multi-level label system design method, which defines a multi-dimensional and multi-level label system to classify engineering specification digital clauses and SNLs. Through the refined classification of engineering specification clauses and SNLs, accurate clause management is realized. The label system of the embodiment of the present application supports a multi-level label structure, can label each SNL and clause, and allows each SNL and clause to have multiple labels to meet complex classification requirements. The label system of the embodiment of the present application is defined in the YAML format and has good intuitiveness and scalability.
[0072] For example, Figure 3As shown, the tag tree (tag architecture) contains four first-level tags: reviewability, mandatory, document requirements, and building type. Each first-level tag is refined into multiple second-level tags, which can more precisely define the scope of application of the clauses. For example, the reviewability tag classifies the reviewability of SNL based on the availability of building model or construction drawing information and the capacity limitations of the review engine. Due to information or review capacity limitations, compliance checks may not be possible for some clauses. Therefore, each SNL can be marked with three second-level tags according to the situation: reviewable tag, partially reviewable tag, and not supported yet tag. Similarly, the mandatory tag is divided according to the binding requirements of the specification clauses, including strong clauses (mandatory requirements that must be strictly complied with), should clauses (guidance clauses, but not necessarily mandatory), and advisable clauses (reference suggestions).
[0073] Furthermore, after the tag tree is defined, it needs to be added to the rule file in batches. As Figure 4 shown, the YAML format of the tag system is converted to generate the <group_set> structure in XML format. Among them, the ID of the first-level tag can end with "00" (e.g., 000 represents "reviewability"), and the ID of the second-level tag can be generated according to the first-level (e.g., 001 represents "reviewable"). Thus, the tag system is embedded in the rule file in a standardized XML structure, and tags can be bound to specific clauses and SNLs for manual or automatic classification.
[0074] Furthermore, clause tag assignment is carried out. Add the <rule_group> element to the XML definition of each clause and assign the corresponding tag id to represent the tag attribute of the clause. As Figure 5 shown, taking Clause 5.1.2 in the General Code for Building Fire Protection as an example, the tag of this Clause 5.1.2 is defined as "001", corresponding to the reviewable tag in the tag system, indicating that this clause is reviewable.
[0075] Furthermore, SNL tag assignment is carried out. Similar to the above clause tag assignment, for each SNL, tag attributes can be added through <snl_group>; as Figure 6 shown, taking Clause 5.1.2 in the General Code for Building Fire Protection as an example, this Clause 5.1.2 is represented by a single SNL, and its tag attributes are assigned 001 and 102, representing reviewable and should clause respectively, providing multi-dimensional classification information.
[0076] Thus, through the multi-dimensional tag system design method proposed in this application, a standardized classification framework can be provided for the rule library.
[0077] Furthermore, after constructing a complete label system, the traditional method of manually assigning labels one by one is inefficient and error-prone. Therefore, the present invention proposes an automatic label generation method based on predefined logical inference rules to improve work efficiency and reduce human errors.
[0078] Furthermore, in some embodiments, SNL labels corresponding to each SNL are generated according to the matching results of each SNL and a predefined term set, including: identifying keywords in each SNL; matching the keywords in each SNL with the terms in the predefined term set to obtain matching results; and generating SNL labels corresponding to each SNL according to the matching results.
[0079] The predefined term set is a set containing multiple category terms for describing the characteristics of SNLs. For example: building type terms: residential, factory building, warehouse, public building, etc.; professional terms: fire protection, HVAC, etc.; document requirement terms: design description, construction drawings, etc.
[0080] Specifically, after embedding the predefined label system structure designed by the above multi-dimensional label system design method into each rule file, read the content of each rule file, extract the SNL expressions and related information therein, traverse each SNL according to the structure of the rule file, extract keywords from the description content of each SNL, and match the extracted keywords with the terms in the predefined term set, that is, the basic label inference combines the predefined term set and specific keywords in the SNL content, and automatically generates corresponding secondary labels through rule matching, such as building type labels, professional labels, etc. Two exemplary explanations are given below:
[0081] (1) Building type label inference: Judge the use of the building (such as residential, public building, factory building, etc.) according to the description content. If it is recognized that the SNL description contains words similar to "residential", "factory building", "warehouse", the corresponding building type label will be automatically added.
[0082] (2) Document requirement label inference: Combine the description of requirements for drawings, documents, etc., and match keywords to generate corresponding document requirement labels.
[0083] In addition, when the SNL description contains multiple conditions, multiple labels will be automatically inferred and generated. For example, when the keywords extracted from the SNL description contain "residential" and "design description", two types of labels, namely the residential building type label and the design description, will be generated.
[0084] In step S203, clause labels corresponding to each clause are inferred and generated according to the SNL labels corresponding to each SNL.
[0085] Further, in some embodiments, when inferring and generating the clause label corresponding to each clause according to the SNL label corresponding to each SNL, it further includes: determining whether there is a conflict between the SNL labels corresponding to multiple SNLs under the current clause; if there is a conflict between the SNL labels corresponding to multiple SNLs under the current clause, determining the clause label corresponding to the current clause based on a predefined priority rule, otherwise, merging the SNL labels corresponding to multiple SNLs under the current clause to obtain the clause label corresponding to the current clause.
[0086] Specifically, each clause can be split into one or more SNLs, and the clause label can be inferred and generated from bottom to top according to the label of the SNL. For multiple SNLs under the same clause, if there is no conflict between the SNL labels corresponding to the multiple SNLs, all relevant labels are synthesized.
[0087] If there is a conflict between the SNL labels corresponding to multiple SNLs under the current clause, the priority label is merged or selected according to a preset rule. For example, when there are both reviewable labels and temporarily unsupported labels for SNLs belonging to the same clause, the clause label is inferred to be partially reviewable. In addition, the embodiments of the present application can also determine the label of the current clause according to a predefined priority rule. For example, when there is an SNL marked with a strong clause label and an SNL marked as appropriate clause in the current clause, the strong clause should be automatically selected as the clause label of the current clause based on the priority rule.
[0088] Thus, the embodiments of the present application realize the automatic label generation of SNLs and clauses by using a predefined term set and inference logic, thereby simplifying the label annotation process. This method has good scalability and can flexibly add new terms and labels according to the actual usage scenario to meet the needs of different fields. The inference logic realizes the automation and standardization of label generation by accurately matching specific terms, which not only ensures the consistency of labels but also effectively avoids errors that may occur in the manual annotation process.
[0089] Further, in some embodiments, after generating the clause label corresponding to each clause, it further includes: obtaining the current review requirement; screening out the target clause and target SNL that match the current review requirement from the clause label corresponding to each clause and the SNL label corresponding to each SNL; performing a compliance review according to the target clause and target SNL.
[0090] Specifically, through a multi-dimensional and multi-level tag system and reasoning method, the present invention can judge the applicability of terms according to different review project objects and scenarios. For example, for a reviewable project of the "residential" type, the review engine can screen out the terms and SNLs that are simultaneously marked with the "residential" building type and the "reviewable" tag from the rule base, and further filter them in combination with tags such as document requirements, so as to achieve efficient and accurate compliance review.
[0091] To facilitate a clearer and more intuitive understanding of the tag reasoning method for rule review proposed in the present application by those skilled in the art, the following will be described in detail in conjunction with Figure 7 For details.
[0092] As Figure 7 shown, the entire process takes the engineering specifications written in natural language as the original input, digitizes the specifications using the SNL language to form a rule file. According to the actual scenario, a multi-level and multi-dimensional tag tree is defined in the YAML format. The tag tree provides a standardized way to precisely classify the rule file in multiple dimensions. After defining the tag tree, its structure can be added to the rule file in batches. Each SNL or term can be marked with the corresponding tag manually or automatically generated by the reasoning method proposed in the present invention. Finally, in combination with the generated tags, the review engine can flexibly screen the applicable terms and SNLs to conduct compliance review on construction drawings or BIM models.
[0093] Thus, the present invention realizes the efficient classification of specification terms and automatic tag generation by constructing a multi-dimensional and multi-level tag system and combining logical reasoning and keyword matching, enabling the review engine to flexibly select applicable terms according to different review scenarios.
[0094] To facilitate a clearer understanding of the tag reasoning method for rule review proposed in the present application by those skilled in the art, the following is an example for illustration, and the specific steps are as follows:
[0095] Step 1: Obtain input resources. Convert the engineering specification terms written in natural language into the SNL (structured natural language) format to form a rule file as the original input.
[0096] Step 2: Define the tag system. Define a multi-dimensional and multi-level tag system in the YAML format according to the review requirements.
[0097] Step 3: Add the tag structure to the rule file. Add the tag system structure to the rule file in batches for subsequent tag assignment.
[0098] Step 4: Read the term mapping file, and allocate different types of terms to the corresponding dictionaries or lists according to the actual situation, such as building types, professional labels, etc., as the basis for subsequent label allocation.
[0099] Step 5: Traverse the SNLs and automatically generate labels. Traverse all SNLs, and generate corresponding labels according to the matching results between the description content of the SNLs and the term mapping. For example, if the description contains keywords such as "residential building", "factory building", etc., automatically generate the corresponding building type labels; if professional terms (such as fire protection, HVAC, etc.) are identified and matched, generate the corresponding professional labels for them.
[0100] Step 6: Generate clause labels. Combine the corresponding SNL labels and reason from bottom to top to generate clause labels. If there are conflicts between multiple SNL labels, select or merge the priority labels according to the preset rules.
[0101] Step 7: Clause screening and compliance review. After the review engine screens out the clauses and SNLs marked as residential and reviewable, and further screens them in combination with other labels (such as document requirements), conduct a compliance review.
[0102] Thus, this application processes functions such as clause label reasoning and label conflict resolution according to predefined logical rules, ensures the reasonable allocation of labels, and allows for custom extensions of the term set and label rules to adapt to different specifications and business requirements.
[0103] According to the label reasoning method for rule review in the embodiments of this application, convert the engineering specification clauses into a structured natural language format to obtain a rule file; add the predefined label system structure to each rule file, and traverse each SNL in each rule file, and generate the corresponding SNL label for each SNL according to the matching result between each SNL and the predefined term set, and reason to generate the corresponding clause label for each clause. Thus, the problems of lack of systematic classification methods, low efficiency and easy errors in manual classification in the background art are solved, and the structured expression and compliance review of building specification clauses are realized.
[0104] Next, describe the label reasoning device for rule review proposed according to the embodiments of this application with reference to the accompanying drawings.
[0105] Figure 8 It is a block diagram of the label reasoning device for rule review in the embodiments of this application.
[0106] As Figure 8 shown, the label reasoning device 10 for rule review includes: an acquisition module 100, a processing module 200, and a reasoning module 300.
[0107] Among them, the acquisition module 100 is used to acquire at least one engineering specification clause and convert the at least one engineering specification clause into a structured natural language format to obtain at least one rule file, where the at least one engineering specification clause is written in natural language; the processing module 200 is used to add a predefined tag system structure to each rule file, traverse each SNL in each rule file, and generate an SNL tag corresponding to each SNL according to the matching result between each SNL and the predefined term set; the inference module 300 is used to infer and generate a clause tag corresponding to each clause according to the SNL tag corresponding to each SNL.
[0108] Further, in some embodiments, when inferring and generating a clause tag corresponding to each clause according to the SNL tag corresponding to each SNL, the inference module 300 is further used to: determine whether there is a conflict between the SNL tags corresponding to multiple SNLs under the current clause; if there is a conflict between the SNL tags corresponding to multiple SNLs under the current clause, determine the clause tag corresponding to the current clause based on the predefined priority rules according to the SNL tags corresponding to multiple SNLs under the current clause, otherwise, merge the SNL tags corresponding to multiple SNLs under the current clause to obtain the clause tag corresponding to the current clause.
[0109] Further, in some embodiments, after generating the clause tag corresponding to each clause, the inference module 300 is further used to: obtain the current review requirement; screen out the target clause and the target SNL that match the current review requirement from the clause tag corresponding to each clause and the SNL tag corresponding to each SNL; perform compliance review according to the target clause and the target SNL.
[0110] Further, in some embodiments, the processing module 200 is used to: identify the keywords in each SNL; match the keywords in each SNL with the terms in the predefined term set to obtain a matching result; generate an SNL tag corresponding to each SNL according to the matching result.
[0111] Further, in some embodiments, the predefined tag system structure adopts the YAML format, and the predefined tag system structure includes at least one first-level tag, and each first-level tag includes at least one second-level tag.
[0112] It should be noted that the foregoing explanation of the embodiment of the label inference method for rule review also applies to the label inference device for rule review in this embodiment, and will not be elaborated here.
[0113] The label inference device for rule review according to the embodiments of the present application converts engineering specification clauses into a structured natural language format to obtain a rule file; adds a predefined label system structure to each rule file, traverses each SNL in each rule file, generates an SNL label corresponding to each SNL according to the matching result between each SNL and the predefined term set, and infers and generates a clause label corresponding to each clause. Thus, the problems of lack of a systematic classification method, low efficiency and easy error in manual classification in the background technology are solved, and the accurate classification and efficient automatic processing of engineering specification clauses are realized.
[0114] Figure 9 The structural schematic diagram of the electronic device provided by the embodiments of the present application. The electronic device may include:
[0115] A memory 901, a processor 902, and a computer program stored on the memory 901 and executable on the processor 902.
[0116] When the processor 902 executes the program, it implements the label inference method for rule review provided in the above embodiments.
[0117] Further, the electronic device further includes:
[0118] A communication interface 903 for communication between the memory 901 and the processor 902.
[0119] The memory 901 is used to store a computer program executable on the processor 902.
[0120] The memory 901 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0121] If the memory 901, the processor 902, and the communication interface 903 are independently implemented, the communication interface 903, the memory 901, and the processor 902 may be interconnected through a bus and complete communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 9 only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0122] Optionally, in a specific implementation, if the memory 901, the processor 902, and the communication interface 903 are integrated on a single chip, the memory 901, the processor 902, and the communication interface 903 can communicate with each other through an internal interface.
[0123] The processor 902 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0124] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the above-mentioned label inference method for rule review is implemented.
[0125] The embodiments of the present application also provide a computer program product, including a computer program. When the computer program is executed by a processor, the above-mentioned label inference method for rule review is implemented.
[0126] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.
[0127] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0128] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A label inference method for rule review, characterized in that: The following steps are involved: Acquire at least one engineering specification clause, and convert the at least one engineering specification clause into a structured natural language format to obtain at least one rule file, wherein the at least one engineering specification clause is written in a natural language; Add a predefined label architecture to each rule file, and traverse each SNL in each rule file, and generate an SNL label corresponding to each SNL according to the matching result of each SNL and the predefined term set; According to the SNL label corresponding to each SNL, the clause label corresponding to each clause is inferred and generated.
2. The method according to claim 1, characterized in that When the clause label corresponding to each clause is generated by reasoning according to the SNL label corresponding to each SNL, it also includes: Determine whether there is a conflict between the SNL labels corresponding to multiple SNLs under the current terms; If there is a conflict between the SNL labels corresponding to the multiple SNLs under the current clause, the clause label corresponding to the current clause is determined based on the SNL labels corresponding to the multiple SNLs under the current clause and based on a predefined priority rule; otherwise, the SNL labels corresponding to the multiple SNLs under the current clause are merged to obtain the clause label corresponding to the current clause.
3. The method according to claim 1, characterized in that After generating the clause labels corresponding to each clause, it also includes: Get current review requirements; Filter out the target clause and target SNL that match the current review requirement from the clause label corresponding to each clause and the SNL label corresponding to each SNL; Compliance review is conducted against the stated target clause and target SNL.
4. The method according to claim 1, characterized in that: Generating an SNL label corresponding to each SNL according to the matching result of each SNL and the predefined term set includes: identifying key words in each of the SNLs; Matching the keywords in each SNL with the terms in the predefined term set to obtain matching results; According to the matching result, an SNL label corresponding to each SNL is generated.
5. The method according to claim 1, characterized in that: The predefined tag architecture adopts a YAML format, and the predefined tag architecture includes at least one first-level tag, and each first-level tag includes at least one second-level tag.
6. A label inference device for rule review, characterized in that: include: An acquisition module, used for acquiring at least one engineering specification clause, and converting the at least one engineering specification clause into a structured natural language format to obtain at least one rule file, wherein the at least one engineering specification clause is obtained by writing in a natural language; A processing module, used for adding a predefined label architecture to each rule file, and traversing each SNL in each rule file, and generating an SNL label corresponding to each SNL according to a matching result between each SNL and a predefined term set; The reasoning module is used to infer and generate a clause label corresponding to each clause according to the SNL label corresponding to each SNL.
7. The device according to claim 6, characterized in that When the clause label corresponding to each clause is generated by reasoning according to the SNL label corresponding to each SNL, the reasoning module is further used to: Determine whether there is a conflict between the SNL labels corresponding to multiple SNLs under the current terms; If there is a conflict between the SNL labels corresponding to the multiple SNLs under the current clause, the clause label corresponding to the current clause is determined based on the SNL labels corresponding to the multiple SNLs under the current clause and based on a predefined priority rule; otherwise, the SNL labels corresponding to the multiple SNLs under the current clause are merged to obtain the clause label corresponding to the current clause.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the label inference method for rule review as described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the label inference method for rule review as described in any one of claims 1-5.
10. A computer program product, comprising a computer program, characterized in that The computer program is executed by a processor to implement the label inference method for rule review as described in any one of claims 1-5.
Citation Information
Patent Citations
Data review method and system based on standard clauses and digital model
CN107220431A
Examination method based on digital examination standard clause
CN110298568A