The invention discloses a lock structure, a computer lock, a bicycle lock and a cabinet lock. The lock structure comprises a shell and a locking structure installed in the shell. The locking structure comprises a first lock hook, a second lock hook, a locking piece and a driving piece, and the shell is provided with an opening; the first lock hook and the second lock hook are both rotationally connected into the shell, and the driving piece is slidably connected with the shell. A first guide part and a second guide part are arranged on the driving piece, and the driving piece moves to enable the first guide part and the second guide part to synchronously drive the first lock hook and the second lock hook to rotate to be unfolded and folded correspondingly; a plurality of gear grooves are formed in the positions, corresponding to the locking pieces, of the driving piece, and the locking pieces are matched with the gear grooves for locking. The first lock hook, the second lock hook, the driving piece and the locking piece are distributed in a T shape and located on the transverse section, the locking piece is located on the longitudinal section, and the locking piece corresponds to the gear groove in position. The lockset can adapt to locking parts of various specifications, the universality of the lockset is improved, and the application range of the lockset is widened.