Data storage control method and system of storage medium

By dividing the storage medium in the heated non-combustible appliance into system program and application data areas, the problem of data loss caused by unexpected power outages is solved, ensuring the normal use of the appliance.

CN121996153APending Publication Date: 2026-05-08GUANGDONG QISITECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG QISITECH CO LTD
Filing Date
2025-12-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing heated non-combustible appliances are prone to data loss due to unexpected power outages or other abnormal situations, leading to malfunctions in appliance operation.

Method used

The storage medium is divided into a system program data storage area and an application data storage area. The system program data is read-only, while the application data storage area is read-and-write. In case of an exception, the application data storage area is cleared and updated.

Benefits of technology

It effectively avoids the loss of system program data, ensures that the equipment can still be used normally under abnormal conditions, and prevents abnormal use due to data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996153A_ABST
    Figure CN121996153A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data storage, in particular to a data storage control method and system of a storage medium. According to the scheme, the storage medium is divided into the system program data storage area and the application data storage area, the system program data is stored in the system program data storage area, and the application data is stored in the application data storage area. During application, after an instruction used for reading data is received, whether the data needing to be read by the instruction is system program data or application data is judged; when the data is the system program data, reading the data needing to be read from the system program data storage area; when the data is the application data, reading the data needing to be read from an application data storage area; and after an instruction for writing data is received, writing the data required to be written by the instruction into the application data storage area. According to the scheme, when abnormal conditions such as accidental power failure occur, the situation that the appliance is used abnormally due to the fact that system program data are lost can be effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and more specifically to a data storage control method and system for a storage medium. Background Technology

[0002] Heated non-combustible appliances require factory calibration to store the heating element's temperature coefficient (TCR) and initial resistance in flash memory, either via infrared or power calibration. For ease of version updates, temperature profiles are also typically flashed into flash memory at the factory. For appliances with automatic start-up upon insertion, infrared insertion data and no-insertion data also need to be calibrated and stored. Infrared insertion data is generated when the infrared sensor detects the insertion of the atomizing substrate, while no-insertion data is generated when the infrared sensor does not detect insertion. Flash memory also stores other data that may change during use, such as the number of inserted components and infrared self-calibration data. Calibration parameters, temperature profiles, and infrared data must be protected from loss or alteration; otherwise, serious issues such as heating failure or automatic start-up may occur. Current flash storage mechanisms typically require reading data from memory, clearing the flash memory, modifying the necessary data in memory, and then storing the entire set. If, during this process, the flash memory is cleared but an unexpected power outage or restart occurs after a low battery event, the flash data will be lost, leading to heating failure. Summary of the Invention

[0003] The present invention provides a data storage control method and system for a storage medium, which effectively solves the problem that existing heating non-combustible appliances are prone to flash data loss under abnormal circumstances such as accidental power outages, which leads to abnormal appliance use.

[0004] According to a first aspect, one embodiment provides a data storage control method for 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 stores system program data, and the application data storage area stores application data; the method includes: Receive an instruction for reading data, and in response to the instruction, determine whether the data to be read by the instruction for reading data is system program data or application data; When the data to be read is system program data, the data to be read is read from the system program data storage area; When the data to be read is application data, the data to be read is read from the application data storage area; Receive an instruction for writing data, and in response to the instruction, write the data to be written by the instruction to the application data storage area.

[0005] In one feasible implementation, the control method further includes: after the system program data storage area stores system program data, prohibiting the writing of data to the system program data storage area.

[0006] In one feasible implementation, when the data to be read is application data, reading the data to be read from the application data storage area includes: If the application data is found to be abnormal, the application data stored in the application data storage area is deleted; otherwise, the data to be read is read from the application data storage area.

[0007] In one feasible implementation, detecting whether the application data is abnormal includes: Determine whether the application data includes a frame header and a CRC checksum. If so, the application data is considered normal; otherwise, the application data is considered abnormal.

