CN109657796A - Judgment rule processing method, device and system for sewage disposal system - Google Patents
Judgment rule processing method, device and system for sewage disposal system Download PDFInfo
- Publication number
- CN109657796A CN109657796A CN201811518194.9A CN201811518194A CN109657796A CN 109657796 A CN109657796 A CN 109657796A CN 201811518194 A CN201811518194 A CN 201811518194A CN 109657796 A CN109657796 A CN 109657796A
- Authority
- CN
- China
- Prior art keywords
- rule
- conclusion
- premise
- regular
- regulated
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 52
- 239000010865 sewage Substances 0.000 title claims abstract description 44
- 230000001105 regulatory effect Effects 0.000 claims abstract description 128
- 238000001514 detection method Methods 0.000 claims abstract description 41
- 238000009795 derivation Methods 0.000 claims abstract description 16
- 230000014509 gene expression Effects 0.000 claims description 56
- 238000012545 processing Methods 0.000 claims description 40
- 238000003860 storage Methods 0.000 claims description 27
- 238000012360 testing method Methods 0.000 claims description 19
- 238000007689 inspection Methods 0.000 claims description 2
- 238000000034 method Methods 0.000 abstract description 57
- 238000004519 manufacturing process Methods 0.000 description 36
- 238000004062 sedimentation Methods 0.000 description 19
- 239000010802 sludge Substances 0.000 description 17
- 230000032683 aging Effects 0.000 description 13
- 238000005457 optimization Methods 0.000 description 13
- 239000007787 solid Substances 0.000 description 13
- 238000004422 calculation algorithm Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000004364 calculation method Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 6
- 230000008094 contradictory effect Effects 0.000 description 6
- 238000007667 floating Methods 0.000 description 6
- 239000010842 industrial wastewater Substances 0.000 description 6
- 238000005273 aeration Methods 0.000 description 4
- 238000007670 refining Methods 0.000 description 4
- 238000004804 winding Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000000428 dust Substances 0.000 description 2
- 230000008030 elimination Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000006260 foam Substances 0.000 description 2
- 239000002245 particle Substances 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- RWSOTUBLDIXVET-UHFFFAOYSA-N Dihydrogen sulfide Chemical compound S RWSOTUBLDIXVET-UHFFFAOYSA-N 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000029087 digestion Effects 0.000 description 1
- 230000005684 electric field Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000020509 sex determination Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/02—Knowledge representation; Symbolic representation
- G06N5/022—Knowledge engineering; Knowledge acquisition
- G06N5/025—Extracting rules from data
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Computing Systems (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of judgment rule processing method, device and system for sewage disposal system.The judgment rule processing method comprises determining that the rule with canonical form, canonical form includes premise set and conclusion set, premise set is extracting between the precondition using the rule, and each conclusion all has derivation relationship in premise set and conclusion set;Whether the conclusion set of the first rule of detection is the subset for having rule conclusion set in the knowledge of sewage disposal system;If it is the subset of existing rule conclusion set, whether the premise set of the first rule of detection contains well-regulated premise set;If the premise set of the first rule contains well-regulated premise set, determines that the rule is redundancy rule, refuse regular middle addition rule in knowledge base.The method provided according to embodiments of the present invention can improve the working efficiency of expert system and the correctness of operation result with principle of optimality library memory space.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of judgment rule processing sides for sewage disposal system
Method, device and system.
Background technique
Expert system can be applied to the fault diagnosis of every profession and trade process flow and equipment etc., utilize O&M technical staff
Expertise solving practical problems comprising knowledge base make up the deficiency of new employee's failure disposition practical experience.In addition, comprising dynamic
The expert system of state knowledge base is also able to achieve the accumulation and update of knowledge and experience, grasps O&M technical staff in time and place
The case where sewage treatment plant, is best suitable for and newest expertise.
As time increases, the knowledge in knowledge base can be more and more, this meeting for expert system based on dynamic repository
The workload for increasing inquiry with retrieval, reduces the working efficiency of expert system;And newly-increased knowledge may be advised with original reasoning
There are logic conflicts between then, if logic conflict cannot be handled effectively, influence whether the correctness of operation result, or even cause specially
Family's system is unable to operate normally.
Summary of the invention
The embodiment of the present invention provides a kind of judgment rule processing method, device and system for sewage disposal system, can
The memory space of rule base in knowledge base to optimize sewage disposal system, improves the working efficiency and operation result of expert system
Correctness.
According to a first aspect of the embodiments of the present invention, a kind of judgment rule processing side for sewage disposal system is provided
Method, comprising:
Determine first rule with canonical form, canonical form includes premise set and conclusion set, wherein premise collection
Conjunction is extracting between the precondition using the first rule, and premise set all has with each conclusion in conclusion set
Derivation relationship;
Obtain sewage disposal system knowledge base in one it is regular, detection first rule conclusion set whether be
The subset of regular conclusion set;
When the conclusion collection of first rule is combined into the subset of existing rule conclusion set, the premise set of the first rule of detection is
It is no to contain well-regulated premise set;
If first rule premise set contain well-regulated premise set, determine first rule be knowledge base in
Well-regulated redundancy rule refuses regular middle the first rule of addition in knowledge base.
According to a second aspect of the embodiments of the present invention, a kind of judgment rule processing dress for sewage disposal system is provided
It sets, comprising:
Canonical form determining module, for determining first rule with canonical form, canonical form includes premise set
With conclusion set, wherein premise set is extracting between the precondition using the first rule, premise set and knot
Each conclusion all has derivation relationship in analects conjunction;
Conclusion compatibility detection module, regular a, detection the in the knowledge base for obtaining sewage disposal system
Whether the conclusion set of one rule is the subset for having rule conclusion set;
Premise compatibility detection module, if the conclusion collection for the first rule is combined into the son of existing rule conclusion set
Whether the premise set of collection, the first rule of detection contains well-regulated premise set;
Redundancy rule processing module, if the premise set for the first rule contains well-regulated premise set, really
Determining the first rule is that well-regulated redundancy rule, refusal are regular in the regular middle addition first of knowledge base in knowledge base.
According to a third aspect of the embodiments of the present invention, a kind of judgment rule processing system for sewage disposal system is provided
System, comprising: memory and processor;The memory is for storing program;The processor be used for read stored in memory can
Program code is executed to execute the above-mentioned judgment rule processing method for sewage disposal system.
According to a fourth aspect of the embodiments of the present invention, a kind of computer readable storage medium is provided, this is computer-readable
Instruction is stored in storage medium, when instruction run on computers when so that computer execute above-mentioned various aspects for dirt
The judgment rule processing method of water treatment system.
According to a fifth aspect of the embodiments of the present invention, a kind of judgment rule processing method is provided, comprising:
Determine first rule with canonical form, the canonical form includes premise set and conclusion set, wherein institute
Stating premise set is to utilize extracting between the described first regular precondition, the premise set and the conclusion
Each conclusion all has derivation relationship in set;
Obtain in knowledge base one it is regular, whether the conclusion set for detecting first rule is described regular
The subset of conclusion set;
When the conclusion collection of first rule is combined into the subset of the existing rule conclusion set, first rule is detected
Premise set whether contain the well-regulated premise set;
If the premise set of first rule contains the well-regulated premise set, first rule is determined
For well-regulated redundancy rule, refusal are advised in the regular middle addition described first of the knowledge base in the knowledge base
Then.
According to a sixth aspect of the embodiments of the present invention, a kind of judgment rule processing unit is provided, comprising:
Canonical form determining module, for determining first rule with canonical form, the canonical form includes premise
Set and conclusion set, wherein the premise set is extracting between the precondition using first rule,
Each conclusion all has derivation relationship in the premise set and the conclusion set;
Conclusion compatibility detection module, for obtaining regular a, knot for detection first rule in knowledge base
Analects close whether be the existing rule conclusion set subset;
Premise compatibility detection module, if the conclusion collection for first rule is combined into the existing rule conclusion collection
Whether the subset of conjunction, the premise set for detecting first rule contain the well-regulated premise set;
Redundancy rule processing module, if the premise set for first rule contains the well-regulated premise
Set determines that first rule is that well-regulated redundancy rule, refusal have the knowledge base in the knowledge base
First rule is added in rule.
According to embodiments of the present invention in for the judgment rule processing method of sewage disposal system, device, system and deposit
Storage media defines canonical form regular in the knowledge base of sewage disposal system, and then defines the determination method of redundancy rule,
Reasoning Efficiency is improved simultaneously in optimization memory space.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention
Attached drawing is briefly described, for those of ordinary skill in the art, without creative efforts, also
Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 is the flow chart for showing the judgment rule processing method of sewage disposal system according to an embodiment of the invention;
Fig. 2 is the decision process flow diagram for showing redundancy rule and contradiction rule according to an embodiment of the present invention;
Fig. 3 is to show new rule according to an embodiment of the present invention to increase flow diagram;
Fig. 4 shows the flow chart for the judgment rule processing method that an embodiment provides according to the present invention;
Fig. 5 shows the structure of the judgment rule processing unit for the sewage disposal system that an embodiment provides according to the present invention
Schematic diagram;
Fig. 6 shows the structural schematic diagram of judgment rule processing unit according to an embodiment of the invention;
Fig. 7 is to show the calculating equipment that can be realized judgment rule treating method and apparatus according to an embodiment of the present invention
The structure chart of exemplary hardware architecture.
Specific embodiment
The feature and exemplary embodiment of various aspects of the invention is described more fully below, in order to make mesh of the invention
, technical solution and advantage be more clearly understood, with reference to the accompanying drawings and embodiments, the present invention is further retouched in detail
It states.It should be understood that specific embodiment described herein is only configured to explain the present invention, it is not configured as limiting the present invention.
To those skilled in the art, the present invention can be real in the case where not needing some details in these details
It applies.Below the description of embodiment is used for the purpose of better understanding the present invention to provide by showing example of the invention.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including
There is also other identical elements in the process, method, article or equipment of the element.
In general, the knowledge in expert system includes two class of data and inference rule.Production KR is a kind of knowledge table
Show mode, including premise and conclusion.Premise is also referred to as the former piece of production, for the prerequisite that production could use, conclusion
The also referred to as consequent of production, premised on when meeting, it should the conclusion of release or the movement that should be executed.Therefore, the present invention is real
It applies the rule in example and is referred to as being production rule.
For deletion, modification and the supplementary question of inference rule in general expert system knowledge base, generation can be passed through
The refining algorithms of formula rule base, to improve the Reasoning Efficiency and correctness of rule base.As an example, the refining algorithms assume rule
The strictly all rules stored in library are Horn clause, and Horn clause is a kind of representation of logic rules.It is every in Horn clause
The form of rule all meets: 1) regular premise is the conjunction of several texts, and identical text is before a rule
Can only occur in mentioning primary;2) regular conclusion is a text.Wherein, a text refers to an atomic proposition or an original
The negative of subproposition.
But since the refining algorithms in the production rule library need to limit identical text in the premise of a rule
Can only occur primary, and the conclusion of rule can only be a text, excessively strictly, cause the refining algorithms not can be used directly in
Inference rule is numerous, but most of expert systems that reasoning number is less.
The embodiment of the present invention, which provides, a kind of for the judgment rule processing method of sewage disposal system, device, system and deposits
Storage media is given by establishing new representation of knowledge canonical form, and based on representation of knowledge canonical form by logic calculus
The detection of redundancy rule and the detection of removing method and contradiction rule and processing method out, can reduce shared by inference rule
Memory space improves the working efficiency of expert system and the correctness of operation result.It, can in the description of embodiment below
With by the canonical form of production rule, referred to as production rule standard type.
Pass through the representation of knowledge canonical form in the specific embodiment description present invention first below.Under in order to make it easy to understand,
Technical term and symbol meaning used in the embodiment of the present invention are illustrated.
For example, in the description of following embodiments:
(1) m, n and i indicate natural number;
(2) P or Q indicates that atomic proposition, atomic proposition do not include proposition of other propositions as component part, that is, exist
The proposition of other propositions cannot be decomposited in structure again.As an example, in atomic proposition without it is non-or and if, so
Etc. logical relations connective.
(3) Text=P orThat is Text indicates the negative of proposition or proposition.
(4) Clause=Text1∧Text2∧…∧Texti, i.e. the regular premise of Clause expression one, the rule premise
It can be expressed as the conjunction of one or more propositions.
According to above-mentioned definition and description, in embodiments of the present invention, knowledge base can be described by following expression formula (1)
The canonical form of middle production rule R.For the convenience of description, the canonical form of production rule R is referred to as production rule
Standard type R.Such as production rule standard type R1, production rule standard type R2Deng.
In one embodiment, production rule standard type R can be expressed as following expressions (1):
(Clause1∨Clause2∨…∨Clausem)→{Q1, Q2..., Qn} (1)
In embodiments of the present invention, expression formula (1) is equivalent to:
(Clause1∨Clause2∨…∨Clausem)→Q1,
(Clause1∨Clause2∨…∨Clausem)→Q2,
..., and (Clause1∨Clause2∨…∨Clausem)→QnIt sets up simultaneously.
By above-mentioned expression formula (1) it is found that in the production rule canonical form of the embodiment of the present invention, precondition can be with
It is that precondition is extracted in one or more rules, in the precondition and conclusion set each conclusion all has reasoning pass
System.
For convenience, in the description in embodiment below, using technical term premise set, to describe production
Precondition in rule criterion form, i.e. premise set are to extract to obtain between the precondition using one or more rules
's.
In order to better understand the present invention, below in conjunction with attached drawing, judgement rule according to an embodiment of the present invention are described in detail
Then processing method, it should be noted that these embodiments are not for limiting the scope of the present disclosure.
Fig. 1 is to show the stream according to an embodiment of the present invention that judge judgment rule processing method for sewage disposal system
Cheng Tu.As shown in Figure 1, the judgment rule processing method 100 for sewage disposal system in the embodiment of the present invention includes following
Step:
Step S110, determining has the first rule of canonical form, and canonical form includes premise set and conclusion set,
In, premise set is extracting between the precondition using the first rule, each in premise set and conclusion set
Conclusion all has derivation relationship.
In this step, the first rule can indicate a logic rules wait enter knowledge base.In one embodiment,
Step S110 can specifically include:
Step S111 obtains the premise set of the first rule and the knot of the first rule according to the propositional formula of the first rule
Analects closes, and the precondition of each first rule includes one or more atomic propositions.
Step S112 establishes the corresponding principal disjunctive normal form expression formula of premise set of the first rule.
Step S113 utilizes the corresponding principal disjunctive normal form expression formula of premise set of the first rule and the conclusion of the first rule
The derivation relationship of each conclusion in set constitutes first rule with canonical form.
In this embodiment, the logic rules wait enter knowledge base are expressed as to the form of principal disjunctive normal form, convenient for subsequent
Judge well-regulated compatibility in the logic rules and knowledge base wait enter knowledge base, so that precondition is comparable,
Improve treatment effeciency and accuracy.
Step S120 obtains regular, a conclusion collection for the first rule of detection in the knowledge base of sewage disposal system
Whether close is the subset for having rule conclusion set.
Step S130, if the conclusion collection of the first rule is combined into the subset of existing rule conclusion set, the first rule of detection
Premise set whether contain well-regulated premise set.
Step S140 determines that the first rule is if the premise set of the first rule contains well-regulated premise set
Well-regulated redundancy rule, refusal are regular in the regular middle addition first of knowledge base in knowledge base.
In this step, if the conclusion collection of the first rule is combined into the subset of existing rule conclusion set, and the first rule
Premise set contain well-regulated premise set, determine that first rule is well-regulated redundancy rule in knowledge base.
Judgment rule processing method according to an embodiment of the present invention can realize redundancy reasoning based on logic calculus
The detection and elimination of rule.If a new rule to entrance knowledge base is redundancy rule, rule entrance can be refused and known
Library is known, to save memory space;Also, if there is regular in knowledge base, the judgment rule through above-described embodiment
Processing method is determined as it being redundancy rule, can delete this redundancy rule to the optimization processing of rule by executing in knowledge base
Then, to save memory space.
In the judgment rule processing method of the embodiment of the present invention, contradiction reasoning can also be realized based on logic calculus
The detection and elimination of rule.
In one embodiment, the judgment rule processing method 100 of sewage disposal system can also include:
Step S150, whether conclusion is compatible the first rule between based on regular, and regular advises with first
Whether premise is compatible between then, determine first rule with knowledge base in it is regular whether be contradiction rule.
In this step, regular for one in knowledge base, it can use well-regulated conclusion set and first
The conclusion set of rule, determination is regular, and whether conclusion is compatible between the first rule.
It specifically, can if there are inclusion relations between well-regulated conclusion set and the conclusion set of the first rule
It is compatible with the regular conclusion between the first rule of determination;If the conclusion collection of well-regulated conclusion set and the first rule
Inclusion relation is not present between conjunction, then can determine that the regular conclusion between the first rule is incompatible.
In one embodiment, exist between well-regulated conclusion set and the conclusion set of the first rule comprising closing
System, comprising: well-regulated conclusion set includes the conclusion set of the first rule or the conclusion set of the first rule includes
Well-regulated conclusion set.
As an example, in embodiments of the present invention, it is assumed that Q11, Q12..., Q1mFor production rule standard type R1's
Conclusion, Q21, Q22..., Q2nFor production rule standard type R2Conclusion.If R1Conclusion and R2Conclusion meet:
Or meet:
Then indicate:
R1Conclusion set and R2Conclusion set between there are inclusion relation, R1Conclusion and R2Conclusion be compatible.
In this example, if R1Conclusion and R2Conclusion be it is incompatible, then can claim R1Conclusion and R2Conclusion
It is contradictory.
In this step, if the regular conclusion between the first rule is compatible, utilization well-regulated premise set
With the premise set of the first rule, detection is regular, and whether premise is compatible between the first rule.
In this step, detect it is regular between the first rule whether the compatible step of premise, can specifically include:
If the regular conclusion between the first rule is compatible, determining has the regular of canonical form, obtains tool
There is the well-regulated premise set of identification standard form.
If there are implication relation between well-regulated premise set and the premise set of the first rule, judgement has rule
Premise is compatible between the premise set of premise set and the first rule then.
If implication relation is not present between well-regulated premise set and the premise set of the first rule, determine existing
Premise is incompatible between the premise set of rule and the premise set of the first rule.
Specifically, there are implication relations between well-regulated premise set and the premise set of the first rule, can wrap
It includes:
It is well-regulated in the first implication that the premise set of well-regulated premise set and the first rule is constituted
Premise collection is combined into the former piece of the first implication, and the premise collection of the first rule is combined into the consequent of the first implication, alternatively,
In the premise set of the first rule and in the second implication that well-regulated premise set is constituted, first is regular
Premise collection is combined into the former piece of the second implication, and well-regulated premise collection is combined into the consequent of the second implication.
As an example, it is assumed that Clause11∨Clause12∨…∨Clause1mFor production rule standard type R1's
Premise, Clause11∨Clause12∨…∨Clause1nFor production rule standard type R2Premise.If R1Premise and R2
Premise meet implication relation expressed by following implication:
Clause11∨Clause12∨…∨Clause1m→Clause11∨Clause12∨…∨Clause1n;Or R1
Premise and R2Premise meet implication relation expressed by following implication:
Clause11∨Clause12∨…∨Clause1n→Clause11∨Clause12∨…∨Clause1m, then table
Show:
Production rule standard type R1And R2Premise be compatible.
In one embodiment, if R1Premise and R2Premise be it is incompatible, then can claim R1Premise and R2's
On condition that contradictory.
In one embodiment, if production rule standard type R1Conclusion and production rule standard type R2Conclusion
Be it is incompatible, then claim R1And R2Conclusion be contradictory.
In one embodiment, if production rule standard type R1Premise and R2Premise be it is incompatible, then claim R1
And R2Premise be contradictory.
As an example, if R1And R2Premise be it is contradictory, then following inference rule:
Clause1i→(Clause21∨Clause22∨…∨Clause2n), 1≤i≤m and
Clause2j→(Clause11∨Clause12∨…∨Clause1m), in 1≤j≤n,
At least one is invalid.
In embodiments of the present invention, if production rule standard type R1Conclusion and production rule standard type R2Knot
By incompatible or production rule standard type R1Premise and R2Premise it is incompatible, then R1And R2It is conflicting rule
Then.
In one embodiment, step S150 can specifically include:
If the regular conclusion between the first rule is incompatible, or the regular conclusion phase between the first rule
Hold but premise is incompatible, then one for reacquiring knowledge base is regular, until the number of acquisition is more than to have in knowledge base
The quantity of rule determines regular for contradiction rule in the first rule and knowledge base.
In embodiments of the present invention, the inference rule premise of any logical relation can be converted into this by logic calculus
Regular canonical form in inventive embodiments.The canonical form of the production rule representation of knowledge, while being also a kind of production rule
The then reduced form of the representation of knowledge may be implemented the optimization storage of expertise, reduce memory space.
In one embodiment, according to the correlation theory of logistics, all there is the main analysis for being equivalent to it in any propositional formula
Normal form and unique is taken, principal disjunctive normal form can reduce the proposition number for including in rule by logic minimization.Therefore, in order to be conducive to
The comparison of proposition between inference rule before the redundancy sex determination for carrying out rule in above-described embodiment, can first pass through logic
Calculation conversion converts for the well-regulated canonical form in the canonical form and rule base of first rule to be processed
The principal disjunctive normal form of the canonical form of one rule, and the principal disjunctive normal form of well-regulated canonical form.
In embodiments of the present invention, according to the definition of redundancy rule and contradiction rule, the two has alternative, i.e., if R1
It is not R1And R2In redundancy rule, then R1And R2For contradiction rule.Therefore, no matter in the embodiment of the present invention, the first rule of selection
It is then already present in the knowledge base of expert system, still needs a new rule for being entered knowledge base, the phase between inference rule
Capacitive and paradox problem can be attributed to redundancy rule decision problem.
Step S160, if first rule with knowledge base in it is regular be contradiction rule, obtain one of knowledge base
It is regular, it detects the premise set of the first rule and whether well-regulated premise set is identical, be based on testing result, knowing
Know regular middle first rule of addition in library.
In one embodiment, step S160 can specifically include:
Step S1601, when testing result, detection different from well-regulated premise set for the premise set of the first rule
Whether the conclusion set and well-regulated conclusion set of the first rule are identical;
Step S1602 utilizes the first rule if the conclusion set of the first rule is identical as well-regulated conclusion set
Generate new rule, the premise set of new rule is the premise set using the first rule and well-regulated premise set is extracted
It obtains, and the conclusion collection of new rule is combined into the conclusion set of the first rule;
Step S1603 carries out abbreviation to the premise set of new rule, after the regular middle addition abbreviation of knowledge base
New rule.
In one embodiment, step S160 can specifically include:
Step S1604, when testing result, detection different from well-regulated premise set for the premise set of the first rule
Whether the conclusion set and well-regulated conclusion set of the first rule are identical;
Step S1605 obtains knowledge base if the conclusion set of the first rule is different from well-regulated conclusion set
Next regular, until the number of acquisition is more than well-regulated quantity in knowledge base;
Step S1606 carries out abbreviation to the premise set of new rule, after the regular middle addition abbreviation of knowledge base
New rule.
In one embodiment, step S160 can specifically include:
Step S1607, when testing result, acquisition identical as well-regulated premise set for the premise set of the first rule
The conclusion set of first rule and the conclusion union of well-regulated conclusion set;
Step S1608, if it is concluded that union simultaneously include proposition and proposition negative proposition, determine first rule with it is existing
Identical and conclusion contradiction premised on inconsistency between rule;
Step S1609 generates the corresponding prompt information of inconsistency, and shows that inconsistency is corresponding regular.
In one embodiment, step S160 can specifically include:
Step S1610, when testing result, acquisition identical as well-regulated premise set for the premise set of the first rule
The conclusion set of first rule and the conclusion union of well-regulated conclusion set;
Step S1611 is generated if it is concluded that union does not include the negative proposition of proposition and proposition simultaneously using the first rule
New rule, the premise collection of new rule are combined into the premise set of the first rule, and the conclusion collection of new rule is combined into conclusion union;
Step S1612 carries out abbreviation to the premise set of new rule, after the regular middle addition abbreviation of knowledge base
New rule.
In embodiments of the present invention, since the inference rule in actually any expert system is not to be averaged use
's.That is, not some inference rule access times is more, and within a period of time in future, the use of the inference rule
Number can be reduced naturally.In the practical application of expert system, the more inference rule of use is easier to be used again.
In the prior art, the rule base refinement method of many expert system knowledge bases does not consider making for different inference rules
Use the frequency.If only considering the logical relation of different inference rules without considering using frequently for they when storing inference rule
It is secondary, it will lead to and execute a considerable amount of independent search and inquiry in application expert system, this had not only wasted computing resource but also had dropped
Low Reasoning Efficiency.
In embodiments of the present invention, the judgment rule processing method 100 of sewage disposal system can also include:
Step S170, when calling the regular of knowledge base, record called well-regulated called number and by
Call it is regular in each conclusion called number.
Step S171 is based on well-regulated called number, is ranked up to the regular of knowledge base.
Step S172, based on it is called it is regular in each conclusion called number, to ordering knowledge base
Well-regulated conclusion set in conclusion sequence.
In embodiments of the present invention, production rule standard type does not influence logical consequence in the storage order of memory space.
But its storage location will affect the efficiency of retrieval and inquiry, it is therefore desirable to optimize its storage order, in executive expert's reasoning
When, record the called number of the called number of every rule and the conclusion of every rule;By every rule according to called
The descending sort of number, by each conclusion in every rule according to the descending sort of called number.
In embodiments of the present invention, it is contemplated that most of inference rule frequency of usage problem of non-uniform in expert system mention
Inference rule and its conclusion are ranked up out, to realize further storage optimization.And independent search and inquiry can be reduced
Calculation amount improves the efficiency of reasoning.
In order to make it easy to understand, below with reference to Fig. 2 and Fig. 3, the judgement of the redundancy rule of the present invention is described in detail embodiment
The judgement and treatment process of journey and contradiction rule.Fig. 2 shows redundancy rule according to an embodiment of the present invention and contradiction rules
Decision process flow diagram;Fig. 3 shows new rule according to an embodiment of the present invention and increases flow diagram.
In this embodiment, based on the production rule canonical form that the embodiment of the present invention defines, pass through inspection institute
The compatibility of premise and conclusion regular in regular (rule i.e. to be determined) and expert system knowledge base is selected, to judge that this is selected
Whether rule is redundancy rule.
As shown in Fig. 2, in one embodiment, determining whether selected rule is that well-regulated redundancy is advised in knowledge base
When then, rules process method may include following processing step:
Step S201 converts principal disjunctive normal form for selected regular premise, that is, before determining in the canonical form of selected rule
Propose the principal disjunctive normal form expression formula of condition.
Step S202 traverses the strictly all rules in expert system knowledge base, and judgment rule ergodic process is whether processing is over.
If regular ergodic process is over, selected rule is contradiction rule with rule in knowledge base.
Step S203 judges whether selected rule conclusion is current rule conclusion if regular ergodic process is not over
Subset.If selected rule conclusion is not the subset of current rule conclusion, will be regular in next rule as
Current rule.
Step S204, if selected rule conclusion is the subset of current rule conclusion, based on current regular premise conversion
Disjunctive normal form determines the principal disjunctive normal form expression formula of precondition in the canonical form of current rule.
Step S205, judges whether selected regular premise contains current regular premise, if so, selected rule is that redundancy is advised
Then.
Step S206, if selected rule premise does not contain current regular premise, will be regular in next
Rule is as current rule.
S201-S206 through the above steps, if selected rule is contradiction rule with the rule in expert system knowledge base
And need to enter knowledge base, it executes new rule and increases algorithm.
As shown in figure 3, based on the production rule canonical form that the embodiment of the present invention defines, if it is decided that selected rule
Then (rule i.e. to be determined) and rule in expert system knowledge base are contradiction rule, according to regular in selected rule and knowledge base
Premise and conclusion inconsistency, which may have different new rule generating methods.
In one embodiment, method regular selected by the regular middle addition of knowledge base, can specifically include:
Step S301 converts principal disjunctive normal form for the premise of selected production rule, that is, determines the standard of selected rule
The principal disjunctive normal form expression formula of precondition in form.
Step S302 traverses the strictly all rules in expert system knowledge base.Whether judgment rule ergodic process terminates.If
It is to then follow the steps S301;Otherwise, step S303 is executed;
The premise of rule current in knowledge base is converted principal disjunctive normal form by step S303.
Step S304 judges whether selected regular premise and current regular premise are identical.If so, executing step S305;It is no
Then, step S308 is executed.
Step S305 seeks the union of selected rule conclusion and current rule conclusion.
Step S306, judges whether newly-generated conclusion union exists simultaneously a certain proposition and its negative proposition.If so, prompt
Selected rule conclusion and current rule conclusion contradiction, and show current rule;Otherwise, step S307 is executed.
Step S307, using the premise of selected rule as the premise of new rule, and using newly-generated conclusion union as new
The conclusion of rule.
Step S308 judges whether selected rule conclusion and current rule conclusion are identical.If so, executing step S309;It is no
Then, step S302 is executed.
Step S309 seeks the premise of selected regular premise and current regular premise extracted as new rule, and will be selected
Conclusion of the conclusion of rule as new rule.
Step S310, the premise of the new rule of abbreviation, and new rule is stored in knowledge base.
In embodiments of the present invention, the canonical form for defining a kind of new production rule, determined by redundancy rule and
The judgement of contradiction rule, if be present in knowledge base, can be deleted for redundancy rule by executing to optimize to calculate,
If it is a new rule for needing to be entered knowledge base, it can be refused into knowledge base, to save memory space.
For contradiction rule, if contradiction rule is present in knowledge base, and without specially treated, illustrate that the expert system is known
The inference rule known inside library is inconsistent, execute the system be likely to be obtained mistake as a result, can take measures, eliminate internal
Logic conflict;It if it is a new rule for needing to be entered knowledge base, and contradicts, then needs with certain rule in knowledge base
Artificial judgement, which determines the processing method of the rule new to this or refuses the new rule, enters knowledge base, is artificially judged, is located
Reason method may include: to be replaced rule contradictory with its or contradiction rule in knowledge base by the rule while being coexisted and knowledge
In library.In the above-mentioned processing method artificially judged, specially treated such as mark-on can be made and known to show and distinguish the coexistent lance
Shield rule, to realize the storage optimization inside expert system knowledge base.
Also, the embodiment of the present invention is directed to the inference rule frequency of usage problem of non-uniform in most of expert systems (i.e.
Some inference rules are frequently used, and other inference rules are less is used) actual conditions, it is existing in knowledge based library
Inference rule by access times number, to existing inference rule carry out two kinds sequence with realize optimization storage.To reduce nothing
The calculation amount for closing search with inquiry, improves the efficiency of reasoning.
It is many for rule in the rule base of expert system knowledge base in the judgment rule processing method of the embodiment of the present invention
It is more, but the situation that reasoning number is less, by defining new representation of knowledge canonical form, and pass through logic calculus based on this
Provide the detection of redundancy rule and the detection and processing method of removing method and contradiction rule.
Below by taking sewage treatment expert system as an example, the judgement rule of rule base in sewage treatment expert system knowledge base are introduced
Then processing method.
In one embodiment, there is the knowledge about primary sedimentation tank failure in sewage treatment expert system knowledge base, such as
Following expressions (2):
Selected objects are that primary sedimentation tank ∧ spoil disposal difficulty → desilting is not net (2)
Assuming that in knowledge base on the basis of a rule, and increase the rule of following expressions description:
Selected objects are primary sedimentation tank ∧ spoil disposal difficulty → sludge failure of pump (3)
Selected objects are primary sedimentation tank ∧ solid overflow → sludge age aging (4)
Selected objects are that primary sedimentation tank ∧ solid overflow → flowing is short-circuit (5)
Selected objects are primary sedimentation tank ∧ solid overflow → industrial wastewater (6)
Selected objects are primary sedimentation tank ∧ Mud up-floating → sludge age aging (7)
Redundancy rule determination method and new regular increase method through above-described embodiment description, above-mentioned rule translate into as
Regular representation described in lower expression formula:
Selected objects are primary sedimentation tank ∧ spoil disposal difficulty → { desilting is not net, sludge failure of pump } (8)
Selected objects are primary sedimentation tank ∧ solid overflow → { sludge age aging, flowing short circuit, industrial wastewater }
(9)
Selected objects are primary sedimentation tank ∧ Mud up-floating → { sludge age aging } (10)
If knowledge base is further added by two new rules of following expression (11) and (12) description:
Selected objects are that primary sedimentation tank ∧ solid overflow → flow is excessive (11)
Selected objects are primary sedimentation tank ∧ solid overflow → sludge age aging (12)
Through determining, the rule of expression formula (11) description is advised with the regular of expression formula (9) description in knowledge base for contradiction
Then, but the rule of expression formula (11) description is identical as the regular premise of expression formula (9) description (are as follows: selected objects are first
Heavy pond ∧ solid overflow), according to new regular increase method, the conclusion for the rule that expression formula (11) describe can be added to accordingly
In the set of existing rule conclusion, the rule of following expression (13) description is obtained:
Selected objects be the overflow of primary sedimentation tank ∧ solid →
{ sludge age aging, flowing short circuit, industrial wastewater, flow are excessive } (13)
Through determining, the rule of expression formula (12) description is redundancy rule relative to knowledge base, therefore to save knowledge inventory
Storage space can refuse the rule into knowledge base.Therefore, the two new rules described for above-mentioned expression formula (11) and (12),
After the judgment rule processing method of the embodiment of the present invention, the knowledge base of update can be expressed as expression formula:
Selected objects are primary sedimentation tank ∧ spoil disposal difficulty → { desilting is not net, sludge failure of pump } (8)
Selected objects are primary sedimentation tank ∧ solid overflow → { sludge age aging, flowing short circuit, industrial wastewater, flow are excessive }
(13)
Selected objects are primary sedimentation tank ∧ Mud up-floating → { sludge age aging } (10)
In one embodiment, if in executive expert's reasoning, the rule of above-mentioned expression formula (10) description is adjusted
It is most with number, and the called number of rule of above-mentioned expression formula (8) description is minimum, and in the rule of above-mentioned expression formula (13) description
In then, the frequency of each fault frequency is followed successively by excessive flow, sludge age aging, flowing short circuit and industrial wastewater from more to less.
Therefore, on the basis of according to the called number of rule to rule compositor, conclusion in rule is gone out according to conclusion
The existing frequency is ranked up.The optimization storage form of the knowledge base after sorted can be expressed as following expressions (10), (13 ') and
(08):
Selected objects are primary sedimentation tank ∧ Mud up-floating → { sludge age aging } (10)
Selected objects are primary sedimentation tank ∧ solid overflow → { flow is excessive, sludge age aging, flowing short circuit, industrial wastewater }
(13′)
Selected objects are primary sedimentation tank ∧ spoil disposal difficulty → { desilting is not net, sludge failure of pump } (8)
As another specific embodiment, have in certain sewage treatment expert system knowledge base about aeration tank and secondary settling tank
The knowledge of failure.Assuming that these rules are stored according to the canonical form of production rule, and it is expressed as expression formula
(14), rule shown in (15) and (16):
((selected objects are that aeration tank ∧ foam ∧ foam black occurs) (selected objects are aeration tank ∧ rotten egg gas to ∨
Taste) ∨ (selected objects are aeration tank ∧ surface black)) → { digestion } (14)
Selected objects are secondary settling tank ∧ bulk solid ∧ Mud up-floating → denitrification failure (15)
((selected objects are secondary settling tank ∧ discrete particle ∧ surface dust shape) (selected objects are secondary settling tank ∧ discrete to ∨
Grain) ∨ (completely needle-shaped wadding body)) → { sludge age aging } (16)
If increasing following rule into knowledge base:
According to the redundancy rule determination method that above-described embodiment describes, in the rule and knowledge base that expression formula (17) indicates
The rule that some expression formulas (14) indicate is contradiction rule.
The regular conclusion as represented by the expression formula (17) is the rule conclusion that expression formula (12) indicates in knowledge base
Subset is analysed the regular premise in expression formula (17) with the regular premise in expression formula (19) by new regular increase method
It takes, obtains the rule of following expressions (14 ') description;And the called number of rule indicated in view of expression formula (15) is most,
And the called number of rule that expression formula (16) indicates is minimum, obtains the optimization storage form of strictly all rules are as follows:
Selected objects are secondary settling tank ∧ bulk solid ∧ Mud up-floating → denitrification failure (15)
((selected objects are secondary settling tank ∧ discrete particle ∧ surface dust shape) (selected objects are secondary settling tank ∧ discrete to ∨
Grain) ∨ (completely needle-shaped wadding body)) → { sludge age aging }
(16)
Judgment rule processing method according to an embodiment of the present invention defines the standard that production rule is stored in knowledge base
Form, and then the concepts such as compatible rule, contradiction rule are defined, and propose redundancy rule decision algorithm and new rule increase calculation
Method is to reduce memory space while improve Reasoning Efficiency.Also, in view of being ranked up inference rule and its conclusion, guarantee to make
It is called with rule precedence often, to reduce the calculation amount of reasoning.
It should be understood that rule optimization storage in the judgment rule processing method for the sewage disposal system that the embodiment of the present invention proposes
Canonical form, the judgement of redundancy rule and contradiction rule and processing method have versatility, and application range is not limited to
Some specific field.In any field, all storage forms proposed using the embodiment of the present invention and judgment rule processing side
Method reaches similar purpose, all within that scope of the present invention.
Fig. 4 shows the flow diagram of judgment rule processing method according to an embodiment of the invention.Such as Fig. 4 institute
Show, in one embodiment, judgment rule processing method 400 may include:
Step S410, determining has the first rule of canonical form, and canonical form includes premise set and conclusion set,
In, premise set is extracting between the precondition using the first rule, each in premise set and conclusion set
Conclusion all has derivation relationship.
Step S420, obtain knowledge base in one it is regular, detection first rule conclusion set whether be to have rule
The then subset of conclusion set.
Step S430, when the conclusion collection of the first rule is combined into the subset of existing rule conclusion set, the first rule of detection
Whether premise set contains well-regulated premise set.
Step S440 determines that the first rule is if the premise set of the first rule contains well-regulated premise set
Well-regulated redundancy rule, refusal are regular in the regular middle addition first of knowledge base in knowledge base.
Judgment rule processing method according to an embodiment of the present invention defines canonical form regular in knowledge base, utilizes
The canonical form of the rule further provides for the determination method of redundancy rule, to be optimized to the memory space in knowledge base,
Reasoning Efficiency is improved simultaneously.
In order to better understand the present invention, below with the expert system in Diagnosing Faults of Electrical field and sewage treatment field
For expert system, the judgment rule processing method of the embodiment of the present invention is described.
In one embodiment, by taking Diagnosing Faults of Electrical expert system as an example, if certain Diagnosing Faults of Electrical expert system
There is the rule of following expression (17)-(19) description in knowledge base:
Motor ∧ winding short circuit → { shell overheat } (17)
Shell overheat ∧ continue ten minutes or more → { motor stalling } (18)
Control cabinet ∧ blown fuse → { electromotion pilot lamp goes out, motor stalling } (19)
If there is a new rule of following expression (20) description will be added in the knowledge base,
Motor ∧ overlond running → { shell overheat } (20)
Firstly, judging whether the rule of above-mentioned expression formula (20) description is redundancy rule using redundancy rule decision algorithm.
Through determining, although the rule conclusion is the subset of the rule conclusion of expression formula (17) description, pass through expression formula (17) and table
Two regular premises up to formula (20) description are contradiction rule.So the new rule of above-mentioned expression formula (20) description is not redundancy
Rule can be added in the knowledge base.
Then, using the new regular increase method of above-described embodiment description, the rule that above-mentioned expression formula (20) can be described
The regular premise that then premise is described with expression formula (17) is extracted, and the rule of following expression (21) description is obtained:
(motor ∧ winding short circuit) ∨ (motor ∧ overlond running) → { shell overheat } (21)
At this point, rule set can be expressed as following expressions in the knowledge base of Diagnosing Faults of Electrical expert system:
(motor ∧ winding short circuit) ∨ (motor ∧ overlond running) → { shell overheat } (21)
Shell overheat ∧ continue ten minutes or more → { motor stalling } (18)
Control cabinet ∧ blown fuse → { electromotion pilot lamp goes out, motor stalling } (19)
Finally, consider that " motor stalling " failure ratio " electromotion pilot lamp goes out " failure occurs often, it, can be with when storing
The conclusion in rule, which sorts, to be indicated to above-mentioned expression formula (18) and expression formula (19) according to the frequency of occurrence of conclusion, to adjust rule
The position of each conclusion in conclusion.As an example, the optimization storage form of the knowledge base after sorted can be expressed as it is following
Expression formula (21), (18) and (19 '):
(motor ∧ winding short circuit) ∨ (motor ∧ overlond running) → { shell overheat } (21)
Shell overheat ∧ continue ten minutes or more → { motor stalling } (18)
Control cabinet ∧ blown fuse → { motor stalling, electromotion pilot lamp go out } (19 ')
It should be clear that the judgment rule processing method in the embodiment, and sewage treatment to be used in above-described embodiment
The specific steps of the judgment rule processing method of system are identical or equivalent, and for convenience of description and succinctly, details are not described herein.
With reference to the accompanying drawing, rule process device according to an embodiment of the present invention is discussed in detail.Fig. 5 is shown according to this hair
The structural schematic diagram for the rule process device that a bright embodiment provides.As shown in figure 5, the judgment rule of sewage disposal system is handled
Device 500 may include:
Canonical form determining module 510, for determining first rule with canonical form, canonical form includes premise collection
Close and conclusion set, wherein premise set be using first rule precondition between extracting, premise set with
Each conclusion all has derivation relationship in conclusion set.
In one embodiment, canonical form determining module 510 can specifically include:
Premise and conclusion acquiring unit obtain the premise set of the first rule for the propositional formula according to the first rule
With the conclusion set of the first rule, the precondition of each first rule includes one or more atomic propositions.
Normal form expression formula establishes unit, for establishing the corresponding principal disjunctive normal form expression formula of premise set of the first rule.
Rule criterion form Component units, for the corresponding principal disjunctive normal form expression formula of premise set using the first rule
With the derivation relationship of each conclusion in the conclusion set of the first rule, first rule with canonical form is constituted.
Conclusion compatibility detection module 520, regular a, detection in the knowledge base for obtaining sewage disposal system
Whether the conclusion set of the first rule is the subset for having rule conclusion set.
Premise compatibility detection module 530, if the conclusion collection for the first rule is combined into existing rule conclusion set
When subset, whether the premise set of the first rule of detection contains well-regulated premise set.
Redundancy rule processing module 540, if the premise set for the first rule contains well-regulated premise set,
And first rule premise set contain well-regulated premise set, determine first rule be knowledge base in it is well-regulated superfluous
Remaining rule refuses regular middle the first rule of addition in knowledge base.
In redundancy rule processing module 540, if the conclusion collection of the first rule is combined into the son of existing rule conclusion set
Collection, and the premise set of the first rule contains well-regulated premise set, determines that first rule is to have rule in knowledge base
Redundancy rule then.
In one embodiment, for the rule process device 500 of sewage disposal system, can also include:
Contradiction rule determining module for whether conclusion to be compatible the first rule between based on regular, and has
Rule and the first rule between whether premise is compatible, determine first rule with knowledge base in it is regular whether be contradiction rule
Then;
Contradiction rule processing module, if for regular for contradiction rule, acquisition in the first rule and knowledge base
One of knowledge base is regular, detects the premise set of the first rule and whether well-regulated premise set is identical, be based on
Testing result, in regular middle the first rule of addition of knowledge base.
In one embodiment, there are inclusion relations between well-regulated conclusion set and the conclusion set of the first rule
When, the regular conclusion between the first rule is compatible;Between well-regulated conclusion set and the conclusion set of the first rule
There is no when inclusion relation, the regular conclusion between the first rule is incompatible.
In one embodiment, there are implication relations between well-regulated premise set and the premise set of the first rule
When, premise is compatible between well-regulated premise set and the premise set of the first rule.
In one embodiment, there is no contain pass between well-regulated premise set and the premise set of the first rule
When being, premise is incompatible between well-regulated premise set and the premise set of the first rule.
In one embodiment, contradiction rule determining module specifically can be used for:
If the regular conclusion between the first rule is incompatible, or the regular conclusion phase between the first rule
Hold but premise is incompatible, one for reacquiring knowledge base is regular, until the number of acquisition is more than to have rule in knowledge base
Quantity then determines regular for contradiction rule in the first rule and knowledge base.
In one embodiment, contradiction rule processing module specifically can be used for:
When the premise set that testing result is the first rule is different from well-regulated premise set, it is regular to detect first
Whether conclusion set and well-regulated conclusion set are identical;
If the conclusion set of the first rule is identical as well-regulated conclusion set, new rule are generated using the first rule
Then, the premise set of new rule is the premise set using first rule and well-regulated premise set is extracted,
And the conclusion collection of new rule is combined into the conclusion set of the first rule;
Abbreviation is carried out to the premise set of new rule, the new rule after the regular middle addition abbreviation of knowledge base.
In one embodiment, contradiction rule determining module specifically can be used for:
When the premise set that testing result is the first rule is different from well-regulated premise set, it is regular to detect first
Whether conclusion set and well-regulated conclusion set are identical;
If the conclusion set of the first rule is different from well-regulated conclusion set, next for obtaining knowledge base is existing
Rule, until the number of acquisition is more than well-regulated quantity in knowledge base;
Abbreviation is carried out to the premise set of new rule, the new rule after the regular middle addition abbreviation of knowledge base.
In one embodiment, contradiction rule determining module specifically can be used for:
When the premise set that testing result is the first rule is identical with well-regulated premise set, it is regular to obtain first
Conclusion set and the conclusion union of well-regulated conclusion set;
If it is concluded that union simultaneously include proposition and proposition negative proposition, determine first it is regular with it is regular between
Identical and conclusion contradiction premised on inconsistency;
The corresponding prompt information of inconsistency is generated, and shows that inconsistency is corresponding regular.
In one embodiment, contradiction rule determining module specifically can be used for:
When the premise set that testing result is the first rule is identical with well-regulated premise set, it is regular to obtain first
Conclusion set and the conclusion union of well-regulated conclusion set;
If it is concluded that union does not include the negative proposition of proposition and proposition simultaneously, new rule is generated using the first rule, newly
The premise collection of rule is combined into the premise set of the first rule, and the conclusion collection of new rule is combined into conclusion union;
Abbreviation is carried out to the premise set of new rule, the new rule after the regular middle addition abbreviation of knowledge base.
Rule process device according to an embodiment of the present invention, it is numerous for the inference rule in expert system knowledge base, but
The less actual conditions of reasoning number, face increasing inference rule, propose the optimization storage side about inference rule
Method.The rules process method provides redundancy rule judgement based on the canonical form of Rule Expression in a kind of new knowledge base
Algorithm and new rule increase algorithm.The purpose is to reduce the occupied memory space of inference rule, the work of expert system is improved
The correctness of efficiency and operation result.
In one embodiment, for the rule process device 500 of sewage disposal system, can also include:
Call number logging modle, for recording called well-regulated quilt when calling the regular of knowledge base
Call number and it is called it is regular in each conclusion called number;
First rule compositor module, for being based on well-regulated called number, the regular progress to knowledge base
Sequence;
Second Rule sorting module, for based on it is called it is regular in each conclusion called number, to
Conclusion sequence in the well-regulated conclusion set of the knowledge base of sequence.
In embodiments of the present invention, it is contemplated that most of inference rule frequency of usage problem of non-uniform in expert system mention
Inference rule and its conclusion are ranked up out, to realize further storage optimization.The purpose is to reduce independent search and inquiry
Calculation amount, improve the efficiency of reasoning.
It should be clear that the invention is not limited to described in foregoing embodiments and specific configuration shown in figure
And processing.For convenience of description and succinctly, it is omitted here the detailed description to known method, and foregoing description is
The specific work process of system, module and unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Fig. 6 shows the structural schematic diagram of judgment rule processing unit according to an embodiment of the invention.Such as Fig. 6 institute
Show, in one embodiment, judgment rule processing unit 600 may include:
Canonical form determining module 610, for determining first rule with canonical form, before the canonical form includes
Propose set and conclusion set, wherein the premise set is to extract to obtain between the precondition using first rule
, each conclusion all has derivation relationship in the premise set and the conclusion set;
Conclusion compatibility detection module 620, it is regular for obtaining in knowledge base one, detect first rule
Conclusion set whether be the existing rule conclusion set subset;
Premise compatibility detection module 630, if the conclusion collection for first rule is combined into the regular knot
Whether the subset that analects closes, the premise set for detecting first rule contain the well-regulated premise set;
Redundancy rule processing module 640, if the premise set for first rule contain it is described well-regulated
Premise set determines that first rule is well-regulated redundancy rule in the knowledge base, refuses in the knowledge base
Regular middle addition first rule.
Judgment rule processing unit according to an embodiment of the present invention is right by defining canonical form regular in knowledge base
Memory space in knowledge base optimizes, and provides the determination method of redundancy rule, to the memory space in knowledge base into
While row optimization, improves and utilize Reasoning Efficiency regular in knowledge base.
It should be clear that the judgment rule processing unit in the embodiment of the present invention, and sewage to be used in above-described embodiment
Module in the judgment rule processing unit of processing system has identical or equivalent configuration and processing.For convenience of description
With it is succinct, be omitted here the detailed description to the course of work of module in judgment rule processing unit, and foregoing description
The specific work process of system, module and unit, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein
It states.
Fig. 7 is to show the calculating equipment that can be realized judgment rule treating method and apparatus according to an embodiment of the present invention
The structure chart of exemplary hardware architecture.
As shown in fig. 7, calculating equipment 700 includes input equipment 701, input interface 702, central processing unit 703, memory
704, output interface 705 and output equipment 706.Wherein, input interface 702, central processing unit 703, memory 704 and
Output interface 705 is connected with each other by bus 710, and input equipment 701 and output equipment 706 pass through 702 He of input interface respectively
Output interface 705 is connect with bus 510, and then is connect with the other assemblies for calculating equipment 700.Specifically, input equipment 701 connects
The input information from external (for example, image capture device) is received, and center is transmitted to for information is inputted by input interface 702
Processor 703;Central processing unit 703 based on the computer executable instructions stored in memory 704 to input information at
Output information is temporarily or permanently stored in memory 704 to generate output information, then passes through output interface by reason
Output information is transmitted to output equipment 706 by 705;Output information is output to the external confession for calculating equipment 700 by output equipment 706
User uses.
In one embodiment, it is shown in Fig. 7 calculate equipment 700 may be implemented as it is a kind of for sewage disposal system
Judgment rule processing system, which may include: memory, be configured as
Store program;Processor is configured as the program stored in run memory, with execute above-described embodiment description for sewage
The judgment rule processing method of processing system.
In one embodiment, calculating equipment 700 shown in Fig. 7 is also implemented as a kind of judgment rule processing system
System, which may include: memory, be configured as storage program;Processor is configured as operation storage
The program stored in device, to execute the judgment rule processing method of above-described embodiment description.
According to an embodiment of the invention, may be implemented as computer software journey above with reference to the process of flow chart description
Sequence.For example, the embodiment of the present invention includes a kind of computer program product comprising be tangibly embodied on machine readable media
Computer program, the computer program includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network, and/or be mounted from removable storage medium.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions, when run on a computer, so that computer executes above-mentioned each implementation
Method described in example.When loading on computers and executing the computer program instructions, entirely or partly generate according to
Process described in the embodiment of the present invention or function.The computer can be general purpose computer, special purpose computer, computer network
Network or other programmable devices.The computer instruction may be stored in a computer readable storage medium, or from one
Computer readable storage medium is transmitted to another computer readable storage medium, for example, the computer instruction can be from one
A web-site, computer, server or data center pass through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL))
Or wireless (such as infrared, wireless, microwave etc.) mode is carried out to another web-site, computer, server or data center
Transmission.The computer readable storage medium can be any usable medium that computer can access or include one or
The data storage devices such as multiple usable mediums integrated server, data center.The usable medium can be magnetic medium,
(for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk) etc..
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, and the essence of corresponding technical solution is not made to be detached from various embodiments of the present invention technology
The range of scheme.
Claims (18)
1. a kind of judgment rule processing method for sewage disposal system characterized by comprising
Determine first rule with canonical form, the canonical form includes premise set and conclusion set, wherein before described
Proposing set is to utilize extracting between the described first regular precondition, the premise set and the conclusion set
In each conclusion all have derivation relationship;
Obtain sewage disposal system knowledge base in one it is regular, detect it is described first rule conclusion set whether be institute
State the subset of existing rule conclusion set;
When the conclusion collection of first rule is combined into the subset of the existing rule conclusion set, before detecting first rule
Mention whether set contains the well-regulated premise set;
If the premise set of first rule contains the well-regulated premise set, determine that first rule is institute
Well-regulated redundancy rule is stated in knowledge base, refuses middle first rule to be added in the regular of the knowledge base.
2. judgment rule processing method according to claim 1, wherein the canonical form of first rule of determination, institute
The conclusion set of premise set and the first rule that canonical form includes the first rule is stated, and the premise subset of the first rule contains
The conclusion subset of first rule, comprising:
According to the propositional formula of first rule, the premise set of the first rule and the conclusion set of the first rule are obtained, often
The precondition of a first rule includes one or more atomic propositions;
Establish the corresponding principal disjunctive normal form expression formula of premise set of first rule;
Utilize the corresponding principal disjunctive normal form expression formula of premise set of first rule and the conclusion set of first rule
In each conclusion derivation relationship, constitute first rule with canonical form.
3. judgment rule processing method according to claim 1, further includes:
Regular whether conclusion is compatible and described regular with described first between first rule based on described
Whether premise is compatible between rule, determine it is described first rule with the knowledge base in it is regular whether be contradiction rule;
If first rule and regular in the knowledge base are contradiction rule, one of the knowledge base has been obtained
Regular, whether premise set and the well-regulated premise set for detecting first rule are identical, are based on the inspection
It surveys as a result, the regular middle addition described first in the knowledge base is regular.
4. judgment rule processing method according to claim 3, wherein
It is described existing there are when inclusion relation between the well-regulated conclusion set and the conclusion set of first rule
The regular conclusion between first rule is compatible;
The well-regulated conclusion set and it is described first rule conclusion set between be not present inclusion relation when, it is described
The regular conclusion between first rule is incompatible.
5. judgment rule processing method according to claim 3, wherein
It is described existing there are when implication relation between the well-regulated premise set and the premise set of first rule
Premise is compatible between the premise set of rule and the premise set of first rule;
The well-regulated premise set and it is described first rule premise set between be not present implication relation when, it is described
Premise is incompatible between well-regulated premise set and the premise set of first rule.
6. judgment rule processing method according to claim 3, wherein described based on described regular with described first
Between rule whether conclusion it is compatible and it is described it is regular whether premise is compatible between first rule, determine described in
First rule with the knowledge base in it is regular whether be contradiction rule, comprising:
If the regular conclusion between first rule is incompatible or described regular and described first advises
Conclusion is compatible between then but premise is incompatible,
One for reacquiring the knowledge base is regular, until the number of acquisition is well-regulated more than in the knowledge base
Quantity determines regular for contradiction rule in first rule and the knowledge base.
7. judgment rule processing method according to claim 3, wherein the premise set of detection first rule
It is whether identical with the well-regulated premise set, be based on the testing result, the knowledge base it is regular in add
Add first rule, comprising:
When the premise set that testing result is first rule is different from the well-regulated premise set, detection described the
Whether the conclusion set and the well-regulated conclusion set of one rule are identical;
It is raw using first rule if the conclusion set of first rule is identical as the well-regulated conclusion set
At new rule, the premise set of the new rule is the premise set and the well-regulated premise using first rule
Set is extracted, and the conclusion collection of the new rule is combined into the described first regular conclusion set;
Abbreviation is carried out to the premise set of the new rule, the new rule after the regular middle addition abbreviation of the knowledge base
Then.
8. judgment rule processing method according to claim 3, wherein the premise set of detection first rule
It is whether identical with the well-regulated premise set, be based on the testing result, the knowledge base it is regular in add
Add first rule, comprising:
When the premise set that testing result is first rule is different from the well-regulated premise set, detection described the
Whether the conclusion set and the well-regulated conclusion set of one rule are identical;
If the conclusion set of first rule is different from the well-regulated conclusion set, obtain under the knowledge base
One regular, until the number of acquisition is more than well-regulated quantity in the knowledge base;
Abbreviation is carried out to the premise set of new rule, the new rule after the regular middle addition abbreviation of the knowledge base.
9. judgment rule processing method according to claim 3, wherein the premise set of detection first rule
It is whether identical with the well-regulated premise set, be based on the testing result, the knowledge base it is regular in add
Add first rule, comprising:
When the premise set that testing result is first rule is identical with the well-regulated premise set, acquisition described the
The conclusion set of one rule and the conclusion union of the well-regulated conclusion set;
If the conclusion union simultaneously include proposition and the proposition negative proposition, determine it is described first rule with it is described
Identical and conclusion contradiction premised on inconsistency between regular;
The corresponding prompt information of the inconsistency is generated, and shows that the inconsistency is corresponding regular.
10. judgment rule processing method according to claim 3, wherein the premise collection of detection first rule
Close and the well-regulated premise set it is whether identical, be based on the testing result, the knowledge base it is regular in
Add first rule, comprising:
When the premise set that testing result is first rule is identical with the well-regulated premise set, acquisition described the
The conclusion set of one rule and the conclusion union of the well-regulated conclusion set;
If the conclusion union does not include the negative proposition of proposition and the proposition simultaneously, generated using first rule new
Rule, the premise collection of the new rule are combined into the premise set of first rule, and the conclusion collection of the new rule is combined into described
Conclusion union;
Abbreviation is carried out to the premise set of the new rule, the new rule after the regular middle addition abbreviation of the knowledge base
Then.
11. judgment rule processing method according to claim 1, further includes:
When calling the regular of the knowledge base, called well-regulated called number and described called is recorded
The called number of each conclusion in regular;
Based on the well-regulated called number, the regular of the knowledge base is ranked up;
Based on it is described it is called it is regular in each conclusion called number, have to the ordering knowledge base
Conclusion sequence in the conclusion set of rule.
12. a kind of judgment rule processing method characterized by comprising
Determine first rule with canonical form, the canonical form includes premise set and conclusion set, wherein before described
Proposing set is to utilize extracting between the described first regular precondition, the premise set and the conclusion set
In each conclusion all have derivation relationship;
Obtain knowledge base in one it is regular, detect it is described first rule conclusion set whether be the existing rule conclusion
The subset of set;
When the conclusion collection of first rule is combined into the subset of the existing rule conclusion set, before detecting first rule
Mention whether set contains the well-regulated premise set;
If the premise set of first rule contains the well-regulated premise set, determine that first rule is institute
Well-regulated redundancy rule is stated in knowledge base, refuses middle first rule to be added in the regular of the knowledge base.
13. a kind of judgment rule processing unit for sewage disposal system characterized by comprising
Canonical form determining module, for determining first rule with canonical form, the canonical form includes premise set
With conclusion set, wherein the premise set is extracting between the precondition using first rule, described
Each conclusion all has derivation relationship in premise set and the conclusion set;
Conclusion compatibility detection module, in the knowledge base for obtaining sewage disposal system one it is regular, detect described the
One rule conclusion set whether be the existing rule conclusion set subset;
Premise compatibility detection module, if the conclusion collection for first rule is combined into the existing rule conclusion set
Whether subset, the premise set for detecting first rule contain the well-regulated premise set;
Redundancy rule processing module, if the premise set for first rule contains the well-regulated premise collection
It closes, determines that first rule is that well-regulated redundancy rule, refusal have rule in the knowledge base in the knowledge base
First rule is added in then.
14. judgment rule processing unit according to claim 13, further includes:
Contradiction rule determining module, for based on it is described it is regular whether conclusion is compatible between first rule, and
It is described it is regular whether premise is compatible between first rule, determine it is described first rule with the knowledge base in
Whether regular be contradiction rule;
Contradiction rule processing module, if for it is described first rule with the knowledge base in it is regular be contradiction rule,
One for obtaining the knowledge base is regular, detects the described first regular premise set and the well-regulated premise collection
Whether conjunction is identical, is based on the testing result, in regular middle addition first rule of the knowledge base.
15. judgment rule processing unit according to claim 13, further includes:
Call number logging modle, for recording called well-regulated quilt when calling the regular of the knowledge base
Call number and it is described it is called it is regular in each conclusion called number;
First rule compositor module, for the well-regulated called number based on described in, to the regular of the knowledge base
It is ranked up;
Second Rule sorting module, for based on it is described it is called it is regular in each conclusion called number, to
Conclusion sequence in the well-regulated conclusion set of the knowledge base of sequence.
16. a kind of judgment rule processing unit characterized by comprising
Canonical form determining module, for determining first rule with canonical form, the canonical form includes premise set
With conclusion set, wherein the premise set is extracting between the precondition using first rule, described
Each conclusion all has derivation relationship in premise set and the conclusion set;
Conclusion compatibility detection module, for obtaining regular, a conclusion collection for detection first rule in knowledge base
Close whether be the existing rule conclusion set subset;
Premise compatibility detection module, if the conclusion collection for first rule is combined into the existing rule conclusion set
Whether subset, the premise set for detecting first rule contain the well-regulated premise set;
Redundancy rule processing module, if the premise set for first rule contains the well-regulated premise collection
It closes, determines that first rule is that well-regulated redundancy rule, refusal have rule in the knowledge base in the knowledge base
First rule is added in then.
17. a kind of general computing system, which is characterized in that including memory and processor;
The memory is for storing executable program code;
The processor is used to read the executable program code stored in the memory and requires to appoint in 1 to 11 with perform claim
The judgment rule processing method of sewage disposal system described in one.
18. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes instruction, works as institute
Instruction is stated when running on computers, so that computer executes the sewage treatment system as described in any one of claims 1 to 11
The judgment rule processing method of system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811518194.9A CN109657796A (en) | 2018-12-12 | 2018-12-12 | Judgment rule processing method, device and system for sewage disposal system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811518194.9A CN109657796A (en) | 2018-12-12 | 2018-12-12 | Judgment rule processing method, device and system for sewage disposal system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109657796A true CN109657796A (en) | 2019-04-19 |
Family
ID=66113812
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811518194.9A Pending CN109657796A (en) | 2018-12-12 | 2018-12-12 | Judgment rule processing method, device and system for sewage disposal system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109657796A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101957942A (en) * | 2010-08-10 | 2011-01-26 | 秦皇岛首秦金属材料有限公司 | Accident planning expert system applied to steel mill |
CN104133981A (en) * | 2014-06-25 | 2014-11-05 | 国家电网公司 | Photovoltaic power station fault diagnosis method based on fuzzy production rule knowledge base |
CN104506338A (en) * | 2014-11-21 | 2015-04-08 | 河南中烟工业有限责任公司 | Fault diagnosis expert system based on decision tree for industrial Ethernet network |
US20150170069A1 (en) * | 2013-12-18 | 2015-06-18 | International Business Machines Corporation | Transforming rules into generalized rules in a rule management system |
-
2018
- 2018-12-12 CN CN201811518194.9A patent/CN109657796A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101957942A (en) * | 2010-08-10 | 2011-01-26 | 秦皇岛首秦金属材料有限公司 | Accident planning expert system applied to steel mill |
US20150170069A1 (en) * | 2013-12-18 | 2015-06-18 | International Business Machines Corporation | Transforming rules into generalized rules in a rule management system |
CN104133981A (en) * | 2014-06-25 | 2014-11-05 | 国家电网公司 | Photovoltaic power station fault diagnosis method based on fuzzy production rule knowledge base |
CN104506338A (en) * | 2014-11-21 | 2015-04-08 | 河南中烟工业有限责任公司 | Fault diagnosis expert system based on decision tree for industrial Ethernet network |
Non-Patent Citations (2)
Title |
---|
肖伟跃: "工艺设计知识库的建造与维护", 《计算机工程与设计》 * |
陆志峰: "专家系统知识库中知识的研究", 《电脑学习》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Song et al. | A comprehensive investigation of the role of imbalanced learning for software defect prediction | |
Hamilton et al. | RIAC: a rule induction algorithm based on approximate classification | |
Ozkan et al. | Upper and lower values for the level of fuzziness in FCM | |
WO2022225579A1 (en) | Variables & implementations of solution automation & interface analysis | |
Guo et al. | Predicting fault prone modules by the dempster-shafer belief networks | |
WO2014186488A2 (en) | Tuning hyper-parameters of a computer-executable learning algorithm | |
Lauri et al. | Fine-grained search space classification for hard enumeration variants of subset problems | |
CN116882978B (en) | Deep sea submersible operation and maintenance support system based on product information frame | |
Tu et al. | FRUGAL: Unlocking semi-supervised learning for software analytics | |
KR20200010624A (en) | Big Data Integrated Diagnosis Prediction System Using Machine Learning | |
Bloedorn et al. | Multistrategy constructive induction: AQ17-MCI | |
CN119249360A (en) | A decision-making method and model for offline reinforcement learning and continuous online fine-tuning | |
Lucke et al. | Variable selection for fault detection and identification based on mutual information of alarm series | |
CN109657796A (en) | Judgment rule processing method, device and system for sewage disposal system | |
CN117826618B (en) | Adaptive control method and system based on cold rolling mill control system | |
CN117807238A (en) | Experimental knowledge base construction method and device | |
CN118193274A (en) | Exception handling method, device, equipment and readable medium for distributed system | |
CN118094354A (en) | Hierarchical cascading power sensitive data classification model construction method and device | |
JP2007213441A (en) | Multivariable decision tree construction system, multivariable decision tree construction method and program for constructing multivariable decision tree | |
Geibel et al. | Relational learning with decision trees | |
JPH09512364A (en) | Isolation of machine failure by qualitative physics | |
CN113934643B (en) | Test case determination method and system based on impact domain path analysis | |
Ambai et al. | Multivariate normal distribution based over-sampling for numerical and categorical features | |
CN118709761B (en) | A method and system for classifying power label knowledge based on large model | |
Sahraoui et al. | A fuzzy logic framework to improve the performance and interpretation of rule-based quality prediction models for oo software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |