The network structure of B2O3-2SiO2 and Al2O3-2SiO2 systems (abbreviated as BS2 and AS2, respectively) in the liquid state is investigated by molecular dynamics simulation. For the BS2 system, most of the basic structural units are BO3 and SiO4. The number of BO4 and SíOb is very small. Most of the tetrahedral SiO4 and trigonal BO3 networks link to each other via mainly the corner-sharing bonds to form -Si-O-Si- and -Si-O-B- linkages. For the AS2 system, most of basic structural units are tetrahedral TO4 (T=Al, Si) and trigonal AlO3. The number of TO5 is negligible. The basic structural units link to each other through mainly the corner-sharing bonds to form -Si-O-Si- and -Si-O-Al- linkages. The topology of basic structural units is investigated via the bond angle and length distribution. The addition of Al2O3 or B2O3 into silica results in the change of the -Si-O- network structure. The cation B3+ or Al3+ tend to replace the Si
4+ in the tetrahedra SiO4 to form negative charge units [BO
4]- and [AlO
4]-, respectively. The concentration of negative charge units in the network structure of AS2 and BS2 is different. The network structure is studied through linkages T-O-T (T = Si, B, Al) and the number of types of linkages. Especially, the structural heterogeneity is also presented and discussed in detail. The structural heterogeneity in BS2 and AS2 liquids is due to the coexistence of two BO3 and SiO4 structural phases in BS2 and three SiO4, AlO4 and AlO3 structural phases in AS2 liquids.