Search

CN-121996153-A - Data storage control method and system for storage medium

CN121996153ACN 121996153 ACN121996153 ACN 121996153ACN-121996153-A

Abstract

The present application relates to the field of data storage technologies, and in particular, to a data storage control method and system for a storage medium. The scheme divides a storage medium into a system program data storage area and an application data storage area, stores system program data through the system program data storage area, and stores application data through the application data storage area. When the data is applied, after receiving an instruction for reading the data, judging whether the data which is required to be read by the instruction is system program data or application data, when the data is the system program data, reading the data which is required to be read from a system program data storage area, when the data is the application data, reading the data which is required to be read from an application data storage area, and after receiving the instruction for writing the data, writing the data which is required to be written by the instruction into the application data storage area. By adopting the scheme of the application, when abnormal conditions such as unexpected power failure and the like occur, the abnormal use condition of the appliance caused by the loss of the system program data can be effectively avoided.

Inventors

  • CHEN GUANGHUI

Assignees

  • 广东省奇思智能制造有限公司

Dates

Publication Date
20260508
Application Date
20251205

Claims (10)

  1. 1. A data storage control method of a storage medium is characterized in that the storage medium is divided into a system program data storage area and an application data storage area, the system program data storage area stores system program data, and the application data storage area stores application data, the method comprises: Receiving an instruction for reading data, and responding to the instruction, judging whether the data which is required to be read by the instruction for reading the data is system program data or application data; When the data to be read is system program data, reading the data to be read from the system program data storage area; When the data to be read is application data, reading the data to be read from the application data storage area; And receiving an instruction for writing data, and responding to the instruction, and writing the data which is required to be written by the instruction for writing data into the application data storage area.
  2. 2. The data storage control method of claim 1, further comprising prohibiting writing of data to the system program data storage area after the system program data storage area stores system program data.
  3. 3. The data storage control method according to claim 1, wherein when the data to be read is application data, reading the data to be read from the application data storage area includes: Detecting whether the application data is abnormal, if so, deleting the application data stored in the application data storage area, otherwise, reading the data to be read from the application data storage area.
  4. 4. The data storage control method of claim 3, wherein the detecting whether the application data is abnormal comprises: Judging whether the application data comprises a frame header and a CRC check code, if so, judging that the application data is normal, otherwise, judging that the application data is abnormal.
  5. 5. The data storage control method of claim 3, wherein the system program data includes at least calibration parameters, a temperature profile, and standard infrared data, the application data includes at least pumping counts and self-calibrating infrared data, and the method further comprises, after deleting the application data stored in the application data storage area: counting the suction count again with a preset reference value to obtain a new suction count and writing the new suction count into the application data storage area; Reading standard infrared data of the system program data storage area, using the standard infrared data as a calibration parameter, re-calibrating the self-calibration infrared data according to the calibration parameter to obtain new self-calibration infrared data, and writing the new self-calibration infrared data into the application data storage area.
  6. 6. The data storage control method as claimed in claim 4, wherein said determining whether the application data includes a frame header and a CRC check code, if so, determines that the application data is normal, otherwise, determines that the application data is abnormal, includes: Judging whether the application data comprises a frame header and a CRC check code or not, judging whether the CRC check code is correct or not, if the application data comprises the frame header and the CRC check code is correct, determining that the application data is normal, otherwise, determining that the application data is abnormal.
  7. 7. A data storage control system of a storage medium, the storage medium being divided into a system program data storage area and an application data storage area, the system program data storage area storing system program data and the application data storage area storing application data, the system comprising: The data judging module is used for receiving an instruction for reading data and responding to the instruction to judge whether the data which is required to be read by the instruction for reading the data is system program data or application data; a data reading module for: When the data to be read is system program data, reading the data to be read from the system program data storage area; When the data to be read is application data, reading the data to be read from the application data storage area; And the data writing module is used for receiving an instruction for writing data and writing the data which is required to be written by the instruction for writing data into the application data storage area in response to the instruction.
  8. 8. The data storage control system of claim 7 wherein the data writing module further comprises disabling writing of data to the system program data storage area after the system program data storage area stores system program data.
  9. 9. The data storage control system of claim 7, wherein in the data reading module, when the data to be read is application data, reading the data to be read from the application data storage area includes: Detecting whether the application data is abnormal, if so, deleting the application data stored in the application data storage area, otherwise, reading the data to be read from the application data storage area.
  10. 10. A computer program product comprising a computer program and/or instructions which, when executed by a processor, implement the method of any one of claims 1-6.

