## 1 Introduction  
Recently, many of the latest technical reports published by 3 GPP have shown the significance of incorporating satellite networks into 5G scenarios [1; 2]. Satellite communication networks will be a complementary solution to satisfy multiple performance metrics in the 5G system, with the merits of ubiquitous coverage and broadcast capability to improve the reliability and availability of the overall network. Expected to enlarge the coverage beyond terrestrial networks, the integrated satellite-terrestrial networks (ISTNs) are effective at providing resilient and high-reliability service for rural, remote, and urban areas, particularly for battlefields with critical missions [3; 4; 5; 6]. Compared with traditional terrestrial or satellite networks, the ISTNs are subject to limited and unbalanced network resources [7; 8; 9]. How to explore the new network architecture to supply services and applications in different scenarios with various Quality of Service/Experience (QoS/QoE) requirements is challenging [10; 11; 12]. Thus, the system integration [13], protocol optimization [14], resource allocation [15], and network management [16] in ISTNs are of great significance. New paradigms like Software-Defined Networking (SDN) and Network Function Virtualization (NFV) not only facilitate the seamless integration, but also reduce both operational and capital expenses of ISTNs. SDN/NFV features can provide significant benefits over satellite networks [17; 18] and terrestrial ones [19; 20]. Previous works have proven the efficacy of the adoption of SDN and NFV technologies into the satellite domain [21] and terrestrial domain [22], which seems to be a necessary step to promote the integrated network. Moreover, the incorporation of SDN/NFV technologies facilitates the integration of satellite communications networks with the 5G terrestrial ones. However, some remaining unsolved problems, related to further exploiting the potentialities of SDN approaches for the integration, are worthy of in-depth study, especially for adaptive and flexible management in dynamic environments. The separation of the control plane and data plane as the distinctive feature of SDN makes it possible to manage the entire integrated network intelligently. Specifically, a set of dedicated controllers composing the control plane manages devices in the data plane, including switches and satellite gateways, to forward packets or to execute the handover flexibly and efficiently. Apart from the latency depending on the placement of both gateways and controllers in certain topologies, reliability is another vital performance indicator influenced by the joint placement. Since the joint placement of both satellite gateways and controllers has an influence on the network performance, how to determine the number and the locations of gateways and controllers needs further investigation. In this paper, we propose an efficient network partition algorithm to tackle the joint gateway and controller placement problem in the SDN-enabled ISTNs. In the proposed algorithm, the ground segment of the entire networks is divided into multiple sub-domains, and only one controller is deployed in each of them. By incorporating the partition-based K-means algorithm [23], the average latency between the centroid and other nodes in each sub-domain can be promptly shortened. Hence, both the performance and running time are notably optimized compared with previous joint placement algorithms [24]. Moreover, we further decrease the algorithm complexity with better performance on network reliability and controller-switch propagation latency. On the one hand, the merits of the partition strategy on shortening the distance among the nodes within the sub-domains decrease the network propagation latency. On the other hand, other performance objectives, including load balancing and consistency, can be implemented in the sub-domains instead of the whole network, which increasingly reduces the complexity of the algorithm.