Precaution: You should make sure that you have set and signed up Google account before your phone was locked and you should remember the password of the Google account.
Step 1 Input any password arbitrary and the system will alert you that you have typed the wrong password for 5 times. Try it again 30 seconds latter.
Step 2 At this moment, you will see "Forgotten the password" on the lower left corner of the unlock interface. Input the Google account and the password and you can have your phone unlocked.
Note: You should make sure the phone is connected to the Internet, or you are not able to log in Google account and remove the pattern lock.