Electricity meter data processing method and aerosol generating device
By using the flash memory of the controller in the aerosol generating device to store the target learning data set, and by comparing it with preset time patterns and calibration values, the problem of inaccurate power display caused by power failure or low power mode of the fuel meter was solved, and the accuracy of power display was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2026-03-27
AI Technical Summary
When the fuel gauge loses power or enters ultra-low power mode, the remaining power percentage display of the aerosol generating device becomes inaccurate or fluctuates, and existing technologies cannot effectively solve this problem.
By setting the flash memory of the controller in the aerosol generating device to store the target learning data set, and comparing it with the preset time pattern and the verification value, it is ensured that the current learning data set of the fuel meter is consistent with the target learning data set, thus avoiding data loss caused by power failure or low power mode.
This improves the accuracy of the remaining battery percentage displayed by the aerosol generator, avoids data loss when the fuel gauge loses power or enters ultra-low power mode, and ensures the accuracy of the battery level displayed by the fuel gauge.
Smart Images

Figure CN121743334A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of aerosol generation device technology, and in particular to a method for processing fuel meter data and an aerosol generation device. Background Technology
[0002] As an example of existing technology, the aerosol generating device periodically acquires cell parameters during the charge-discharge cycle of the battery cell using a fuel gauge to generate a current learning data set and calculates the remaining battery percentage based on this data set. However, when the fuel gauge loses power or enters an ultra-low power mode, at least part of the current learning data set is lost. This results in the aerosol generating device displaying an inaccurate or fluctuating remaining battery percentage calculated by the fuel gauge after reinitialization. Summary of the Invention
[0003] The main technical problem solved by the embodiments of this application is to provide a data processing method for a fuel gauge and an aerosol generating device, which can avoid the impact of the fuel gauge losing power or entering an ultra-low power mode, and improve the accuracy of the remaining power percentage displayed by the aerosol generating device.
[0004] To solve the above technical problems, one technical solution adopted in this application embodiment is: to provide a fuel meter data processing method, applied to an aerosol generating device, the aerosol generating device including a battery cell, a fuel meter and a controller, the fuel meter being electrically connected to the battery cell, the fuel meter being used to periodically acquire the battery cell parameters during the charge and discharge cycle of the battery cell to generate a current learning data set, and to calculate the remaining percentage of the battery cell based on the current learning data set;
[0005] The method includes:
[0006] According to a preset time pattern, based on the current learning data group and the target learning data group stored in the flash memory of the controller, it is determined whether to update the target learning data group, and when it is determined to update the target learning data group, the target learning data group is updated to be consistent with the current learning data group.
[0007] After the fuel meter is reinitialized, it determines whether to update the current learning data group based on the target learning data group and the current learning data group stored in the flash memory of the controller. If it is determined that the current learning data group should be updated, the current learning data group should be updated to be consistent with the learning data group.
[0008] In some embodiments, the current learning data group includes a plurality of current learning data, each of the current learning data including a first address value and a first check value;
[0009] The target learning data group includes several target learning data, and each target learning data includes a second address value and a second check value;
[0010] The first address value and the second address value have a one-to-one correspondence.
[0011] In some embodiments, determining whether to update the target learning data group based on the current learning data group and the target learning data group stored in the flash memory of the controller, according to a preset time pattern, includes:
[0012] The current learning data group is obtained according to a preset time pattern;
[0013] Determine whether the current learning data group and the target learning data group stored in the flash memory of the controller are consistent;
[0014] If so, then keep the target learning data set unchanged;
[0015] If not, update the target learning data set;
[0016] The controller's flash memory includes a pre-stored set of target learning data.
[0017] In some embodiments, determining whether to update the current learning data group based on the target learning data group and the current learning data group stored in the flash memory of the controller after the fuel meter is reinitialized includes:
[0018] After the fuel gauge is reinitialized, the current learning data group is obtained;
[0019] Determine whether the target learning data set stored in the flash memory of the controller is consistent with the current learning data set;
[0020] If so, then keep the current learning data set unchanged;
[0021] If not, update the current learning data set.
[0022] In some embodiments, determining whether the current learning data set and the target learning data set stored in the flash memory of the controller are consistent includes:
[0023] Iterate through the current learning data group and the target learning data group;
[0024] Based on the one-to-one correspondence between the first address value and the second address value, the consistency between the first check value of the current learning data and the second check value of the corresponding target learning data is determined.
[0025] In some embodiments, updating the target learning data set to be consistent with the current learning data set includes:
[0026] If the first verification value of the current learning data and the second verification value of the corresponding target learning data are inconsistent, then the target learning data is updated to the current learning data so that the target learning data group is consistent with the current learning data group.
[0027] In some embodiments, determining whether the target learning data set stored in the flash memory of the controller is consistent with the current learning data set includes:
[0028] Iterate through the target learning data group and the current learning data group;
[0029] Based on the one-to-one correspondence between the first address value and the second address value, the consistency between the second verification value of the target learning data and the first verification value of the corresponding current learning data is determined.
[0030] In some embodiments, updating the current learning data set to be consistent with the target learning data set includes:
[0031] If the second verification value of the target learning data is inconsistent with the first verification value of the corresponding current learning data, then the current learning data is updated to the target learning data so that the current learning data group is consistent with the target learning data group.
[0032] In some embodiments, the method further includes displaying the remaining battery percentage.
[0033] To solve the above-mentioned technical problems, another technical solution adopted in the embodiments of this application is: providing an aerosol generating device, comprising:
[0034] Battery cells are used to provide power.
[0035] A fuel gauge is electrically connected to the battery cell. The fuel gauge is used to periodically acquire the battery cell parameters during the charge and discharge cycle of the battery cell to generate a current learning data set and calculate the remaining percentage of the battery cell based on the current learning data set.
[0036] A controller is electrically connected to both the battery cell and the fuel gauge; wherein the controller includes at least one processor connected to the fuel gauge; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in any embodiment of this application.
[0037] In some embodiments, the system further includes a linear regulator electrically connected between the battery cell and the controller, the linear regulator being configured to process the output voltage of the battery cell to provide power to the controller.
[0038] The beneficial effects of this application's embodiments are as follows: This application's embodiments, according to a preset time pattern, determine whether to update the target learning data group based on the current learning data group and the target learning data group stored in the controller's flash memory. When it is determined to update the target learning data group, the updated target learning data group is consistent with the current learning data group. After the fuel gauge is reinitialized, it determines whether to update the current learning data group based on the target learning data group stored in the controller's flash memory and the current learning data group. When it is determined to update the current learning data group, the updated current learning data group is consistent with the learning data group. Therefore, this application's embodiments can avoid the impact of the fuel gauge losing power or entering ultra-low power mode, improving the accuracy of the remaining battery percentage displayed by the aerosol generating device. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the specific embodiments of this application, the accompanying drawings used in the description of the specific embodiments will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0040] Figure 1 This is a schematic diagram of the structure of an aerosol generating device provided in an embodiment of this application;
[0041] Figure 2 This is a flowchart of a method for processing fuel meter data provided in an embodiment of this application;
[0042] Figure 3a This is a schematic diagram of the data structure of a current learning data group provided in an embodiment of this application;
[0043] Figure 3b This is a schematic diagram of the data structure of a target learning data set provided in an embodiment of this application;
[0044] Figure 4 yes Figure 2 A flowchart of step S10 is provided;
[0045] Figure 5 yes Figure 4 A flowchart of a method for step S12 is provided;
[0046] Figure 6 yes Figure 2 A flowchart of step S20 is provided;
[0047] Figure 7 yes Figure 6 A flowchart of step S22 is provided;
[0048] Figure 8 yes Figure 1 A schematic diagram of a controller structure is provided. Detailed Implementation
[0049] To facilitate understanding of this application, a more detailed description is provided below with reference to the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on the other element, or one or more intermediate elements may exist between them. When an element is described as "connected" to another element, it can be directly connected to the other element, or one or more intermediate elements may exist between them. The terms "upper," "lower," "inner," "outer," "vertical," "horizontal," 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 this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0050] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0051] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0052] like Figure 1 As shown, the aerosol generating device includes a battery cell 11, a fuel gauge 12, and a controller 13. The battery cell 11 is used to provide power. The fuel gauge 12 is electrically connected to the battery cell 11 and is used to periodically acquire the battery cell parameters during the charge-discharge cycle of the battery cell 11 to generate a current learning data set and calculate the remaining percentage of the battery cell 11 based on the current learning data set. The controller 13 is electrically connected to both the battery cell 11 and the fuel gauge 12 and is used to execute the fuel gauge data processing method of any embodiment of this application.
[0053] The fuel gauge 12 does not include flash memory, meaning it does not have the feature of retaining data even when power is lost. To ensure the accuracy of the remaining percentage of battery cell 11, it is necessary to guarantee the accuracy of the current learning data set generated during the charge-discharge cycle of battery cell 11. This is to avoid the problem that the current learning data set generated by fuel gauge 12 will be at least partially lost or the results will be inaccurate after the fuel gauge 12 loses power or enters a low-power mode and is reinitialized.
[0054] In some embodiments, the aerosol generating apparatus further includes a linear regulator electrically connected between the battery cell 11 and the controller 13, the linear regulator being configured to process the output voltage of the battery cell 11 to provide power to the controller 13.
[0055] When the power supply voltage of the controller 13 is lower than the output voltage of the battery cell 11, the battery cell 11 indirectly provides power to the controller 13 through a linear regulator.
[0056] Please see Figure 2 This is a flowchart illustrating a method for processing fuel meter data according to an embodiment of this application. The fuel meter data processing method is applied to the aerosol generating device described above, such as... Figure 2 As shown, the data processing method for the fuel meter includes:
[0057] Step S10: According to the preset time pattern, based on the current learning data group and the target learning data group stored in the flash memory of the controller, determine whether to update the target learning data group, and when it is determined to update the target learning data group, update the target learning data group to be consistent with the current learning data group.
[0058] Step S20: After the fuel meter is reinitialized, determine whether to update the current learning data group based on the target learning data group and the current learning data group stored in the flash memory of the controller. If it is determined to update the current learning data group, update the current learning data to be consistent with the learning data group.
[0059] The current learning data group includes several current learning data sets, each of which includes a first address value and a first check value; the target learning data group includes several target learning data sets, each of which includes a second address value and a second check value; the first address value and the second address value have a one-to-one correspondence.
[0060] In the embodiments of this application, both the first check value and the second check value are checksums.
[0061] In one example, such as Figure 3aAs shown, the current learning data group includes 20 current learning data. The first current learning data includes the first address value DX1, the current learning data content X1, and the first check value CX1. The second current learning data includes the first address value DX2, the current learning data content X2, and the first check value CX2. The third current learning data includes the first address value DX3, the current learning data content X3, and the first check value CX3, and so on. The twentieth current learning data includes the first address value DX20, the current learning data content X20, and the first check value CX20.
[0062] In one example, such as Figure 3b As shown, the target learning data group includes 20 target learning data. The first target learning data includes the second address value DY1, the current learning data content Y1, and the second check value CY1. The second target learning data includes the second address value DY2, the current learning data content Y2, and the second check value CY2. The third target learning data includes the second address value DY3, the current learning data content Y3, and the second check value CY3, and so on. The twentieth target learning data includes the second address value DY20, the current learning data content Y20, and the second check value CY20.
[0063] The number of current learning data groups is the same as the number of target learning data groups. The first address value DX1 of the first current learning data corresponds to the second address value DY1 of the first target learning data, the first address value DX2 of the second current learning data corresponds to the second address value DY2 of the second target learning data, the first address value DX3 of the third current learning data corresponds to the second address value DY3 of the third target learning data, and so on. The first address value DX20 of the twentieth current learning data corresponds to the second address value DY20 of the twentieth target learning data. The one-to-one correspondence between the current learning data group and the target learning data group is achieved through the first address value DX1 and the second address value DY1.
[0064] In some embodiments, such as Figure 4 As shown, in step S10, according to a preset time pattern, based on the current learning data group and the target learning data group stored in the controller's flash memory, it is determined whether to update the target learning data group, including:
[0065] Step S11: Obtain the current learning data group according to the preset time pattern.
[0066] Before each sleep cycle, the controller retrieves the current learning data set, and then enters sleep mode according to a preset time pattern. For example, the controller retrieves the current learning data set at a preset period.
[0067] Step S12: Determine whether the current learning data group and the target learning data group stored in the flash memory of the controller are consistent.
[0068] Step S13: If yes, then keep the target learning data group unchanged.
[0069] Step S14: If not, update the target learning data set.
[0070] The controller's flash memory includes a pre-stored set of target learning data.
[0071] When the aerosol generating device leaves the factory, the controller's flash memory is set to the target learning data group storage area, and the initial target learning data group is written into the target learning data group storage area.
[0072] In one example, if an update occurs, the latest target learning data set replaces the original target learning data stored in the same storage location. In another example, if an update occurs, the original target learning data is moved one position forward, and the latest target learning data set is stored in the original storage location of the original target learning data. By analyzing the data in the two adjacent storage locations, information such as the changes made in the most recent data update and the time of the change can be obtained.
[0073] In some embodiments, such as Figure 5 As shown, step S12 can be achieved through the following steps:
[0074] Step S121: Traverse the current learning data group and the target learning data group.
[0075] Step S122: Based on the one-to-one correspondence between the first address value and the second address value, determine the consistency between the first verification value of the current learning data and the second verification value of the corresponding target learning data.
[0076] Based on the above embodiments, step S10, which updates the target learning data group to be consistent with the current learning data group, includes: if the first verification value of the current learning data and the corresponding second verification value of the target learning data are inconsistent, then the target learning data is updated to the current learning data so that the target learning data group is consistent with the current learning data group.
[0077] by Figure 3a and Figure 3bFor example, iterate through the first current learning data in the current learning data group and the first target learning data in the target learning data group. Based on the correspondence between the first address value DX1 and the second address value DY1, determine the consistency between the first checksum CX1 of the first current learning data and the second checksum CY1 of the first target learning data. If the first checksum CX1 of the first current learning data and the second checksum CY1 of the first target learning data are inconsistent, then update the first target learning data to the first current learning data, that is, replace the first target learning data with the first current learning data. At this time, the target learning data group is updated. If the first checksum CX1 of the first current learning data and the second checksum CY1 of the first target learning data are consistent, then keep the first target learning data unchanged.
[0078] Iterate through the second current learning data in the current learning data group and the second target learning data in the target learning data group. Based on the correspondence between the first address value DX2 and the second address value DY2, determine the consistency between the first checksum CX2 of the second current learning data and the second checksum CY2 of the second target learning data. If the first checksum CX2 of the second current learning data and the second checksum CY2 of the second target learning data are inconsistent, update the second target learning data to the second current learning data, i.e., replace the second target learning data with the second current learning data. At this time, the target learning data group is updated. If the first checksum CX2 of the second current learning data and the second checksum CY2 of the second target learning data are consistent, keep the second target learning data unchanged.
[0079] Iterate through the third current learning data in the current learning data group and the third target learning data in the target learning data group. Based on the correspondence between the first address value DX3 and the second address value DY3, determine the consistency between the first checksum CX3 of the third current learning data and the second checksum CY3 of the third target learning data. If the first checksum CX3 of the third current learning data and the second checksum CY3 of the third target learning data are inconsistent, update the third target learning data to the third current learning data, i.e., replace the third target learning data with the third current learning data. At this time, the target learning data group is updated. If the first checksum CX3 of the third current learning data and the second checksum CY3 of the third target learning data are consistent, keep the third target learning data unchanged.
[0080] And so on...
[0081] Iterate through the twentieth current learning data point in the current learning data group and the twentieth target learning data point in the target learning data group. Based on the correspondence between the first address value DX20 and the second address value DY20, determine the consistency between the first checksum CX20 of the twentieth current learning data point and the second checksum CY20 of the twentieth target learning data point. If the first checksum CX20 of the twentieth current learning data point and the second checksum CY20 of the twentieth target learning data point are inconsistent, then update the twentieth target learning data point to the twentieth current learning data point, that is, replace the twentieth target learning data point with the twentieth current learning data point. At this time, the target learning data group is updated. If the first checksum CX20 of the twentieth current learning data point and the second checksum CY20 of the twentieth target learning data point are consistent, then keep the twentieth target learning data point unchanged.
[0082] In summary, the system confirms whether to update the target learning data set according to a preset time pattern. If the target learning data set is confirmed to have changed, the latest target learning data set is saved to the controller's flash memory, ensuring that the target learning data set stored in the controller's flash memory is consistent with the current learning data set of the fuel meter. The target learning data set stored in the controller's flash memory has the characteristic of not being lost when power is off.
[0083] In some embodiments, such as Figure 6 As shown, in step S20, after the fuel meter is reinitialized, it is determined whether to update the current learning data set based on the target learning data set and the current learning data set stored in the controller's flash memory, including:
[0084] Step S21: After the fuel meter is reinitialized, obtain the current learning data group.
[0085] Fuel meter reinitialization includes: powering on the fuel meter after a power outage, and exiting low-power mode after entering low-power mode.
[0086] Step S22: Determine whether the target learning data set stored in the flash memory of the controller is consistent with the current learning data set.
[0087] Step S23: If yes, then keep the current learning data group unchanged.
[0088] Step S24: If not, update the current learning data set.
[0089] In some embodiments, such as Figure 7 As shown, step S22 can be achieved through the following steps:
[0090] S221, Traverse the target learning data group and the current learning data group.
[0091] S222. Based on the one-to-one correspondence between the first address value and the second address value, determine the consistency between the second check value of the target learning data and the first check value of the corresponding current learning data.
[0092] Based on the above embodiments, step S20, which updates the current learning data group to be consistent with the target learning data group, includes: if the second verification value of the target learning data and the corresponding first verification value of the current learning data are inconsistent, then the current learning data is updated to the target learning data so that the current learning data group is consistent with the target learning data group.
[0093] by Figure 3a and Figure 3b For example, iterate through the first target learning data in the target learning data group and the first current learning data in the current learning data group. Based on the correspondence between the first address value DX1 and the second address value DY1, determine the consistency between the second checksum CY1 of the first target learning data and the first checksum CX1 of the first current learning data. If the second checksum CY1 of the first target learning data and the first checksum CX1 of the first current learning data are inconsistent, then update the first current learning data to the first target learning data, that is, replace the first current learning data with the first target learning data. At this time, the current learning data group is updated. If the second checksum CY1 of the first target learning data and the first checksum CX1 of the first current learning data are consistent, then keep the first current learning data unchanged.
[0094] Iterate through the second target learning data in the target learning data group and the second current learning data in the current learning data group. Based on the correspondence between the first address value DX2 and the second address value DY2, determine the consistency between the second checksum CY2 of the second target learning data and the first checksum CX2 of the second current learning data. If the second checksum CY2 of the second target learning data and the first checksum CX2 of the second current learning data are inconsistent, update the second current learning data to the second target learning data, i.e., replace the second current learning data with the second target learning data. At this time, the current learning data group is updated. If the second checksum CY2 of the second target learning data and the first checksum CX2 of the second current learning data are consistent, keep the second current learning data unchanged.
[0095] Iterate through the third target learning data in the target learning data group and the third current learning data in the current learning data group. Based on the correspondence between the first address value DX3 and the second address value DY3, determine the consistency between the second checksum CY3 of the third target learning data and the first checksum CX3 of the third current learning data. If the second checksum CY3 of the third target learning data and the first checksum CX3 of the third current learning data are inconsistent, update the third current learning data to the third target learning data, i.e., replace the third current learning data with the third target learning data. At this time, the current learning data group is updated. If the second checksum CY3 of the third target learning data and the first checksum CX3 of the third current learning data are consistent, keep the third current learning data unchanged.
[0096] And so on...
[0097] Iterate through the twentieth target learning data point in the target learning data group and the twentieth current learning data point in the current learning data group. Based on the correspondence between the first address value DX20 and the second address value DY20, determine the consistency between the second checksum CY20 of the twentieth target learning data point and the first checksum CX20 of the twentieth current learning data point. If the second checksum CY20 of the twentieth target learning data point and the first checksum CX20 of the twentieth current learning data point are inconsistent, then update the twentieth current learning data point to the twentieth target learning data point, that is, replace the twentieth current learning data point with the twentieth target learning data point. At this time, the current learning data group is updated. If the second checksum CY3 of the twentieth target learning data point and the first checksum CX3 of the twentieth current learning data point are consistent, then keep the twentieth current learning data point unchanged.
[0098] In summary, after the fuel gauge is reinitialized, it is determined whether to update the current learning data set. If the current learning data set is found to be inconsistent with the target learning data set stored in the controller's flash memory, the target learning data set stored in the controller's flash memory is written to the fuel gauge, ensuring that the fuel gauge's current learning data set is up-to-date. This avoids the problem that the fuel gauge's current learning data set will be at least partially lost or the result will be inaccurate after reinitialization due to power failure or entering low-power mode.
[0099] Based on any of the above embodiments, the method further includes: displaying the remaining battery percentage.
[0100] It is understandable that the aerosol generating device includes a display module, which displays the remaining power percentage, allowing users to directly observe it and improving the human-computer interaction.
[0101] The fuel gauge data processing method provided in this application follows a preset time pattern. Based on the current learning data group and the target learning data group stored in the controller's flash memory, it determines whether to update the target learning data group. When it is determined to update the target learning data group, the updated target learning data group is consistent with the current learning data group. After the fuel gauge is reinitialized, it determines whether to update the current learning data group based on the target learning data group stored in the controller's flash memory and the current learning data group. When it is determined to update the current learning data group, the updated current learning data group is consistent with the learning data group. Therefore, this application embodiment can avoid the impact of the fuel gauge losing power or entering ultra-low power mode, improving the accuracy of the remaining power percentage displayed by the aerosol generating device.
[0102] like Figure 8 As shown, the controller 13 includes at least one processor 131 connected to the fuel gauge 12; and a memory 132 communicatively connected to the at least one processor 131. For example, the memory 132 is connected to the processor 131 via a bus.
[0103] Processor 131 is configured to support the aerosol generating apparatus in performing the corresponding functions in the methods described in the above-described method embodiments. Processor 131 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general-purpose array logic (GAL), or any combination thereof.
[0104] Memory 132 is used to store program code, etc. Memory 132 may include volatile memory (VM), such as random access memory (RAM); memory 132 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 132 may also include combinations of the above types of memory.
[0105] The memory 132 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the fuel meter data processing method in the embodiments of this application. The processor 131 executes various functional applications and data processing of the fuel meter data processing method by running the non-volatile software programs, instructions, and modules stored in the memory 132, thereby realizing the functions of each module or unit of the fuel meter data processing method provided in the above method embodiments.
[0106] The memory 132 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function. The data storage area may store data created by using the fuel meter data processing device according to the fuel meter data processing method. In some embodiments, the memory may optionally include memory remotely located relative to the processor 131, and these remote memories may be connected to the fuel meter data processing device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0107] One or more modules are stored in memory 132. When executed by one or more processors 131, they perform the fuel meter data processing method in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0108] This application also provides a computer-readable storage medium storing computer instructions for causing a processor to execute the fuel meter data processing method provided in any embodiment of this application.
[0109] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0110] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the fuel meter data processing method provided in any embodiment of this application.
[0111] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for processing data from a fuel meter, applied to an aerosol generating device, characterized in that, The aerosol generating device includes a battery cell, a fuel gauge, and a controller. The fuel gauge is electrically connected to the battery cell and is used to periodically acquire the battery cell parameters during the charge-discharge cycle of the battery cell to generate a current learning data set and calculate the remaining percentage of the battery cell based on the current learning data set. The method includes: According to a preset time pattern, based on the current learning data group and the target learning data group stored in the flash memory of the controller, it is determined whether to update the target learning data group, and when it is determined to update the target learning data group, the target learning data group is updated to be consistent with the current learning data group. After the fuel meter is reinitialized, it determines whether to update the current learning data group based on the target learning data group and the current learning data group stored in the flash memory of the controller. If it is determined that the current learning data group should be updated, the current learning data group should be updated to be consistent with the learning data group.
2. The data processing method for the fuel meter according to claim 1, characterized in that, The current learning data group includes several current learning data, and each current learning data includes a first address value and a first check value; The target learning data group includes several target learning data, and each target learning data includes a second address value and a second check value; The first address value and the second address value have a one-to-one correspondence.
3. The data processing method for the fuel meter according to claim 2, characterized in that, The step of determining whether to update the target learning data group according to a preset time pattern, based on the current learning data group and the target learning data group stored in the flash memory of the controller, includes: The current learning data group is obtained according to a preset time pattern; Determine whether the current learning data group and the target learning data group stored in the flash memory of the controller are consistent; If so, then keep the target learning data set unchanged; If not, update the target learning data set; The controller's flash memory includes a pre-stored set of target learning data.
4. The data processing method for the fuel meter according to claim 2 or 3, characterized in that, When the fuel meter is reinitialized, determining whether to update the current learning data group based on the target learning data group stored in the flash memory of the controller and the current learning data group includes: After the fuel gauge is reinitialized, the current learning data group is obtained; Determine whether the target learning data set stored in the flash memory of the controller is consistent with the current learning data set; If so, then keep the current learning data set unchanged; If not, update the current learning data set.
5. The data processing method for the fuel meter according to claim 3, characterized in that, The step of determining whether the current learning data set and the target learning data set stored in the flash memory of the controller are consistent includes: Iterate through the current learning data group and the target learning data group; Based on the one-to-one correspondence between the first address value and the second address value, the consistency between the first check value of the current learning data and the second check value of the corresponding target learning data is determined.
6. The data processing method for the fuel meter according to claim 5, characterized in that, The step of updating the target learning data set to be consistent with the current learning data set includes: If the first verification value of the current learning data and the second verification value of the corresponding target learning data are inconsistent, then the target learning data is updated to the current learning data so that the target learning data group is consistent with the current learning data group.
7. The data processing method for the fuel meter according to claim 4, characterized in that, The step of determining whether the target learning data set stored in the flash memory of the controller is consistent with the current learning data set includes: Iterate through the target learning data group and the current learning data group; Based on the one-to-one correspondence between the first address value and the second address value, the consistency between the second verification value of the target learning data and the first verification value of the corresponding current learning data is determined.
8. The data processing method for the fuel meter according to claim 7, characterized in that, The step of updating the current learning data group to be consistent with the target learning data group includes: If the second verification value of the target learning data is inconsistent with the first verification value of the corresponding current learning data, then the current learning data is updated to the target learning data so that the current learning data group is consistent with the target learning data group.
9. The data processing method for the fuel meter according to claim 1, characterized in that, The method further includes displaying the remaining battery percentage.
10. An aerosol generating device, characterized in that, include: Battery cells are used to provide power. A fuel gauge is electrically connected to the battery cell. The fuel gauge is used to periodically acquire the battery cell parameters during the charge and discharge cycle of the battery cell to generate a current learning data set and calculate the remaining percentage of the battery cell based on the current learning data set. A controller is electrically connected to both the battery cell and the fuel gauge; wherein the controller includes at least one processor connected to the fuel gauge; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-9.
11. The aerosol generating apparatus according to claim 10, characterized in that, Also includes: A linear regulator, electrically connected between the battery cell and the controller, is configured to process the output voltage of the battery cell to provide power to the controller.