This application relates to the field of engine technology, and discloses a method, device, equipment, and medium for joint optimization control of engine backfire prevention. The method includes: acquiring at least engine speed, average indicated pressure, excess air coefficient, intake manifold pressure,
cylinder pressure, valve overlap angle, intake manifold flow velocity, and
hydrogen injection parameters, and at least determining the magnitude relationship between
cylinder pressure and intake manifold pressure; when the intake manifold pressure is greater than the
cylinder pressure, determining that there is no risk of
flame backflow in the engine, not triggering the fuse action, and constructing a multi-objective optimization function, and then executing a preset joint optimization strategy based on the multi-objective optimization function; when the intake manifold pressure is not greater than the cylinder pressure, determining that there is a risk of
flame backflow in the engine, triggering the fuse action and generating a forced intake blockage command to at least control the intake valve to close and stop intake until the intake manifold pressure is greater than the cylinder pressure for a preset duration, then releasing the fuse action and resuming the execution of the preset joint optimization strategy.