To solve the problem of smooth switching between car-following model and lane-changing model, the Intelligent Driver Model (IDM) for a single lane was used to study the driver's behavior switching mechanism of normally following, generating intentions to change lanes, creating space and speed gains, and performing lane change. In the case of sufficient lane-changing space and speed gains, the ego vehicle's intention to change lane was considered to solve the switching boundary between car-following behavior and lane-changing behavior, which is also the IDM failure point. In the event that there is no lane-changing gains, the IDM was optimized by incorporating the constraint components of the target lane vehicles in conjunction with the actual motion state of the ego vehicle, and the Stepless Switching Intelligent Driver Model (SSIDM) was constructed. Drivers' natural driving information was collected and scenario mining was performed on structured roads. On the basis of the collected data, an elliptic equation was used to fit the behavior switching boundary, and the two component balance coefficients of the front and rear vehicles on the target lane were identified. According to the test set verification results, the Mean Square Error (MSE) of the SSIDM is 2.172, which is 57.98% less than that of the conventional single-lane IDM. The SSIDM can accomplish stepless switching comparable to driver's behavior between the car-following behavior and the lane-changing behavior, with greater precision than IDM.