The development of intelligent traffic coordination and smart mobility under the digital economy has increased the need for effective traffic sub-area division. The traditional division methods rely on predefined urban administrative units, failing to adapt to the varying traffic conditions. Therefore, data-driven approaches have been developed to divide traffic sub-areas, considering both the frequency of data updates and a balance between accuracy and traffic characteristics within the selected data. However, these approaches are affected by unsatisfactory zone boundaries, and the relevant clustering algorithms cannot efficiently support traffic sub-area division. To address these issues, this paper proposes a two-layer traffic sub-area division (TL-TSD) framework that considers factors such as traffic density, road structure, and spatiotemporal characteristics inherent in the overall trajectory. Specifically, in the first layer, we introduce a specific equation based on dynamic time warping to adaptively perform trajectory cutting and record matching information while maintaining the shape features of the overall trajectory. Subsequently, we design a modified density based spatial clustering of applications with noise algorithm to obtain initial clusters. In the second layer, based on the matching information, we introduce two trajectory refinement algorithms. Each is designed for final clusters and well-defined boundaries. Extensive experimental results and statistical analysis on two real-world datasets indicate that the proposed framework can effectively address the aforementioned technical challenges and outperform the comparison algorithms in terms of the overall dunn metric. Moreover, the visualization results show that the final clusters with well-defined boundaries are more effective for dividing traffic sub-areas.