An unlocking method, applied to an electronic device, wherein the electronic device comprises an inner screen, an outer screen, a front-facing camera, and a rear-facing camera, the inner screen is a foldable screen, the inner screen and the front-facing camera are located on one side of the electronic device, the outer screen and the rear-facing camera are located on another side of the electronic device, and the method comprises: when the inner screen is in a locked and closed state, and the outer screen is in a locked and black state, detecting an operation of turning on the outer screen; in response to the operation of turning on the outer screen, turning on the outer screen, starting the rear-facing camera, and starting a first timer, wherein timing duration of the first timer is first duration; before the first timer expires, if the rear-facing camera captures a face image, identifying whether the face image captured by the rear-facing camera matches a preset face image; if the face image captured by the rear-facing camera matches the preset face image, unlocking the outer screen, entering a master mode, closing the rear-facing camera, stopping the first timer, prompting a user to use the front-facing camera to perform face authentication within second duration, and starting a second timer, wherein timing duration of the second timer is the second duration, in master mode, the electronic device does not restrict access permissions for information; detecting an operation of unfolding the inner screen; in response to the operation of unfolding the inner screen, turning on the inner screen, starting the front-facing camera, and locking the outer screen; before the second timer expires, if the front-facing camera captures a face image, closing the front-facing camera, stopping the second timer, and identifying whether the face image captured by the front-facing camera matches the preset face image; and if the face image captured by the front-facing camera does not match the preset face image, unlocking the inner screen, and entering a guest mode, in the guest mode, the electronic device restricts access permissions for some information; or if the face image captured by the front-facing camera matches the preset face image, unlocking the inner screen, and entering the master mode; or when the second timer expires, if the front-facing camera still has not captured any face image, prompting the user that unlocking the inner screen fails. when the inner screen is in a locked and closed state, and the outer screen is in a locked and black state, detecting an operation of turning on the outer screen; in response to the operation of turning on the outer screen, turning on the outer screen, starting the rear-facing camera, and starting a first timer, wherein timing duration of the first timer is first duration; before the first timer expires, if the rear-facing camera captures a face image, identifying whether the face image captured by the rear-facing camera matches a preset face image; if the face image captured by the rear-facing camera matches the preset face image, unlocking the outer screen, entering a master mode, closing the rear-facing camera, stopping the first timer, prompting a user to use the front-facing camera to perform face authentication within second duration, and starting a second timer, wherein timing duration of the second timer is the second duration, in master mode, the electronic device does not restrict access permissions for information; detecting an operation of unfolding the inner screen; in response to the operation of unfolding the inner screen, turning on the inner screen, starting the front-facing camera, and locking the outer screen; before the second timer expires, if the front-facing camera captures a face image, closing the front-facing camera, stopping the second timer, and identifying whether the face image captured by the front-facing camera matches the preset face image; and if the face image captured by the front-facing camera does not match the preset face image, unlocking the inner screen, and entering a guest mode, in the guest mode, the electronic device restricts access permissions for some information; or if the face image captured by the front-facing camera matches the preset face image, unlocking the inner screen, and entering the master mode; or when the second timer expires, if the front-facing camera still has not captured any face image, prompting the user that unlocking the inner screen fails.