Sample adding control method and device for tobacco essence and electronic equipment
By detecting the type and environmental information of the fragrance, setting the target weight and monitoring the weight sensor to generate control information, and adding samples in small quantities in succession, the hysteresis error problem in the process of filling the fragrance for tobacco is solved, and precise control and automated sampling is achieved.
Patent Information
- Application Number
- CN202311844573.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, the sampling loading process of tobacco flavors is inaccurate due to the hysteresis error problem of gravity sensors, and the sampling volume cannot be effectively controlled, which can easily lead to overweight or insufficient.
By detecting the flavor type and environmental information, querying the filling control information, setting the target weight and monitoring the weight sensor, generating control information to control the solenoid valve to add samples in a small amount in succession until the weight to be adjusted is reached, and the error database and environmental information are updated to achieve precise control.
Accurate sample addition in the case of hysteresis error of gravity sensors is achieved, reducing the impact of hysteresis errors, ensuring the final sample addition results are accurate, and there is no manual intervention in the entire process.
Smart Images

Figure CN120353193A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to intelligent control technology, and in particular to a method, device, and electronic device for controlling the addition of tobacco flavoring. Background Art
[0002] The process of adding tobacco flavoring is generally as follows: The tobacco flavoring in the storage bottle is squeezed into the conduit under the action of an introduced gas source. When production blending is required, the controller controls the solenoid valve connected to the other end of the conduit to open, allowing the tobacco flavoring to enter the sampler through the solenoid valve and drip into the blending bottle from the sampler. After the weight sensor detects that the weight of the blending bottle reaches the target weight, the solenoid valve is closed to complete the addition process. However, in actual situations, due to the hysteresis error problem of the gravity sensor, the actual weight when the gravity sensor detects the target weight has not reached the target weight, and simply increasing the opening time of the solenoid valve easily leads to overweight addition. Currently, there is no method that can precisely control the addition process of tobacco flavoring. Summary of the Invention
[0003] To solve the above problems, one or more embodiments of this specification describe a method, device, and electronic device for controlling the addition of tobacco flavoring.
[0004] According to a first aspect, there is provided a method for controlling the addition of tobacco flavoring, the method comprising: After detecting an addition instruction, determining the flavor type information of the target tobacco flavoring being added, and querying filling control information based on the flavor type information and environmental information, the filling control information including the single filling duration and the target opening amplitude of the solenoid valve, the single filling duration being the duration through which the target tobacco flavoring exactly fills the sampler orifice tube, the environmental information including temperature information, pressure information, and humidity information, and the solenoid valve being provided at the inlet of the sampler; Determining the weight to be blended of the target tobacco flavoring, and setting a target weight based on the weight to be blended, the target weight being less than the weight to be blended; Monitoring the detected weight of the weight sensor, and when the detected weight reaches the target weight, generating control information for instructing the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time a first preset waiting duration elapses, until the detected weight reaches the weight to be blended.
[0005] Preferably, setting the target weight based on the weight to be blended includes: Querying the weight to be blended in a preset error database to obtain an error weight, the error database storing the mapping relationship between the weight to be blended and the error weight; Set the error weight to the target weight.
[0006] Preferably, the filling control information further includes the single filling mass, which is the mass of the target tobacco flavor that can exactly fill the pipette hole tube. After generating the control information, it further includes: After a second preset waiting duration, determine the first weight difference between the weight to be blended and the detected weight, and determine the remaining number of times based on the first weight difference and the single filling mass. Display the remaining number of times on the target interface.
[0007] Preferably, after determining the remaining number of times based on the first weight difference and the single filling mass, it further includes: When the remaining number of times is not an integer, generate a cancellation message, which is used to indicate that the solenoid valve stops working after completing the current filling. After a third preset waiting duration, determine the second weight difference between the weight to be blended and the detected weight, and determine the target pipette hole tube among the candidate pipette hole tubes based on the second weight difference. The target single filling mass corresponding to the target pipette hole tube can be divided evenly by the second weight difference. Generate a replacement reminder message based on the target pipette hole tube.
[0008] Preferably, after generating the control information, it further includes: After the second preset waiting duration, obtain a captured image of the blending bottle, determine the liquid level height of the blending bottle based on the captured image, and calculate the estimated weight based on the liquid level height. Compare the estimated weight and the detected weight to generate an error judgment result.
[0009] Preferably, the error judgment result includes a first error judgment result and a second error judgment result. The comparing the estimated weight and the detected weight to generate an error judgment result includes: Compare the estimated weight and the detected weight. When the third weight difference between the estimated weight and the detected weight is less than the preset difference, generate a first error judgment result, which is used to characterize that the weight sensor detects normally. When the third weight difference between the estimated weight and the detected weight is not less than the preset difference, generate a second error judgment result, which is used to characterize that the weight sensor detects abnormally.
[0010] Preferably, the method further includes: When the environmental information is updated, query the filling control information again.
[0011] According to a second aspect, a sample addition control device for tobacco flavor is provided. The device includes: A detection module, configured to, after detecting a sample addition instruction, determine the flavor type information of the target tobacco flavor being added, query filling control information based on the flavor type information and environmental information, where the filling control information includes the single filling duration and the target opening amplitude of the solenoid valve. The single filling duration is the duration that the target tobacco flavor just fills the sample addition orifice tube completely. The environmental information includes temperature information, pressure information, and humidity information. The solenoid valve is disposed at the inlet of the sample addition device; A determination module, configured to determine the weight to be blended of the target tobacco flavor, and set a target weight based on the weight to be blended, where the target weight is less than the weight to be blended; A control module, configured to monitor the detected weight of the weight sensor, and when the detected weight reaches the target weight, generate control information, where the control information is used to instruct the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time a first preset waiting duration elapses, until the detected weight reaches the weight to be blended.
[0012] According to a third aspect, an electronic device is provided, including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method provided in the first aspect or any one of the possible implementation manners of the first aspect.
[0013] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. Instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer or a processor, the computer or the processor is caused to execute the method provided in the first aspect or any one of the possible implementation manners of the first aspect.
[0014] The method and device provided in the embodiments of this specification can consider the hysteresis error problem of the gravity sensor. When the detected weight of the gravity sensor is about to reach the weight to be dispensed, control information is generated according to the filling control information, so as to control the solenoid valve to add samples in small amounts successively through the control information until the detected weight reaches the weight to be dispensed. Through such a sample addition method, the influence of adding samples in small amounts successively on the hysteresis error can be ignored. And during the precise control process of adding samples successively, the hysteresis error caused by adding a large amount of samples in the early stage will gradually recover, so that the sample addition result corresponding to when the final detected weight reaches the weight to be dispensed is relatively accurate, and the whole process can be realized intelligently without manual participation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0016] Figure 1 It is a schematic flowchart of a method for controlling the addition of tobacco flavor in an embodiment of this specification.
[0017] Figure 2 It is a schematic diagram of the principle of the tobacco flavor addition process in an embodiment of this specification.
[0018] Figure 3 It is a schematic diagram of the principle of controlling the successive sample addition process by control information in an embodiment of this specification.
[0019] Figure 4 It is a schematic structural diagram of a device for controlling the addition of tobacco flavor in an embodiment of this specification.
[0020] Figure 5 It is a schematic structural diagram of an electronic device in an embodiment of this specification. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.
[0022] In the following description, the terms "first" and "second" are for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments that contain one or more of all other possible combinations of A, B, C, and D, even if such embodiments may not be explicitly described in the following content.
[0023] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes can be made to the functions and arrangements of the described elements without departing from the scope of the present application. Various processes or components can be appropriately omitted, substituted, or added to each example. For example, the described method can be performed in a different order than the described order, and various steps can be added, omitted, or combined. In addition, the features described for some examples can be combined into other examples.
[0024] See Figure 1 , Figure 1 is a schematic flow diagram of a method for controlling the addition of tobacco flavor provided by an embodiment of the present application. In the embodiment of the present application, the method includes: S101. After detecting the addition instruction, determine the flavor type information of the target tobacco flavor being added, and query the filling control information based on the flavor type information and environmental information.
[0025] Among them, the filling control information includes the single filling duration and the target opening amplitude of the solenoid valve. The single filling duration is the duration required for the target tobacco flavor to exactly fill the sampling tube. The environmental information includes temperature information, pressure information, and humidity information. The solenoid valve is provided at the inlet of the sampler.
[0026] The execution subject of the present application can be a controller.
[0027] In the embodiment of this specification, the schematic diagram of the principle of the addition process is as Figure 2As shown, when the staff generates a sample addition instruction through operations on the corresponding terminal, controls the solenoid valve to fully open, and starts the entire sample addition process, the controller will detect the sample addition instruction. The controller will parse the sample addition instruction to determine the flavor type information of the target tobacco flavor for the current sample addition process based on the additional information of the instruction. Tobacco flavors are fluids with a certain viscosity. Under the action of different environmental information such as temperature, pressure, and humidity, tobacco flavors with different flavor type information will exhibit different viscosities. In order to precisely control the entire sample addition process, the controller needs to determine the current viscosity of the target tobacco flavor. Specifically, the controller can query the data in the filling database to determine the filling control information corresponding to the flavor type information and environmental information, and use this filling control information to represent the viscosity of the target tobacco flavor under the current environmental information.
[0028] As an example, the staff can pre-adjust the environmental information in a test environment where the environmental information can be changed and collect the filling control information of various types of tobacco flavors under different environmental information. Finally, by summarizing these information, a mapping relationship between cigarette type information, environmental information, and filling control information is generated to construct a filling database. In the actual process, the controller only needs to query the filling database based on the cigarette type information and environmental information to obtain the corresponding filling control information. Among them, the reason why the filling control information also includes the target opening amplitude of the solenoid valve is that although a single filling duration can be obtained corresponding to different opening amplitudes of the solenoid valve, in some cases, the single filling duration may be too long, affecting the overall sample addition efficiency. Therefore, a filling duration range can be preset, and a set of filling control information is selected within this range, and this set of filling control information is used as the data in the filling database. In addition, when there are multiple sets of selectable filling control information within the preset range, any set can be selected as the data in the filling database.
[0029] S102. Determine the weight to be blended of the target tobacco flavor, and set a target weight based on the weight to be blended.
[0030] Among them, the target weight is less than the weight to be blended.
[0031] In the embodiments of this specification, the weight to be dispensed is the weight that is expected to be achieved after adding the target tobacco flavoring to the dispensing bottle theoretically. Due to the obvious hysteresis in the detected weight of the gravity sensor during continuous and large-scale sample addition, that is, when the elastic element is loaded, a moment that causes the bottom surface to move outward will inevitably be generated. When the load is removed, due to the existence of the bottom surface friction moment, the moment that causes the bottom surface to move back is less than the moment that causes the bottom surface to move outward during deformation, which blocks the recovery of the deformation of the elastic element and generates a hysteresis error. This makes it so that after continuously and largely adding samples until the detected weight of the gravity sensor reaches the weight to be dispensed, if the sample addition stops, after a period of time, the detected weight will decrease and be lower than the weight to be dispensed. For this reason, this application divides the entire sample addition process into two segments. The first segment is a conventional large-scale sample addition process, and the second segment is a process of adding samples one by one in small amounts. In this way, it is not easy to generate obvious hysteresis in the second segment, which can ensure the accuracy of the detected weight during the second segment of the sample addition process. To divide the sample addition process, the controller will set a target weight lower than the weight to be dispensed according to the weight to be dispensed. As long as the detected weight reaches the target weight, the second segment of the process of adding samples one by one in small amounts will be carried out. Among them, the setting of the target weight can be set according to a certain proportion of the weight to be dispensed (for example, 95% of the weight to be dispensed), or according to the manual experience of the hysteresis error, corresponding target weights are set for different weights to be dispensed, and a database storing the mapping relationship between the two is constructed. In actual situations, the corresponding target weight can be determined through querying the database.
[0032] In an implementable manner, setting the target weight based on the weight to be dispensed includes: Query the weight to be dispensed in a preset error database to obtain an error weight. The mapping relationship between the weight to be dispensed and the error weight is stored in the error database; Set the error weight as the target weight.
[0033] In the embodiments of this specification, the controller may pre-store an error database. According to the manual experience of the hysteresis error, corresponding error weights are set for different weights to be dispensed. The error weight may be the weight at which the detected weight drops from the weight to be dispensed under the influence of hysteresis. Finally, the controller will use the queried error weight as the target weight.
[0034] S103. Monitor the detected weight of the weight sensor. When the detected weight reaches the target weight, generate control information.
[0035] Among them, the control information is used to instruct the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time the first preset waiting duration elapses until the detected weight reaches the weight to be dispensed.
[0036] In the embodiments of this specification, the controller continuously monitors the detected weight of the weight sensor. When the detected weight reaches the target weight, the controller considers that the actual weight is almost reaching the weight to be formulated. At this time, the controller generates control information to control the solenoid valve for the next stage of the sample addition process. Under the control of the control information, the solenoid valve first enters the closed state, and then every time the first preset waiting duration (e.g., 20 s) elapses, it will open the valve according to the target opening amplitude and close after maintaining the single filling duration in the open state. Through the cycle of this process, the target tobacco flavor will be added to the formulation bottle in multiple small amounts. Each small addition will not cause obvious lag problems again, and during the multiple addition process, the lagging effect caused by the large amount of sample addition in the previous stage has been eliminated. When the final detected weight reaches the weight to be formulated, it means that the actual weight really reaches the weight to be formulated, and thus the control can be ended to complete the entire sample addition process flow.
[0037] Among them, as Figure 3 shown, the reason why this application selects the duration that the target tobacco flavor exactly fills the sampling tube as the single filling duration is considered that when the sampling tube of the sampler just touches the bottom of the formulation bottle, after the solenoid valve is closed, the tobacco flavor in the sampling tube of the sampler will be exactly filled, and at this time, the tobacco flavor in the sampling tube just contacts the tobacco flavor in the formulation bottle. At this time, due to the viscosity of the tobacco flavor, under the action of the negative pressure between the formulation bottle and the sampler, the tobacco flavor in the sampling tube will be completely squeezed into the formulation bottle. This can ensure that each newly added tobacco flavor is completely added to the formulation bottle, and at the same time, the tobacco flavor added each time is exactly the amount of the tobacco flavor with the volume of the sampling tube, which is convenient for accurately determining the quality of the tobacco flavor added each time. Among them, for the situation where negative pressure cannot be formed independently, the solenoid valve can be set to apply air pressure to the sampler after the solenoid valve is closed to actively form negative pressure.
[0038] In an implementable manner, the filling control information further includes the single filling mass, and the single filling mass is the mass of the target tobacco flavor that can exactly fill the sampling tube of the sampler; After generating the control information, it further includes: After the second preset waiting duration, determine the first weight difference between the weight to be formulated and the detected weight, and determine the remaining number of times based on the first weight difference and the single filling mass; Display the remaining number of times on the target interface.
[0039] In the embodiments of this specification, in the foregoing embodiments, only the filling duration for each time can be accurately controlled for each sample addition, but it is difficult for the staff waiting beside to intuitively understand how many more times of sample addition are needed to complete the sample addition process. Therefore, the filling control information may further include the single filling mass, which can also be tested in the test environment and then entered into the filling database for storage. Since it takes some time to eliminate the hysteresis error of the weight sensor, the controller will not immediately calculate the number of times when entering the stage of successive small sample additions. Instead, it waits for a second preset duration (e.g., 30 s). After the second preset duration, the controller considers that the error of the weight sensor has been eliminated at this time and the detected data is accurate enough. At this time, the controller will perform a division operation based on the first weight difference between the detected weight and the weight to be dispensed, and the single weight corresponding to the single filling mass, to obtain the remaining number of times. After determining the remaining number of times, the controller will display the remaining number of times on the target interface of the target terminal used by the staff, so that the staff can intuitively understand how many more times of sample addition the process will perform by observing the target interface.
[0040] In an implementable manner, after determining the remaining number of times based on the first weight difference and the single filling mass, it further includes: When the remaining number of times is not an integer, a cancellation message is generated, and the cancellation message is used to instruct the solenoid valve to stop working after completing the current filling; After a third preset waiting duration, determine the second weight difference between the weight to be dispensed and the detected weight, and determine the target sample addition tube among the candidate sample addition tubes based on the second weight difference. The target single filling mass corresponding to the target sample addition tube can be divided evenly by the second weight difference; Generate a replacement reminder message based on the target sample addition tube.
[0041] In the embodiments of this specification, in some cases, the first weight difference and the single filling mass cannot be divided evenly. This means that when adding samples successively according to the current single filling mass, it is impossible to accurately reach the weight to be prepared anyway. To avoid this situation, when the controller determines that the remaining number of times is not an integer, it will first generate a cancellation message to cancel the successive sample addition process controlled by the control information. Then, since the orifice tube of the sampler can be replaced and the sampler is generally equipped with multiple orifice tubes of different thicknesses, during the process of testing data in the test environment and constructing the filling database, the filling control information corresponding to different thicknesses of orifice tubes can also be tested and stored respectively. Considering that when canceling the operation, the sampler is already in the process of this sample addition, the cancellation message will not cancel the current ongoing sample addition process, but only the subsequent sample addition processes. Therefore, the controller will first wait for a third preset waiting duration (such as 20 s) until the current sample addition is completed, and then re-determine the second weight difference. By comparing the second weight difference with the single filling mass corresponding to each orifice tube, the target sampler orifice tube that can make the remaining number of times divisible can be determined, and the controller will generate a replacement reminder message with the target sampler orifice tube and send it to the target terminal of the staff to remind the staff to replace the orifice tube.
[0042] In an implementable manner, after generating the control information, it further includes: After the second preset waiting duration, obtain a captured image of the dispensing bottle, determine the liquid level height of the dispensing bottle based on the captured image, and calculate an estimated weight based on the liquid level height; Compare the estimated weight with the detected weight to generate an error judgment result.
[0043] In the embodiments of this specification, considering that as the service life increases and the equipment components age and are damaged, there is still a possibility of error in the detection result after eliminating the hysteresis error. After waiting for the second preset waiting duration to eliminate the hysteresis error, the controller will collect a captured image of the dispensing bottle through the camera and perform image recognition on the captured image to determine the liquid level height of the dispensing bottle. Based on parameters such as the liquid level height, the inner diameter width of the dispensing bottle, and the weight of the dispensing bottle itself, the controller can estimate the weight of the dispensing bottle at this time to obtain an estimated weight. Then, the controller will compare the estimated weight with the detected weight and generate an error judgment result. The staff can obtain this error judgment result to judge whether there is an abnormality in the detected value of the weight sensor and decide whether to perform corresponding control operations to interfere with the current sample addition process according to the judgment result.
[0044] In an implementable manner, the error judgment result includes a first error judgment result and a second error judgment result; Comparing the estimated weight and the detected weight to generate an error judgment result, including: Comparing the estimated weight and the detected weight; When a third weight difference between the estimated weight and the detected weight is less than a preset difference, generating a first error judgment result, where the first error judgment result is used to characterize that the weight sensor is detecting normally; When the third weight difference between the estimated weight and the detected weight is not less than the preset difference, generating a second error judgment result, where the second error judgment result is used to characterize that the weight sensor is detecting abnormally.
[0045] In the embodiments of the present specification, considering that the estimated weight is a predicted value and there will be certain errors itself, as long as the difference between the estimated weight and the detected weight is within the preset error, it is considered that the weight sensor is normal, otherwise it is considered that the weight sensor is abnormal. According to different comparison results, the controller will generate different error judgment results to send to the target terminal of the staff to inform the staff of the current situation of the weight sensor. The staff can stop the sample addition process in time after finding that the weight sensor is abnormal to avoid inaccurate weight to be blended in the blending bottle and affecting the quality of the products produced subsequently.
[0046] In an implementable manner, the method further includes: When the environmental information is updated, re-querying the filling control information.
[0047] In the embodiments of the present specification, during the sample addition process, the environmental information may change over time. Therefore, the controller will also continuously obtain the latest environmental information through temperature sensors, humidity sensors, etc. When the controller finds that the environmental information has changed and is updated, the controller will re-query the filling control information that matches the latest environmental information to ensure the accuracy of the sample addition process in real time.
[0048] Next, the sample addition control device for tobacco flavor provided in the embodiments of the present application will be introduced in detail. It should be noted that the sample addition control device for tobacco flavor shown in the appendix Figure 4 , is used to execute the method of the embodiments of the present application. For the convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, please refer to the embodiments shown in the appendix Figure 4 of the present application. Figure 1 Shown in Figure 1 of the present application.
[0049] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a sample addition control device for tobacco flavor provided in the embodiments of the present application. As shown in Figure 4 , the device includes: The detection module 401 is configured to, after detecting a sample addition instruction, determine the flavor type information of the target tobacco flavor being added, query filling control information based on the flavor type information and environmental information, where the filling control information includes the single filling duration and the target opening amplitude of the solenoid valve. The single filling duration is the duration that the target tobacco flavor exactly fills the sample addition tube orifice. The environmental information includes temperature information, pressure information, and humidity information. The solenoid valve is disposed at the inlet of the sample addition device; The determination module 402 is configured to determine the weight of the target tobacco flavor to be blended, and set a target weight based on the weight to be blended, where the target weight is less than the weight to be blended; The control module 403 is configured to monitor the detected weight of the weight sensor. When the detected weight reaches the target weight, generate control information, where the control information is used to instruct the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time a first preset waiting duration elapses, until the detected weight reaches the weight to be blended.
[0050] In an implementable manner, the determination module 402 is specifically configured to: Query the weight to be blended in a preset error database to obtain an error weight. The error database stores the mapping relationship between the weight to be blended and the error weight; Set the error weight as the target weight.
[0051] In an implementable manner, the filling control information further includes the single filling mass, where the single filling mass is the mass of the target tobacco flavor that can exactly fill the sample addition tube orifice; The control module 403 is specifically configured to: After a second preset waiting duration, determine a first weight difference between the weight to be blended and the detected weight, and determine the remaining number of times based on the first weight difference and the single filling mass; Display the remaining number of times on a target interface.
[0052] In an implementable manner, the control module 403 is further specifically configured to: When the remaining number of times is not an integer, generate a cancellation information, where the cancellation information is used to instruct the solenoid valve to stop working after completing the current filling; After a third preset waiting duration, determine a second weight difference between the weight to be blended and the detected weight, and determine a target sample addition tube orifice among candidate sample addition tube orifices based on the second weight difference. The target single filling mass corresponding to the target sample addition tube orifice can be divided evenly by the second weight difference; Generate a replacement reminder information based on the target sample addition tube orifice.
[0053] In one possible implementation, the control module 403 is further specifically configured to: After the second preset waiting duration, obtain a captured image of the dispensing bottle, determine the liquid level height of the dispensing bottle based on the captured image, and calculate an estimated weight based on the liquid level height; Compare the estimated weight with the detected weight to generate an error judgment result.
[0054] In one possible implementation, the error judgment result includes a first error judgment result and a second error judgment result; The control module 403 is further specifically configured to: Compare the estimated weight with the detected weight; When a third weight difference between the estimated weight and the detected weight is less than a preset difference, generate a first error judgment result, where the first error judgment result is used to indicate that the weight sensor detects normally; When the third weight difference between the estimated weight and the detected weight is not less than the preset difference, generate a second error judgment result, where the second error judgment result is used to indicate that the weight sensor detects abnormally.
[0055] In one possible implementation, the device further includes: An update module, configured to re-query the filling control information when the environment information is updated.
[0056] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented by means of software and / or hardware. The "units" and "modules" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), etc.
[0057] Each processing unit and / or module of the embodiments of the present application can be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or can be implemented by software that executes the functions described in the embodiments of the present application.
[0058] See Figure 5 , which shows a schematic structural diagram of an electronic device related to an embodiment of the present application. This electronic device can be used to implement Figure 1 the method in the shown embodiment. As Figure 5 shown, the electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0059] Among them, the communication bus 502 is used to realize the connection and communication between these components.
[0060] Among them, the user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may further include a standard wired interface and a wireless interface.
[0061] Among them, the network interface 504 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0062] Among them, the processor 501 may include one or more processing cores. The processor 501 connects various parts within the entire electronic device 500 through various interfaces and lines. By running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and by calling the data stored in the memory 505, it executes various functions of the electronic device 500 and processes data. Optionally, the processor 501 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 501 may integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, the user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 501 and may be implemented separately by a single chip.
[0063] Among them, the memory 505 may include a Random Access Memory (RAM), or may also include a Read-Only Memory. Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store the data involved in the above-mentioned method embodiments. Optionally, the memory 505 may also be at least one storage device located far from the aforementioned processor 501. As Figure 5 shown, in the memory 505 as a computer storage medium, there may be included an operating system, a network communication module, a user interface module, and program instructions.
[0064] In Figure 5 the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user to obtain the data input by the user; and the processor 501 can be used to call the sample addition control application program for cigarette flavor stored in the memory 505 and specifically perform the following operations: After detecting the sample addition instruction, determine the flavor type information of the target cigarette flavor being added, query the filling control information based on the flavor type information and the environmental information, the filling control information includes the single filling duration and the target opening amplitude of the solenoid valve, the single filling duration is the duration that the target cigarette flavor just fills the sample addition tube hole, the environmental information includes temperature information, pressure information and humidity information, and the solenoid valve is arranged at the inlet of the sample addition device; Determine the weight to be blended of the target cigarette flavor, and set a target weight based on the weight to be blended, the target weight is less than the weight to be blended; Monitor the detected weight of the weight sensor, and when the detected weight reaches the target weight, generate control information, the control information is used to instruct the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time after the first preset waiting duration until the detected weight reaches the weight to be blended.
[0065] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nano-systems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0066] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0067] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0068] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling or communication connection can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0069] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0070] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0071] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned memory includes: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs, etc., which are various media that can store program codes.
[0072] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory, and the memory can include: flash drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc.
[0073] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. After considering the specification and practicing the present disclosure, those skilled in the art will readily think of other embodiments of the present disclosure. This application aims to cover any variations, uses, or adaptive changes of the present disclosure. These variations, uses, or adaptive changes follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for controlling the addition of tobacco flavor, characterized in that, The method includes: After detecting a sample addition instruction, determining the flavor type information of the target tobacco flavor being added, querying filling control information based on the flavor type information and environmental information, where the filling control information includes the single filling duration and the target opening amplitude of the solenoid valve. The single filling duration is the duration for the target tobacco flavor to exactly fill the sample addition tube. The environmental information includes temperature information, pressure information, and humidity information. The solenoid valve is provided at the inlet of the sample addition device; Determining the weight to be blended of the target tobacco flavor, and setting a target weight based on the weight to be blended, where the target weight is less than the weight to be blended; Monitoring the detected weight of the weight sensor, and when the detected weight reaches the target weight, generating control information, where the control information is used to instruct the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time a first preset waiting duration elapses until the detected weight reaches the weight to be blended.
2. The method according to claim 1, characterized in that, The setting of the target weight based on the weight to be blended includes: Querying the weight to be blended in a preset error database to obtain an error weight, where the error database stores the mapping relationship between the weight to be blended and the error weight; Setting the error weight as the target weight.
3. The method according to claim 1, wherein The filling control information further includes the single filling mass, where the single filling mass is the mass of the target tobacco flavor that can exactly fill the sample addition tube; After generating the control information, it further includes: After a second preset waiting duration, determining a first weight difference between the weight to be blended and the detected weight, and determining the remaining number of times based on the first weight difference and the single filling mass; Displaying the remaining number of times on a target interface.
4. The method according to claim 3, wherein After determining the remaining number of times based on the first weight difference and the single filling mass, it further includes: When the remaining number of times is not an integer, generating a cancellation information, where the cancellation information is used to instruct the solenoid valve to stop working after completing the current filling; After a third preset waiting duration, determining a second weight difference between the weight to be blended and the detected weight, and determining a target sample addition tube among the candidate sample addition tubes based on the second weight difference, where the target single filling mass corresponding to the target sample addition tube can be divided evenly by the second weight difference; Generating a replacement reminder information based on the target sample addition tube.
5. The method according to claim 3, wherein After generating the control information, it further includes: After the second preset waiting duration, acquiring a captured image of the blending bottle, determining the liquid level height of the blending bottle based on the captured image, and calculating an estimated weight based on the liquid level height; Comparing the estimated weight and the detected weight, and generating an error judgment result.
6. The method according to claim 5, wherein The error judgment result includes a first error judgment result and a second error judgment result; The comparing the estimated weight and the detected weight and generating an error judgment result includes: Comparing the estimated weight and the detected weight; When a third weight difference between the estimated weight and the detected weight is less than a preset difference, generating a first error judgment result, where the first error judgment result is used to characterize that the weight sensor detects normally; When the third weight difference between the estimated weight and the detected weight is not less than a preset difference, a second error judgment result is generated, and the second error judgment result is used to indicate that the weight sensor detects abnormally.
7. The method according to claim 1, characterized in that, The method further includes: When the environmental information is updated, the filling control information is queried again.
8. A sample addition control device for tobacco flavor, characterized in that, The device includes: A detection module, configured to, after detecting a sample adding instruction, determine the flavor type information of the target tobacco flavor being added, and query filling control information based on the flavor type information and environmental information. The filling control information includes the single filling duration and the target opening amplitude of the solenoid valve. The single filling duration is the duration that the target tobacco flavor just fills the sample adding pipe orifice. The environmental information includes temperature information, pressure information, and humidity information. The solenoid valve is arranged at the inlet of the sample adding device; A determination module, configured to determine the weight to be blended of the target tobacco flavor, and set a target weight based on the weight to be blended, where the target weight is less than the weight to be blended; A control module, configured to monitor the detected weight of the weight sensor, and when the detected weight reaches the target weight, generate control information, where the control information is used to instruct the solenoid valve to open the valve amplitude to the target opening amplitude and maintain the single filling duration every time a first preset waiting duration elapses until the detected weight reaches the weight to be blended.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, on which a computer program is stored. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer or a processor, the computer or the processor is caused to execute the steps of the method according to any one of claims 1-7.