Disclosure of Invention
The invention mainly aims to provide a method for detecting the smoking quantity of an electronic cigarette, which can detect the nicotine quantity taken in by a user in the process of smoking the electronic cigarette.
In order to achieve the above object, the present invention provides a method for detecting smoking amount of an electronic cigarette, which is applied to a cloud server, and the method for controlling the electronic cigarette comprises:
receiving smoking amount information of the electronic cigarette; the smoking amount information is sent to the cloud server by the mobile terminal after the electronic cigarette is in communication connection with the mobile terminal;
calculating the current nicotine generation amount according to the smoking amount information;
acquiring a first nicotine absorption amount accumulated in a current preset period; (ii) a The first nicotine smoking amount is the nicotine smoking amount from the beginning stage of the current preset period to the time when the smoking amount information is received;
obtaining a current second nicotine intake amount according to the current nicotine production amount; the second nicotine puff is equal to the sum of the first nicotine puff and the current nicotine production;
judging whether the current second nicotine smoking amount exceeds the total nicotine smoking amount accumulated in the last preset period; the total nicotine smoking amount accumulated in the last preset period is the total nicotine smoking amount of the user recorded by the cloud server in the last preset period;
if the current second nicotine smoking amount exceeds the total nicotine smoking amount accumulated in the last preset period, the cloud server generates first alarm information;
and the cloud server sends the first alarm information to the mobile terminal so as to inform a user of the first alarm information.
Further, the preset period includes a plurality of preset sub-periods, and the smoking amount detection method further includes:
judging whether the difference between the third nicotine intake in a preset sub-period after the preset sub-period and the third nicotine intake in the previous preset sub-period exceeds a first threshold value or not; the third nicotine intake is the total nicotine intake of the user during a predetermined sub-period;
if the difference between the third nicotine intake in the later preset sub-period and the third nicotine intake in the previous preset sub-period exceeds the first threshold, identifying the later preset sub-period as over-taking;
detecting the number of the overdose intakes marked in the preset period;
judging whether the number of the marks indicating excessive smoking exceeds a preset limit mark number or not;
and if the identification indicates that the number of excessive suckers exceeds the preset limit identification number, generating second alarm information.
Further, the method further comprises:
judging whether the current time is the termination time of a preset period or not;
if the current time is the termination time of the preset period; acquiring a second nicotine intake of the current preset period;
judging whether the second nicotine smoking amount in the current preset period exceeds the nicotine smoking total amount in the last preset period;
and if the second nicotine smoking amount in the current preset period does not exceed the nicotine smoking total amount in the last preset period, generating first feedback information.
Further, the step of "if the second nicotine intake of the current preset period does not exceed the total nicotine intake of the previous preset period" further comprises:
judging whether the second nicotine smoking amount in the current preset period is less than a first threshold value compared with the nicotine smoking total amount in the last preset period;
if the total nicotine smoking amount in the current preset period is less than a first threshold value compared with the total nicotine smoking amount in the last preset period, first feedback information is generated.
Further, the step of obtaining the second nicotine intake for the current preset period further comprises:
identifying the second nicotine intake for the current preset period as a preset period nicotine intake for the user;
and uploading the nicotine smoking amount of the user in the preset period to a nicotine smoking amount ranking set.
Further, the smoking amount detection method further includes:
obtaining a nicotine intake ranking order of the nicotine intake ranking set;
and generating second feedback information according to the nicotine smoking amount ranking sequence.
The invention also provides a method for detecting the smoking amount of the electronic cigarette, which is applied to a mobile terminal, and the method for controlling the electronic cigarette comprises the following steps:
after the mobile terminal establishes communication connection with the electronic cigarette, smoking amount information is generated;
sending smoking amount information to a cloud server;
judging whether first alarm information of the cloud server is received or not;
and if the first alarm information of the cloud server is received, informing a user of the first alarm information.
The invention further provides a cloud server, which comprises a first processor and a first memory, wherein the first memory stores a first control program of an electronic cigarette, and the first control program of the electronic cigarette is configured to be executed by the first processor, so as to realize the control method of the electronic cigarette.
The invention also provides a mobile terminal comprising a second processor and a second memory, the second memory storing a second control program of an electronic cigarette, the second control program of the electronic cigarette being configured to be executed by the second processor to implement the control method of the electronic cigarette as described in any one of the above.
The invention also relates to a smoking amount control system of the electronic cigarette, which comprises the electronic cigarette, a cloud server and a mobile terminal, wherein the electronic cigarette is in communication connection with the mobile terminal, and the cloud server is in communication connection with the mobile terminal; the cloud server is the cloud server or the mobile terminal is the mobile terminal.
The electronic cigarette smoking habit monitoring and detecting method and device have the advantages that the mobile terminal sends smoking amount information of the electronic cigarette to the cloud server, the smoking amount can be monitored and detected by utilizing the computing capacity and the storage capacity of the cloud server, the electronic cigarette smoking habit of a user is recorded, and when the user excessively smokes, an alarm is given to remind the user of controlling the frequency of smoking the electronic cigarette. Meanwhile, when the smoking amount of the user is obviously reduced, feedback information is generated to encourage the user to continue smoking control. Instructing smokers to reasonably smoke the electronic cigarettes and appropriately quit smoking.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, the control system of an electronic cigarette includes acloud server 100, amobile terminal 200, and anelectronic cigarette 300; the electronic cigarette is in communication connection with the mobile terminal, and thecloud server 100 is in communication connection with themobile terminal 200.
Referring to fig. 2-3, thecloud server 100 includes afirst processor 101 and afirst memory 102, and thefirst memory 102 stores a first control program of the electronic cigarette, and the first control program of the electronic cigarette is configured to be executed by thefirst processor 101 to implement the control method of the electronic cigarette. Themobile terminal 200 comprises asecond processor 201 and asecond memory 202, wherein thesecond memory 202 stores a second control program of the electronic cigarette, and the second control program of the electronic cigarette is configured to be executed by thesecond processor 201 to realize the control method of the electronic cigarette.
In this embodiment, the electronic cigarette includes a bluetooth module and a control circuit, the bluetooth module is used to establish communication connection with the mobile terminal, and the control circuit controls the smoke cartridge to generate smoke according to the received control instruction.
Referring to fig. 4, the method for controlling the electronic cigarette applied to thecloud server 100 specifically includes:
step S10: receiving smoking amount information of the electronic cigarette;
step S11: calculating the current nicotine generation amount according to the smoking amount information;
step S12: acquiring a first nicotine smoking amount accumulated in a current preset period;
step S13: obtaining a current second nicotine smoking amount according to the current nicotine production amount;
step S14: judging whether the current second nicotine smoking amount exceeds the total nicotine smoking amount accumulated in the last preset period; if the current second nicotine smoking amount exceeds the total nicotine smoking amount accumulated in the last preset period, executing step S15; otherwise, returning to execute the step S10;
step S15: generating first alarm information;
step S16: and sending the first alarm information to the mobile terminal.
In this embodiment, the smoking amount information of theelectronic cigarette 300 is sent to thecloud server 100 through themobile terminal 200, thecloud server 100 calculates to obtain the smoking amount of nicotine, and compares the nicotine in the preset period with the nicotine smoking amount in the previous period, if the second nicotine smoking amount in the current period exceeds the total nicotine smoking amount in the previous period, it is known that the user has smoked too much, and the first alarm information needs to be sent to remind the user. Specifically, the smoking amount information is sent to thecloud server 100 by the mobile terminal after the electronic cigarette is in communication connection with the mobile terminal. The smoking amount information includes the tobacco tar consumption amount and the tobacco tar type acquired by the mobile terminal 200 from theelectronic cigarette 300. Thecloud server 100 can obtain the nicotine content in each mg of the tobacco tar used by theelectronic cigarette 300 in the tobacco tar type library, and can estimate the nicotine generation amount approximately according to the tobacco tar consumption amount of theelectronic cigarette 300. Specifically, the preset period is a preset time period, and when one preset period is completed, a new preset period is started to be timed; specifically, the preset period may be 2 hours, 12 hours, 24 hours, or the like. The first nicotine smoking amount is the amount of nicotine smoked by the user recorded by thecloud server 100 from the beginning stage of the current preset period to the time when the smoking amount information is received. The second nicotine intake amount is the sum of the first nicotine intake amount and the nicotine intake amount of the current nicotine generation amount, and it can be understood that the second nicotine intake amount is the total nicotine intake amount of the user from the beginning of the preset period to before the information of the intake amount is received. The total nicotine smoking amount is the total nicotine smoking amount of the user recorded by thecloud server 100 in the last completed preset period.
Preferably, referring to fig. 5, the method for detecting smoking amount of an electronic cigarette further includes:
step S21: judging whether the difference between the third nicotine smoking amount in a preset sub-period after two adjacent preset sub-periods and the third nicotine smoking amount in the last preset sub-period exceeds a first threshold value; if the difference between the third nicotine intake in the next preset sub-period and the third nicotine intake in the previous adjacent preset sub-period exceeds the first threshold, executing step S22; otherwise, continuing to execute step S21;
step S22: marking the latter preset sub-period as excessive smoking;
s23, detecting the number of the excessive suckers marked in the preset period;
step S24: judging whether the number of the over-suckers exceeds a preset limit number, and if the number of the over-suckers exceeds the preset limit number, executing the step S25; otherwise, returning to execute the step S21;
step S25: second alarm information is generated.
In this embodiment, the preset period includes a plurality of preset sub-periods, and the time of each preset sub-period is equal; for example, the predetermined period is 24 hours, and 12 predetermined sub-periods of 2 hours may be included. And when one preset sub-period is finished, starting a second preset sub-period, and sequentially carrying out the steps until all the preset sub-periods in the preset period are finished. And detecting and comparing the smoking amount in the adjacent preset sub-periods to judge whether the smoking amount is suddenly increased in a short time in the preset period, and timely reminding the user of proper smoking by sending second alarm information to themobile terminal 200. The third nicotine intake is the total amount of nicotine ingested by the user during a complete predetermined sub-period. For example, when the third nicotine intake for the previous predetermined sub-period is 20 mg and the third nicotine intake for the next following predetermined sub-period is 40 mg, the difference between the nicotine intakes for the two predetermined sub-periods is 20 mg, and when the first threshold is 10 mg, it is known that the following predetermined sub-period is over-nicotine intake, the following predetermined sub-period is identified as over-intake; similarly, when the difference in nicotine intake during the next predetermined sub-period of the next predetermined sub-period exceeds the first threshold, the next predetermined sub-period of the next predetermined sub-period is identified as over-intake. When the plurality of over-smoking identifiers are stored, it can be known that the smoking amount of theelectronic cigarette 300 in the preset period of the user is in an increasing state, second alarm information is generated and sent to themobile terminal 200, and the user is reminded of smoking moderately.
Preferably, referring to fig. 6, the smoking amount detecting method further includes:
step S31: judging whether the current time is the termination time of a preset period or not; if the current time is the end time of the preset period, executing step S32; otherwise, returning to continue to execute the step S31;
step S32: acquiring a second nicotine smoking amount of the current preset period;
step S33: and judging whether the second nicotine smoking amount in the current preset period exceeds the nicotine smoking total amount in the last preset period, if so, executing the step S34, otherwise, returning to continue executing the step S14.
Step S34: first feedback information is generated.
In this embodiment, it is determined whether the smoking amount detection of one preset period is completed, and when the smoking amount detection of the preset period is completed, the second nicotine smoking amount at the current time is obtained, and it can be understood that the second nicotine smoking amount at the current time is the nicotine smoking amount accumulated from the beginning to the end of the preset period. If the nicotine smoking amount in the current preset period is less than the nicotine smoking total amount in the last preset period, it indicates that the user of theelectronic cigarette 300 has reduced the smoking amount, and generates the first feedback information. The first feedback information represents that the user effectively controls the times of smoking the electronic cigarette in the current preset period time. In some embodiments, the first feedback information may be used for a point reward for the smoking control competition. Thecloud server 100 takes the total nicotine smoking amount through monitoring, and takes a preset period as a unit, if the preset period is set to be one month or one week, if the nicotine smoking amount is reduced in the month compared with the last month, first feedback information is generated, which indicates that the smoking amount of the electronic cigarette is effectively reduced, and theelectronic cigarette 300 user points are awarded, and the points can be used for direct exchange and purchase of commodities in a mall.
Preferably, referring to fig. 7, step S33 further includes:
step S41: judging whether the second nicotine smoking amount in the current preset period is less than the first threshold value compared with the nicotine smoking total amount in the last preset period, and executing the step S42 if the second nicotine smoking amount in the current preset period is less than the first threshold value compared with the nicotine smoking total amount in the last preset period; otherwise, returning to continue executing the step S43;
step S42: generating first feedback information;
step S43: and generating third feedback information.
In this embodiment, in addition to that the nicotine intake amount meeting the current preset period is less than the nicotine intake total amount of the previous preset period, it is also required to determine whether the second nicotine intake amount meeting the current preset period is less than a first threshold value compared with the nicotine intake total amount of the previous preset period, for example, the first threshold value is 20%, and only if the second nicotine intake amount meeting the current preset period is less than 20% compared with the nicotine intake total amount of the previous preset period, the first feedback information can be obtained for the smoking control competition. If the sum of the total points of the cigarette smoke control competition is less than 20%, third feedback information which does not meet the conditions is generated, and in the cigarette smoke control competition, the third feedback information can be used for informing the user that the challenge fails, points cannot be obtained, or points need to be deducted.
Preferably, referring to fig. 8, after step S32, the method further includes:
step S51: identifying the second nicotine puff for the current preset period as a preset period nicotine puff for the user;
step S52: uploading the nicotine smoking amount of the user in the preset period to a nicotine smoking amount ranking set;
step S53: obtaining a nicotine intake ranking order of the nicotine intake ranking set;
step S54: and generating second feedback information according to the nicotine smoking amount ranking sequence.
In this embodiment, the nicotine smoking amount ranking set is set up by the cloud server, and includes the second nicotine smoking amount of the plurality of users of theelectronic cigarette 300 in the current preset period. The nicotine smoking amount of the user in the preset period is collected and sequenced, the sequencing mode is that the smoking amount is smaller, the ranking is higher, and second feedback information is generated according to the ranking, so that when a smoking control game is set, the user can be rewarded according to the second feedback information, for example, the user who ranks the top three is rewarded with points. In some embodiments, there may also be a label in order of decreasing amount of nicotine overall smoking: and if the nicotine smoking amount in the current preset period is ranked in a way of reducing the percentage of the nicotine smoking amount in the last preset period, the reduced percentage is about high, and the obtained ranking is higher.
Preferably, referring to fig. 9, the method for controlling an electronic cigarette applied to themobile terminal 200 specifically includes:
step S61: after the mobile terminal establishes communication connection with the electronic cigarette, smoking amount information is generated;
step S62: sending smoking amount information to a cloud server;
step S63: judging whether first alarm information of the cloud server is received or not; if the first alarm information of the cloud server is received, executing step S64; otherwise, continuing to execute step S63;
step S64: and informing a user of the first alarm information.
In this embodiment, theelectronic cigarette 300 establishes a communication connection with themobile terminal 200 at the start, so as to send the smoking amount information of theelectronic cigarette 300 to the cloud server. Specifically, the smoking amount information is obtained by acquiring tobacco tar consumption and electronic cigarette smoking times within a preset time of the electronic cigarette; and calculating by thecloud server 100 to obtain the nicotine smoking condition according to the tobacco tar consumption and the electronic cigarette smoking times. When thecloud server 100 detects that the user excessively sucks nicotine, themobile terminal 200 directly displays the nicotine sucking amount information through numerical values or displays the nicotine intake condition within the preset time in the form of tables such as a line graph and the like to remind the user to control the electronic cigarette to be sucked so as to reduce the nicotine intake. The user can more intuitively know the nicotine intake condition of the user through the application program of the mobile terminal, and the smoking amount of the electronic cigarette is controlled.
In the above embodiment, themobile terminal 200 sends the smoking amount information of theelectronic cigarette 300 to thecloud server 100, and by using the computing capability and the storage capability of thecloud server 100, the smoking amount can be monitored and detected, the smoking habit of theelectronic cigarette 300 of the user is recorded, and when the user excessively smokes, an alarm is given to remind the user to control the frequency of smoking the electronic cigarette. Meanwhile, when the smoking amount of the user is obviously reduced, feedback information is generated to encourage the user to continue smoking control. Instructing smokers to reasonably smoke the electronic cigarettes and appropriately quit smoking.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.