Data storage method and device based on aerosol generation device and storage medium

By optimizing the data storage method in the aerosol generation device, frequent erasing of FLASH memory is avoided, and the service life of the memory and the device is extended.

CN120256323APending Publication Date: 2025-07-04SHENZHEN FIRST UNION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410020343.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-04
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the FLASH memory of the aerosol generation device needs to be frequently erased before writing new data each time, resulting in a shortening of the memory service life, which in turn affects the overall life of the device.

Method used

Before writing data, first search for the read and write operation unit of the FLASH memory to see if there is available storage space. If there is, write it. If there is no, erase it first and then write it to avoid frequent erasures until it is fully erased.

Benefits of technology

The number of erasing times of the FLASH memory is reduced, and its service life is extended, thereby extending the service life of the aerosol generator.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256323A_ABST
    Figure CN120256323A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a data storage method based on an aerosol generation device. The method comprises the following steps: receiving first data to be written; in a read-write operation unit of the FLASH memory, available storage spaces are searched, and the available storage spaces are continuous n data storage addresses in an erasure state; if the available storage space exists, writing first data in the available storage space; and if the available storage space does not exist, erasing the read-write operation unit corresponding to the available storage space, and writing the first data when erasing is completed. According to the method, whether the read-write operation unit has the available storage space or not is searched, if yes, data are written in, and if not, the read-write operation unit is erased and then the data are written in, so that the situation that a FLASH memory is frequently erased before new data are written in each time is avoided; and the data can be circularly written in the read-write operation unit in the FLASH memory until the read-write operation unit is full of the data and then the data is erased, so that the service life of the FLASH memory is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic atomization technology, and in particular to a data storage method, device and storage medium based on an aerosol generating device. Background Art

[0002] FLASH memory has the advantages of low cost, large storage capacity, fast read and write speed, etc., and occupies an important position in the memory field. FLASH memory is a non-volatile memory based on floating gate transistor structure, which includes three main operations: erase, write and read.

[0003] At present, an aerosol generating device records relevant puff data by setting up a FLASH memory inside the aerosol generating device. Generally, the puff data is stored in a specified address of the FLASH memory. Regardless of the length of the puff data, the original data needs to be erased before writing new data each time. Frequent erasing of the FLASH memory will shorten the service life of the FLASH memory, which will easily shorten the service life of the aerosol generating device. Summary of the invention

[0004] The data storage method, device and storage medium based on the aerosol generating device provided in the embodiments of the present application can solve at least some of the defects in the prior art.

[0005] In the first aspect, the embodiment of the present application provides a data storage method based on an aerosol generating device. The aerosol generating device includes a chamber and an atomizer, the chamber is used to accommodate an aerosol generating matrix, and the atomizer is used to atomize the aerosol generating matrix to generate an aerosol; a battery cell is used to provide power to the atomizer; a controller includes a FLASH memory, and the battery cell and the atomizer are electrically connected to the controller; the data storage method includes: receiving the first data to be written; searching for available storage space in a read-write operation unit of the FLASH memory, wherein a plurality of continuous data storage addresses are contained in one of the read-write operation units, and the available storage space is a continuous n number of data storage addresses in an erased state; if there is available storage space, the first data is written in the available storage space; if there is no available storage space, the corresponding read-write operation unit is erased, and the first data is written when the erasure is completed.

[0006] In some embodiments, the first data is used to indicate the number of puffs, the duration of each puff, or the total puff duration.

[0007] In some embodiments, writing the first data in the available storage space includes: determining that among the consecutive n data storage addresses in the erased state, the first data storage address is the starting address of the first data; and writing the first data starting from the starting address of the first data.

[0008] In some embodiments, the data storage method further includes: receiving a second data to be written; determining the starting address of the second data according to the data length of the first data and the starting address of the first data; and writing the second data starting from the starting address of the second data.

[0009] In some embodiments, the first data is: the target data to be written for the first time after the system power supply fails and resumes power supply.

[0010] In some embodiments, the second data is: the next target data to be written after writing the first data and when the system power supply continues to supply power normally.

