Pressure sensor used in marine hydrographic survey is an important device for the deep sea detection, the tsunami forecast and the marine engineering. Owing to its mature technology process and low production cost, silicon piezoresistive sensor is widely applied in the field of industrial pressure measurement. However, its temperature effect can result in non-negligible dynamic error, which cannot meet requirement of deep sea environment. The silicon-on-sapphire pressure sensor based on stress cup structure is presented. The output voltage values show a high deviation in the range of -6 similar to 50 degrees C due to temperature drift. In order to minimise this temperature effect, a temperature compensation algorithm is proposed to realise 0.03% accuracy in the full scale 60MPa range. Compared with a reference commercial sensor in deep sea experiment, the test pressure sensors exhibit minor error, excellent similarity and coherence. This numerical method provides a new research direction for environmental self-adaptive sensor. It can be emphasised that this sensor will have a good application prospect in unattended long-term ocean observation system.