###### Abstract
A key limitation of prior studies is the lack of analysis on the spatial interaction between HDT travel and freight functional clustering. Without integrating regional functional attributes, such as freight intensity, vehicle-type specialization, and supply chain complexity, researchers have struggled to explain why certain HDT types dominate specific areas or how these patterns emerge from underlying economic activities. This oversight highlights the inadequacy of purely vehicle-centric frameworks and underscores the urgency of adopting an approach that uses HDT typologies and their operational patterns to map and categorize urban regions based on their freight functions. To bridge this gap, our study proposes a data-driven framework that constructs systematic regional indicators based on micro-level urban freight activities and integrates cutting-edge machine learning methods, aiming to define and identify urban freight functional clustering. On this basis, we further analyze the spatial interaction between freight travel behavior and clustered zones, with the stable functional linkage between HDT types and their application scenarios serving as the core driver, and explain the distribution of the trips of specific HDT types based on regional industrial deconstruction. Focusing on Shanghai and the Yangshan Port, we first leverage massive amounts of truck trajectory data to derive detailed freight trip datasets. We begin with descriptive statistics of travel characteristics across HDT types, revealing surface-level differences in trip volume and temporal distributions. We then construct a series of regional indicators using vehicle-level freight activity data and employ hierarchical clustering to categorize freight zones. We also innovatively introduce indicators to measure the level of freight specialization and operational models, critical functional attributes overlooked in previous works. Combining urban layouts and industrial structure, we interpret the clustering results from the perspective of freight functional positioning. Further integrating HDT trip data and spatial heatmaps of trip endpoints, we investigate the spatial interactions between HDT types and clustered zones, aiming to (1) reveal how regional freight functions influence the spatiotemporal distributions of HDT travel; (2) identify the generative mechanisms behind observed travel regularities (e.g., route concentration and fleet specialization); and (3) provide a more systematic and comprehensive understanding of urban freight dynamics to inform optimized urban freight management and infrastructure deployment. This novel work achieves the following: (1) the development of entropy-based indicators to quantify regional freight specialization and operational models; and (2) a city-scale demonstration of bidirectional relationships between freight clustering and HDT behavior. Overall, by integrating regional functional attributes with micro-level truck trip data, our research offers a holistic understanding of urban freight systems, demonstrating that HDT travel patterns are not merely outcomes of transportation demand but also reflections of broader urban industrial structures. This perspective enables a shift from generic policymaking to fine-grained interventions, thereby enhancing both operational efficiency and sustainability. Ultimately, this study contributes to the theoretical literature on urban freight geography and provides practical insights for policymakers seeking to balance economic growth with environmental stewardship in China's rapidly evolving cities.