Mechanical locks are not just a type of marble lock, except that most mechanical locks currently use a bullet lock structure. A plurality of holes are radially distributed on the surface of the pin lock cylinder, and the holes correspond to the holes in the lock body and ensure the necessary concentricity. These holes are inserted into the upper and lower rows of cylindrical pins, that is, the upper and lower marbles. In general, the upper bullet in the lock body hole is inserted into the lock core hole, or the lower marble in the lock core is inserted into the lock body hole, so that the lock core cannot be arbitrarily rotated. After the ball lock is inserted by the correct key, since the key pitch and the pin hole correspond to the tooth depth one by one corresponding to the length of the lower pin, the contact surface of the upper pin and the lower pin coincides with the contact surface of the lock core and the lock body. The lock cylinder can be freely rotated, and the mechanism is driven to realize the switching action.