In this article, the electron trapping and acceleration in the wake field driven by an ultrarelativistic hollow electron beam is studied. When the hollow driver injects into plasma, there is a doughnut-shaped electron bubble formed because of the existence of a special ‘backflow’ beam in the centre of the electron bubble. At the same time, there is a transverse convergence of the hollow driver, which leads to the weakening of the backflow beam. This results in a local electron density transition at the rear of the bubble. During this process, there is an expansion of the longitudinal electron bubble size, and a bunch of background electrons is trapped by the wake field at the rear of the bubble. The tracks for the trapped electrons show that there are two sources: one is from the bubble sheath and the other is from the unique backflow beam. In the particle-in-cell simulation where the driving beam has initial energy of $1.0$ GeV per particle, the trapped beam can be accelerated to energy of more than $1.5$ GeV per particle and the corresponding transformer ratio is $1.5$. With the increase of driving beam energy up to $40.0$ GeV, a transformer ratio of $1.4$ still can be achieved. By adjusting the hollow beam density, it is possible to control the trapped beam charge value and beam quality, such as its energy spread and transverse emittance.