A detection method for detecting insulation of a power grid connected with a photovoltaic inverter against ground, wherein the power grid comprises a first live line, a second live line, a third live line and a zero line, and wherein a detection device is used to detect the insulation of the power grid against ground, the detection device comprising: a first resistor, wherein a first end of the first resistor is connected to a ground wire of the photovoltaic inverter, and a second end of the first resistor is connected to the first live line; a second resistor, wherein a first end of the second resistor is connected to the ground wire, and a second end of the second resistor is connected to the zero line; a first series branch including a third resistor and a first switch device connected in series, wherein a first end of the first series branch is connected to the ground wire, and a second end of the first series branch is connected to the zero line or the first live line; a fourth resistor; and a second series branch including a fifth resistor and a second switch device connected in series, and wherein the second series branch is connected in parallel with the fourth resistor to from a first parallel branch, wherein a first end of the first parallel branch is connected to the ground wire, and a second end of the first parallel branch is connected to the second live line, wherein the detection method comprises: acquiring voltage values of the ground wire and the live lines (R, S, T) in different switch states of the switch devices (Q1, Q2) in the detection device by changing the switch state of the switch devices (Q1, Q2), wherein the zero line is a reference zero potential; and calculating a value of a resistance of the power grid relative to ground based on the voltage values, wherein acquiring voltage values comprises: acquiring voltages of each live line (R, S, T) and the ground wire in the power grid in each of at least 4 switch combination states by changing the switch combination state of the first switch device and the second switch device. a first resistor, wherein a first end of the first resistor is connected to a ground wire of the photovoltaic inverter, and a second end of the first resistor is connected to the first live line; a second resistor, wherein a first end of the second resistor is connected to the ground wire, and a second end of the second resistor is connected to the zero line; a first series branch including a third resistor and a first switch device connected in series, wherein a first end of the first series branch is connected to the ground wire, and a second end of the first series branch is connected to the zero line or the first live line; a fourth resistor; and a second series branch including a fifth resistor and a second switch device connected in series, and wherein the second series branch is connected in parallel with the fourth resistor to from a first parallel branch, wherein a first end of the first parallel branch is connected to the ground wire, and a second end of the first parallel branch is connected to the second live line, wherein the detection method comprises: acquiring voltage values of the ground wire and the live lines (R, S, T) in different switch states of the switch devices (Q1, Q2) in the detection device by changing the switch state of the switch devices (Q1, Q2), wherein the zero line is a reference zero potential; and calculating a value of a resistance of the power grid relative to ground based on the voltage values, wherein acquiring voltage values comprises: acquiring voltages of each live line (R, S, T) and the ground wire in the power grid in each of at least 4 switch combination states by changing the switch combination state of the first switch device and the second switch device. acquiring voltage values of the ground wire and the live lines (R, S, T) in different switch states of the switch devices (Q1, Q2) in the detection device by changing the switch state of the switch devices (Q1, Q2), wherein the zero line is a reference zero potential; and calculating a value of a resistance of the power grid relative to ground based on the voltage values, wherein acquiring voltage values comprises: acquiring voltages of each live line (R, S, T) and the ground wire in the power grid in each of at least 4 switch combination states by changing the switch combination state of the first switch device and the second switch device.