Example 7 Let $I=\left\{x \mid x \leqslant 8, x \in \mathbf{N}^{*}\right\}, A \cup \complement_{I} B=\{1,3,4,5,6,7\}$, $\complement_{I} A \cup B=\{1,2,4,5,6,8\}, \complement_{I} A \cap \complement_{I} B=\{1,5,6\}$, then $A=$ $\qquad$ $; B=$ $\qquad$ .
Solution: Clearly, $I=\{1,2,3,4,5,6,7,8\}$, since $A \cup \complement_{I} B=\{1,3,4,5,6,7\}$, it follows that $\complement_{I} A \cap B=\{2,8\}$. Similarly, $A \cap \complement_{I} B=\{3,7\}$, and from $\complement_{I} A \cap \complement_{I} B=\{1,5,6\}$, we know that $A \cup B=\{2,3,4,7,8\}$. Drawing a Venn diagram, we can see that $A=\{3,4,7\}, B=\{2,4,8\}$.

Solution Guide: In mathematics, diagrams play a crucial role. In this example, the law of complements is used first to clarify the positions of the elements in the sets, and then a Venn diagram is utilized. The solution process is concise, clear, fast, and accurate. Appropriately using the method of combining numbers and shapes can achieve twice the result with half the effort.