A water conservancy standard knowledge conflict detection method and system
Patent Information
- Application Number
- CN202611120927.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]有鉴于此,本公开实施例提供了一种水利标准知识冲突检测方法和系统,能够通过子场景构建和触发条件逻辑运算,精准识别同一工程场景下标准条款之间的逻辑冲突,解决了传统方法无法兼顾场景化筛选与逻辑关联判断的难题
[0018]本公开实施例提供的一种水利标准知识冲突检测方法,通过构建待检测水利工程的子场景并获取关键词组合,能够将海量标准条款按工程场景进行初步归类,避免无关条款的干扰。通过将标准条款的适用对象与子场景关键词组合进行匹配,能够快速筛选出与当前工程场景真正相关的待处理条款,提高检测的针对性。通过基于同一子场景下待处理条款的触发条件和执行动作进行逻辑冲突判断,能够精准识别在相同工程场景下同时触发且执行动作相斥的真实逻辑矛盾。当存在冲突时获取冲突证据并整理为冲突报告,为水利工程标准一致性审查提供了可靠的技术支撑,有效解决了传统方法中人工审查效率低下以及自动化方案因忽略触发条件与执行动作之间的逻辑关联而导致的误判和漏检问题。
Smart Images

Figure CN123013896A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of water conservancy engineering technology, and in particular to a method and system for detecting conflicts in water conservancy standard knowledge. Background Technology
[0002] Water conservancy projects involve multiple fields such as water resource management, flood control and disaster reduction, and engineering construction. Their standard system is vast and complex, encompassing numerous national, industry, and local standards. In actual engineering design, designers need to refer to multiple standards and specifications simultaneously. However, due to differences in their development background, scope of application, and revision time, these standards may contain inconsistencies or even contradictory provisions. With the continuous increase in the number of standards, how to efficiently and accurately detect logical conflicts between standard clauses has become a crucial issue in the informatization and intelligentization of water conservancy.
[0003] Traditional methods for detecting conflicts in water conservancy standards mainly rely on manual review by experts or text retrieval and comparison based on keywords. However, manual review is inefficient and struggles to handle the massive volume of standard documents requiring conflict resolution. Existing automated solutions mostly rely solely on text similarity or keyword matching to compare standard clauses, filtering out clauses involving the same technical indicators and then performing numerical comparisons. These methods fail to adequately consider the logical connection between the triggering conditions and execution actions of standard clauses, easily misjudging clauses effective in different application scenarios as conflicts, or overlooking genuine logical contradictions by ignoring differences in triggering conditions. Summary of the Invention
[0004] In view of this, the present disclosure provides a method and system for detecting knowledge conflicts in water conservancy standards. It can accurately identify logical conflicts between standard clauses in the same engineering scenario by constructing sub-scenarios and triggering conditional logical operations, thus solving the problem that traditional methods cannot simultaneously take into account scenario-based screening and logical association judgment.
[0005] In a first aspect, this disclosure provides a method for detecting knowledge conflicts in water conservancy standards, employing the following technical solution: Construct several sub-scenarios of the water conservancy project to be tested, and obtain the keyword combination of each sub-scenarios; Several standard clauses were extracted from the water conservancy standards knowledge document; these standard clauses include the applicable objects, triggering conditions, and execution actions. The applicable objects of the standard clauses and the keyword combinations of the sub-scenarios are matched to filter out the clauses to be processed that belong to the same sub-scenario. Based on the triggering conditions and execution actions of any two pending clauses in the same sub-scenario, determine whether there is a logical conflict between the two pending clauses. When logical conflicts exist, obtain evidence of the conflict. The clauses with logical conflicts, their respective sub-scenarios, and the corresponding evidence of conflict are compiled into a conflict detection report.
[0006] Optionally, the construction of several sub-scenarios of the water conservancy project to be detected, and the acquisition of keyword combinations for each sub-scenarios, include: Retrieve the standard name and professional category information of each standard document in the water conservancy standards knowledge base; The standard name and the professional category information are segmented and keywords are extracted to obtain a set of candidate scenario keywords. Cluster the keywords in the candidate scenario keyword set to obtain several keyword clusters; Each keyword cluster corresponds to an engineering field as a sub-scenario, and the keywords in the keyword cluster are used as the keyword combination of the sub-scenario.
[0007] Optionally, the step of matching the applicable objects of the standard clauses with the keyword combinations of the sub-scenarios to filter out clauses to be processed belonging to the same sub-scenario includes: Match the applicable objects of the standard clauses with each keyword in the keyword combination of the sub-scenario; If at least one keyword in the keyword combination of the sub-scenario successfully matches the applicable object, then the standard clause is determined to belong to the sub-scenario.
[0008] Optionally, determining whether there is a logical conflict between any two pending clauses based on their triggering conditions and execution actions within the same sub-scenario includes: Convert the trigger conditions of any two pending clauses in the same sub-scene into logical expressions respectively; Transform the logical expressions of any two pending clauses into binary decision graphs respectively; Perform a logical AND operation on the two transformed binary decision graphs to obtain an AND decision graph; If there is no path with a true value in the decision graph, it is determined that the two pending clauses do not have overlapping triggering conditions and do not constitute a logical conflict. If there is a path with a true value in the decision graph, then the combination of scenario conditions corresponding to the path with a true value is extracted from the decision graph as a candidate conflict scenario; In the candidate conflict scenario, compare whether the execution actions of the two pending clauses are mutually exclusive. If they are mutually exclusive, it is determined that there is a logical conflict; if they are not mutually exclusive, it is determined that there is no logical conflict.
[0009] Optionally, the step of converting the logical expressions of any two pending terms into binary decision graphs includes: Convert each condition descriptor in the logical expression into a Boolean variable; According to the logical order and logical operation relationship between the condition description items in the logical expression, the Boolean variables are organized into a decision tree structure; wherein, the decision tree structure includes a root node, a branch node and a leaf node, the root node and the branch node each correspond to a condition description item, and the leaf node takes the value of true or false; The decision tree structure is processed by node merging and redundancy removal to obtain the binary decision graph.
[0010] Optionally, performing a logical AND operation on the two transformed binary decision graphs to obtain an AND decision graph includes: The two binary decision graphs after transformation are traversed synchronously. Core nodes with the same condition description items in the two binary decision graphs are merged. The condition parameter values of the merged core nodes are taken as the intersection of the condition parameter values of the original two core nodes. The core nodes include root nodes and branch nodes. After the core nodes are merged, the links from the root node to the leaf node form the merged path; If the condition parameter values of all core nodes on the merged path are non-empty, then the leaf nodes of the merged path are true. If any core node in the merged path has a condition parameter value that is empty, then the leaf node of the merged path will be set to false. The binary decision graph formed by merging all paths where all leaf nodes are true is called the AND decision graph.
[0011] Optionally, the step of extracting the combination of scenario conditions corresponding to the paths with true values from the decision graph as candidate conflict scenarios includes: Starting from the root node of the decision graph, traverse the path and go down each branch node layer by layer along the branches with true values until the leaf node with a true value is reached. The condition description items and corresponding condition parameter values of all branch nodes on the traversed path are combined by logical AND to form the scene condition combination corresponding to the path. If there are multiple paths with true values in the decision graph, then the scenario condition combination corresponding to each path is extracted as a candidate conflict scenario.
[0012] Optionally, in the candidate conflict scenario, comparing whether the execution actions of the two pending clauses are mutually exclusive includes: Extract the action description and action parameter values from the two pending clauses' execution actions; If two actions have the same action description and the action parameter is a numerical parameter, then compare whether the ranges of the two values have an intersection. If there is no intersection, they are determined to be mutually exclusive; if there is an intersection, they are determined to be mutually exclusive. If two actions have the same action description and the action parameter value is an instruction type action, then it is determined whether the two instructions belong to a preset mutually exclusive action pair. If they do, they are determined to be mutually exclusive; otherwise, they are determined to be non-mutually exclusive.
[0013] Optionally, obtaining evidence of the conflict when a logical conflict exists includes: Obtain standard source information for two pending clauses that have logical conflicts; Obtain the description items and action parameter values of the conflicting actions in the execution actions of the two pending clauses; The standard source information, the candidate conflict scenarios, and the conflicting action descriptions and action parameter values are used as evidence of conflict.
[0014] Secondly, this disclosure also provides a water conservancy standard knowledge conflict detection system, which adopts the following technical solution: The construction module is used to build several sub-scenes of the water conservancy project to be tested and obtain the keyword combination of each sub-scene; The extraction module is used to extract several standard clauses from the water conservancy standard knowledge document; wherein, the standard clauses include the applicable objects, triggering conditions, and execution actions; The filtering module is used to match the applicable objects of the standard clauses with the keyword combinations of the sub-scenarios to filter out the clauses to be processed that belong to the same sub-scenario. The judgment module is used to determine whether there is a logical conflict between any two pending clauses based on their triggering conditions and execution actions within the same sub-scenario. The acquisition module is used to obtain evidence of logical conflicts when they exist. The sorting module is used to compile conflict-ridden clauses, their respective sub-scenarios, and corresponding conflict evidence into a conflict detection report.
[0015] Thirdly, this disclosure also provides a computer device, which adopts the following technical solution: The computer device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform any of the above-described water conservancy standard knowledge conflict detection methods.
[0016] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing computer instructions for causing a computer to execute any of the above-described water conservancy standard knowledge conflict detection methods.
[0017] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the methods described above.
[0018] This disclosure provides a method for detecting knowledge conflicts in water conservancy standards. By constructing sub-scenarios of the water conservancy project to be tested and obtaining keyword combinations, it can initially classify massive amounts of standard clauses according to the project scenario, avoiding interference from irrelevant clauses. By matching the applicable objects of standard clauses with the keyword combinations of sub-scenarios, it can quickly filter out the clauses to be processed that are truly relevant to the current project scenario, improving the targeting of the detection. By judging logical conflicts based on the triggering conditions and execution actions of the clauses to be processed under the same sub-scenarios, it can accurately identify real logical contradictions that are triggered simultaneously and have mutually exclusive execution actions under the same project scenario. When a conflict exists, conflict evidence is obtained and compiled into a conflict report, providing reliable technical support for the consistency review of water conservancy project standards. This effectively solves the problems of low efficiency in manual review in traditional methods and misjudgment and missed detection caused by automated solutions ignoring the logical relationship between triggering conditions and execution actions.
[0019] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating the water conservancy standard knowledge conflict detection method provided in this embodiment of the disclosure; Figure 2 A flowchart illustrating the method for obtaining sub-scene keyword combinations provided in this embodiment of the disclosure; Figure 3 A flowchart illustrating the method for filtering pending terms provided in this embodiment of the disclosure; Figure 4A flowchart illustrating the logical conflict detection method provided in this embodiment of the disclosure; Figure 5 This is a schematic flowchart of the logical expression conversion method provided in the embodiments of this disclosure; Figure 6 This is a schematic diagram of the decision graph acquisition process provided in an embodiment of the present disclosure; Figure 7 This is a schematic diagram of the candidate conflict scenario acquisition method provided in the embodiments of this disclosure; Figure 8 This is a schematic flowchart of the repulsion determination method provided in the embodiments of this disclosure; Figure 9 This is a schematic flowchart of a conflict evidence acquisition method provided in an embodiment of the present disclosure; Figure 10 A schematic diagram of the knowledge conflict detection system for water conservancy standards provided in this embodiment of the disclosure; Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. Detailed Implementation
[0022] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0023] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0024] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0025] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0026] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0027] Reference Figure 1 This disclosure provides a method for detecting knowledge conflicts in water conservancy standards, including the following steps: S1: Construct several sub-scenes of the water conservancy project to be tested, and obtain the keyword combination of each sub-scene; S2: Extract several standard clauses from the water conservancy standards knowledge document; among them, the standard clauses include the applicable objects, triggering conditions, and execution actions; S3: Match the applicable objects of standard clauses with the keyword combinations of sub-scenarios to filter out clauses that belong to the same sub-scenarios and are yet to be processed. S4: Based on the triggering conditions and execution actions of any two pending clauses in the same sub-scenario, determine whether there is a logical conflict between any two pending clauses; S5: When a logical conflict exists, obtain evidence of the conflict; S6: Compile the pending clauses with logical conflicts, their respective sub-scenarios, and corresponding conflict evidence into a conflict detection report.
[0028] This disclosure discloses a method for detecting knowledge conflicts in water conservancy standards. By constructing sub-scenarios of the water conservancy project to be tested and obtaining keyword combinations, it can initially classify massive amounts of standard clauses according to engineering scenarios, avoiding interference from irrelevant clauses. By matching the applicable objects of standard clauses with the keyword combinations of sub-scenarios, it can quickly filter out the clauses to be processed that are truly relevant to the current engineering scenario, improving the targeting of the detection. By judging logical conflicts based on the triggering conditions and execution actions of the clauses to be processed under the same sub-scenarios, it can accurately identify real logical contradictions that are triggered simultaneously and have contradictory execution actions under the same engineering scenario. When conflicts exist, conflict evidence is obtained and compiled into a conflict report, providing reliable technical support for the consistency review of water conservancy engineering standards. This effectively solves the problems of low efficiency in manual review in traditional methods and misjudgment and missed detection caused by automated solutions ignoring the logical relationship between triggering conditions and execution actions.
[0029] In S1, refer to Figure 2The flowchart illustrating the method for obtaining keyword combinations for sub-scenes is shown. The process of "constructing several sub-scenes of the water conservancy project to be tested and obtaining the keyword combinations for each sub-scene" includes the following steps: S11: Obtain the standard name and professional category information of each standard document in the water conservancy standards knowledge base; S12: Perform word segmentation and keyword extraction on the standard name and professional category information to obtain a set of candidate scenario keywords; S13: Cluster the keywords in the candidate scenario keyword set to obtain several keyword clusters; S14: Determine the engineering field corresponding to each keyword cluster as a sub-scenario, and use the keywords in the keyword cluster as the keyword combination of the sub-scenario.
[0030] The standard name is the standardized name of the standard document, consisting of the standard number and the full name of the standard. For example, in SL260—2014, "Design Code for Embankment Engineering," SL 260—2014 is the standard number, and "Design Code for Embankment Engineering" is the full name of the standard. The professional category information refers to the classification tag to which the standard belongs in the water conservancy standard system, such as "Engineering Construction / Embankment Engineering" or "Water Resources Management / Hydrology," where "Engineering Construction" is a first-level category and "Embankment Engineering" is a second-level category. The standard name and professional category information of each standard document are extracted from the water conservancy standard knowledge base as the raw corpus.
[0031] Natural language processing is applied to the extracted standard names and professional category information. A word segmentation tool is used to segment the standard names, removing common modifiers such as "specification," "standard," "design," "construction," and "engineering," retaining core nouns with domain-specific characteristics. For example, "SL 260—2014 Dike Engineering Design Specification" is processed to extract "dike" and "dike engineering." Professional category information is split hierarchically to extract names at each level; for example, "engineering construction / dike engineering" is extracted to extract "engineering construction" and "dike engineering." Candidate keywords extracted from all standard documents are summarized to form a candidate scenario keyword set.
[0032] A clustering algorithm is selected to cluster the keywords in the candidate scenario keyword set. For example, the co-occurrence frequency of each keyword in all standard documents is counted. "Dike" and "dike project" frequently co-occur in the same standard document, as do "reservoir" and "dam," but the co-occurrence frequency of "dike" and "reservoir" is very low. The association strength between keywords is calculated based on the co-occurrence frequency, and keywords with association strength higher than a preset threshold are grouped into the same cluster. For example, after clustering, "dike," "dike project," "dike design," and "dike construction" are clustered into one cluster, corresponding to the "dike project" sub-scenario, with the keyword combination {dike, dike project, dike design, dike construction}; "reservoir," "reservoir scheduling," "dam," and "hub" are clustered into another cluster, corresponding to the "reservoir project" sub-scenario. A mapping relationship is established between each sub-scenario and its keyword combination and stored.
[0033] In S2, the Water Conservancy Standards Knowledge Base collects and stores national, industry, and local standards documents in the water conservancy industry. By traversing each standard document in the Water Conservancy Standards Knowledge Base, each standard document is segmented according to the clause number to obtain several standard clauses.
[0034] The core of a standard clause is the triggering condition and the execution action. The triggering condition includes a condition description and a condition parameter value. The triggering condition refers to the name or characteristic description (non-numerical part) of the parameter involved in the triggering condition, such as levee level, foundation type, and flood return period. The condition parameter value refers to the specific value (numerical or classification value) corresponding to the parameter, such as Level 1, weak, and 100 years. The execution action includes an action description and an action parameter value. The action action refers to the name or behavior description (non-numerical part) of the parameter involved in the execution action, such as levee crest freeboard, anti-sliding stability coefficient, and construction requirements. The action parameter value refers to the specific value or behavioral instruction corresponding to the parameter, such as ≥1.5m, ≥1.05m, and prohibited.
[0035] The standard clauses also include the scope of application, which refers to the engineering scope, type, or scenario to which the clause applies, as explicitly specified in the standard clauses. For example, if this clause applies to Class 1 levee projects, then Class 1 levee projects are the scope of application; or if this clause applies to the safety assessment of reservoir dams, then the safety assessment of reservoir dams is the scope of application.
[0036] In S3, refer to Figure 3 The flowchart illustrating the pending clause filtering method shows that "matching trigger conditions and keyword combinations to filter pending clauses belonging to the same sub-scenario" includes the following steps: S31: Match the applicable objects of the standard clauses with the keywords in the keyword combination of the sub-scenario; S32: If at least one keyword in the keyword combination of a sub-scenario successfully matches the applicable object, then the standard clause is determined to belong to the sub-scenario.
[0037] The matching process employs either string inclusion relationship judgment or keyword matching. A successful match is considered achieved if the text of the applicable object contains any keyword from the keyword combination, or if the applicable object and the keywords semantically match. For example, if the applicable object is a Level 1 levee project, and the keyword combination is {levee, levee project, levee design, levee construction}, a successful match is achieved because Level 1 levee project contains the keywords "levee" and "levee project," thus determining that the standard clause belongs to the levee project sub-scenario. If the applicable object does not match any keyword in the keyword combination, then the standard clause does not belong to that sub-scenario. Through this matching method, all standard clauses are categorized into their respective sub-scenarios, forming a set of clauses to be processed for each sub-scenario.
[0038] In S4, refer to Figure 4 The flowchart illustrating the logical conflict detection method demonstrates that "based on the triggering conditions and execution actions of any two pending clauses within the same sub-scenario, determining whether there is a logical conflict between any two pending clauses" includes the following steps: S41: Convert the trigger conditions of any two pending clauses in the same sub-scene into logical expressions respectively; S42: Convert the logical expressions of any two pending terms into binary decision graphs respectively; S43: Perform a logical AND operation on the two transformed binary decision graphs to obtain the AND decision graph; S44: If there is no path with a true value in the decision graph, then it is determined that the two pending clauses do not have overlapping triggering conditions and do not constitute a logical conflict. S45: If there is a path with a true value in the decision graph, extract the combination of scenario conditions corresponding to the path with a true value from the decision graph as a candidate conflict scenario; S46: In the case of candidate conflict, compare whether the execution actions of the two pending clauses are mutually exclusive. If they are mutually exclusive, it is determined that there is a logical conflict. If they are not mutually exclusive, it is determined that there is no logical conflict.
[0039] In S41, for each clause to be processed, the condition description and condition parameter values in its triggering conditions are extracted. The condition description is used as a variable in a logical expression, and the condition parameter value is used as a constraint on the value of that variable. According to the logical relationship (AND, OR, NOT, etc.) between the condition descriptions in the triggering conditions, the variables are combined into a logical expression. For example, if the triggering conditions of a certain standard clause are that the dike level is level 1 and the foundation type is weak, then the extracted condition descriptions are dike level and foundation type, and the corresponding condition parameter values are level 1 and weak, respectively. They are combined into a logical expression according to the AND logical relationship: (dike level = level 1) AND (foundation type = weak).
[0040] In S42, refer to as follows Figure 5 The flowchart illustrating the logical expression transformation method shows that "converting the logical expressions of any two pending terms into binary decision graphs" includes the following steps: S421: Convert each condition description in the logical expression into a Boolean variable; S422: Organize each Boolean variable into a decision tree structure according to the logical order and logical operation relationship between the condition description items in the logical expression; wherein, the decision tree structure includes a root node, branch nodes and leaf nodes, the root node and branch nodes each correspond to a condition description item, and the leaf node takes the value of true or false; S423: Perform node merging and redundancy removal on the decision tree structure to obtain a binary decision graph.
[0041] In S421, each condition description corresponds to a Boolean variable, which takes the value of true or false to indicate whether the condition is met. For example, in the logical expression (levee level = 1) AND (foundation type = weak), levee level = 1 corresponds to Boolean variable X1, and foundation type = weak corresponds to Boolean variable X2. For condition descriptions with a range of values, such as flood recurrence interval ≥ 100 years, it is also converted into a Boolean variable X3, with a true value indicating that the threshold condition is met and a false value indicating that it is not met.
[0042] In S422, a decision tree is a tree-like data structure where internal nodes correspond to Boolean variables, edges represent true or false values, and leaf nodes also represent true or false values. For example, for the logical expression X1 AND X2, with X1 as the root node, branches where X1 is true connect to X2, and branches where X1 is false connect directly to the leaf node "false"; branches where X2 is true connect to the leaf node "true", and branches where X2 is false connect to the leaf node "false". For the logical expression X1 OR X2, branches where X1 is true connect directly to the leaf node "true", branches where X1 is false connect to X2, branches where X2 is true connect to the leaf node "true", and branches where X2 is false connect to the leaf node "false". In this way, logical expressions are completely mapped to a decision tree structure, where each path from the root node to a leaf node represents a set of conditional value combinations.
[0043] In S423, node merging refers to combining nodes with the same substructure to avoid repeatedly representing the same logical judgment. Redundancy removal refers to deleting redundant nodes. For example, when the true / false branches of a node point to the same child node, the judgment of that node has no impact on the result, and the node can be directly deleted and replaced with its child node. For example, for the logical expression X1 AND (X2 OR X2), since X2 OR X2 is equivalent to X2, the duplicate X2 nodes can be merged after redundancy removal. After node merging and redundancy removal, the resulting directed acyclic graph is the binary decision graph corresponding to the logical expression. Compared with the original decision tree, the binary decision graph has a significantly reduced number of nodes, which can participate in subsequent logical AND operations more efficiently.
[0044] In S43, refer to as follows Figure 6 The diagram illustrating the process of obtaining the AND decision graph shows that "performing a logical AND operation on the two transformed binary decision graphs to obtain the AND decision graph" includes the following steps: S431: Perform synchronous traversal on the two transformed binary decision graphs, merge the core nodes with the same condition description in the two binary decision graphs, and take the condition parameter value of the merged core node as the intersection of the condition parameter values of the original two core nodes; where the core node includes the root node and the branch node. S432: After the core nodes are merged, the links from the root node to the leaf node form the merged path; S433: If the condition parameter values of all core nodes on the merged path are non-empty, then the leaf nodes of the merged path are true. S434: If any core node in the merged path has a condition parameter value that is empty, then the leaf node of the merged path is set to false. S435: The binary decision graph formed by merging all leaf nodes with true values is called the AND decision graph.
[0045] In S431-S435, when performing a logical AND operation on two binary decision graphs, the system synchronously traverses downwards layer by layer from the root node of each graph. The core operation is to merge the root nodes or branch nodes with the same condition description in the two graphs. After merging, the condition parameter value of the node is the intersection of the two. If the condition descriptions in the two graphs are different, they cannot be merged and are each retained as an independent node.
[0046] For example, if the root node condition description of the first binary decision graph is "levee level" and the root node condition description of the second binary decision graph is also "levee level," and their condition descriptions are the same, then they are merged into one node, and its condition parameter value is the intersection of the two. That is, if both are level 1, then the intersection is level 1. If the root node condition description of the first binary decision graph is "levee level" and the root node condition description of the second binary decision graph is "reservoir type," and their condition descriptions are different, then they cannot be merged. Both are retained as nodes in the merged path, and their corresponding condition parameter values are also retained.
[0047] After each branch node is merged or retained, the links from the root node to the leaf node naturally form the merged path. If the intersection of the condition parameter values of a node on the merged path is empty (for example, the first node requires a dike level of 1, and the second node requires a dike level of 2, and they have no intersection), then the condition parameter value of that node is empty, the entire path is invalid, and the leaf node is set to false. Only when the condition parameter values of all nodes on the merged path are not empty is the path valid, and the leaf nodes are set to true. The binary decision graph formed by the merged path with all leaf nodes set to true is the result and decision graph of the logical AND operation.
[0048] In S44, it is determined whether there is any path with a true value in the decision graph. If there is no path with a true value, it means that the intersection of the sets of scenarios that can be satisfied by the two triggering conditions is empty, that is, there is no scenario that can trigger the two standard clauses at the same time. In this case, the two clauses to be processed take effect independently under different scenario conditions, and it is impossible for them to generate constraints at the same time in the same engineering scenario. Therefore, there is no need to compare the execution actions, and it can be directly determined that there is no logical conflict.
[0049] In S45, refer to as follows Figure 7 The flowchart illustrating the method for obtaining candidate conflict scenarios shows that "extracting the combination of scenario conditions corresponding to paths with true values from the decision graph as candidate conflict scenarios" includes the following steps: S451: Start from the root node of the decision graph and traverse the path, going down each branch node with a true value until the leaf node with a true value is reached. S452: Combine the condition description items and corresponding condition parameter values of all branch nodes on the traversed path according to the logical AND relationship to form the scene condition combination corresponding to the path. S453: If there are multiple paths with true values in the decision graph, extract the scenario condition combination corresponding to each path as a candidate conflict scenario.
[0050] In S451-S453, when a path with a true value exists in the decision graph, starting from the root node of the decision graph, select the branch with a true value (the branch whose condition parameter value is satisfied) to enter the next level node; if the current branch node has multiple sub-branches, only select the branch with a true value to continue traversing downwards; repeat this process until a leaf node with a true value is reached. Each complete path from the root node to a true leaf node represents a combination of scenario conditions that can simultaneously satisfy the triggering conditions of two pending clauses.
[0051] For each branch node visited, the condition description and condition parameter value of that branch node are recorded as one of the condition items in the scene condition combination. Finally, all condition items are connected by a logical AND to form a complete scene condition combination. For example, if the traversal path passes through the branch nodes "Elevation Level = 1" and "Foundation Type = Weak", the resulting scene condition combination is "Elevation Level = 1 and Foundation Type = Weak".
[0052] When multiple paths in the decision graph are true, it indicates that there are multiple different combinations of scenario conditions that can trigger both clauses to be processed simultaneously. The scenario condition combinations corresponding to each path are extracted independently using the above method. Each resulting scenario condition combination is a candidate conflict scenario. These scenario condition combinations together constitute a set of candidate conflict scenarios. Subsequent steps will compare whether the execution actions of the two clauses are mutually exclusive within each candidate conflict scenario.
[0053] In S46, refer to as follows Figure 8 The flowchart illustrating the mutual exclusion judgment method, which states that "in a candidate conflict scenario, comparing whether the execution actions of two pending clauses are mutually exclusive," includes the following steps: S461: Extract the action description and action parameter values from the two pending clauses' execution actions; S462: If two actions have the same action description and the action parameter is a numerical parameter, then compare whether the ranges of the two values have an intersection. If there is no intersection, they are determined to be mutually exclusive; if there is an intersection, they are determined to be mutually exclusive. S463: If the action description items of two actions are the same and the action parameter value is an instruction type action, then determine whether the two instructions belong to a preset mutually exclusive action pair. If they do, they are determined to be mutually exclusive; otherwise, they are determined to be non-mutually exclusive.
[0054] In S461-S463, under candidate conflict scenarios, the action description items and action parameter values of the execution actions of the two pending clauses are extracted. After extraction, the action description items of the two execution actions are compared to see if they are the same. If the action description items are different, it means that the two clauses constrain different design parameters or behaviors, do not constitute a conflict, and no further comparison is needed; if the action description items are the same, different comparison methods are used according to the type of action parameter values.
[0055] For numerical parameters, compare whether the ranges of two values overlap. Numerical parameters include greater than or equal to (e.g., ≥1.5m), less than or equal to (e.g., ≤1.0m), and interval types (e.g., 1.0m~1.5m). Convert each action parameter value into a numerical range, then calculate whether two ranges overlap. If the overlap is empty, they are considered mutually exclusive; otherwise, they are considered non-exclusive. For command-type actions, determine whether two commands belong to a preset mutually exclusive action pair, such as allow and prohibit, must and cannot. If two commands belong to a preset mutually exclusive action pair, they are considered mutually exclusive; otherwise, they are considered non-exclusive.
[0056] In S5, refer to as follows Figure 9 The flowchart illustrating the method for obtaining conflict evidence shows that "obtaining conflict evidence when logical conflicts exist" includes the following steps: S51: Obtain standard source information for two pending clauses that have logical conflicts; S52: Obtain the description items and action parameter values of the conflicting actions in the execution actions of the two pending clauses; S53: Use standard source information, candidate conflict scenarios, and conflicting action descriptions and action parameter values as evidence of conflict.
[0057] In steps S51-S53, the source information of two logically conflicting clauses is extracted from the standard clause library. This information includes the standard name, standard number, clause number, and the original text of the clause. This clarifies the specific standard and clause location involved in the conflict. The source information was already acquired and stored during the standard clause extraction in step S2 and can be retrieved directly based on the clause identifier. Simultaneously, candidate conflict scenarios are extracted—specific combinations of conditions that trigger both clauses simultaneously—to illustrate the specific engineering scenario in which the conflict occurs. The action descriptions and parameter values of the two mutually exclusive actions are obtained to explain the specific contradictory content of the actions. The action descriptions are parameter names (e.g., superelevation of the levee crest), and the action parameter values are corresponding values or instructions (e.g., ≥1.5m and ≤1.0m). These three pieces of information are then combined to form complete conflict evidence.
[0058] In S6, conflict detection reports are output in a unified format, including the standard source information of the two standard clauses involved in the conflict (standard name, standard number, clause number, and original clause text), the sub-scenario to which the two clauses belong, candidate conflict scenarios with overlapping triggering conditions, the specific details of the conflicting actions (action description items and conflicting action parameter values), conflict type labels (numerical range conflict or instruction mutual exclusion conflict), and a conflict description and suggested handling methods automatically generated by the system. The report supports JSON format output and also supports generating readable documents for expert review.
[0059] Reference Figure 10 This disclosure provides a water conservancy standard knowledge conflict detection system, including: Module 101 is used to construct several sub-scenes of the water conservancy project to be tested and obtain the keyword combination of each sub-scene; The extraction module 102 is used to extract several standard clauses from the water conservancy standard knowledge document; among them, the standard clauses include the applicable objects, triggering conditions and execution actions; The filtering module 103 is used to match the applicable objects of standard clauses with the keyword combination of sub-scenarios, and filter out the clauses to be processed that belong to the same sub-scenarios. The judgment module 104 is used to determine whether there is a logical conflict between any two pending clauses based on the triggering conditions and execution actions of any two pending clauses in the same sub-scenario. The acquisition module 105 is used to acquire evidence of conflict when a logical conflict exists. The sorting module 106 is used to sort out the pending clauses with logical conflicts, their respective sub-scenarios, and the corresponding conflict evidence into a conflict detection report.
[0060] The various variations and specific examples of the water conservancy standard knowledge conflict detection method provided above are also applicable to the water conservancy standard knowledge conflict detection system provided in this disclosure. Through the foregoing detailed description of the water conservancy standard knowledge conflict detection method, those skilled in the art can clearly understand the implementation method of the water conservancy standard knowledge conflict detection system. For the sake of brevity, it will not be described in detail here.
[0061] A computer device according to embodiments of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0062] The processor may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of this disclosure, the processor is used to run computer-readable instructions stored in the memory, causing the computer device to perform all or part of the steps of the water conservancy standard knowledge conflict detection method described in the foregoing embodiments of this disclosure.
[0063] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.
[0064] like Figure 11 This is a schematic diagram of a computer device provided for an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the computer device in the embodiments of the present disclosure. Figure 11 The computer device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0065] like Figure 11 As shown, a computer device may include a processor (such as a central processing unit, graphics processing unit, etc.), which performs various appropriate actions and processes based on programs stored in read-only memory (ROM) or programs loaded from storage devices into random access memory (RAM). The RAM also stores various programs and data required for the operation of the computer device. The processor, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0066] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow the computer device to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 11 A computer apparatus with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or included alternatively.
[0067] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the water conservancy standard knowledge conflict detection method of embodiments of this disclosure are performed.
[0068] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0069] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the water conservancy standard knowledge conflict detection method described in the foregoing embodiments of the present disclosure are performed.
[0070] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
[0071] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0072] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0073] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.
[0074] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0075] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0076] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0077] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0078] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A method for detecting knowledge conflicts in water conservancy standards, characterized in that, include: Construct several sub-scenarios of the water conservancy project to be tested, and obtain the keyword combination of each sub-scenarios; Several standard clauses were extracted from the water conservancy standards knowledge document; these standard clauses include the applicable objects, triggering conditions, and execution actions. The applicable objects of the standard clauses and the keyword combinations of the sub-scenarios are matched to filter out the clauses to be processed that belong to the same sub-scenario. Based on the triggering conditions and execution actions of any two pending clauses in the same sub-scenario, determine whether there is a logical conflict between the two pending clauses. When logical conflicts exist, obtain evidence of the conflict. The clauses with logical conflicts, their respective sub-scenarios, and the corresponding evidence of conflict are compiled into a conflict detection report.
2. The method for detecting knowledge conflicts in water conservancy standards according to claim 1, characterized in that, The process involves constructing several sub-scenarios of the water conservancy project to be tested, and obtaining keyword combinations for each sub-scenarios, including: Retrieve the standard name and professional category information of each standard document in the water conservancy standards knowledge base; The standard name and the professional category information are segmented and keywords are extracted to obtain a set of candidate scenario keywords. Cluster the keywords in the candidate scenario keyword set to obtain several keyword clusters; Each keyword cluster corresponds to an engineering field as a sub-scenario, and the keywords in the keyword cluster are used as the keyword combination of the sub-scenario.
3. The method for detecting knowledge conflicts in water conservancy standards according to claim 1, characterized in that, The step of matching the applicable objects of the standard clauses with the keyword combinations of the sub-scenarios to filter out the clauses to be processed belonging to the same sub-scenario includes: Match the applicable objects of the standard clauses with each keyword in the keyword combination of the sub-scenario; If at least one keyword in the keyword combination of the sub-scenario successfully matches the applicable object, then the standard clause is determined to belong to the sub-scenario.
4. The method for detecting knowledge conflicts in water conservancy standards according to claim 1, characterized in that, The determination of whether there is a logical conflict between any two pending clauses based on their triggering conditions and execution actions within the same sub-scenario includes: Convert the trigger conditions of any two pending clauses in the same sub-scene into logical expressions respectively; Transform the logical expressions of any two pending clauses into binary decision graphs respectively; Perform a logical AND operation on the two transformed binary decision graphs to obtain an AND decision graph; If there is no path with a true value in the decision graph, it is determined that the two pending clauses do not have overlapping triggering conditions and do not constitute a logical conflict. If there is a path with a true value in the decision graph, then the combination of scenario conditions corresponding to the path with a true value is extracted from the decision graph as a candidate conflict scenario; In the candidate conflict scenario, compare whether the execution actions of the two pending clauses are mutually exclusive. If they are mutually exclusive, it is determined that there is a logical conflict; if they are not mutually exclusive, it is determined that there is no logical conflict.
5. The method for detecting knowledge conflicts in water conservancy standards according to claim 4, characterized in that, The step of converting the logical expressions of any two pending clauses into binary decision graphs includes: Convert each condition descriptor in the logical expression into a Boolean variable; According to the logical order and logical operation relationship between the condition description items in the logical expression, the Boolean variables are organized into a decision tree structure; wherein, the decision tree structure includes a root node, a branch node and a leaf node, the root node and the branch node each correspond to a condition description item, and the leaf node takes the value of true or false; The decision tree structure is processed by node merging and redundancy removal to obtain the binary decision graph.
6. The method for detecting knowledge conflicts in water conservancy standards according to claim 4, characterized in that, The step of performing a logical AND operation on the two transformed binary decision graphs to obtain an AND decision graph includes: The two transformed binary decision graphs are traversed synchronously, and the core nodes with the same condition description items in the two binary decision graphs are merged. The condition parameter values of the merged core nodes are taken as the intersection of the condition parameter values of the original two core nodes. The core nodes include root nodes and branch nodes. After the core nodes are merged, the links from the root node to the leaf node form the merged path; If the condition parameter values of all core nodes on the merged path are non-empty, then the leaf nodes of the merged path are true. If any core node in the merged path has a condition parameter value that is empty, then the leaf node of the merged path will be set to false. The binary decision graph formed by merging all paths where all leaf nodes are true is called the AND decision graph.
7. The method for detecting knowledge conflicts in water conservancy standards according to claim 4, characterized in that, The combination of scenario conditions corresponding to the paths with true values extracted from the decision graph, as candidate conflict scenarios, includes: Starting from the root node of the decision graph, traverse the path and go down each branch node layer by layer along the branches with true values until the leaf node with a true value is reached. The condition description items and corresponding condition parameter values of all branch nodes on the traversed path are combined by logical AND to form the scene condition combination corresponding to the path. If there are multiple paths with true values in the decision graph, then the scenario condition combination corresponding to each path is extracted as a candidate conflict scenario.
8. The method for detecting knowledge conflicts in water conservancy standards according to claim 4, characterized in that, In the aforementioned candidate conflict scenario, comparing whether the execution actions of the two pending clauses are mutually exclusive includes: Extract the action description and action parameter values from the two pending clauses' execution actions; If two actions have the same action description and the action parameter is a numerical parameter, then compare whether the ranges of the two values have an intersection. If there is no intersection, they are determined to be mutually exclusive; if there is an intersection, they are determined to be mutually exclusive. If two actions have the same action description and the action parameter value is an instruction type action, then it is determined whether the two instructions belong to a preset mutually exclusive action pair. If they do, they are determined to be mutually exclusive; otherwise, they are determined to be non-mutually exclusive.
9. The method for detecting knowledge conflicts in water conservancy standards according to claim 4, characterized in that, When a logical conflict exists, obtaining evidence of the conflict includes: Obtain standard source information for two pending clauses that have logical conflicts; Obtain the description items and action parameter values of the conflicting actions in the execution actions of the two pending clauses; The standard source information, the candidate conflict scenarios, and the conflicting action descriptions and action parameter values are used as evidence of conflict.
10. A knowledge conflict detection system for water conservancy standards, characterized in that, The system includes: The construction module is used to build several sub-scenes of the water conservancy project to be tested and obtain the keyword combination of each sub-scene; The extraction module is used to extract several standard clauses from the water conservancy standard knowledge document; wherein, the standard clauses include the applicable objects, triggering conditions, and execution actions; The filtering module is used to match the applicable objects of the standard clauses with the keyword combinations of the sub-scenarios to filter out the clauses to be processed that belong to the same sub-scenario. The judgment module is used to determine whether there is a logical conflict between any two pending clauses based on their triggering conditions and execution actions within the same sub-scenario. The acquisition module is used to obtain evidence of logical conflicts when they exist. The sorting module is used to compile conflict-ridden clauses, their respective sub-scenarios, and corresponding conflict evidence into a conflict detection report.
