Enhancing drug delivery requires improving the quality of cross-linked hydrogels. In this paper, a molecular generation model is constructed based on graph convolutional neural network (GCNN). By simulating the intermolecular interaction situation and network structure, we optimize the selection of cross-linking agent and chain segment design to enhance the mechanical properties of hydrogels under different ratios. Systematically carry out hydrogel preparation and characterization tests to analyze the crystalline structure and thermal stability of boraxpectin cross-linked (SICH) hydrogels. The behavior and effect of SICH hydrogels based on structure optimization algorithms in drug delivery are analyzed through drug delivery practice. The results showed that the cell viability of SICH hydrogels in drug delivery was at least 70.49% with low cytotoxicity.The in vivo drug release of SICH hydrogels was nearly three times higher than that of PVA hydrogels in 24 hours. For in vitro drug release, it released up to 86.68% in 24 hours in a smooth manner, which had a good drug modulation release effect. Stable and efficient drug delivery can be achieved using cross-linked hydrogel SICH.