Universal driving method for plug and play of device

Provided is a universal driving method for plug and play of a device. The universal driving method for plug and play of the device comprises the step of setting up a drive framework, a plug and play mechanism of a development phase and a plug and play mechanism of a run phase, wherein the plug and play mechanism of the development phase is used for integrating drivers of various devices, and the plug and play mechanism of the run phase is used for achieving the purposes that when the new device is plugged, the new device can be matched with the corresponding driver, and automatic loading of the device can be achieved under the condition that a system program runs. According to the universal driving method for plug and play of the device, due to the fact that only manual configuration of a little of information needs to be carried out in the development phase, and the device drivers and device test programs can be automatically generated, the workload of developers is reduced, and robustness of the device drivers and device hardware is ensured; the purpose that the plug and play function is achieved through zero configuration is achieved in a use phase, when the device is plugged by a user, the device driver can be obtained from a local host or a server, and when the corresponding device driver does not exist, only device description information provided by the developers needs to be provided, and the device driver can be automatically generated.