[0008] In one feasible implementation, the system program data includes at least temperature curves and standard infrared data; the application data includes at least the number of suction tubes and self-calibrated infrared data; after deleting the application data stored in the application data storage area, the method further includes: The number of suction tubes is recounted using a preset baseline value to obtain a new number of suction tubes, which is then written to the application data storage area. Read the standard infrared data from the system program data storage area, use the standard infrared data as calibration parameters, recalibrate the self-calibration infrared data according to the calibration parameters to obtain new self-calibration infrared data, and write it into the application data storage area.

[0009] In one feasible implementation, determining whether the application data includes a frame header and a CRC checksum, and if so, determining that the application data is normal; otherwise, determining that the application data is abnormal, includes: It is determined whether the application data includes a frame header and a CRC checksum, and whether the CRC checksum is correct. If the application data includes a frame header and a CRC checksum and the CRC checksum is correct, then the application data is determined to be normal; otherwise, the application data is determined to be abnormal.

[0010] According to a second aspect, one embodiment provides a data storage control system for 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 stores system program data, and the application data storage area stores application data; the system includes: The data judgment module is used to receive an instruction for reading data, and in response to the instruction, to determine whether the data to be read by the instruction for reading data is system program data or application data. The data reading module is used for: When the data to be read is system program data, the data to be read is read from the system program data storage area; When the data to be read is application data, the data to be read is read from the application data storage area; The data writing module is used to receive instructions for writing data, and in response to the instructions, write the data to be written by the instructions to the application data storage area.

[0011] In one feasible implementation, the data writing module further includes: after the system program data storage area stores system program data, it prohibits writing data to the system program data storage area.

[0012] In one feasible implementation, 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: If the application data is found to be abnormal, the application data stored in the application data storage area is deleted; otherwise, the data to be read is read from the application data storage area.

[0013] According to a third aspect, one embodiment provides a computer program product including a computer program and / or instructions that, when executed by a processor, implement the method described above.

[0014] A data storage control method and system for a storage medium according to the above embodiments is mainly applied to heated non-combustible appliances. Before the appliance leaves the factory, 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. During application, upon receiving an instruction to read data, it is determined whether the data to be read is system program data or application data. If the data to be read is system program data, the data is read from the system program data storage area; if the data to be read is application data, the data is read from the application data storage area. Upon receiving an instruction to write data, the data to be written is written to the application data storage area. By adopting the above solution of this application, in the event of an unexpected power outage or other abnormal situation, the loss of system program data that could lead to malfunctions in the appliance can be effectively avoided. Attached Figure Description

[0015] Figure 1 A flowchart of a data storage control method for a storage medium provided in this embodiment; Figure 2 This is a structural block diagram of a data storage control system for a storage medium provided in this embodiment.

[0016] Reference numerals: 100, data judgment module; 200, data reading module; 300, data writing module. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of this application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to this application are not shown or described in the specification. This is to avoid obscuring the core parts of this application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0018] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0019] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).

[0020] Currently, existing appliances store system program data (data before leaving the factory) and application data (usage data after leaving the factory) in a unified storage medium, typically in flash memory. Flash storage mechanisms generally require first reading the data and briefly storing it in memory, then completely clearing the flash memory, modifying the necessary data in memory, and finally storing the entire set back into flash. During this process, if the flash memory is cleared, unexpected events such as low battery levels causing power outages and restarts can lead to data loss. Since this lost data includes system program data, it can result in heating failures and other abnormalities, rendering the appliance unusable. Therefore, this application proposes a data storage control method and system for a storage medium to solve this problem. The specific solution is described below.

[0021] refer to Figure 1 This embodiment provides a data storage control method for a storage medium, wherein 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 data storage control method specifically includes the following steps: Step 100: Receive an instruction for reading data. In response to the instruction, the data judgment module determines whether the data to be read by the instruction is system program data or application data. Step 200: When the data to be read is system program data, the data reading module reads the data to be read from the system program data storage area; Step 300: When the data to be read is application data, the data reading module reads the data to be read from the application data storage area; Step 400: Receive the instruction for writing data. In response to the instruction, the data writing module writes the data to be written to the application data storage area.