[0011] In some embodiments, if there is no available storage space, erasing the corresponding read / write operation unit and, when the erasing is completed, writing the first data includes: if there is no available storage space, reading the data written last time in the corresponding read / write operation unit; when the reading is completed, erasing the corresponding read / write operation unit; when the erasing is completed, determining the starting address in the erased read / write operation unit as the starting address of the first data; and writing the first data starting from the starting address of the first data.

[0012] In some embodiments, one read / write operation unit is the smallest erasing or writing unit; and the number of read / write operation units receiving the first data is one or more than one.

[0013] In a second aspect, an embodiment of the present application provides an aerosol generating device. The aerosol generating device includes: an atomizer configured to atomize an aerosol generating substrate to generate an aerosol, and is characterized in that the aerosol generating device further includes: at least one processor; and a FLASH memory communicatively connected to the at least one processor; wherein the FLASH memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the data storage method based on the aerosol generating device as described above.

[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on a computer, the computer is enabled to execute the above-mentioned data storage method based on the aerosol generating device.

[0015] At least one advantageous aspect of the data storage method based on an aerosol generating device provided by an embodiment of the present application is that when writing data to the aerosol generating device, by searching whether there is available storage space in the read / write operation unit of the FLASH memory in the aerosol generating device, if there is, the data is written, and if not, the read / write operation unit is erased first and then the data is written, thereby avoiding frequent erasure of the FLASH memory before each new data is written, and being able to cyclically write data to the read / write operation unit in the FLASH memory until it is full and then erased, thereby reducing the number of erasures of the FLASH memory, increasing the service life of the FLASH memory, and increasing the service life of the aerosol generating device. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings represent similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0017] Figure 1 It is a schematic structural diagram of an aerosol generating device provided by an embodiment of the present application;

[0018] Figure 2 It is a schematic structural diagram of an aerosol generating device provided by another embodiment of the present application;

[0019] Figure 3 It is a schematic structural diagram of an aerosol generating device provided by another embodiment of the present application;

[0020] Figure 4 It is a method flow chart of the data storage method based on an aerosol generating device provided by an embodiment of the present application;

[0021] Figure 5 It is a method flow chart of the data storage method based on an aerosol generating device provided by another embodiment of the present application;

[0022] Figure 6 It is an embodiment schematic diagram of the starting address of the first data provided by an embodiment of the present application;

[0023] Figure 7 It is an embodiment schematic diagram of the first data that has been written provided by an embodiment of the present application;

[0024] Figure 8 It is an embodiment schematic diagram of the erased read / write operation unit provided by an embodiment of the present application;

[0025] Figure 9Schematic diagram of an embodiment in which the starting address in the read / write operation unit after erasure in the embodiment of the present application is determined as the starting address of the first data;

[0026] Figure 10 Schematic diagram of an embodiment of the starting address of the second data provided by the embodiment of the present application. Detailed implementation manners

[0027] To facilitate the understanding of the present invention, the present invention will be described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is expressed as "fixed to" another element, it can be directly on the other element, or there can be one or more intermediate elements therebetween. When an element is expressed as "connected to" another element, it can be directly connected to the other element, or there can be one or more intermediate elements therebetween. The terms "upper", "lower", "inner", "outer", "bottom", etc. used in this specification indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0028] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in this specification in the description of the present invention are only for the purpose of describing specific embodiments and are not used to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.

[0029] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0030] Figure 1 Schematic diagram of the structure of the aerosol generating device provided by the embodiment of the present application, as Figure 1 shown, the aerosol generating device 100 includes a battery cell 10, a main board 20 and an atomizer 30. A controller of the aerosol generating device 100 is provided on the main board 20. The battery cell 10 and the atomizer 30 are respectively electrically connected to the controller, so that the controller can control the battery cell 10 to supply electric energy to the atomizer 30. A longitudinally extending chamber 40 is further provided in the aerosol generating device 100. The chamber 40 is used to accommodate the solid aerosol generating substrate 200 used in conjunction with the aerosol generating device 100. The atomizer 30 is used to atomize the aerosol generating substrate 200 in the chamber 40 to generate aerosol, so that the user can inhale the aerosol by sucking on the aerosol generating substrate 200.

