An electronic mechanical brake system, comprising a brake pedal, an electronic brake mechanism, a mechanical brake mechanism, a brake, and a switch mechanism, wherein the switch mechanism has a first state and a second state, the switch mechanism is in the first state when the electronic brake mechanism works properly, and the switch mechanism is in the second state when the electronic brake mechanism fails; the electronic brake mechanism comprises a controller and an electronic signal sensor, the controller is electrically connected to the electronic signal sensor and the brake, when the switch mechanism is in the first state, the electronic signal sensor is configured to receive a braking signal of the brake pedal and transmit the braking signal to the controller, and the controller controls the brake to brake based on the braking signal; and the mechanical brake mechanism comprises a transmission assembly and an actuator, and when the switch mechanism is in the second state, the actuator is in transmission connection to the brake pedal by using the transmission assembly, and the actuator is connected to the brake, to control the brake to brake, characterized in that the switch mechanism comprises: a housing, a first sliding block, a double-sided ratchet, and an electromagnetic switch assembly; a first end of the first sliding block is connected to the brake pedal by using a connecting rod, the connecting rod is configured to drive the first sliding block to slide on the housing in a first direction, a second end of the first sliding block is connected to a first end of the double-sided ratchet, a first side of the double-sided ratchet is connected to a feedback mechanism, and a second side of the double-sided ratchet is connected to the transmission assembly; and a first end of the electromagnetic switch assembly is disposed on the first sliding block, a second end of the electromagnetic switch assembly is disposed on the double-sided ratchet, and the electromagnetic switch assembly is configured to: connect the switch mechanism to the double-sided ratchet when the switch mechanism is in the first state, and connect the switch mechanism to the transmission assembly when the switch mechanism is in the second state. the switch mechanism has a first state and a second state, the switch mechanism is in the first state when the electronic brake mechanism works properly, and the switch mechanism is in the second state when the electronic brake mechanism fails; the electronic brake mechanism comprises a controller and an electronic signal sensor, the controller is electrically connected to the electronic signal sensor and the brake, when the switch mechanism is in the first state, the electronic signal sensor is configured to receive a braking signal of the brake pedal and transmit the braking signal to the controller, and the controller controls the brake to brake based on the braking signal; and the mechanical brake mechanism comprises a transmission assembly and an actuator, and when the switch mechanism is in the second state, the actuator is in transmission connection to the brake pedal by using the transmission assembly, and the actuator is connected to the brake, to control the brake to brake, characterized in that the switch mechanism comprises: a housing, a first sliding block, a double-sided ratchet, and an electromagnetic switch assembly; a first end of the first sliding block is connected to the brake pedal by using a connecting rod, the connecting rod is configured to drive the first sliding block to slide on the housing in a first direction, a second end of the first sliding block is connected to a first end of the double-sided ratchet, a first side of the double-sided ratchet is connected to a feedback mechanism, and a second side of the double-sided ratchet is connected to the transmission assembly; and a first end of the electromagnetic switch assembly is disposed on the first sliding block, a second end of the electromagnetic switch assembly is disposed on the double-sided ratchet, and the electromagnetic switch assembly is configured to: connect the switch mechanism to the double-sided ratchet when the switch mechanism is in the first state, and connect the switch mechanism to the transmission assembly when the switch mechanism is in the second state. a housing, a first sliding block, a double-sided ratchet, and an electromagnetic switch assembly; a first end of the first sliding block is connected to the brake pedal by using a connecting rod, the connecting rod is configured to drive the first sliding block to slide on the housing in a first direction, a second end of the first sliding block is connected to a first end of the double-sided ratchet, a first side of the double-sided ratchet is connected to a feedback mechanism, and a second side of the double-sided ratchet is connected to the transmission assembly; and a first end of the electromagnetic switch assembly is disposed on the first sliding block, a second end of the electromagnetic switch assembly is disposed on the double-sided ratchet, and the electromagnetic switch assembly is configured to: connect the switch mechanism to the double-sided ratchet when the switch mechanism is in the first state, and connect the switch mechanism to the transmission assembly when the switch mechanism is in the second state.