Let the function $f(x)$ satisfy $f(1)=1, f(4)=7$, and for any $a, b \in \mathbf{R}$, we have
$$
f\left(\frac{a+2 b}{3}\right)=\frac{f(a)+2 f(b)}{3} .
$$

Then $f(2014)=$ $\qquad$
(A) 4027
(B) 4028
(C) 4029
(D) 4030
Solution 1 From $f\left(\frac{a+2 b}{3}\right)=\frac{f(a)+2 f(b)}{3}$, we get
$f(2)=f\left(\frac{4+2 \times 1}{3}\right)=\frac{f(4)+2 f(1)}{3}=3$,
$f(3)=f\left(\frac{1+2 \times 4}{3}\right)=\frac{f(1)+2 f(4)}{3}=5$.
Thus, we conjecture that $f(n)=2 n-1\left(n \in \mathbf{Z}_{+}\right)$.
We prove this by mathematical induction.
(1) When $n=1,2,3$, it is clearly true.
(2) Assume that when $n=3 k\left(k \in \mathbf{Z}_{+}\right)$, the conclusion holds.

Then let $a=3 k+1, b=1$, we get
$f(3 k+1)=3 f(k+1)-2 f(1)=6 k+1$.
Similarly, let
$$
a=3 k+2, b=2 ; a=3 k+3, b=3 \text {. }
$$

Then $f(3 k+2)=6 k+3 ; f(3 k+3)=6 k+5$.
Therefore, when $n \in \mathbf{Z}_{+}$, we have $f(n)=2 n-1$.
Thus, $f(2014)=2 \times 2014-1=4027$.
Solution 2 In the given condition, let
$a=3 x, b=0 ; a=0, b=\frac{3}{2} y$.
Then $f(x)=\frac{f(3 x)+2 f(0)}{3}$;
$f(y)=\frac{f(0)+2 f\left(\frac{3}{2} y\right)}{3}$.
Hence $f(3 x)=3 f(x)-2 f(0)$;
$f\left(\frac{3}{2} y\right)=\frac{3 f(y)-f(0)}{2}$.
Again, in the given condition, let $a=3 x, b=\frac{3 y}{2}$, we get
$f(x+y)=\frac{f(3 x)+2 f\left(\frac{3 y}{2}\right)}{3}$
$=f(x)+f(y)-f(0)$,
which means $f(x+y)-f(0)=f(x)-f(0)+f(y)-f(0)$.
Let $g(x)=f(x)-f(0)$. Then
$g(x+y)=g(x)+g(y)$,
$g(1)=f(1)-f(0)=1-f(0)$.
It is easy to prove by mathematical induction that when $n \in \mathbf{Z}_{+}$, we have
$g(n)=n g(1)=n(1-f(0))$.
Thus, $g(4)=4(1-f(0))$.
Also, $g(4)=f(4)-f(0)=7-f(0)$, so
$4(1-f(0))=7-f(0)$.
Therefore, $f(0)=-1$.
Thus, $g(n)=n(1-f(0))=2 n$.
So, $f(n)=2 n-1\left(n \in \mathbf{Z}_{+}\right)$.
Hence $f(2014)=2 \times 2014-1=4027$.
From the above derivation, we know that the condition
$$
f\left(\frac{a+2 b}{3}\right)=\frac{f(a)+2 f(b)}{3}
$$

is equivalent to the Cauchy equation
$$
g(x+y)=g(x)+g(y),
$$

where $g(x)=f(x)-f(0)$.
Next, we provide a method for solving the Cauchy equation in the field of rational numbers.

Lemma Let $f(x)$ be a function defined on the set of rational numbers $\mathbf{Q}$, and for any $x, y \in \mathbf{Q}$, we have
$f(x+y)=f(x)+f(y)$.
Then $f(x)=f(1) x(x \in \mathbf{Q})$.
Proof Let $x=y=0$. Then $f(0)=0$.
By the given condition, for any positive integer $n$ we have
$f(n+1)=f(n)+f(1)\left(n \in \mathbf{Z}_{+}\right)$.
Thus, $f(n)=f(1) n\left(n \in \mathbf{Z}_{+}\right)$
Also, let $x=n, y=-n\left(n \in \mathbf{Z}_{+}\right)$. Then
$f(0)=f(n)+f(-n)$.
Thus, $f(-n)=-f(1) n\left(n \in \mathbf{Z}_{+}\right)$.
Therefore, for any $n \in \mathbf{Z}$, we have $f(n)=f(1) n$.
For any rational number $\frac{q}{p}\left(q \in \mathbf{Z}, p \in \mathbf{Z}_{+}\right)$, we have
$f(1) q=f(q)$
$=\underbrace{f\left(\frac{q}{p}\right)+f\left(\frac{q}{p}\right)+\cdots+f\left(\frac{q}{p}\right)}_{p t}=p f\left(\frac{q}{p}\right)$.
Thus, $f\left(\frac{q}{p}\right)=f(1) \frac{q}{p}$.
In summary, for any $x \in \mathbf{Q}$, we have $f(x)=f(1) x$.