Data processing method and device and atomization equipment
By using a volatile storage area to temporarily store vaping data in the atomizing device and combining it with a non-volatile storage area for data transfer, the problems of data backtracking difficulty and loss under the global accumulator recording method are solved, achieving real-time and accurate data and extending hardware life.
Patent Information
- Application Number
- CN202511511189.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-02-10
AI Technical Summary
When existing atomizing devices record usage data through a global accumulator, data backtracking is difficult and prone to errors and loss, making accurate backtracking in the time dimension impossible.
The system uses a volatile storage area to temporarily store the data extracted each time, combined with the accumulated data in the non-volatile storage area. Data management is performed using timestamps to ensure the real-time nature and orderliness of the data, and the data is transferred within a preset time period.
It enables real-time storage and accurate retrieval of data from atomizing devices, reducing the risk of data loss, extending hardware lifespan, and improving data retrieval efficiency and accuracy.
Smart Images

Figure CN121489192A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of atomizers, and more particularly to a data processing method, apparatus, and atomizing device. Background Technology
[0002] Atomizing devices are devices that convert atomizing matrix into aerosols. As atomizing devices become increasingly intelligent, more and more of them are equipped with data storage components, which can record user data on the atomizing device.
[0003] In related technologies, when recording the usage data of atomizing devices, a global accumulator is usually used to record the usage data, which reduces the number of global variables maintained inside the atomizing device.
[0004] However, in related technologies, the method of recording usage data through a global accumulator makes data backtracking quite difficult.
[0005] Application content This application provides a data processing method, apparatus, and atomizing device, which can fix the storage capacity of the volatile storage area to avoid the storage capacity from increasing over time. This allows the device to record usage data within a preset time period with only a fixed and minimal storage space. At the same time, based on the fact that the read and write speed of the volatile storage area is higher than that of the non-volatile storage area, and that the non-volatile storage area still retains data after power failure, the difficulty of backtracking usage data of the atomizing device can be reduced, and the efficiency and accuracy of backtracking usage data of the atomizing device can be improved.
[0006] In one embodiment, a data processing method is provided, applied to an atomizing device, the method comprising: Acquire the first usage data of the atomizing device and the timestamp of each first usage data; the first usage data includes the inhalation duration and the number of inhalations for each inhalation process within a first preset time period; The first usage data is stored in the first storage area of the atomizing device according to the timestamp of each first usage data; the first storage area is a volatile storage area; When all first usage data within the first preset time period are stored in the first storage area, second usage data is determined based on each first usage data, and the second usage data is stored in the second storage area of the atomizing device; the second usage data includes the cumulative inhalation time and the cumulative number of inhalations within the first preset time period; the second storage area is a non-volatile storage area.
[0007] In one embodiment, a data processing apparatus is provided, the apparatus comprising: The acquisition device is used to acquire first usage data of the atomizing device and timestamps of each first usage data; the first usage data includes the inhalation duration and the number of inhalation ports for each inhalation process within a first preset time period; A storage device is used to store the first usage data into a first storage area of the atomizing device according to the timestamp of each first usage data; the first storage area is a volatile storage area; The storage device is further configured to, when all first usage data within a first preset time period are stored in the first storage area, determine second usage data based on each first usage data and store the second usage data in the second storage area of the atomizing device; the second usage data includes the cumulative inhalation time and the cumulative number of inhalations within the first preset time period; the second storage area is a non-volatile storage area.
[0008] In one embodiment, an atomizing device is provided, the atomizing device including: a controller; The controller is used to implement the data processing method described above during execution.
[0009] The embodiments of this application have the following advantages: This application embodiment can acquire the first usage data of the atomizing device and the timestamps of each first usage data, and defines the first usage data as including the inhalation duration and number of inhalations for each inhalation process within a first preset time period. By acquiring the timestamps, each set of original usage data corresponds to a unique time identifier, providing data support for subsequent data analysis. The first usage data is then stored in the first storage area of the atomizing device according to the timestamps of each first usage data, and the first storage area is defined as a volatile storage area. This allows the storage capacity of the volatile storage area to be fixed within a preset time period, preventing the storage capacity from increasing over time. This means the device only needs a fixed, minimal storage space (e.g., only a few tens of bytes) to record usage data within the preset time period. Furthermore, the read / write latency of the volatile storage area is extremely low, achieving the effect of instant generation of inhalation data, ensuring the real-time nature of data storage. For example, if a user inhales twice consecutively within one second, the low-latency storage area can quickly complete the writing of both data entries, while the high-latency storage area may experience data overwriting or delay. Simultaneously, storing data by timestamp preserves the time dimension information of the first usage data, improving the orderliness of the first usage data storage.
[0010] With all first usage data within a first preset time period stored in the first storage area, second usage data is determined based on each first usage data point and stored in the second storage area of the atomizing device. The second usage data is defined to include the cumulative inhalation time and cumulative number of inhalations within the first preset time period. The second storage area is a non-volatile storage area. By combining the storage of frequently generated first usage data records in the volatile storage area with the storage of second usage data derived from the first usage data (e.g., accumulated first usage data) in the non-volatile storage area, usage data of the atomizing device is stored in units of preset time periods. This allows for the viewing of independent data corresponding to the preset time period during data retrieval, rather than a general total, thus reducing the difficulty of retrieval. Furthermore, based on the higher read / write speed of the volatile storage area compared to the non-volatile storage area, and the fact that the non-volatile storage area retains data even after power failure, the efficiency and accuracy of retrieval of usage data for the atomizing device can be improved. Meanwhile, if the frequently generated usage data is directly written to the non-volatile storage area, the storage chip will be repeatedly erased and rewritten due to the small amount of data per write but the high frequency of writes, which will accelerate the aging of the hardware. If the usage data is temporarily stored in the volatile storage area, the usage data will be stored in the non-volatile storage area when the above condition "all the first usage data in the first preset time period are stored in the first storage area" is met. This can extend the service life of the hardware, reduce resource consumption, and prevent the loss of usage data after the device is powered off. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of the steps of a data processing method provided in an embodiment of this application; Figure 2 This is a flowchart of another data processing method provided in an embodiment of this application; Figure 3 This is a structural block diagram of a data processing apparatus provided in an embodiment of this application; Figure 4 This is a structural block diagram of an atomizing device provided in this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. Furthermore, the term "and / or" in the specification and claims is used to describe the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0015] As atomizing devices become increasingly intelligent and users demand personalization, more and more atomizing devices are equipped with data storage components, which can record user usage data of the atomizing device.
[0016] In related technologies, when recording the usage data of atomizing devices, a global accumulator is usually used to record the usage data, which reduces the number of global variables maintained inside the atomizing device.
[0017] However, in related technologies, the method of recording usage data through a global accumulator makes data backtracking quite difficult.
[0018] For example, recording usage data using a simple global accumulator can also be understood as a total count dumping mode. The atomizer internally maintains only one or two global variables; for example, it might only maintain the total number of puffs (total_puff_count) and the total puff duration (total_puff_duration). Each time a user takes a puff, these two variables are incremented, and they are persistently stored in the atomizer. When a terminal device connects to the atomizer, the atomizer can periodically send the total number of puffs and the total puff duration to the terminal device at preset time intervals. After receiving the total number of puffs and the total puff duration each time, the application (APP) corresponding to the atomizer on the terminal device can subtract the total number of puffs and the total puff duration received during the previous synchronization from the received total number of puffs and the total puff duration, thereby calculating the number of new puffs and the puff duration added during this synchronization cycle.
[0019] The current technology that uses a global accumulator to record usage data only provides the total number of historical data extractions and the total extraction duration during data backtracking; it cannot perform data backtracking over time. This data recording method can lead to permanent data corruption in the event of synchronization errors. If a synchronization fails—for example, if the app receives data but crashes and fails to save the received data—the next synchronization will calculate an increment that includes data from both synchronization cycles, resulting in abnormally high data for one day and zero data for another. This type of error is almost impossible to correct.
[0020] If the app is not opened for data synchronization for a long period of time, a large amount of usage data may accumulate on the vaping device. If the vaping device has limited storage space or uses a simple accumulator, once the large amount of usage data is synchronized, historical daily details may be lost, and only a total number will be displayed, making it impossible to review the specific usage of the previous days.
[0021] Against this background, embodiments of this application provide a data processing and control method that can reduce the difficulty of tracing back usage data of atomizing devices and improve the efficiency and accuracy of tracing back usage data of atomizing devices.
[0022] The data processing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0023] Figure 1 This is a flowchart illustrating the steps of a data processing method provided in an embodiment of this application. Figure 1 As shown, the method includes steps 101-103.
[0024] Step 101: Obtain the first usage data of the atomizing device and the timestamp of each first usage data.
[0025] In this embodiment, the first usage data includes the suction duration and number of suction ports for each suction process within a first preset time period, or other data that can characterize the suction duration and / or number of suction ports, such as the power-on duration and applied power of the heating element in the atomizing device, or the consumption of the atomizing matrix. The first usage data can be obtained through various sensors, such as by setting an airflow sensor to detect the number of times it is triggered, corresponding to the number of suction ports. The timestamp of the first usage data can be used to indicate the start and end times of the usage behavior corresponding to the first usage data.
[0026] For example, during a suction process, the suction detection device of the atomizing device can detect continuous suction behavior. This can also be understood as the suction detection device of the atomizing device detecting that the time interval between two adjacent suction behaviors does not exceed a preset threshold. When the suction detection device detects that the time interval between two adjacent suction behaviors exceeds the preset threshold, it no longer considers these two suction behaviors to belong to the same suction process.
[0027] For example, when the preset threshold is 1 minute, at time t1, the inhalation detection device of the atomizing device detects one suction action at time t1, time t2, and time t3 respectively. The interval between time t1 and time t2 is 0.5 minutes, and the interval between time t2 and time t3 is 3 minutes. Therefore, the suction actions detected by the inhalation detection device of the atomizing device at time t1 and time t2 belong to the same suction process, and the suction action detected by the inhalation detection device of the atomizing device at time t3 belongs to the next suction process.
[0028] Step 102: Store the first usage data into the first storage area of the atomizing device according to the timestamp of each first usage data.
[0029] In this embodiment, the first storage area is a volatile storage area, which can also be understood as a cache area. For example, the volatile storage area can be SRAM. The first storage area has fast access speed and extremely low read / write latency, but it requires continuous power to maintain data. Once the power is off, the stored data will be lost immediately. Within a first preset time period, each time the inhalation detection device of the atomizing device detects an inhalation process, it can determine the start and end time of this inhalation process, determine the timestamp of this inhalation process based on the start and end time of this inhalation process, and store the inhalation duration and number of inhalation ports of this inhalation process in the first storage area of the atomizing device according to the timestamp of this inhalation process.
[0030] Based on the above embodiments, exemplarily, if the first preset time period is from 0:00 on month x day to 0:00 on month x+3 day, i.e., the first preset time period is 72 hours, within these 72 hours, if the inhalation detection device of the atomizing device detects the first inhalation behavior at 2:00 on month x day, and then detects an inhalation behavior every minute, and after detecting an inhalation behavior at 2:30 on month x day, no inhalation behavior is detected within 3 minutes after 2:30, then it is determined that this inhalation process has ended. This inhalation process started at 2:00 and ended at 2:30. It can be concluded that the inhalation duration of this inhalation process is 30 minutes, the number of inhalations is 15, and the timestamp is determined according to the start and end time of this inhalation process. This data can be stored in the first storage area of the atomizing device. Similarly, within the first preset time period, each time the inhalation detection device of the atomizing device detects a suction process, it can determine the start and end time of this suction process, determine the timestamp of this suction process based on the start and end time of this suction process, and store the suction duration and number of suction ports of this suction process in the first storage area of the atomizing device according to the timestamp of this suction process.
[0031] Step 103: If all the first usage data within the first preset time period are stored in the first storage area, determine the second usage data based on each of the first usage data, and store the second usage data in the second storage area of the atomizing device.
[0032] In this embodiment, the second usage data includes the cumulative suction duration and cumulative number of suction ports within the first preset time period. The second storage area is a non-volatile storage area. The data in the second storage area can still be stored for a long time after a power outage, without the need for continuous power supply to maintain the data. When all the first usage data within the first preset time period is stored in the first storage area, all the first usage data within the first preset time period can be processed, for example, by accumulating it using an accumulator to obtain the second usage data within the first preset time period, and then the second usage data can be stored in the second storage area.
[0033] Alternatively, after obtaining the second usage data within the first preset time period, the second usage data can be stored simultaneously in the first storage area and the second storage area. For example, after obtaining the second usage data, the second usage data can be stored in the first storage area and then transferred to the second storage area to ensure the accuracy of the stored data.
[0034] Based on the above embodiments, for example, when the first preset time period is from 0:00 on month x day to 0:00 on month x+3 day, if 5 inhalation processes are detected within the first preset time period, the inhalation data corresponding to these 5 inhalation processes are all stored in the first storage area. When the current time is detected to be after 0:00 on month x+3 day, that is, when the first preset time period has ended, it can be determined that all the first usage data within the first preset time period are stored in the first storage area. At this time, second usage data can be determined based on each first usage data, and the second usage data is stored in the second storage area of the atomizing device. That is, the cumulative inhalation time and the cumulative number of inhalations within the first preset time period are stored in the second storage area of the atomizing device.
[0035] This application embodiment obtains the first usage data of the atomizing device and the timestamps of each first usage data, and defines the first usage data as including the inhalation duration and number of inhalations for each inhalation process within a first preset time period. The obtained timestamps ensure that each set of original usage data corresponds to a unique time identifier, providing data support for subsequent data analysis. The first usage data is then stored in the first storage area of the atomizing device according to the timestamps of each first usage data, and this first storage area is defined as a volatile storage area. The read / write latency of the volatile storage area is extremely low, achieving the effect of instant generation of inhalation data and ensuring the real-time nature of data storage. For example, if a user inhales twice consecutively within one second, the storage area with extremely low latency can quickly complete the writing of both data entries, while the storage area with higher latency may experience data overwriting or delay. Simultaneously, storing data according to timestamps preserves the time dimension information of the first usage data, improving the orderliness of the first usage data storage.
[0036] With all first usage data within a first preset time period stored in the first storage area, second usage data is determined based on each first usage data, and the second usage data is stored in the second storage area of the atomizing device. The second usage data is limited to include the cumulative inhalation time and the cumulative number of inhalations within the first preset time period. The second storage area is a non-volatile storage area. By combining the storage of frequently generated first usage data records in the volatile storage area with the storage of second usage data obtained based on the first usage data in the non-volatile storage area, such as the accumulated first usage data, the usage data of the atomizing device is stored in units of preset time periods. This allows for the viewing of independent data corresponding to the preset time period during data backtracking, rather than a general total, thereby reducing the difficulty of backtracking the usage data of the atomizing device. Meanwhile, directly writing frequently generated usage data into the non-volatile storage area would lead to repeated erasing and rewriting of the storage chip due to the small amount of data per write but high frequency of writes, accelerating hardware aging. If usage data is temporarily stored in the volatile storage area, and then stored in the non-volatile storage area when the condition "all first usage data within the first preset time period are stored in the first storage area" is met, the usage data can be stored in the non-volatile storage area. This extends the hardware's lifespan, reduces resource consumption, and prevents data loss after power failure. It also avoids the problem of excessively high costs associated with solely using non-volatile storage, or the data rollback errors caused by solely using volatile storage.
[0037] Figure 2 This is a flowchart illustrating the steps of another data processing method provided in an embodiment of this application. For example... Figure 2 As shown, the method includes steps 201-203.
[0038] Step 201: Obtain the first usage data of the atomizing device and the timestamp of each first usage data; the first usage data includes the inhalation duration and the number of inhalation ports for each inhalation process within the first preset time period.
[0039] Step 202: Store the first usage data in the first storage area of the atomizing device according to the timestamp of each first usage data; the first storage area is a volatile storage area.
[0040] Step 203: If all the first usage data within the first preset time period are stored in the first storage area, determine the second usage data based on each first usage data, and store the second usage data in the second storage area of the atomizing device; the second usage data includes the cumulative inhalation time and the cumulative number of inhalations within the first preset time period; the second storage area is a non-volatile storage area.
[0041] The specific implementation methods for steps 201-203 above can be found in the above description. Figure 1 Examples are not described here.
[0042] Optionally, step 202 above may include sub-steps 2021-2023.
[0043] Sub-step 2021: Based on the timestamps of each first usage data, determine the third usage data within the second preset time period and the fourth usage data within the third preset time period.
[0044] In this embodiment of the application, the first preset time period includes a second preset time period and a third preset time period. The second preset time period is the preset time period before the third preset time period, and the third preset time period is the preset time period in which the current moment is located. The third usage data includes the duration of each suction and the number of suction ports within the second preset time period. The fourth usage data includes the duration of each suction and the number of suction ports within the third preset time period.
[0045] For example, the first preset time period is from 0:00 on month x day to 0:00 on month x+3 day, the second preset time period can be from 0:00 on month x day to 0:00 on month x+2 day, and the third preset time period can be from 0:00 on month x+2 day to 0:00 on month x+3 day.
[0046] Sub-step 2022: Store the third-use data in the first location of the first storage area.
[0047] Sub-step 2023: Store the fourth data in the second location of the first storage area.
[0048] In this embodiment of the application, for sub-steps 2022-2023, storing the third usage data in the first location of the first storage area can also be understood as storing the usage data of the ended period in the first location of the first storage area. Storing the fourth usage data in the second location of the first storage area can also be understood as storing the usage data of the current period in the second location of the first storage area.
[0049] Based on the above embodiments, for example, usage data from 00:00 on month x day to 00:00 on month x+2 day can be stored in the first location of the first storage area, that is, the third usage data can be stored in the first location of the first storage area. Usage data from 00:00 on month x+2 day to 00:00 on month x+3 day can be stored in the second location of the first storage area, that is, the fourth usage data within the third preset time period can be stored in the second location of the first storage area.
[0050] This embodiment can determine the third usage data within the second preset time period and the fourth usage data within the third preset time period according to the timestamps of each first usage data; and defines the first preset time period as including the second preset time period and the third preset time period, where the second preset time period is the preset time period before the third preset time period, and the third preset time period is the preset time period in which the current moment is located; the third usage data includes the duration and number of suction ports for each suction within the second preset time period; the fourth usage data includes the duration and number of suction ports for each suction within the third preset time period; then the third usage data is stored in the first location of the first storage area; and the fourth usage data is stored in the second location of the first storage area. This allows for partitioned storage of data in the ended period and the ongoing period, reducing the risk of data loss and the difficulty of data statistical analysis. Furthermore, since the second preset time period has ended, the third usage data corresponding to the second preset time period is fixed data that no longer changes. Storing the third usage data in the first location can be considered as read-only data, which can prevent accidental overwriting or tampering by subsequent data write operations, ensuring the integrity of historical data.
[0051] Optionally, the above sub-step 2023 may also include sub-steps 20231-20232.
[0052] Sub-step 20231: Take the current time as the start time of the current suction process. When the current suction process ends, obtain the fifth usage data and the timestamp of the fifth usage data. The fifth usage data includes the suction duration and the number of suction ports in the current suction process.
[0053] Sub-step 20232: Store the fifth usage data and the timestamp of the fifth usage data in the second location of the first storage area.
[0054] In this embodiment, the inhalation detection device of the atomizing device can be an airflow sensor, a pressure sensor, etc. The inhalation detection device can monitor the user's inhalation action in real time. When the user begins to inhale, the sensor triggers the device to start atomization; when the user stops inhaling, the sensor detects that the airflow or pressure has returned to the baseline, thus determining that inhalation has ended. If the inhalation detection device detects that an inhalation has ended and does not detect the user starting to inhale again within a preset time period, it determines that the current inhalation process has ended. The inhalation duration and number of inhalations during the current inhalation process can be obtained, i.e., the fifth usage data, as well as the timestamp of the fifth usage data. The fifth usage data and the timestamp of the fifth usage data are stored in the second location of the first storage area.
[0055] In this embodiment, the current time is taken as the start time of the current suction process. When the current suction process ends, the fifth usage data and the timestamp of the fifth usage data are obtained and stored in the second location of the first storage area. The fifth usage data is limited to include the suction duration and the number of suction ports in the current suction process. The suction data of the current suction process in the current time period can be stored in real time, and the suction data of the current suction process can be stored in the second location of the first storage area in real time, which can reduce the impact on other data in the first storage area when storing the current data in real time.
[0056] Optionally, the above method may also include step 204.
[0057] Step 204: If both the fourth and fifth usage data are stored in the second location of the first storage area, store each of the fourth and fifth usage data in the first location and clear the second location.
[0058] In this embodiment of the application, when both the fourth and fifth usage data are stored in the second location of the first storage area, that is, when the third preset time period has ended and all data within the third preset time period is stored in the second location of the first storage area, all data within the third preset time period can be transferred to the second location and the second location can be cleared, so as to facilitate the storage of usage data within the preset time period after the third preset time period in the second location.
[0059] For example, the storage location index of the usage data for the second preset time period can be set to 0, and the storage location index of the usage data for the third preset time period can be set to 1. When the third preset time period has not ended, if the suction data of the current suction process is obtained, the suction data of the current suction process can be stored in the second location of the first storage area. When the third preset time period has ended, the suction data can be transferred to the first location. At this time, the storage location index (current_day_index) of the suction data can be moved forward one position, for example, current_day_index = (current_day_index + 1) % 3. The second location is then cleared, that is, the data at the new index location is cleared. For example, recent_data [current_day_index].puff_count=0, total_duration_ms=0.
[0060] This embodiment stores the fourth and fifth usage data in the second location of the first storage area, then stores the fourth and fifth usage data in the first location and clears the second location. This allows the first location to retain only historical data from the ended period, while the second location awaits storage of current data for the new period. This enables real-time storage of atomization device usage data. Simultaneously, the second location, acting as a temporary buffer, is typically designed with a capacity sufficient for storing data in a single period, resulting in low hardware requirements. Furthermore, the clearing operation ensures that it does not occupy additional space due to the accumulation of old data, reducing storage pressure.
[0061] Optionally, the above method may also include step 205.
[0062] Step 205: If all the third usage data within the second preset time period is stored in the first location, determine the sixth usage data based on the third usage data within the second preset time period, and store the sixth usage data in the second storage area of the atomizing device.
[0063] In this embodiment, the sixth usage data includes the cumulative suction duration and cumulative number of suction ports within the second preset time period. If all the third usage data within the second preset time period is stored in the first location of the first storage area, all the third usage data within the second preset time period can be processed to obtain the sixth usage data within the second preset time period, and then stored in the second storage area. Alternatively, after obtaining the sixth usage data within the second preset time period, the sixth usage data can be stored simultaneously in both the first and second storage areas. For example, after obtaining the sixth usage data, it can be stored in the first location of the first storage area and then transferred to the second storage area to ensure the accuracy of the stored data.
[0064] Based on the above embodiments, exemplarily, if the first preset time period is from 0:00 on month x day to 0:00 on month x+3 day, and the second preset time period is from 0:00 on month x day to 0:00 on month x+2 day, when it is detected that the current time is after 0:00 on month x+2 day, that is, the second preset time period has ended, it can be determined that all the third usage data within the second preset time period is stored in the first location. At this time, the sixth usage data can be determined based on the third usage data, and the sixth usage data is stored in the second storage area of the atomizing device. That is, the cumulative inhalation time and the cumulative number of inhalations within the second preset time period are stored in the second storage area of the atomizing device.
[0065] In this embodiment, if all the third usage data within the second preset time period is stored in the first location, the sixth usage data is determined based on the third usage data within the second preset time period, and the sixth usage data is stored in the second storage area of the atomizing device. Even if the first preset time period has not ended but the second preset time period has ended, the cumulative inhalation time and cumulative number of inhalations within the second preset time period can be stored in the second storage area of the atomizing device first to prevent data loss due to power outages and improve the security of usage data.
[0066] Optionally, the above method may also include step 206.
[0067] Step 206: Send the second usage data to the terminal device so that the terminal device can analyze the second usage data.
[0068] In this embodiment, the terminal device can refer to a smart device such as a mobile app or tablet that is compatible with the atomizing device. The terminal device can connect to the atomizing device wirelessly via Bluetooth Low Energy (BLE) technology. Intelligent data synchronization is achieved through specific Bluetooth services and features, i.e., sending second usage data to the terminal device for analysis. The atomizing device can send the second usage data to the terminal device in the form of data packets, with the data packet format being: [date and timestamp, number of packets, total duration]. Since the length of a single Bluetooth data packet is limited (typically about 20 bytes), if data over a long period needs to be sent, it may need to be sent in multiple packets. For example, if three days' worth of data needs to be sent, each day's data is sent as a separate data packet.
[0069] After analyzing the second usage data, the terminal device can display the analysis results via a display device. For example, the terminal device can clearly display the number of suction ports and duration for "today," "yesterday," and "the day before yesterday" on the display screen. It can also generate detailed charts based on the analysis results, such as bar charts or line charts for the past three days.
[0070] For example, the Bluetooth module of the app corresponding to the atomizing device in the terminal device can receive usage data from the atomizing device and parse the date, number of puffs, and duration from each data packet according to the protocol. The app can store the parsed data in a local database on the phone (e.g., SQLite), with the date as the primary key. If data for a certain day already exists in the database, it can be overwritten and updated using the newly received data for that day.
[0071] Based on the above embodiments, for example, after receiving the second usage data, i.e., after receiving the cumulative inhalation time and cumulative number of inhalations within the first preset time period, the terminal device can analyze the usage trend of the nebulizer based on the second usage data. For example, if the first preset time period is the entire day of yesterday, the received usage data from yesterday can be compared with the usage data from the day before yesterday, or the received usage data from yesterday can be compared with the daily usage data from the past week to determine the user's usage trend of the nebulizer. This allows the user to control the frequency of using the nebulizer based on the usage trend analysis results from the terminal device. The terminal device can also push personalized reminder information to the user based on the above analysis results, for example, by displaying a text prompt message on the screen such as "Your usage frequency has been continuously increasing for 3 consecutive days. It is recommended to adjust your usage habits."
[0072] The terminal device can also manage the amount of atomizing fluid used by the atomizing device based on the second usage data. For example, by assessing the estimated number of days the remaining atomizing fluid will last and whether the preset suction limit has been exceeded based on the second usage data, the user can be assisted in controlling the amount of atomizing fluid used.
[0073] This embodiment sends second usage data to the terminal device for analysis. This analysis clearly presents independent data for different preset time periods, allowing users to intuitively understand their vaping habits through the analysis results on the terminal app, thus improving the user experience. Simultaneously, the terminal device can back up the analyzed data to the cloud, eliminating the need for users to re-accumulate data when changing vaping devices, thereby enhancing usage continuity.
[0074] Optionally, step 206 above may include sub-steps 2061-2062.
[0075] Sub-step 2061: Use the data tag synchronization identifier for the second one.
[0076] Sub-step 2062: Send a synchronization identifier to the terminal device to indicate the unsynchronized second usage data, so that the terminal device can analyze the second usage data.
[0077] In this embodiment, for sub-steps 2061-2062, the synchronization flag (sync_flag) is used to characterize whether the second usage data has been synchronized to the terminal device connected to the atomizing device. Unsynchronized indicates that the second usage data has not yet been sent to the terminal device; synchronized indicates that the second usage data has been successfully sent and received by the terminal device. For example, when the second usage data synchronization flag is 0, it indicates that the second usage data is not synchronized; when the second usage data synchronization flag is 1, it indicates that the second usage data is synchronized. For example, when the second usage data synchronization flag is 0, it indicates that the second usage data is not synchronized, and the second usage data can be sent to the terminal device. The synchronization flag ensures that regardless of the connection interval, the terminal device can locate itself based on the unsynchronized flag and continue synchronization from the last interrupted synchronization node, rather than starting synchronization from the beginning, thus ensuring data integrity.
[0078] For example, the atomizing device can process the second usage data to be sent into a data packet based on the synchronization flag and send the data packet to the terminal device. Each time the app successfully receives and parses a data packet, it can send an acknowledgment (ACK) to the atomizing device. After receiving the ACK for the corresponding date, the atomizing device can mark the synchronization flag for that date as 1 (synchronized). This prevents the retransmission of synchronized data on subsequent connections. If the connection is interrupted, unacknowledged data will still be retransmitted on the next connection because the sync_flag is 0. Alternatively, the atomizing device can traverse the first storage area, checking each storage location. If unsynchronized second usage data exists at each storage location in the first storage area, it can process the unsynchronized second usage data at that location into a data packet and send the data packet to the terminal device.
[0079] This embodiment marks the second usage data with a synchronization identifier and sends the identifier to the terminal device to indicate unsynchronized second usage data, allowing the terminal device to analyze the second usage data. The second usage data is generated according to a first preset time period (e.g., every few days, every day, every hour), and accumulates over time (e.g., one cumulative data entry per day). The synchronization identifier is equivalent to labeling each data entry as sent or unsent. The atomizing device can quickly determine which data needs to be sent first and which data has already been transmitted, avoiding duplicate or missed transmissions. Without a synchronization identifier, the atomizing device would need to resend all historical second usage data every time it connects to the terminal, resulting in invalid data transmission, wasting BLE communication bandwidth, and increasing the computational power consumption of the app due to repeated processing by the terminal. With the identifier, the atomizing device can directly send unsynchronized data by querying the synchronization identifier each time it connects to the terminal, improving communication efficiency. Meanwhile, if a transmission fails due to signal interruption, such as when the phone suddenly leaves the connection range, the unsynchronized data flag will not change. The device will resend the data the next time it connects, avoiding data loss due to a single communication failure, so that the terminal device can eventually obtain complete user usage data.
[0080] Optionally, step 206 above may include sub-step 2063.
[0081] Sub-step 2063: In response to receiving a data synchronization request from the terminal device, send second usage data to the terminal device so that the terminal device can analyze the second usage data.
[0082] In this embodiment of the application, after each successful connection with the atomizing device, the APP can automatically initiate a synchronization request to the atomizing device, so that the user can see the latest data as soon as he / she opens the APP.
[0083] For example, after receiving a synchronization request, the atomizing device can process the second usage data to be sent into a data packet and send the data packet to the terminal device. Alternatively, after receiving a synchronization request, the atomizing device can traverse the first storage area, check each storage location in the first storage area, and if data to be synchronized exists in each storage location of the first storage area, it can package the data and send it to the terminal device.
[0084] This embodiment, in response to a data synchronization request received from a terminal device, sends second usage data to the terminal device. The terminal device then analyzes this second usage data. Data is only sent when the atomizing device receives a synchronization request, avoiding indiscriminate data transmission. For example, if the device frequently detects the terminal is online and automatically sends data, it may result in invalid data transmission when the user has not opened the app. This reduces unnecessary power consumption in BLE communication and extends the atomizing device's battery life. Furthermore, since the BLE connection between the atomizing device and the terminal may be lost due to distance, signal issues, etc., automatically initiating a synchronization request to the atomizing device allows the user to re-initiate the synchronization request after the connection is restored. The atomizing device can then resend data, preventing data loss due to unstable connections.
[0085] In a specific embodiment, when the first preset time period is 3 days, the usage data for these 3 days can be stored in the first storage area. The first storage area can include three storage locations: the first location stores the usage data from the day before yesterday, the second location stores the usage data from yesterday, and the third location stores the usage data from today. To retain only the data from the most recent three days, a DailyPuffData array of size 3 can be used as a circular buffer, i.e., the aforementioned first storage area.
[0086] For example, a circular buffer can be represented as follows.
[0087] struct DailyPuffData recent_data[3]; uint8_t current_day_index; / / Index (0, 1, or 2) pointing to the location where the data for the current day is stored.
[0088] Among them, index 0 can point to the storage location of the usage data from the day before yesterday; index 1 can point to the storage location of the usage data from yesterday; and index 2 can point to the storage location of the usage data from today.
[0089] The storage results of usage data for each day can be represented as follows.
[0090] struct DailyPuffData { uint32_t timestamp; / / The starting timestamp of the day (e.g., Unix time at 00:00). uint16_t puff_count; / / Total number of puffs for the day uint32_t total_duration_ms; / / Total suction duration for the day (milliseconds) uint8_t sync_flag; / / Synchronization flag (0: not synchronized, 1: synchronized) }
[0091] In summary, the embodiments of this application can obtain the first usage data of the atomizing device and the timestamps of each first usage data, and define the first usage data as including the inhalation duration and number of inhalations for each inhalation process within a first preset time period. By obtaining the timestamps, each set of original usage data corresponds to a unique time identifier, providing data support for subsequent data analysis. The first usage data is then stored in the first storage area of the atomizing device according to the timestamps of each first usage data, and the first storage area is defined as a volatile storage area; the read / write latency of the volatile storage area is extremely low, achieving the effect of instant generation of inhalation data, ensuring the real-time nature of data storage. For example, if a user inhales twice consecutively within 1 second, the storage area with extremely low latency can quickly complete the writing of the two data entries, while the storage area with higher latency may experience data overwriting or delay. Simultaneously, storing data according to timestamps preserves the time dimension information of the first usage data, improving the orderliness of the first usage data storage.
[0092] When all first usage data within a first preset time period are stored in the first storage area, second usage data is determined based on each first usage data, and the second usage data is stored in the second storage area of the atomizing device. The second usage data is limited to include the cumulative inhalation time and the cumulative number of inhalations within the first preset time period. The second storage area is a non-volatile storage area. This allows for the storage of atomizing device usage data in units of preset time periods, enabling the viewing of individual data corresponding to the preset time period during data retrieval, rather than a general total, thus reducing the difficulty of retrieval of atomizing device usage data. Furthermore, directly writing frequently generated usage data into the non-volatile storage area would lead to repeated erasing and rewriting of the storage chip due to the small data volume per write but high frequency, accelerating hardware aging. Storing usage data temporarily in the volatile storage area, and storing it in the non-volatile storage area when the condition "all first usage data within the first preset time period are stored in the first storage area" is met, can extend hardware lifespan, reduce resource consumption, and prevent data loss after power failure.
[0093] This application also provides a data processing apparatus. Figure 3 This is a structural block diagram of a data processing apparatus provided in an embodiment of this application. For example... Figure 3 As shown, the device 300 may include an acquisition module 301 and a storage module 302.
[0094] The acquisition module 301 is used to acquire the first usage data of the atomizing device and the timestamp of each first usage data; the first usage data includes the inhalation duration and the number of inhalation ports for each inhalation process within a first preset time period; Storage module 302 is used to store the first usage data into the first storage area of the atomizing device according to the timestamp of each first usage data; the first storage area is a volatile storage area; Storage module 302 is further configured to, when all first usage data within a first preset time period are stored in the first storage area, determine second usage data based on each first usage data and store the second usage data in the second storage area of the atomizing device; the second usage data includes the cumulative inhalation time and the cumulative number of inhalations within the first preset time period; the second storage area is a non-volatile storage area.
[0095] Optionally, the suction time and number of suction ports can be characterized by the energization time and applied power of the heating element in the atomizing device, or by the consumption of the atomizing matrix.
[0096] Optionally, the storage module 302 is specifically used to determine the third usage data within the second preset time period and the fourth usage data within the third preset time period according to the timestamp of each first usage data; and to store the third usage data and the fourth usage data in the first storage area; wherein, the first preset time period includes the second preset time period and the third preset time period, the second preset time period is the preset time period before the third preset time period, and the third preset time period is the preset time period in which the current moment is located; the third usage data includes the suction duration and the number of suction ports for each suction process within the second preset time period; the fourth usage data includes the suction duration and the number of suction ports for each suction process within the third preset time period.
[0097] Optionally, the storage module 302 is specifically used to store the third usage data in a first location of the first storage area; and to store the fourth usage data in a second location of the first storage area.
[0098] Optionally, the storage module 302 is specifically used to take the current time as the start time of the current suction process, and at the end of the current suction process, to obtain the fifth usage data and the timestamp of the fifth usage data; the fifth usage data includes the suction duration and the number of suction ports in the current suction process; and to store the fifth usage data and the timestamp of the fifth usage data in the second location of the first storage area.
[0099] Optionally, the storage module 302 is further configured to store the fourth usage data and the fifth usage data in the first location and clear the second location when both the fourth usage data and the fifth usage data are stored in the second location of the first storage area.
[0100] Optionally, the storage module 302 is further configured to determine the sixth usage data based on the third usage data when all the third usage data within the second preset time period is stored in the first location, and store the sixth usage data in the second storage area of the atomizing device. The sixth usage data includes the cumulative inhalation time and the cumulative number of inhalations within the second preset time period.
[0101] Optionally, such as Figure 3 As shown, the device 300 may further include a transmitting module 303.
[0102] The sending module 303 is used to send second usage data to the terminal device so that the terminal device can analyze the second usage data.
[0103] Optionally, the sending module 303 is specifically used to mark the second usage data with a synchronization identifier; the synchronization identifier is used to indicate whether the second usage data is synchronized to the terminal device that has established a connection with the atomizing device; the synchronization identifier is sent to the terminal device to indicate the unsynchronized second usage data, so that the terminal device can analyze the second usage data.
[0104] Optionally, the sending module 303 is specifically used to send second usage data to the terminal device in response to receiving a data synchronization request from the terminal device, so that the terminal device can analyze the second usage data.
[0105] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0106] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0107] This application also provides an atomizing device. (Refer to...) Figure 4 , Figure 4 This is a structural block diagram of an electronic device for data processing provided in an embodiment of this application. Figure 4 As shown, the atomizing device includes: a controller 401; the controller 401 is used to implement the data processing method described above when executing.
[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0109] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0111] These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing terminal device to operate in a predictive manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0113] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0114] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0115] The above provides a detailed description of a data processing method, apparatus, electronic device, and readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data processing method, characterized in that, Applied to atomizing devices, the method includes: Acquire the first usage data of the atomizing device and the timestamp of each of the first usage data; the first usage data includes the inhalation duration and the number of inhalation ports for each inhalation process within a first preset time period; The first usage data is stored in the first storage area of the atomizing device according to the timestamp of each of the first usage data; the first storage area is a volatile storage area; If all the first usage data within the first preset time period are stored in the first storage area, second usage data is determined based on each of the first usage data, and the second usage data is stored in the second storage area of the atomizing device; The second usage data includes the cumulative suction duration and cumulative number of suction ports within the first preset time period; the second storage area is a non-volatile storage area.
2. The method according to claim 1, characterized in that, The suction duration and number of suction ports are characterized by the energization time and applied power of the heating element in the atomizing device, or by the consumption of the atomizing matrix.
3. The method according to claim 1, characterized in that, The step of storing the first usage data in the first storage area of the atomizing device according to the timestamp of each of the first usage data includes: Based on the timestamps of each of the first usage data, determine the third usage data within the second preset time period and the fourth usage data within the third preset time period; The third usage data and the fourth usage data are stored in the first storage area; The first preset time period includes the second preset time period and the third preset time period. The second preset time period is the preset time period before the third preset time period, and the third preset time period is the preset time period in which the current moment is located. The third usage data includes the suction duration and the number of suction ports for each suction process within the second preset time period. The fourth usage data includes the suction duration and the number of suction ports for each suction process within the third preset time period.
4. The method according to claim 3, characterized in that, The step of storing the third usage data and the fourth usage data in the first storage area includes: The third data used is stored in the first location of the first storage area; The fourth data used is stored in the second location of the first storage area.
5. The method according to claim 4, characterized in that, The step of storing the fourth data to a second location in the first storage area includes: The current time is taken as the start time of the current suction process. When the current suction process ends, the fifth usage data and the timestamp of the fifth usage data are obtained. The fifth usage data includes the suction duration and the number of suction ports in the current suction process. The fifth usage data and its timestamp are stored in the second location of the first storage area.
6. The method according to claim 5, characterized in that, The method further includes: If both the fourth and fifth usage data are stored in the second location of the first storage area, the fourth and fifth usage data are stored in the first location, and the second location is cleared.
7. The method according to claim 4, characterized in that, The method further includes: If all the third usage data within the second preset time period is stored in the first location, the sixth usage data is determined based on the third usage data, and the sixth usage data is stored in the second storage area of the atomizing device. The sixth usage data includes the cumulative inhalation time and the cumulative number of inhalations within the second preset time period.
8. The method according to claim 1, characterized in that, The method further includes: The second usage data is sent to the terminal device so that the terminal device can analyze the second usage data.
9. The method according to claim 8, characterized in that, Sending the second usage data to the terminal device for analysis by the terminal device includes: The second usage data is marked with a synchronization identifier; the synchronization identifier is used to indicate whether the second usage data is synchronized to the terminal device that has established a connection with the atomizing device. The synchronization identifier is sent to the terminal device to indicate the unsynchronized second usage data, so that the terminal device can analyze the second usage data.
10. The method according to claim 8, characterized in that, Sending the second usage data to the terminal device for analysis by the terminal device includes: In response to receiving a data synchronization request from the terminal device, the second usage data is sent to the terminal device so that the terminal device can analyze the second usage data.
11. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire first usage data of the atomizing device and timestamps of each piece of the first usage data; the first usage data includes the inhalation duration and the number of inhalation ports for each inhalation process within a first preset time period; The storage module is used to store the first usage data into the first storage area of the atomizing device according to the timestamp of each of the first usage data; the first storage area is a volatile storage area; The storage module is further configured to determine second usage data based on each of the first usage data within the first preset time period, and store the second usage data in the second storage area of the atomizing device, provided that all the first usage data within the first preset time period are stored in the first storage area; the second usage data includes the cumulative inhalation time and the cumulative number of inhalations within the first preset time period; the second storage area is a non-volatile storage area.
12. An atomizing device, characterized in that, The atomizing device includes: a controller; The controller is used to implement the method as described in any one of claims 1-10 when executing.