[0031] In some embodiments, the atomizer 30 may be a mesh resistive heating element coated on the outer wall of the chamber 40. The mesh resistive heating element 30 is electrically connected to the main board 20. After the mesh resistive heating element 30 is powered on, it generates heat and transfers the heat to the aerosol-forming substrate 200 in the chamber 40. Some of the active substances filled inside the aerosol-forming substrate 200 are volatilized by heat to generate aerosol.

[0032] Figure 2 The following is a schematic structural diagram of an aerosol generating device provided in another embodiment of the present application. As Figure 2 shown, the aerosol generating device 100 may also use electromagnetic induction heating to atomize the aerosol-forming substrate 200 to generate aerosol. The atomizer 30 extends at least partially into the chamber 40, and the end thereof extending into the chamber 40 is formed into a pin shape or a sheet shape, so that the atomizer 30 can be smoothly inserted into the aerosol-forming substrate 200 for heating and atomization. A coil 50 is wound around the outer wall of the chamber 40. The controller controls the battery cell 10 to pass an alternating current into the coil 50. The coil 50 generates a changing magnetic field under the action of the alternating current. The changing magnetic field penetrates the atomizer 30 and then induces eddy currents in the atomizer 30. The atomizer 30 generates heat under the action of the eddy current effect and the hysteresis effect, and then can heat the aerosol-forming substrate 200.

[0033] The aerosol-forming substrate 200 is preferably a tobacco-containing material that releases volatile compounds from the substrate when heated; or it may also be a non-tobacco material that is suitable for electrically heated smoking after heating. The aerosol-forming substrate 200 is preferably a solid substrate, and may include one or more of powder, granule, fragment, strip, strip or sheet of vanilla leaf, tobacco leaf, homogenized tobacco, expanded tobacco, etc.; alternatively, the solid substrate may contain additional tobacco or non-tobacco volatile flavor compounds to be released when the substrate is heated.

[0034] Suitable materials for the atomizer 30 can be any one of graphite, molybdenum, silicon carbide, stainless steel, niobium, aluminum, nickel, iron, copper, nickel-containing compounds, titanium, and metal material composites. In some embodiments, to better induce eddy currents to improve the heating efficiency, the material of the atomizer 30 is preferably a ferromagnetic material or composed of a ferromagnetic material, and ferromagnetic materials such as ferrite iron, ferromagnetic alloys (such as ferromagnetic steel or stainless steel), ferromagnetic particles, and ferrites.

[0035] In some other embodiments, the aerosol generating device 100 may also heat and atomize the liquid aerosol-forming substrate 200 to generate aerosol.

[0036] Figure 3 The following is a schematic structural diagram of an aerosol generating device provided in another embodiment of the present application. AsFigure 3 As shown, the aerosol generating device 100 includes a housing 90a. The housing 90a is provided with an air inlet hole 92a for external air to enter the aerosol generating device 100, and a mouthpiece 91a for the user to inhale the aerosol. A liquid storage cavity 10a is provided inside the housing 90a. A vaporizable liquid aerosol generating matrix is stored in the liquid storage cavity 10a. A gas guide tube 20a extends longitudinally in the liquid storage cavity 10a. One end of the gas guide tube 20 is communicated with the mouthpiece 91a. To seal the liquid storage cavity 10a, a sealing member 50a is further provided in the housing 90a. The sealing member 50a is in interference fit with the inner wall of the housing 90a to seal the liquid storage cavity 10a.

[0037] A nebulizer is provided in the gas guide tube 20. The nebulizer includes a liquid guiding element 30a and a heating element 40a combined with the liquid guiding element 30a. The liquid guiding element 30a partially extends into the liquid storage cavity 10a. The liquid guiding element 30a is made of a hygroscopic material, such as non-woven fabric, cotton fiber, glass fiber or porous material, etc. The heating element 40a can be combined with the liquid guiding element 30a by means of printing, deposition, sintering or physical assembly, or wound around the liquid guiding element 30a. Thus, the liquid matrix in the liquid storage cavity 10a can be absorbed by the liquid guiding element 30a. The liquid guiding element 30a further transfers the liquid matrix to the heating element 40a through the tiny voids or microporous structures inside it. The heating element 40a heats and atomizes the liquid matrix to generate an aerosol, and releases the aerosol into the gas guide tube 20a. A ventilation hole 51a is provided on the sealing member 50a. The ventilation port 51a is communicated with the gas guide tube 20a. When the user sucks at the mouthpiece 91a, after the external air enters the aerosol generating device 100 through the air inlet hole 92a, it then flows into the ventilation hole 51a through the internal air flow channel, enters the gas guide tube 20a through the ventilation hole 51a, and finally carries the aerosol in the gas guide tube 20a to the mouthpiece 91a for the user to inhale.

