The present invention provides a background task detection method, device, electronic device and storage medium. The method includes: disassembling the symbol table of the project to be detected and obtaining the
assembly instructions of each symbol therein; for any target function, obtaining each target symbol containing the address of the target function, and obtaining the class name corresponding to each target symbol through the address information of each target symbol, and obtaining a class name
list corresponding to the target function, wherein the address information includes a starting address and an offset address, and the target function includes a function for starting a background task and a function for ending a background task; by comparing the
first class name
list and the second class name
list, obtaining a difference class, so as to detect the code of the difference class and obtain a background task detection result, wherein the
first class name list is a class name list corresponding to the function for starting a background task, and the second class name list is a class name list corresponding to the function for ending a background task.