Public security detention refers to the behavior that the perpetrator is detained in violation of public security management (such as drunk driving and beating others without causing minor injuries). It is decided and implemented by the public security organ.
Criminal detention refers to the detention of actors suspected of committing crimes for the purpose of criminal proceedings. It is decided and implemented by the public security organ. The procuratorial organ's power to decide on the custody of the cases it investigates and handles is only exercised by the public security organ under certain circumstances.
Judicial custody refers to the detention of an actor who violates court discipline and refuses to execute a judgment or ruling. Decided and executed by the people's court.
It is illegal for street offices to detain citizens, and they can directly sue their illegal acts in court.