Description

Data storage control method and system for storage medium Technical Field The present invention relates to the field of data storage technologies, and in particular, to a data storage control method and system for a storage medium. Background The heating non-combustion appliance is characterized in that the TCR, the initial resistance and the like of the heating element are stored in the flash in a mode of infrared or power calibration when leaving the factory, the flash is brushed with a common temperature curve when leaving the factory for convenient version iteration, and infrared insertion data and blank insertion data are calibrated and stored for the appliance with the self-starting plug cigarette. The infrared insertion data are data generated by the fact that the infrared sensing device senses that the atomized matrix is inserted, and the empty insertion data are data generated by the fact that the infrared sensing device does not sense that the atomized matrix is inserted. Meanwhile, some other data which can be changed in the using process, such as an insertion count, infrared self-calibration data and the like, can be stored in the flash. The calibration parameters, the temperature curve, the infrared data and the like need to be ensured not to be lost or changed, otherwise, the conditions that the use is seriously affected such as incapacitation or self-starting are caused. The existing Flash storage mechanism generally needs to read data into a memory, then completely empty Flash and integrally store partial data to be changed after being changed in the memory, and in the process, if the Flash is emptied, the device is powered off and restarted due to unexpected conditions such as low electricity and the like, the Flash data is lost, so that the situations such as incapability of heating and the like occur. Disclosure of Invention The data storage control method and system for the storage medium effectively solve the problem that the existing heating non-combustion appliance is easy to lose flash data under the abnormal conditions of unexpected power failure and the like, so that the appliance is abnormal in use. According to a first aspect, there is provided in one embodiment a data storage control method of a storage medium divided into a system program data storage area storing system program data and an application data storage area storing application data, the method comprising: Receiving an instruction for reading data, and responding to the instruction, judging whether the data which is required to be read by the instruction for reading the data is system program data or application data; When the data to be read is system program data, reading the data to be read from the system program data storage area; When the data to be read is application data, reading the data to be read from the application data storage area; And receiving an instruction for writing data, and responding to the instruction, and writing the data which is required to be written by the instruction for writing data into the application data storage area. In one implementation, the control method further includes prohibiting writing of data to the system program data storage area after the system program data storage area stores system program data. In an implementation manner, when the data to be read is application data, reading the data to be read from the application data storage area includes: Detecting whether the application data is abnormal, if so, deleting the application data stored in the application data storage area, otherwise, reading the data to be read from the application data storage area. In an implementation manner, the detecting whether the application data is abnormal includes: Judging whether the application data comprises a frame header and a CRC check code, if so, judging that the application data is normal, otherwise, judging that the application data is abnormal. In one implementation, the system program data at least comprises a temperature curve and standard infrared data, the application data at least comprises a pumping count and self-calibration infrared data, and after deleting the application data stored in the application data storage area, the method further comprises: counting the suction count again with a preset reference value to obtain a new suction count and writing the new suction count into the application data storage area; Reading standard infrared data of the system program data storage area, using the standard infrared data as a calibration parameter, re-calibrating the self-calibration infrared data according to the calibration parameter to obtain new self-calibration infrared data, and writing the new self-calibration infrared data into the application data storage area. In an implementation manner, the determining whether the application data includes a frame header and a CRC check code, if yes, determining that the application data is normal, and if not, determining