[0022] The storage medium mentioned in this embodiment uses flash memory as an example. Before the device leaves the factory, the flash memory is configured as multi-page. In flash memory, a "page" is the basic unit for data writing. System program data is stored in one or more pages. Application data that is changed during use after leaving the factory is stored in another page or more pages in the flash memory, specifically paging based on the amount of data. Furthermore, the page or more pages storing system program data are configured to only allow data reading operations and not data writing operations. The page or more pages storing application data are not specifically configured, allowing both data reading and data writing operations. Since flash memory is erased page by page, by adopting the control method of this application, the factory data (i.e., system program data) will not be erased when it is necessary to store changed data. Even if the device experiences abnormal situations such as power failure during storage, the loss or abnormality of changed data will not affect the use of the device.

[0023] Specifically, during application, after receiving a data read instruction, the system determines whether the data to be read is system program data or application data. If it determines that the data to be read is system program data, it reads the data from the system program data storage area; if it determines that the data to be read is application data, it reads the data from the application data storage area. When application data needs to be updated, after receiving a write data instruction, the system reads the data from the application data storage area and temporarily stores it in memory. Then, it clears the entire application data storage area, modifies the data to be changed in memory, and writes the entire data back into the application data storage area, thus updating the application data. Using the data storage control method of this application, even if the device experiences abnormal situations such as power outages during storage, the loss or abnormality of the changed data will not affect the use of the device.

[0024] Furthermore, the control method also includes: prohibiting the writing of data to the system program data storage area when system program data is stored there.

[0025] In practical applications, the system program data storage area stores system program data. By configuring this area to only perform read operations and not store data after leaving the factory, system program data storage can effectively prevent system data anomalies. Specifically, the system program data storage area stores at least the frame header, calibration parameters, standard infrared data, temperature profile, and CRC checksum. The frame header is generally fixed data, such as 654321, and is stored in the flash system program data storage area after one storage operation. Calibration parameters include initial resistance, initial temperature, and TCR, used to calibrate the infrared data generated after the appliance is used by the user. Infrared data includes empty insertion data and smoke insertion data, which are obtained by infrared sensors and used as reference data for application data updates. The CRC checksum is a 16-bit character stored in the system program data storage area.

[0026] In some implementations, when the data to be read is application data, the data to be read is read from the application data storage area. Specifically, this 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.

[0027] In practical applications, the application data storage area stores at least a frame header and a CRC checksum. Additionally, it stores the number of suction points and / or self-calibration infrared data. When reading data from the application data storage area, the application data needs to be inspected to determine whether it is normal or abnormal. The specific inspection method is as follows: If the application data includes a frame header and a CRC checksum, it is considered normal; otherwise, it is considered abnormal. Only when the application data begins with a frame header and ends with a CRC checksum can it be considered normal and can be read and written. Otherwise, the application data is considered abnormal, and the current page's application data will be cleared. Subsequent application data will then be recalibrated and / or written to ensure fault-free subsequent use.

[0028] Furthermore, it determines whether the application data includes a frame header and a CRC checksum. If so, the application data is considered normal; otherwise, it is considered abnormal. This includes determining whether the application data includes a frame header and a CRC checksum, and also determining whether the CRC checksum is correct. If the application data includes a frame header and a CRC checksum and the CRC checksum is correct, the application data is considered normal; otherwise, it is considered abnormal.

[0029] In practical applications, even if the application data contains a frame header and a CRC checksum, it doesn't guarantee the data's integrity. Only when the application data includes a frame header and a CRC checksum, and the CRC checksum is correct, can the application data be definitively considered normal. Specifically, when the current application data generated by the user's device is stored in the application data storage area, a CRC checksum (called the standard checksum) is generated simultaneously. If an anomaly occurs during the temporary storage of the current application data into memory, causing the application data stored in memory to differ from the data stored in the application data storage area, then the CRC checksum in memory will be inconsistent with the standard checksum. This indicates a CRC checksum anomaly, and consequently, a problem with the current application data. Therefore, to further ensure the application data's integrity, it's necessary to check the CRC checksum's correctness. Only when the application data includes a frame header and a CRC checksum, and the CRC checksum is correct, can the application data be considered normal.

