A compressor, comprising: a first primary cylinder, a second primary cylinder, a secondary cylinder and a lower flange, wherein the first primary cylinder, the second primary cylinder and the secondary cylinder are stacked, a separator is provided between two adjacent cylinders, the secondary cylinder is provided at the same side of the first primary cylinder and the second primary cylinder, or the secondary cylinder is provided between the first primary cylinder and the second primary cylinder, and the lower flange is provided at the lower sides of the first primary cylinder, the second primary cylinder and the secondary cylinder; the first primary cylinder is provided with a first air entry and a first slide piece groove, a first slide piece is provided in the first slide piece groove, the second primary cylinder is provided with a second air entry and a second slide piece groove, a second slide piece is provided in the second slide piece groove, the secondary cylinder is provided with an air outlet and a third slide piece groove, and a third slide piece is provided in the third slide piece groove; characterized in that the first primary cylinder and the second primary cylinder are connected in parallel, the first primary cylinder and the second primary cylinder are connected in serial to the secondary cylinder after being connected in parallel, and a refrigerant entering the first air entry and the second air entry is discharged from the air outlet after primary or/and secondary compression; and two separators are divided into a first separator and a second separator, and any one or two of the first separator, the second separator and the lower flange are provided with a slide piece control device configured to control a slide piece to act, each slide piece control device corresponding to one of the slide pieces; wherein during a operation of the compressor, one or two of the first primary cylinder, the second primary cylinder and the secondary cylinder has a working state and an unloading state. a first primary cylinder, a second primary cylinder, a secondary cylinder and a lower flange, wherein the first primary cylinder, the second primary cylinder and the secondary cylinder are stacked, a separator is provided between two adjacent cylinders, the secondary cylinder is provided at the same side of the first primary cylinder and the second primary cylinder, or the secondary cylinder is provided between the first primary cylinder and the second primary cylinder, and the lower flange is provided at the lower sides of the first primary cylinder, the second primary cylinder and the secondary cylinder; the first primary cylinder is provided with a first air entry and a first slide piece groove, a first slide piece is provided in the first slide piece groove, the second primary cylinder is provided with a second air entry and a second slide piece groove, a second slide piece is provided in the second slide piece groove, the secondary cylinder is provided with an air outlet and a third slide piece groove, and a third slide piece is provided in the third slide piece groove; characterized in that the first primary cylinder and the second primary cylinder are connected in parallel, the first primary cylinder and the second primary cylinder are connected in serial to the secondary cylinder after being connected in parallel, and a refrigerant entering the first air entry and the second air entry is discharged from the air outlet after primary or/and secondary compression; and two separators are divided into a first separator and a second separator, and any one or two of the first separator, the second separator and the lower flange are provided with a slide piece control device configured to control a slide piece to act, each slide piece control device corresponding to one of the slide pieces; wherein during a operation of the compressor, one or two of the first primary cylinder, the second primary cylinder and the secondary cylinder has a working state and an unloading state.