Example 4 If real numbers $a, b$ satisfy the conditions
$$
a^{2}+b^{2}=1,|1-2 a+b|+2 a+1=b^{2}-a^{2} \text {, }
$$

then $a+b=$ $\qquad$
(2009, National Junior High School Mathematics Joint Competition)