[0030] In some implementations, the system program data includes at least calibration parameters, temperature profiles, and standard infrared data; the application data includes at least the number of suction tubes and self-calibrated infrared data; after deleting the application data stored in the application data storage area, it also includes: The number of suction tubes is recounted using a preset baseline value to obtain a new number of suction tubes, which is then written to the application data storage area. Read the standard infrared data from the system program data storage area, use the standard infrared data as calibration parameters, recalibrate the self-calibration infrared data according to the calibration parameters to obtain new self-calibration infrared data, and write it to the application data storage area.

[0031] In practical applications, when an anomaly is detected in the current application data, the data on the page containing the current application data in the application data storage area is cleared, effectively deleting the current application data stored in the application data storage area. Afterwards, the application data is updated and rewritten. Specifically, for the number of puffs, the count starts again from a preset baseline value (e.g., 0), and the recounted data is written to the application data storage area. Self-calibration infrared data includes empty interpolation and puff insertion values, which are generated by an algorithm that continuously learns the current value during each puff insertion process and fine-tunes the infrared data in the system program data. For self-calibration infrared data, the standard infrared data and calibration parameters in the system program data storage area are read. The standard infrared data is then used as calibration parameters to recalibrate the self-calibration infrared data, resulting in new self-calibration infrared data, which is then written to the application data storage area, thus updating and calibrating the infrared data in the application data. Alternatively, the standard infrared data can be used as a baseline, and the self-calibration infrared data can be recalibrated according to the calibration parameters to obtain new self-calibration infrared data, which is then written to the application data storage area, achieving the same update and calibration.

[0032] refer to Figure 2 This embodiment provides a data storage control system for a storage medium, which 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 data storage control system includes a data judgment module 100, a data reading module 200, and a data writing module 300. Specifically, the data judgment module 100 receives an instruction to read data and, in response to the instruction, determines whether the data to be read is system program data or application data. The data reading module 200 reads the required data from the system program data storage area when the required data is system program data, and reads the required data from the application data storage area when the required data is application data. The data writing module 300 receives an instruction to write data and, in response to the instruction, writes the data required by the instruction to the application data storage area.

[0033] Specifically, during application, after receiving a data read instruction, the data judgment module 100 determines whether the data to be read is system program data or application data. If the data is determined to be system program data, the data read module 200 reads the data from the system program data storage area; if the data is determined to be application data, the data read module 200 reads the data from the application data storage area. When application data needs to be updated, after receiving a write instruction, the system reads the data from the application data storage area through the data write module 300 and temporarily stores it in memory. Then, after completely clearing the application data storage area, the necessary data is modified in memory, and the entire data is written back into the application data storage area, thus updating the application data. Using the data storage control system of this application, even if the device experiences a power outage or other abnormal situation during storage, the loss or abnormality of the modified data will not affect the use of the device.

[0034] Furthermore, regarding the data judgment module 100, data reading module 200, and data writing module 300 in the data storage control system of the storage medium, since the functions and roles of each module have been described in detail in the above embodiments, this embodiment will not elaborate further.

[0035] Furthermore, the data writing module 300 prohibits writing data to the system program data storage area when the system program data is already stored there.

[0036] In practical applications, the system program data storage area stores system program data. By configuring this area to only perform read operations and not store data after leaving the factory, system program data storage can effectively prevent system data anomalies. Specifically, the system program data storage area stores at least the frame header, calibration parameters, infrared data, temperature profile, and CRC checksum. The frame header is generally fixed data, such as 654321, and is stored in the flash system program data storage area after one storage operation. Calibration parameters include initial resistance, initial temperature, and TCR, used to calibrate the infrared data generated after the appliance is used by the user. Infrared data includes empty insertion data and smoke insertion data, which are obtained by infrared sensors and used as reference data for application data updates. The CRC checksum is a 16-bit character stored in the system program data storage area.

