## 3 Results and Discussion
### Mechanism Discussion
#### 3.4.3 Photocatalytic Mechanism Analysis  
The conduction band potential (E\({}_{CB}\)) of the composite was determined by the following formula [50]: \(E_{CB}=\chi-E_{c}-0.5\ E_{g}\). In this equation, \(\chi\) represents the geometric mean of the absolute electronegativity values of g-C\({}_{3}\)N\({}_{4}\) and CdS atoms (4.55 eV and 5.23 eV), \(E_{g}\) is the bandgap width of g-C\({}_{3}\)N\({}_{4}\) and CdS (2.62 eV and 2.12 eV) [51], with \(E_{c}\) being a constant (-4.5 eV) linked to the standard hydrogen electrode. The valence band potential (\(E_{VB}\)) of the composite was obtained as follows: \(E_{VB}=E_{CB}+E_{g}\). The CB levels for g-C\({}_{3}\)N\({}_{4}\) and CdS were \(-1.26\) eV and \(-0.33\) eV, while their VB levels were 1.36 eV and 1.79 eV, respectively.  
The photocatalytic working mechanism of CdS/g-C\({}_{3}\)N\({}_{4}\) was derived by integrating findings from prior research. During the dark reaction, the composite material effectively adsorbs tetracycline molecules onto its surface, aided by its large area for adsorption (123 m\({}^{2}\)/g) and an abundance of active sites, this initial adsorption step is beneficial to the subsequent photocatalytic reaction. Pure porous g-C\({}_{3}\)N\({}_{4}\) and CdS are highly responsive to light in the visible spectrum due to their intrinsic properties. Upon light absorption, electrons are excited out of the VB and reach higher energy levels in the CB. Notably, the CB level of porous g-C\({}_{3}\)N\({}_{4}\) (\(-1.26\) eV) have higher negative values than CdS (\(-0.33\) eV). This energy configuration facilitates the efficient transfer of photoexcited electrons between g-C\({}_{3}\)N\({}_{4}\) and CdS, aiding charge separation and boosting photocatalytic efficiency. Similarly, the VB level of porous g-C\({}_{3}\)N\({}_{4}\) (+1.36 eV) has a lower positive value than CdS (+1.79 eV), enabling photogenerated holes to migrate from CdS to g-C\({}_{3}\)N\({}_{4}\). After the above transmission process, the photogenerated electrons and holes separation are more efficient and have a longer lifetime. Afterward, electrons generated in the conduction band of CdS are transferred to the catalyst's surface. Because the potential of the electrons has higher negative values than E(O\({}_{2}\)/\(\cdot\)O\({}_{2}\)\({}^{-}\)), these electrons can interact with molecular oxygen present on the catalyst's surface, leading to the formation of \(\cdot\)O\({}_{2}\)\({}^{-}\) radicals as active species. Simultaneously, the photogenerated holes have a longer lifetime and can themselves degrade organic molecules directly. According to the research of [PERSON] et al. [52], the potential intermediates and degradation pathways of tetracycline hydrochloride were identified and analyzed. The S1 and S2 sites of TCH were attacked by active substances (h\({}^{+}\) and \(\cdot\)O\({}_{2}\)\({}^{-}\)), and the intermediates were finally generated. The intermediates were finally mineralized by h\({}^{+}\) and \(\cdot\)O\({}_{2}\)\({}^{-}\) to carbon dioxide (CO\({}_{2}\)) and water (H\({}_{2}\)O). More importantly, the transfer of this Z-scheme heterostructure consumes the electron holes in the CB of CdS [53], reducing the photocorrosion in CdS [54] and has positive significance for the stable use of composite photocatalysts (Figure 12).  
Figure 11: Full wavelength scan spectrum (**a**) at different times and (**b**) the results of mineralization experiments.