A Unified Framework for Combinatorial Optimization Based on Graph Neural Networks