[0037] In one feasible implementation, in the data reading module 200, when the data to be read is application data, the data to be read is read from the application data storage area, including: 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.

[0038] In practical applications, the application data storage area stores at least a frame header and a CRC checksum. Additionally, it stores the number of suction points and / or self-calibration infrared data. When reading data from the application data storage area, the application data needs to be inspected to determine whether it is normal or abnormal. The specific inspection method is as follows: if the application data includes a frame header and a CRC checksum, it is considered valid; otherwise, it is considered invalid. Only when the application data begins with a frame header and ends with a CRC checksum can it be considered normal data and can be read and written. Otherwise, it is considered abnormal data, and the application data on the current page will be cleared. Subsequent application data will then be recalibrated and / or written to ensure fault-free subsequent use.

[0039] This embodiment provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implement the method described above. Since the data storage control method for a storage medium has been described in detail in the above embodiments, this embodiment will not repeat that description further.

[0040] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.

[0041] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A data storage control method for a storage medium, 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 includes: Receive an instruction for reading data, and in response to the instruction, determine whether the data to be read by the instruction for reading data is system program data or application data; When the data to be read is system program data, the data to be read is read from the system program data storage area; When the data to be read is application data, the data to be read is read from the application data storage area; Receive an instruction for writing data, and in response to the instruction, write the data to be written by the instruction to the application data storage area.

2. The data storage control method as described in claim 1, characterized in that, Also includes: Once the system program data storage area has stored the system program data, writing data to the system program data storage area is prohibited.

3. The data storage control method as described in claim 1, characterized in that, When the data to be read is application data, reading the data to be read from the application data storage area includes: If the application data is found to be abnormal, the application data stored in the application data storage area is deleted; otherwise, the data to be read is read from the application data storage area.

4. The data storage control method as described in claim 3, characterized in that, The detection of whether the application data is abnormal includes: Determine whether the application data includes a frame header and a CRC checksum. If so, the application data is considered normal; otherwise, the application data is considered abnormal.

5. The data storage control method as described in claim 3, characterized in that, The system program data includes at least calibration parameters, temperature curves, and standard infrared data; the application data includes at least the number of suction tubes and self-calibrated infrared data; after deleting the application data stored in the application data storage area, the process further includes: The number of suction tubes is recounted using a preset baseline value to obtain a new number of suction tubes, which is then written to the application data storage area. Read the standard infrared data from the system program data storage area, use the standard infrared data as calibration parameters, recalibrate the self-calibration infrared data according to the calibration parameters to obtain new self-calibration infrared data, and write it into the application data storage area.

6. The data storage control method as described in claim 4, characterized in that, The step of determining whether the application data includes a frame header and a CRC checksum, if yes, determines that the application data is normal; otherwise, it determines that the application data is abnormal, including: It is determined whether the application data includes a frame header and a CRC checksum, and whether the CRC checksum is correct. If the application data includes a frame header and a CRC checksum and the CRC checksum is correct, then the application data is determined to be normal; otherwise, the application data is determined to be abnormal.

7. A data storage control system for a storage medium, 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 system includes: The data judgment module is used to receive an instruction for reading data, and in response to the instruction, to determine whether the data to be read by the instruction for reading data is system program data or application data. The data reading module is used for: When the data to be read is system program data, the data to be read is read from the system program data storage area; When the data to be read is application data, the data to be read is read from the application data storage area; The data writing module is used to receive instructions for writing data, and in response to the instructions, write the data to be written by the instructions to the application data storage area.

8. The data storage control system as described in claim 7, characterized in that, The data writing module further includes: after the system program data storage area stores system program data, it prohibits writing data to the system program data storage area.

9. The data storage control system as described in claim 7, characterized in that, 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: If the application data is found to be abnormal, the application data stored in the application data storage area is deleted; otherwise, the data to be read is read from the application data storage area.

10. A computer program product comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by a processor, they implement the method of any one of claims 1-6.