[0038] The aerosol generating device 100 further includes an airflow sensing element 80a and a main board 70a. A controller of the aerosol generating device 100 is provided on the main board 70a. When the user sucks at the mouthpiece 91a, a negative pressure is generated inside the aerosol generating device 100. The airflow sensing element 70a senses the negative pressure and generates an induction signal. The induction signal is sent to the controller, and the controller can control the nebulizer to start working according to the induction signal.

[0039] It should be noted that the method for the aerosol generating device 100 to atomize the aerosol generating substrate 200 to generate aerosol is not limited to the above embodiments. Those skilled in the art can also use other well-known methods to atomize the aerosol generating substrate 200 to generate aerosol. For example, infrared heating atomization, air heating atomization, etc. can also be used. Moreover, in some embodiments, the aerosol generating device 100 can also use ultrasonic atomization to atomize the liquid aerosol generating substrate 200 to generate aerosol.

[0040] Figure 4 FIG. is a flowchart of a data storage method based on an aerosol generating device provided by an embodiment of the present application. This data storage method is based on Figures 1-3 the aerosol generating device 100 shown. As Figure 4 shown, the data storage method based on the aerosol generating device includes the following steps:

[0041] S410. Receive the first data to be written.

[0042] Among them, the first data is the target data to be written for the first time after the system power supply of the battery cell in the aerosol generating device fails and resumes power supply.

[0043] It should be noted that the system power supply fails and resumes power supply, which is also equivalent to the first power supply to the FLASH memory.

[0044] The first data can be the number of puffs, the duration of each puff, or the total puff duration of the aerosol generating device 100. By recording these parameters, the user can understand their own puffing habits. At the same time, the aerosol generating device 100 can also judge the remaining number of puffs or puff duration based on these parameters to feedback the current usage status of the aerosol generating device 100 to the user.

[0045] S420. Search for available storage space in a read / write operation unit of the FLASH memory. Among them, a read / write operation unit contains multiple consecutive data storage addresses, and the available storage space is n consecutive data storage addresses in the erased state.

[0046] As an example rather than a limitation, the value of n can be 6, or it can also be 7. The specific n can be set according to the actual application scenario and is not limited here.

[0047] Exemplarily, the address of a read / write operation unit ranges from 0x08007800 to 0x08007BFF, and its space size is 1024 bytes, that is, 1K. Therefore, a data storage address in the erased state can be represented by 0xFF.

[0048] S430. If there is available storage space, write the first data within the available storage space.

[0049] It can be understood that within a read / write operation unit, the available storage space is less than or equal to the read / write operation unit.

[0050] S440. If there is no available storage space, erase the corresponding read / write operation unit, and when the erasure is completed, write the first data.

[0051] Among them, the non - existence of available storage space can be understood as: the corresponding read / write operation unit is full, that is, there is no available storage space in a read / write operation unit, which means the read / write operation unit is full of data. Thus, erase the read / write operation unit full of data, and then write new data.

[0052] At least one advantageous aspect of the data storage method based on the aerosol - generating device provided by the embodiments of the present application is that when writing data to the aerosol - generating device, by searching whether there is available storage space in the read / write operation unit of the FLASH memory in the aerosol - generating device, if there is, write the data; if not, first erase the read / write operation unit and then write the data. Thus, it avoids frequently erasing the FLASH memory before writing new data each time, and can cycle - write data in the read / write operation unit of the FLASH memory until it is full and then erase it, thereby reducing the number of erasures of the FLASH memory, increasing the service life of the FLASH memory, and increasing the service life of the aerosol - generating device.

[0053] Figure 5 It is a flowchart of the data storage method based on the aerosol - generating device provided by another embodiment of the present application. As Figure 5 shown, the data storage method based on the aerosol - generating device includes the following steps:

