1. A method for locking a file, the method being implemented in a device including at least one processor and a memory storing instructions executable by the at least one processor, and the method comprising: acquiring biological feature recognition information of a user, the biological feature recognition information including at least one of fingerprint information, voiceprint information, iris information, or face information; and locking a designated file using the biological feature recognition information, according to a locking instruction input being determined by a long-press instruction, wherein: acquiring the biological feature recognition information includes collecting the biological feature recognition information of the user when the designated file is generated by photographing and, when the biological feature recognition information is the fingerprint information, collecting the biological feature recognition information includes: receiving a photographing instruction input by the user through a touchscreen, the photographing instruction instructing to perform photographing to generate the designated file; and at the same time collecting the fingerprint information of the user when the photographing is performed: the designated file is locked into a locked state, the locked state including one of a hidden state, an unmodifiable state, an undeletable state, or an unviewable state; and the locked state is unlocked by the acquired biological feature recognition information of the user.