7. (7 points) Use the digits $1,2,3,4,5,6,7,8$ to form two different four-digit numbers (each digit is used only once) so that their difference is the smallest. What is this difference? $\qquad$ .
【Analysis】Let these two numbers be $a, b$. , and $a<b$. The smallest difference in the thousands place can only be 1. To make the difference as small as possible, we can only make the other digits of $a$ as large as possible, and the other digits of $b$ as small as possible. Therefore, we should try to make the hundreds place of $a$ greater than that of $b$, the tens place of $a$ greater than that of $b$, and the units place of $a$ greater than that of $b$. Thus, they are 8 and 1, 7 and 2, 6 and 3, and the remaining 4,5 are assigned to the thousands place. According to this, we solve.

【Solution】Solution: Let these two numbers be $a, b$., and $a<b$. The smallest difference in the thousands place can only be 1. According to the above analysis, it should be: $5123-4876=247$

Therefore, the answer is: 247.