The paper defines a Structured Query Sentence to describe the query process and proposes a distributed firewall rules validity detection algorithm based on semi-isomorphic firewall decision diagrams (SFDD) logical operation. The algorithm keeps consistency
completeness
and compactness of the original rules
eliminates the rule anomalies in intra-firewall. Our simulation results demonstrate that the algorithm achieves a significant improvement in validity detection of rules.