Dynamically Optimizing Network Structure Based on Synaptic Pruning in the Brain