My Thought:
Let $\phi:\mathbb{Q}^* \to \mathbb{Z}$ be a nontrivial homomorphism. Then I have observed the following properties:
$\phi(p^n)=n\cdot\phi(p) \ \forall n \in \mathbb{N}$.
$\phi(p^{-n})=n\cdot\phi(p^{-1}) \ \forall n \in \mathbb{N}$.
So $\phi$ can be completely determined by its values in $p$ and $p^{-1}$ for all prime $p$.
Is there some other direction to think and get some thing else? Please provide me some hints. Thank you.
Yes, there are nontrivial group homomorphisms. In fact, they can be nicely classified.
Consider the function $\phi_2 : \mathbb{Q}^* \to \mathbb{Z}$, where $\phi_2(q)$ is defined as the unique integer such that $q \cdot 2^{- \phi_2(q)}$ can be written as $\frac{a}{b}$ with $a, b$ odd.
Then $\phi_2$ is a group homomorphism.
Note that it's possible to generalise $\phi_2$ to $\phi_p$ for any prime number $p$. So this gives us a broad class of nontrivial group homomorphisms.
In fact, it can be shown that any group homomorphism $\mathbb{Q}^* \to \mathbb{Z}$ must be of the form $\sum\limits_{n = 0}^\infty a_n \phi_{p_n}$, where $\{p_n\}_{n \in \mathbb{N}}$ is the sequence of prime numbers and $a_n$ is a sequence of integers. Note that this infinite sum makes sense because when we compute $\sum\limits_{n = 0}^\infty a_n \phi_{p_n}(a / b)$, only finitely many values $\phi_{p_n}(a/b)$ are nonzero.
With some more analysis, it turns out that $\mathbb{Q}^*$ is isomorphic to $(\mathbb{Z}/2 \mathbb{Z}) \oplus \bigoplus\limits_{n \in \mathbb{N}} \mathbb{Z}$, where the injections send the nontrivial element of $\mathbb{Z}/2\mathbb{Z}$ to $-1$ and the $n$th injection $\mathbb{Z} \to \mathbb{Q}^*$ sends $i$ to $(p_n)^i$. This makes classifying the group homomorphisms $\mathbb{Q}^*$ to $\mathbb{Z}$ quite simple, since we have
$\begin{equation} \begin{split} Hom(\mathbb{Q}^*, \mathbb{Z}) &\simeq Hom((\mathbb{Z}/2 \mathbb{Z}) \oplus \bigoplus\limits_{n \in \mathbb{N}} \mathbb{Z}, \mathbb{Z}) \\ &\simeq Hom(\mathbb{Z}/2 \mathbb{Z}, \mathbb{Z}) \times Hom(\bigoplus\limits_{n \in \mathbb{N}} \mathbb{Z}, \mathbb{Z}) \\ &\simeq Hom(\mathbb{Z}/2 \mathbb{Z}, \mathbb{Z}) \times \prod\limits_{n \in \mathbb{N}} Hom(\mathbb{Z}, \mathbb{Z}) \end{split} \end{equation}$
and since $Hom(\mathbb{Z} / 2 \mathbb{Z}, \mathbb{Z}) \simeq 0$, and since $Hom(\mathbb{Z}, \mathbb{Z}) \simeq \mathbb{Z}$, we see that the final term is isomorphic to $\prod\limits_{n \in \mathbb{N}} \mathbb{Z} \simeq \mathbb{Z}^\mathbb{N}$.