An electronic device, comprising: a housing assembly; and a sliding mechanism being assembled to the housing assembly, and comprising: a slide rail assembly comprising a fixed member and a slide rail, the fixed member being fixed to the housing assembly, the fixed member being provided with a sliding slot, and an end of the slide rail being slidably guided in the sliding slot; and a driving assembly fixed to the housing assembly, the driving assembly comprising a driving unit connected to the slide rail, and the driving unit being configured to drive the slide rail to slide from the housing assembly to the outside and to slide from the outside to the housing assembly, wherein the driving assembly further comprises a driving assembly bracket fixed to the housing assembly, the driving unit comprises a first guide rod, a transmission lead screw, a driving member, and a push member, the first guide rod and the transmission lead screw are assembled to the driving assembly bracket, the driving member is connected to an end of the transmission lead screw, and the driving member is configured to drive the transmission lead screw to rotate; and the push member is provided with a transmission hole and a sliding hole, the transmission lead screw is connected in the transmission hole in a transmission manner, the first guide rod is slidably fitted in the sliding hole, and the push member is configured to drive the slide rail to slide, characterized in that, the driving unit further comprises an elastic buffering assembly, the elastic buffering assembly is fixed to the slide rail, and the elastic buffering assembly is connected to the push member, wherein the elastic buffering assembly comprises a first fixed portion, a second fixed portion, a second guide rod, and a first elastic member; and the first fixed portion and the second fixed portion are fixed to the slide rail, the second guide rod is fixed between the first fixed portion and the second fixed portion, the first elastic member is fitted over the second guide rod, and the push member is configured to push the first elastic member to stretch and retract on the second guide rod. a housing assembly; and a sliding mechanism being assembled to the housing assembly, and comprising: a slide rail assembly comprising a fixed member and a slide rail, the fixed member being fixed to the housing assembly, the fixed member being provided with a sliding slot, and an end of the slide rail being slidably guided in the sliding slot; and a driving assembly fixed to the housing assembly, the driving assembly comprising a driving unit connected to the slide rail, and the driving unit being configured to drive the slide rail to slide from the housing assembly to the outside and to slide from the outside to the housing assembly, a slide rail assembly comprising a fixed member and a slide rail, the fixed member being fixed to the housing assembly, the fixed member being provided with a sliding slot, and an end of the slide rail being slidably guided in the sliding slot; and a driving assembly fixed to the housing assembly, the driving assembly comprising a driving unit connected to the slide rail, and the driving unit being configured to drive the slide rail to slide from the housing assembly to the outside and to slide from the outside to the housing assembly, wherein the driving assembly further comprises a driving assembly bracket fixed to the housing assembly, the driving unit comprises a first guide rod, a transmission lead screw, a driving member, and a push member, the first guide rod and the transmission lead screw are assembled to the driving assembly bracket, the driving member is connected to an end of the transmission lead screw, and the driving member is configured to drive the transmission lead screw to rotate; and the push member is provided with a transmission hole and a sliding hole, the transmission lead screw is connected in the transmission hole in a transmission manner, the first guide rod is slidably fitted in the sliding hole, and the push member is configured to drive the slide rail to slide, characterized in that, the driving unit further comprises an elastic buffering assembly, the elastic buffering assembly is fixed to the slide rail, and the elastic buffering assembly is connected to the push member, wherein the elastic buffering assembly comprises a first fixed portion, a second fixed portion, a second guide rod, and a first elastic member; and the first fixed portion and the second fixed portion are fixed to the slide rail, the second guide rod is fixed between the first fixed portion and the second fixed portion, the first elastic member is fitted over the second guide rod, and the push member is configured to push the first elastic member to stretch and retract on the second guide rod.