Investigating the mechanical and deformation response of a shield tunnel to nearby cavities has a significant importance on the structural safety assessment and protection. Limited to the laborious modelling and analysis barriers, the refined structural model including lining segments and connecting bolts are proposed by the BIM-based parametric modelling technology, using which the geometric properties can be adjusted through one-click operation. The pretreatment algorithm has also been developed to impose springs on the numeric nodes effectively and accurately, forming an elaborate numerical simulation method. Numerical analysis has been exerted and verified considering the homogeneity of the excavation geological condition. Results show that for the shield tunnel excavated in the homogeneous stratum, the mechanical and deformation responses of the lining structure are symmetrical about the vertical central plane. The lining ring deforms from a circle to an elliptic shape. To inquire the effect of the geological cavity, three sceneries for cavity at various positions are studied. Numerical results reveal that the lining segments deform towards the cavity side significantly, leading to over 100 times the deformation increment at the vault and invert, even over 1000 times at the cavity side for the unilateral cavity. At the cavity(ies) side(s), the internal forces of the lining segments increase, and the stress states change from compression on the outer surface to tension. The stress of connecting bolts also indicates the stress concentration for the supporting structures at the cavity side. Reinforced supports are needed for the concrete linings near the geological defects.