[0054] S510. Receive the first data to be written.

[0055] The execution steps of step S510 are the same as those of step S410, and will not be elaborated here.

[0056] S520. Search for available storage space among the read / write operation units of the FLASH memory, where a read / write operation unit contains multiple consecutive data storage addresses, and the available storage space is n consecutive data storage addresses in the erased state.

[0057] It should be noted that a read / write operation unit is the smallest erasure or write unit, and the number of read / write operation units receiving the first data is one or more. Therefore, the embodiments of the present application can be applied not only to one read / write operation unit, but also to more than one consecutive read / write operation units.

[0058] S530. If there is available storage space, among the consecutive n data storage addresses in the erased state, determine that the first data storage address is the starting address of the first data.

[0059] Base Address: Also known as the starting address, the address of the first byte in the storage area is used as the starting address of the storage area, also known as the base address. That is, take the first data storage address among the consecutive n data storage addresses in the erased state as the starting address of the first data.

[0060] Exemplarily, as Figure 6 shown, Figure 6 is a schematic diagram of an embodiment of the starting address of the first data provided by the embodiment of the present application. Assume that n is 6, and a data storage address in the erased state is represented by 0xFF. If there is available storage space, determine that the first 0xFF among the consecutive 6 0xFFs is the starting address of the first data.

[0061] S540. Using the starting address of the first data as the starting address, write the first data.

[0062] Exemplarily, assume that the first data is: 55555555 00000100. Based on Figure 6 , using the starting address of the first data as the starting address, write the first data to obtain a schematic diagram of the embodiment with the first data written as shown in Figure 7 .

[0063] S550. If there is no available storage space, read the data written last time in the corresponding read / write operation unit.

[0064] Among them, the situation of no available storage space can be understood as: the corresponding read / write operation unit is full. That is, when there is no available storage space in a read / write operation unit, it means that the read / write operation unit is full of data.

[0065] S560. When the reading is completed, erase the corresponding read / write operation unit.

[0066] S570. When the erasure is completed, determine the starting address in the erased read / write operation unit as the starting address of the first data.

[0067] It can be understood that each data storage address in the erased read / write operation unit is in the erased state. Exemplarily, as Figure 8As shown Figure 8 FIG. is a schematic diagram of an embodiment of a read / write operation unit after erasure provided by an embodiment of the present application.

[0068] S580: Starting from the starting address of the first data, write the first data.

[0069] Exemplarily, as Figure 9 shown Figure 9 FIG. is a schematic diagram of an embodiment in which the starting address in the read / write operation unit after erasure provided by an embodiment of the present application is determined as the starting address of the first data.

[0070] By erasing the read / write operation unit only when it is full in a FLASH memory, frequent erasure of the FLASH memory before each write of new data can be avoided, thereby increasing the service life of the FLASH memory.

[0071] In some embodiments, the data storage method based on the aerosol generating device further includes: (1) receiving the second data to be written; (2) determining the starting address of the second data according to the data length of the first data and the starting address of the first data; (3) starting from the starting address of the second data, writing the second data.

[0072] Wherein, the second data is: the next target data to be written after writing the first data and when the system power supply continues to be normally powered.

[0073] Exemplarily, based on Figure 7 , according to the data length of the first data and the starting address of the first data, determine the starting address of the second data. The starting address of the second data is as Figure 10 shown Figure 10 FIG. is a schematic diagram of an embodiment of the starting address of the second data provided by an embodiment of the present application.

[0074] When the system power supply continues to be normally powered, after writing the first data, the first data is not erased, and the second data is continuously written on the basis of the first data, thereby avoiding frequent erasure of the FLASH memory before each write of new data, and further increasing the service life of the FLASH memory.

[0075] At least one advantageous aspect of the data storage method based on an aerosol generating device provided by an embodiment of the present application is that when writing data to the aerosol generating device, by searching whether there is available storage space in the read / write operation unit of the FLASH memory in the aerosol generating device, if there is, the data is written, if not, the read / write operation unit is erased first and then the data is written, thereby avoiding frequent erasure of the FLASH memory before each new data is written, and being able to cyclically write data to the read / write operation unit in the FLASH memory until it is full and then erased, thereby reducing the number of erasures of the FLASH memory, increasing the service life of the FLASH memory, and increasing the service life of the aerosol generating device.

