The invention relates to the technical field of remote equipment control, and particularly provides a method and a device for realizing PDU
remote detection and control, a Socket
server establishes TCP long connection with a plurality of PDU equipment, a back-end service is responsible for
business logic processing, Redis caches PDU equipment states and timed task information, an upper-layer application provides a user
interaction interface, and the upper-layer application provides a user
interaction interface. Displaying an
equipment state and receiving a
user control instruction; comprising the following steps: S1, starting and monitoring a
server; s2, connection establishment and
handshake are carried out; s3, equipment login and identity binding are carried out; s4, reporting and analyzing the state; s5,
heartbeat maintenance and
timeout detection; s6, carrying out connection disconnection
processing; s7, remote manual control is carried out; and S8, automatically timing the task. Compared with the prior art, remote manual control of the PDU socket can be performed through the API, and timing task detection is triggered by using the
heartbeat message of the PDU, so that automatic timing switching of the PDU socket is realized.