An electronic method for non-targeted, multi-index and rapid detection of pesticide residue in edible agricultural products, comprising the steps; first: establishing a first-level accurate mass spectrometry database and a second-level fragment ion mass spectrometry database of more than 1200 pesticides commonly used worldwide; using the two mass spectrometry databases for screening and confirmation of a pesticide compound, and establishing a unique electronic identity card for each pesticide, such that a standard of a conventional identification method using a physical pesticide as a reference is replaced with an electronic standard; second: developing software for high-resolution mass spectrometry based automatic matching, qualitative identification, and intelligent screening of pesticide residues, and embedding a software program into an instrument, such that comparison between test samples and pesticide mass spectrometry databases is rapid, throughput and accuracy are high, data is reliable, and processes