[0076] An embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium can be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program.

[0077] Wherein, when the computer program is executed by a processor, it implements one or more steps in the data storage method based on an aerosol generating device disclosed in the embodiment of the present application. The complete computer program product is embodied on one or more computer-readable storage media containing the computer program disclosed in the embodiment of the present application (including but not limited to, disk memory, CD-ROM, optical memory, etc.).

[0078] In summary, an embodiment of the present application proposes a data storage method based on an aerosol generating device. The data storage method based on an aerosol generating device, when writing data to the aerosol generating device, by searching whether there is available storage space in the read / write operation unit of the FLASH memory in the aerosol generating device, if there is, the data is written, if not, the read / write operation unit is erased first and then the data is written, thereby avoiding frequent erasure of the FLASH memory before each new data is written, and being able to cyclically write data to the read / write operation unit in the FLASH memory until it is full and then erased, thereby reducing the number of erasures of the FLASH memory, increasing the service life of the FLASH memory, and increasing the service life of the aerosol generating device. Moreover, when the system power supply continues to supply power normally, after writing the first data, the first data is not erased, and the second data is continuously written on the basis of the first data, thereby avoiding frequent erasure of the FLASH memory before each new data is written, and further increasing the service life of the FLASH memory, and increasing the service life of the aerosol generating device.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; under the idea of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and the steps can be implemented in any order, and there are many other variations in different aspects of the present invention as described above. For the sake of brevity, they are not provided in detail; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data storage method based on an aerosol generating device, characterized in that, The aerosol generating device includes a chamber and an atomizer. The chamber is used to accommodate an aerosol generating substrate, and the atomizer is used to atomize the aerosol generating substrate to generate an aerosol; a battery, configured to supply electrical energy to the atomizer; a controller, including a FLASH memory, wherein the battery and the atomizer are both electrically connected to the controller; The data storage method includes: receiving first data to be written; searching for available storage space in one read / write operation unit of the FLASH memory, wherein one read / write operation unit contains a plurality of consecutive data storage addresses, and the available storage space is n consecutive data storage addresses in an erased state; if available storage space exists, writing the first data in the available storage space; if no available storage space exists, erasing the corresponding read / write operation unit, and when the erasing is completed, writing the first data.

2. The data storage method according to claim 1, wherein The first data is used to indicate the number of puffs, the duration of each puff, or the total puff duration.

3. The data storage method according to claim 1, wherein The writing the first data in the available storage space includes: determining that among the n consecutive data storage addresses in an erased state, the first data storage address is the starting address of the first data; starting from the starting address of the first data, writing the first data.

4. The data storage method according to claim 3, wherein The data storage method further includes: receiving second data to be written; determining the starting address of the second data according to the data length of the first data and the starting address of the first data; starting from the starting address of the second data, writing the second data.

5. The data storage method according to claim 1, wherein The first data is the target data to be written for the first time after the system power supply fails and resumes power supply.

6. The data storage method according to claim 4, wherein The second data is the next target data to be written after writing the first data and when the system power supply continues to be normally powered.

7. The data storage method according to claim 1, characterized in that The if no available storage space exists, erasing the corresponding read / write operation unit, and when the erasing is completed, writing the first data includes: if no available storage space exists, reading the data written last time in the corresponding read / write operation unit; when the reading is completed, erasing the corresponding read / write operation unit; when the erasing is completed, determining the starting address in the erased read / write operation unit as the starting address of the first data; starting from the starting address of the first data, writing the first data.

8. The data storage method according to claim 1, wherein One read / write operation unit is the smallest erasing or writing unit; the number of read / write operation units for receiving the first data is one or more than one.

9. An aerosol generating device, comprising: An atomizer for atomizing an aerosol generating substrate to generate an aerosol, characterized in that the aerosol generating device further includes: at least one processor; and a FLASH memory communicatively connected to the at least one processor; wherein the FLASH memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data storage method based on an aerosol generating device according to any one of claims 1-8.

10. A computer-readable storage medium having instructions stored thereon, characterized in that, When the instruction is executed by a processor, it implements the data storage method based on an aerosol generating device according to any one of claims 1-8.