Since door locks (for the most part) operate when the driver or passenger press the Lock or Unlock buttons on a door panel, a malfunctioning button could be the cause of it trying to operate by itself as you describe. I would open the panel and unplug one of the control buttons to see if the problem stops. If it continues, unplug the other control button. If one is causing the issue you will know you found a bad control. The security system (remote) can also lock and unlock the doors and that could be the source of trouble but is too difficult for you to diagnose. If not the door controls, take it to a dealer to have it checked out.
Answers & Comments
Since door locks (for the most part) operate when the driver or passenger press the Lock or Unlock buttons on a door panel, a malfunctioning button could be the cause of it trying to operate by itself as you describe. I would open the panel and unplug one of the control buttons to see if the problem stops. If it continues, unplug the other control button. If one is causing the issue you will know you found a bad control. The security system (remote) can also lock and unlock the doors and that could be the source of trouble but is too difficult for you to diagnose. If not the door controls, take it to a dealer to have it checked out.