The embodiment of the invention provides a hyper-parameter adjustment method based on safety
reinforcement learning, and the method comprises the steps: firstly converting an
optimization problem of a control strategy into a Lagrange problem with a constraint condition, defining a primary
loss function and a
secondary loss function, and setting a safety threshold value; secondly, combining with a
Lagrange multiplier to construct an initial Lagrange function so as to minimize main loss and meet security constraints; secondly, setting an initial value of a
Lagrange multiplier by solving a dual problem, and then introducing a
damping factor to construct an enhanced function; and finally, after
model parameters are initialized, updating the
model parameters by using a
gradient descent method and updating the multiplier by using a gradient ascent method in iteration, and substituting into an enhanced function to evaluate whether the strategy is optimal, namely, the main loss is minimum and the security constraint is met, until a
global optimal solution is found. Therefore, the optimization of the control strategy is realized, the
system performance can be improved, the
system safety is guaranteed, the oscillation of the learned strategy when the constraint is satisfied is prevented, and the stable proceeding of the
reinforcement learning process is ensured.