Disclosure of Invention
The invention provides a method for controlling the opening and closing of an intelligent cigarette box, which is used for at least solving one of the technical problems that the smoking behavior of a user cannot be effectively controlled, so that potential safety hazards are easily caused.
The invention provides a method for controlling the opening and closing of an intelligent cigarette box, which comprises the following steps: acquiring geographical position information of the intelligent cigarette box at the current moment and opening time information of the intelligent cigarette box, and determining a certain geographical position area of the intelligent cigarette box according to the geographical position information, wherein the certain geographical position area is a set of all geographical positions within a preset range radius of the geographical position of the cigarette box at the certain opening moment; acquiring geographical position information of the intelligent cigarette box at the previous moment, and calculating the speed of the intelligent cigarette box based on the geographical position information of the intelligent cigarette box at the current moment; judging whether the speed of the intelligent cigarette box is greater than a first preset threshold value or not; judging whether the altitude of the intelligent cigarette box is greater than a second preset threshold value or not according to the acquired geographical position information of the intelligent cigarette box at the current moment; if the speed of the intelligent cigarette box is greater than a first preset threshold value or the altitude of the intelligent cigarette box is greater than a second preset threshold value, forbidding the intelligent cigarette box to be opened; and if the speed of the intelligent cigarette box is not greater than a first preset threshold value, controlling the time interval for taking out the cigarettes and the quantity of the cigarettes according to a certain geographical position area where the intelligent cigarette box is located.
In addition, the method for controlling the opening and closing of the intelligent cigarette box according to the above embodiment of the present invention may further have the following additional technical features:
further, the preset range is 5m-300m in radius.
Further, the first preset threshold value is 60km/h, 80km/h, 100km/h or 120 km/h.
Further, the second preset threshold is 1000m, 1500m, 2000m, 3000m or 4000 m.
Further, before obtaining the geographical location information of the intelligent cigarette box at the current moment and the time information of the opening of the intelligent cigarette box, and determining a certain geographical location area of the intelligent cigarette box according to the geographical location information, the method further includes: and respectively controlling the intelligent cigarette box to be prohibited from opening or allowed to open based on the acquired prohibition signal or the permission signal transmitted by the external sensing device.
Further, after controlling the time interval for taking out the cigarettes and the quantity of the cigarettes taken out according to a certain geographical location area where the intelligent cigarette box is located if the speed of the intelligent cigarette box is not greater than a first preset threshold, the method includes: obtaining historical smoking data, wherein the historical smoking data comprises the cigarette box opening frequency in a certain geographical location area of a certain time period; judging whether the opening frequency of the intelligent cigarette box is smaller than a third preset threshold value or not; and if the opening frequency of the intelligent cigarette box is smaller than a third preset threshold value, adjusting the time interval for taking out the cigarettes and the quantity of the cigarettes when the intelligent cigarette box is in a certain geographical position area.
Further, the third preset threshold is one per hour or one per five hours.
Further wherein the inhibition of opening of said intelligent cigarette pack is determined by the following function: y is X1/A + X2/B, wherein X1 is the speed of the current intelligent cigarette box, X2 is the poster height of the current intelligent cigarette box, A is a constant and takes a value of 100km/h-200km/h, and B is a constant and takes a value of 1000m-6000 m; and when the value of Y is not less than 2, forbidding the intelligent cigarette box to open.
Further, wherein the number Z of cigarettes removed is controlled by the following function: and Z is X2/C + D, wherein X2 is the poster height of the current intelligent cigarette box, C is a constant and takes a value of 3000m-3500m, and D is a constant and takes a value of 3-5.
The invention also comprises a method for controlling smoking behavior, and the method for controlling the opening and closing of the cigarette box is adopted.
The method for controlling the smoking behavior can control the opening and closing of the cigarette case according to the difference of the geographic position and the time, and can automatically analyze the smoking behavior characteristics and the change of the smoking behavior characteristics according to the geographic position and the time record of the occurrence of the historical smoking behavior, so that the algorithm rule is changed, and the control of the smoking behavior is facilitated.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present 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.
As shown in fig. 1, the intelligent cigarette case in the present application includes a cigarette case body 10 and a cigarette case cover 20, wherein a cigarette taking opening 22 is formed in the cigarette case cover 20, and the size of the cigarette taking opening 22 corresponds to the diameter of one cigarette; the intelligent cigarette case still includes: a cigarette box lock 21, a cigarette detection sensor 11, and a controller 12; the cigarette box lock 21 and the cigarette detection sensor 11 are electrically connected with the controller 12; the cigarette box lock 21 is arranged on the cigarette box cover 20 and used for closing or opening the cigarette taking port under the control of the controller 12; the cigarette detection sensor 11 is disposed on an inner wall of the cigarette case body 10 on a side close to the cigarette taking opening 22, and is configured to detect cigarette information in the cigarette case body 10 and send a cigarette signal to the controller 12.
Referring to fig. 1, a flowchart of a method for controlling opening and closing of an intelligent cigarette box according to the present application is shown.
As shown in fig. 1, the method for controlling the opening and closing of the intelligent cigarette box specifically comprises the following steps:
step S101, obtaining geographical position information of the intelligent cigarette box at the current moment and opening time information of the intelligent cigarette box, and determining a certain geographical position area of the intelligent cigarette box according to the geographical position information, wherein the certain geographical position area is a set of all geographical positions within a preset range radius of the geographical position of the cigarette box at the certain opening moment.
It should be noted that the radius of the preset range is 5m to 300 m.
Step S102, obtaining the geographical position information of the intelligent cigarette box at the previous moment, and calculating the speed of the intelligent cigarette box based on the geographical position information of the intelligent cigarette box at the current moment.
And step S103, judging whether the speed of the intelligent cigarette box is greater than a first preset threshold value.
It should be noted that the first preset threshold is 60km/h, 80km/h, 100km/h or 120 km/h.
And step S104, judging whether the altitude of the intelligent cigarette box is greater than a second preset threshold value according to the acquired geographical position information of the intelligent cigarette box at the current moment.
It should be noted that the second preset threshold is 1000m, 1500m, 2000m, 3000m, or 4000 m.
Step S105, if the speed of the intelligent cigarette box is greater than a first preset threshold or the altitude of the intelligent cigarette box is greater than a second preset threshold, prohibiting the intelligent cigarette box from being opened.
In this embodiment, the prohibition of opening of the intelligent cigarette box is determined by the following function values: y is X1/A + X2/B, wherein X1 is the speed of the current intelligent cigarette box, X2 is the poster height of the current intelligent cigarette box, A is a constant and takes a value of 100km/h-200km/h, and B is a constant and takes a value of 1000m-6000 m; and when the value of Y is not less than 2, forbidding the intelligent cigarette box to open.
And step S106, if the speed of the intelligent cigarette box is not greater than a first preset threshold value, controlling the time interval for taking out the cigarettes and the quantity of the cigarettes taken out according to a certain geographical position area where the intelligent cigarette box is located.
In the present embodiment, the number of cigarettes removed is controlled by the following function: and Z is X2/C + D, wherein X2 is the poster height of the current intelligent cigarette box, C is a constant and takes a value of 3000m-3500m, and D is a constant and takes a value of 3-5. Control cigarette case lock 21 through controller 12 and open regularly to can realize the control and take out the time interval of cigarette, detect the quantity of taking out the cigarette from cigarette case body 10 and with quantity information transmission to controller 12 through cigarette detection sensor 11 in real time, because the mouth of getting the cigarette can only take out a cigarette once, when the quantity of taking out the cigarette equals the settlement number value, controller 12 control cigarette case lock 21 closes.
According to the method, the geographical position information of the intelligent cigarette box at the last moment is obtained, the speed of the intelligent cigarette box is calculated based on the geographical position information of the intelligent cigarette box at the current moment, whether the speed of the current intelligent cigarette box exceeds a speed threshold value or not can be judged, whether the altitude of the current intelligent cigarette box exceeds a height threshold value or not is judged, and therefore the altitude and the speed of the intelligent cigarette box are considered, whether the intelligent cigarette box is opened or not is comprehensively judged, the purpose of effectively controlling smoking behaviors of a user is achieved, and potential safety hazards caused by smoking when the user starts a vehicle or is in a high altitude state are avoided. And the time interval for taking out the cigarettes and the quantity of the cigarettes taken out are controlled according to a certain geographical position area where the intelligent cigarette box is located, so that the control of smoking behaviors is facilitated.
In some optional embodiments, the intelligent cigarette box is controlled to be prohibited from opening or allowed to open respectively based on the acquired prohibition signal or the permission signal transmitted by the external sensing device. In this way, specific control can be performed for the smoking prohibition area or the smoking permission area, thereby improving the convenience of smoking behavior control.
In some optional embodiments, historical smoking data is obtained, and the historical smoking data comprises the opening frequency of the cigarette box in a certain geographical location area of a certain time period; judging whether the opening frequency of the intelligent cigarette box is smaller than a third preset threshold value or not; and if the opening frequency of the intelligent cigarette box is smaller than a third preset threshold value, adjusting the time interval for taking out the cigarettes and the quantity of the cigarettes when the intelligent cigarette box is in a certain geographical position area. Therefore, the smoking behavior of a certain user can be adjusted and controlled according to the smoking frequency of the user, and the purposes of smoking quitting and smoking control for a specific user are achieved.
In particular, the third preset threshold is one per hour or one per five hours.
Referring to fig. 2, a flowchart of a method for controlling the opening and closing of an intelligent cigarette box according to an embodiment of the present application is shown.
As shown in fig. 2, the current time and geographical position are detected, the time and geographical position for taking out the cigarettes are recorded, the information is transmitted to the control system, and the control system forbids or allows the unlocking device of the cigarette box to be opened manually according to the algorithm rule, so that the taking out and putting in of the cigarettes are controlled, and the smoking behavior is controlled;
the algorithm rules can be adjusted according to the collected time and quantity of taking out and putting in the cigarettes and historical data of corresponding geographic positions;
classifying the geographic location as 2, 3, 4, or 5;
automatically classifying the geographical positions according to the mutual distance between the geographical positions where the cigarettes collected within a certain period are taken out and placed;
if the mutual distance of any 2 geographic positions is less than A m, the two geographic positions are set to be in the same classification, and the numerical value of A is 5-300;
setting the quantity and time intervals of the cigarettes which can be taken out in different geographical position categories within specific time, and adjusting the quantity and time intervals of the cigarettes which can be taken out in the corresponding geographical position categories within the corresponding specific time according to the record of historical smoking data if the smoking behavior frequency of the corresponding geographical position categories within the specific time is reduced and the reduction amount meets the preset condition;
the control system may set the number of cigarettes removed or placed at a time,
and calculating the speed of the cigarette box according to the current geographic position and the time signal, prohibiting or allowing manual operation to open the unlocking device of the cigarette box according to the speed value, and prohibiting manual operation to open the unlocking device of the cigarette box when the speed is more than 60km/h or 80km/h or 100km/h or 120 km/h.
The unlocking device for opening the cigarette box is prohibited or allowed to be manually operated according to the altitude value of the geographical position data, and is prohibited from being manually operated when the altitude is more than 1000m or 1500m or 2000m or 3000m or 4000 m.
In summary, the method can analyze and judge according to multiple factors such as time, geographical position, altitude, speed and the like, further control the opening and closing of the cigarette case, control the taking out and putting in of the cigarettes, further control smoking behaviors, and achieve the purposes of smoking cessation and smoking control.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.