In order to meet the demand for electricity in buildings, this project combines the DC power distribution equipment for buildings currently available on the market, and utilizes AC/DC converters (AC/DC), DC buses, distributed power supplies, DC loads, accumulators, switches, and protection devices to jointly complete the design scheme of the DC power distribution system for buildings. The corresponding fault feature quantities are extracted using the generalized S-transform as the input samples of the gated cyclic unit network, and the Adam optimization algorithm is used to optimize the model operation for the problem of accuracy degradation that may easily occur during the training process, while the safety protection technology based on the gated cyclic unit network is formulated. A science and technology park is selected as the case of this construction project, and the model is used to analyze the case. When Eline is greater than Ebus and EP is greater than EN, the model correctly recognizes a negative bus fault, corresponding to the R-value of [0,1,0,0,0,1,0], and the model repairs this type of fault by means of circuit breaker tripping. Even under the influence of transition resistance, the safety protection scheme of building DC distribution system in this paper still performs excellent.