A device for preventing contamination of a positive-pressure connector (6) of an indwelling needle and a method based on same. The device comprises a shell (1), a connecting port (3) fixedly connected to the shell (1) and used for connecting to the positive-pressure connector (6), an air pressure balance hole (5) disposed opposite to the connecting port (3) and provided on the shell (1), and a filtering membrane (2) provided between the air pressure balance hole (5) and the connecting port (3). The device is simple in structure, adopts a structural design of the filtering membrane (2), can filter microorganisms, bacteria, viruses, dusts, and particulate pollution sources, and is used during indwelling of infusion intervals to prevent the positive-pressure connector (6) from being exposed to the air and maintain the aseptic state and positive-pressure condition of the positive-pressure connector (6) during indwelling.