A high level of scalability is needed to support the large-scale Internet-of-Things (IoT) networks. To address the issue of distributed trust in different IoT devices, blockchain technology can be effectively used to safely manage IoT data due to its ability to provide transactions traceability and security. However, massive real-time IoT application data has brought huge challenges to the scalability of the integration framework of blockchain and IoT. This paper proposes a nested-chain architecture, which consists of one main chain and multiple sub chains to address the aforementioned challenges. The main chain stores identity credential used for distributed identity (DID) management, while the sub chain stores the IoT data. A notary module that involves access nodes from both chains is designed for cross-chain transactions. In addition, considering the transaction information, node characteristics, and network status, we further introduce a node selection algorithm based on Graph Convolutional Network (GCN), which can effectively reduce the cost of cross-chain communications. We implement and evaluate a prototype of our framework on the Hyperledger Fabric platform to demonstrate its feasibility and superiority. The analyzed results have shown that our proposed framework outperforms traditional schemes, by reducing system latency up to 23.2% and increasing system throughput up to 12.5%.