The invention discloses a refrigerating and heating device and a cold and
heat control method. The refrigerating and heating device comprises a driver, a refrigerating and heating generator and a medium circulation unit. The refrigerating and heating generator comprises a flow cavity, a medium and a
solid elastic clamping material unit. The medium circulating unit comprises a pipeline and a heat exchange unit, and the pipeline communicates with the flow cavity; during heating, the
solid elastic clamping material unit is loaded, heat is generated during
phase change, a medium in the flow cavity is heated, the heated medium is conveyed to the heat exchange unit for
heat supply through the pipeline, and the medium enters the flow cavity through the pipeline; when the
solid elastic clamping material unloading unit generates reverse
phase change, cold energy is generated to cool the medium in the flow cavity, the cooled medium is conveyed away through the pipeline, and the medium enters the flow cavity through the pipeline; or during
refrigeration, the solid elastic clamping material unit is unloaded, the cooled medium is conveyed to the heat exchange unit through the pipeline for cooling, and the medium enters the flow cavity through the pipeline; and the solid elastic clamping material unit is loaded, the heating medium is conveyed away through the pipeline, and the medium enters the flow cavity through the pipeline.