1. A method for controlling a voltage in a near direct current area, wherein the method is applied in a control of an automatic voltage control system in a master station of a power system and comprises following steps: collecting measured values of parameters as initial values of prediction values of the parameters, wherein the prediction values comprise voltage prediction values of pilot buses, a voltage prediction value of a bus in a convertor station, a first active power prediction value which is a sum of active power prediction values of loads in the convertor station, a first reactive power prediction value which is a sum of reactive power prediction values of the loads in the convertor station, an input amount of capacitors and reactors in the convertor station, terminal voltage prediction values of generators participating in a voltage control, active power prediction values of the generators and reactive power prediction values of the generators; inputting the initial values into a preset control model for optimizing a model predictive control, wherein the preset control model comprises an objective function and constraint conditions, the objective function is a function established according to the voltage prediction values of the pilot buses and the terminal voltage prediction values of the generators, and configured to optimize terminal voltage setting values of generators, the constraint conditions comprise a first constraint condition of the reactive power prediction values of the generators, a second constraint condition of the voltage prediction values of the pilot buses, the voltage prediction value of the bus in the convertor station, the terminal voltage prediction values of the generators, a third constraint condition of the input amount of the capacitors and reactors in the convertor station, a fourth constraint condition of an input amount of filter capacitors under a constant reactive power mode, a fifth constraint condition of a number of actions of the capacitors and reactors and a sixth constraint condition of a system voltage, the reactive power prediction values of the generators and the input amount of the capacitors and reactors in the convertor station; solving the preset control model to obtain a solution sequence of the terminal voltage setting values of the generators within a time window; sending first values in the solution sequence to the generators, such that the voltage control in the near direct current area is realized.