Digitally encoded hypersurfaces show great potential in the field of electromagne-tic wave modulation. Currently, digitally encoded hypersurfaces in the terahertz band are mainly classified into two types: structure-encoded and controllable material-encoded. Once a structure-encoded hypersurface is fabricated, its function is fixed, which makes it difficult to adapt to changing application requirements. In contrast, the controllable material-encoded hypersurfaces can achieve dynamic regulation and multifunctional switching of terahertz beams by changing the external excitation, which shows good reconfigurability. To address this challenge, a Dirac semimetal-based encoded hypersurface is proposed in this paper. The Fermi energy level of the Dirac semimetal is varied by changing the bias voltage, which in turn dynamically adjusts its relative permittivity to obtain the coded unit. Besides, the traditional gradient-phase method encodes arrays by periodically arranging the cell structure, but there are limitations in the flexibility and accuracy of beam modulation. In order to break through these limitations, this paper employs a genetic algorithm for the inverse design of hypersurface coding arrays, which effectively improves the initiative and flexibility of beam modulation. In this paper, a three-layer terahertz-encoded hypersurface unit with a “back” structure composed of Dirac semimetallic materials is firstly designed, and the Dirac semimetallic dielectric constant is dynamically adjusted by using an applied bias voltage, so that the hypersurface unit is at 1.95 THz when the Fermi energy levels are 0.01 eV, 0.05 eV, 0.09 eV, and 0.55 eV can achieve 2bit coding. The results show that, for beam configuration, single-beam and multi-beam (two-beam to five-beam) modulation can be achieved at 1.95 THz within 40° pitch angle and 360° azimuth angle; for vortex beam generation, single-vortex beams with ±1 and ±2 topological charges can be generated, with mode purity exceeding 60%, and single-vortex, double-vortex and triple-vortex beams in pitch angle and 360° azimuth angle can be realised with the vortex-phase convolution. In terms of RCS reduction, in the frequency range of 1.72–2.51 THz, the hypersurface is able to achieve more than 10 dB of RCS reduction, especially in the frequency range of 1.82 THz, the maximum reduction value is up to 27.5 dB. achieves the diversity of functions, but also has a high degree of reconfigurability to meet the needs of complex application scenarios.