A connecting mechanism, comprising: a body and a detachable part connected with the body; wherein the body comprises a casing and a sliding component, the casing is provided with an insertion hole for insertion of the detachable part, the sliding component is in sliding connection with the casing, and the sliding component is provided thereon with access holes and clamping holes which communicate with the access holes; and the detachable part comprises insertion pieces; when the sliding component slides from a first position to a second position, the access holes are opposite to the insertion hole, and the insertion pieces of the detachable part extend into the access holes through the insertion hole; when the sliding component slides from the second position to the first position, the insertion pieces of the detachable part enter the clamping holes from the access holes so that the sliding component locks the detachable part through the clamping holes; wherein the sliding component comprises a sliding part and conductive plate type compression springs; the sliding part is slidably connected to the casing; each conductive plate type compression spring comprises a free end and a fixed end, wherein the free end is in linkage with the sliding part, and the fixed end is fixed on the casing; a conductive connecting end extends from the free end of each conductive plate type compression spring, wherein the conductive connecting end is provided with the access hole and the clamping hole; under the action of an external force, the sliding part slides from the first position to the second position, the conductive plate type compression springs are compressed, each access hole is opposite to the insertion hole, and the insertion pieces of the detachable part extend into the access holes through the insertion hole; when the external force disappears, the sliding part slides from the second position to the first position under the restoring force of the conductive plate type compression springs, and the insertion pieces of the detachable part enter the clamping holes through the access holes and contact with the conductive connecting ends, so that the detachable part is electrically connected with the conductive plate type compression springs. when the sliding component slides from a first position to a second position, the access holes are opposite to the insertion hole, and the insertion pieces of the detachable part extend into the access holes through the insertion hole; when the sliding component slides from the second position to the first position, the insertion pieces of the detachable part enter the clamping holes from the access holes so that the sliding component locks the detachable part through the clamping holes; wherein the sliding component comprises a sliding part and conductive plate type compression springs; the sliding part is slidably connected to the casing; each conductive plate type compression spring comprises a free end and a fixed end, wherein the free end is in linkage with the sliding part, and the fixed end is fixed on the casing; a conductive connecting end extends from the free end of each conductive plate type compression spring, wherein the conductive connecting end is provided with the access hole and the clamping hole; under the action of an external force, the sliding part slides from the first position to the second position, the conductive plate type compression springs are compressed, each access hole is opposite to the insertion hole, and the insertion pieces of the detachable part extend into the access holes through the insertion hole; when the external force disappears, the sliding part slides from the second position to the first position under the restoring force of the conductive plate type compression springs, and the insertion pieces of the detachable part enter the clamping holes through the access holes and contact with the conductive connecting ends, so that the detachable part is electrically connected with the conductive plate type compression springs.