High-energy-density materials (HEDMs) are crucial for explosives, propellants, and new energy materials. Designing highperformance HEDMs involves conflicting sub-objectives for molecular structure design. Previous research has focused on specific molecule types, limiting the understanding of molecular structural features' influence on density. This work integrated the structure and density data of C2−C30 oxygen-containing compounds, expanded molecule types, and constructed a comprehensive database with 17,987 compounds' SMILES and density values. Substructures such as ring frameworks, side chains, and functional groups were split using a molecular substructure splitting algorithm. A linear regression model was then established to examine the effects of substructures on density, with regression coefficients representing their contributions. The results showed that ring structures had a greater contribution to density. A decrease in C atoms and an increase in O atoms and their unsaturated bonds were significant positive features of density contribution in ring structures. Side chains and single alkane ring frameworks had similar density contribution distributions, and ring aromatic structures with three or more rings and cycloalkane structures with four or more rings had similar density contribution distributions, with ∼90% showing a significant positive contribution. Finally, the study examined the effects of the number of atoms in the skeleton of multi-ring alkane substructures and the average number of shared atoms on density contribution. The significant contribution of multi-ring alkane substructures first increased and then decreased when the average number of atoms in the ring and the variance of the number of atoms increased.