A method for locking a file, wherein the method comprises: acquiring biological feature recognition information of a current user, wherein the biological feature recognition information comprises voiceprint information; and locking a first designated file by using the biological feature recognition information of the current user, wherein the first designated file is a file to be obtained by photography, and acquiring the biological feature recognition information of the current user comprises: collecting the biological feature recognition information of the current user when the first designated file is obtained by photography, and collecting the biological feature recognition information of the current user when the first designated file is obtained by photography comprises: collecting a voice signal of the current user by a microphone; recognizing the voice signal to obtain a first photographing instruction input from the current user, wherein the first photographing instruction is used for instructing to obtain the first designated file by photography; and extracting the voiceprint information of the current user from the voice signal. acquiring biological feature recognition information of a current user, wherein the biological feature recognition information comprises voiceprint information; and locking a first designated file by using the biological feature recognition information of the current user, wherein the first designated file is a file to be obtained by photography, and acquiring the biological feature recognition information of the current user comprises: collecting the biological feature recognition information of the current user when the first designated file is obtained by photography, and collecting the biological feature recognition information of the current user when the first designated file is obtained by photography comprises: collecting a voice signal of the current user by a microphone; recognizing the voice signal to obtain a first photographing instruction input from the current user, wherein the first photographing instruction is used for instructing to obtain the first designated file by photography; and extracting the voiceprint information of the current user from the voice signal. collecting the biological feature recognition information of the current user when the first designated file is obtained by photography, and collecting the biological feature recognition information of the current user when the first designated file is obtained by photography comprises: collecting a voice signal of the current user by a microphone; recognizing the voice signal to obtain a first photographing instruction input from the current user, wherein the first photographing instruction is used for instructing to obtain the first designated file by photography; and extracting the voiceprint information of the current user from the voice signal. collecting a voice signal of the current user by a microphone; recognizing the voice signal to obtain a first photographing instruction input from the current user, wherein the first photographing instruction is used for instructing to obtain the first designated file by photography; and extracting the voiceprint information of the current user from the voice signal.