Abnormal cigarette carton monitoring method, device, equipment, system and storage medium
By automatically obtaining token and production data, analyzing and comparing data abnormalities, automatic monitoring and abnormal reminders of tobacco production data are realized, and the problems of low monitoring frequency and high labor costs in the existing technology are solved, improving the timeliness and efficiency of data discovery.
Patent Information
- Application Number
- CN202510148731.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-02-11
AI Technical Summary
During tobacco production, it is difficult to timely discover the relationship between box cigarettes, strip cigarettes and piece cigarettes QR codes and report abnormalities, resulting in abnormal data backlog, and low manual monitoring frequency, high labor intensity and high cost.
By obtaining the token and building the time parameter request information, production data packets are automatically obtained from the box condition association system, and the number of reports that are displayed failed reporting, associated failure and reports are parsed and saved. Automatic monitoring and abnormal data reminders are realized based on the preset threshold and duration.
It realizes comprehensive and automatic monitoring of production data of the box condition-related system, improves monitoring frequency, reduces labor costs, and promptly discovers and reminds of abnormal data, avoiding the problem of long data discovery time caused by manual errors.
Smart Images

Figure CN120047166A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tobacco production, and in particular, to a method, device, equipment, system and storage medium for monitoring abnormal cigarette cases. Background Art
[0002] During the tobacco production process, a box condition association system is used to associate the two-dimensional codes on boxed cigarettes, the two-dimensional codes on strip cigarettes, and the two-dimensional codes on case cigarettes, and report them to the national tobacco bureau two-dimensional code control platform. In the actual production process, if the association between the two-dimensional codes on boxed cigarettes, the two-dimensional codes on strip cigarettes, and the two-dimensional codes on case cigarettes fails, or the reporting fails or there is a backlog during the process of reporting the association information to the national tobacco bureau two-dimensional code control platform, it will cause data anomalies in the box condition association system. In the prior art, staff log in to the box condition association system at a monitoring frequency of about half an hour / time to check whether there are data anomalies. This method has a low monitoring frequency and it is difficult to detect anomalies in a timely manner; if the monitoring frequency of the staff is shortened, it will increase the labor intensity of the staff and the labor cost. Summary of the Invention
[0003] To solve at least one of the above problems, the present invention provides a method, device, equipment, system and storage medium for monitoring abnormal cigarette cases.
[0004] First aspect, the present application provides a method for monitoring abnormal cigarette packets, including the following steps: Token acquisition step: Sending a request message for acquiring a token to the box condition association system; Receiving a login data packet from the box condition association system; Sending the login data packet to the analysis software; Receiving the token from the analysis software and saving it; First duration monitoring step: After receiving the token, timestamping the token and starting the timing. When the timing duration reaches the first preset duration, returning to the token acquisition step and refreshing the token; Production data acquisition step: Acquiring the current time and converting it into a time parameter; Constructing a request message including the time parameter and the token and sending it to the box condition association system; Receiving a production data packet from the box condition association system; Parsing the production data packet to obtain and save the number of reported failures shown, the number of associated failures shown, and the number of items being reported; Second duration monitoring step: Starting the timing when sending the request message including the time parameter and the token to the box condition association system. When the timing duration reaches the second preset duration, returning to the production data acquisition step; Abnormality judgment step: Comparing the currently saved number of reported failures shown with the previously saved number of reported failures shown; Comparing the currently saved number of associated failures shown with the previously saved number of associated failures shown; Comparing the currently saved number of items being reported and a preset threshold; When the currently saved number of reported failures shown is greater than the previously saved number of reported failures shown, and / or the currently saved number of associated failures shown is greater than the previously saved number of associated failures shown, sending a first data abnormality reminder message to the reminder device; When the currently saved number of items being reported is greater than the preset threshold, sending a second data abnormality reminder message to the reminder device.
[0005] Preferably, the abnormality judgment step further includes: When the currently saved number of reported failures shown is greater than the previously saved number of reported failures shown, and / or the currently saved number of associated failures shown is greater than the previously saved number of associated failures shown, sending the first data abnormality reminder message to the email of the second designated staff member in the form of an email through the email of the first designated staff member; When the currently saved number of items being reported is greater than the preset threshold, sending the second data abnormality reminder message to the email of the second designated staff member in the form of an email through the email of the first designated staff member.
[0006] Preferably, sending the first data abnormality reminder message to the reminder device in the abnormality judgment step includes sending the first data abnormality reminder message to a display screen for pop-up prompt, and sending the first data abnormality reminder message to an alarm device for alarm; Sending the second data abnormality reminder message to the reminder device includes sending the second data abnormality reminder message to a display screen for pop-up prompt.
[0007] Preferably, the range of the second preset duration is 0.5 - 5 min.
[0008] In a second aspect, the present application provides a monitoring device for abnormal cigarette cases. The device includes: an obtaining token module configured to send a request message for obtaining a token to a box condition association system, receive a login data packet from the box condition association system, send the login data packet to an analysis software, receive and save the token from the analysis software; a first duration monitoring module configured to timestamp the token and start timing after receiving the token, and when the timing duration reaches a first preset duration, return to the step of obtaining the token and refresh the token; an obtaining production data module configured to obtain the current time and convert it into a time parameter, construct a request message including the time parameter and the token and send it to the box condition association system, receive a production data packet from the box condition association system, parse the production data packet to obtain and save the number of reported failures shown, the number of associated failures shown, and the number of reports in progress shown; a second duration monitoring module configured to start timing when sending a request message including the time parameter and the token to the box condition association system, and when the timing duration reaches a second preset duration, return to the step of obtaining production data; an abnormal judgment module configured to compare the currently saved number of reported failures shown with the previously saved number of reported failures shown, compare the currently saved number of associated failures shown with the previously saved number of associated failures shown, compare the currently saved number of reports in progress shown with a preset threshold; when the currently saved number of reported failures shown is greater than the previously saved number of reported failures shown, and / or the currently saved number of associated failures shown is greater than the previously saved number of associated failures shown, send a first data abnormality reminder message to a reminder device; when the currently saved number of reports in progress shown is greater than the preset threshold, send a second data abnormality reminder message to the reminder device.
[0009] In a third aspect, the present application provides a monitoring device for abnormal cigarette cases. The device includes a memory and a processor. An abnormal monitoring program is stored on the memory, and when the abnormal monitoring program is executed by the processor, it implements the monitoring method for abnormal cigarette cases described in any one of the above.
[0010] Preferably, computer programs of the box condition association system, the national bureau two-dimensional code control platform, the analysis software, and the email are also stored on the memory.
[0011] Fourthly, the present application provides a monitoring system for abnormal cartons of cigarettes, including the monitoring device for abnormal cartons of cigarettes and a reminder device described above, and the monitoring device is communicatively connected to the reminder device; the reminder device is configured to receive a first data anomaly reminder message and a second data anomaly reminder message from the monitoring device, and perform a reminder based on the first data anomaly reminder message and the second data anomaly reminder message.
[0012] Preferably, the reminder device includes: a display screen and an alarm device, both the display screen and the alarm device are communicatively connected to the monitoring device; the display screen is configured to receive the first data anomaly reminder message and the second data anomaly reminder message from the monitoring device, and perform a pop-up reminder based on the first data anomaly reminder message and the second data anomaly reminder message; the alarm device is configured to receive the first data anomaly reminder message from the monitoring device, and perform an alarm based on the first data anomaly reminder message.
[0013] Fifthly, the present application provides a storage medium storing computer-readable instructions, which, when run by a processor, execute the method described in any one of the above.
[0014] The monitoring method, device, equipment, system and storage medium of the present invention have the following beneficial effects:
[0015] In the present application, according to the time parameter and the token, and in accordance with the set second preset duration, the production data packet is automatically obtained from the carton condition association system and the number of display reporting failures, the number of display association failures, and the number of displays in the reporting are parsed therefrom. According to the set abnormal data determination conditions, that is, the currently saved number of display reporting failures is greater than the previously saved number of display reporting failures, the currently saved number of display association failures is greater than the previously saved number of display association failures, and the currently saved number of displays in the reporting is greater than the preset threshold, the abnormal data is determined and a reminder is issued, realizing comprehensive and automatic monitoring of the production data of the carton condition association system. Moreover, in the present application, the second preset duration can be designed to be relatively short, that is, the monitoring frequency can be greatly increased with less cost increase, and the situation where it takes a long time to discover abnormal data due to the inspection errors and omissions of the staff can be avoided, which helps to quickly discover the abnormal data in the carton condition association system. Description of the Drawings
[0016] To better understand the above and other objects, features, advantages and functions of the present invention, reference may be made to the embodiments shown in the drawings. The same reference numerals in the drawings refer to the same components. Those skilled in the art should understand that the drawings are intended to schematically illustrate the preferred embodiments of the present invention and have no restrictive effect on the scope of the present invention, and the components in the drawings are not drawn to scale.
[0017] Figure 1The flowchart of a method for monitoring abnormal cigarette cases according to an embodiment of the present invention is shown;
[0018] Figure 2 The framework diagram of a device for monitoring abnormal cigarette cases according to an embodiment of the present invention is shown;
[0019] Figure 3 The framework diagram of a system for monitoring abnormal cigarette cases according to an embodiment of the present invention is shown.
[0020] Description of reference numerals:
[0021] 101, Token acquisition module; 102, First duration monitoring module; 103, Production data acquisition module; 104, Second duration monitoring module; 105, Abnormality judgment module; 2, Monitoring device; 21, Memory; 211, Abnormality monitoring program; 212, Carton condition association system; 213, National Bureau two-dimensional code control platform; 214, Analysis software; 215, Email; 22, Processor; 3, Display screen; 4, Alarm device. Detailed implementation manners
[0022] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following.
[0023] As used herein, the term "including" and its variants represent open inclusion, that is, "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "an exemplary embodiment" and "an embodiment" mean "at least one exemplary embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.
[0024] To at least partially solve one or more of the above problems and other potential problems, embodiments of the present disclosure propose a method for monitoring abnormal cigarette cases, as Figure 1 shown, including the following steps:
[0025] Steps for obtaining a token: Send a request message for obtaining a token to the box condition association system; Receive a login data packet from the box condition association system; Send the login data packet to the analysis software; Receive and save the token from the analysis software; Preferably, in this application, the method for obtaining a token is to exchange the appid for a query token, and the analysis software uses Fidder software to analyze the login data packet to obtain the token.
[0026] First duration monitoring step: After receiving the token, add a timestamp to the token and start timing. When the timing duration reaches the first preset duration, return to the steps for obtaining a token and refresh the token, thereby establishing a token expiration mechanism.
[0027] Steps for obtaining production data: Obtain the current time and convert it into a time parameter. Preferably, use the datetime function to obtain the current date, and the rule for converting it into a time parameter is: convert the current date into the format of "%Y-%m-%d"; Construct a request message including the time parameter and the token and send it to the box condition association system; Receive a production data packet from the box condition association system; Parse the production data packet to obtain and save the number of reported failures shown, the number of associated failures shown, and the number of reports in progress shown.
[0028] Second duration monitoring step: Start timing when sending a request message including the time parameter and the token to the box condition association system. When the timing duration reaches the second preset duration, return to the steps for obtaining production data to achieve the setting of the monitoring frequency. Preferably, the range of the second preset duration is 0.5 - 5 minutes. For example, the second preset duration is set to 1 minute, that is, repeat the steps for obtaining production data every 1 minute.
[0029] Abnormality judgment step: Compare the currently saved number of reported failures shown with the previously saved number of reported failures shown; Compare the currently saved number of associated failures shown with the previously saved number of associated failures shown; Compare the currently saved number of reports in progress shown and a preset threshold.
[0030] When the number of currently saved display report failures is greater than the number of previously saved display report failures, and / or the number of currently saved display association failures is greater than the number of previously saved display association failures, a first data anomaly reminder message is sent to the reminder device. Specifically, sending the first data anomaly reminder message to the reminder device includes sending the first data anomaly reminder message to the display screen for pop-up prompting. For example, pop-up messages such as "There are associated failed cigarettes, please handle them in time" and "There are reported failed cigarettes, please handle them in time" on the display screen, and sending the first data anomaly reminder message to the alarm device for alarming. More specifically, the alarm device is an alarm light, and the first data anomaly reminder message is sent to the alarm light to make it flash; preferably, when the number of currently saved display report failures is greater than the number of previously saved display report failures, and / or the number of currently saved display association failures is greater than the number of previously saved display association failures, the first data anomaly reminder message is also sent to the email of the second designated staff member in the form of an email according to the first fixed template through the email of the first designated staff member; realizing multiple reminder methods when abnormal data is found.
[0031] When the number of currently saved display reports is greater than the preset threshold, a second data anomaly reminder message is sent to the reminder device. Specifically, sending the second data anomaly reminder message to the reminder device includes sending the second data anomaly reminder message to the display screen for pop-up prompting. For example, pop-up messages such as "There is a backlog of reports, please handle them in time" on the display screen; preferably, when the number of currently saved display reports is greater than the preset threshold, the second data anomaly reminder message is also sent to the email of the second designated staff member in the form of an email according to the second fixed template through the email of the first designated staff member.
[0032] This application also provides a monitoring device for abnormal cigarettes, such as Figure 2As shown, the device includes: an obtaining token module 101, configured to send request information for obtaining a token to the cartridge condition association system; receive a login data packet from the cartridge condition association system; send the login data packet to the analysis software; receive and save the token from the analysis software; a first duration monitoring module 102, configured to timestamp the token and start timing after receiving the token, and when the timing duration reaches a first preset duration, return to the step of obtaining the token and refresh the token; a production data obtaining module 103, configured to obtain the current time and convert it into a time parameter; construct request information including the time parameter and the token and send it to the cartridge condition association system; receive a production data packet from the cartridge condition association system; parse the production data packet to obtain and save the number of displayed reporting failures, the number of displayed association failures, and the number of displayed reports in progress; a second duration monitoring module 104, configured to start timing when sending the request information including the time parameter and the token to the cartridge condition association system, and when the timing duration reaches a second preset duration, return to the step of obtaining production data; an anomaly judgment module 105, configured to compare the currently saved number of displayed reporting failures with the previously saved number of displayed reporting failures; compare the currently saved number of displayed association failures with the previously saved number of displayed association failures; compare the currently saved number of displayed reports in progress with a preset threshold; when the currently saved number of displayed reporting failures is greater than the previously saved number of displayed reporting failures, and / or the currently saved number of displayed association failures is greater than the previously saved number of displayed association failures, send a first data anomaly reminder message to the reminder device; when the currently saved number of displayed reports in progress is greater than the preset threshold, send a second data anomaly reminder message to the reminder device.
[0033] The present application also provides a monitoring device for abnormal cigarette packs. The device includes a memory 21 and a processor 22. An abnormal monitoring program 211 is stored on the memory 21. When the abnormal monitoring program 211 is executed by the processor 22, it implements the monitoring method for abnormal cigarette packs described in any one of the above. Preferably, as Figure 3 shown, a computer program of the cartridge condition association system 212, a computer program of the national bureau two-dimensional code control platform 213, a computer program of the analysis software 214, and a computer program of the mailbox 215 are also stored on the memory 21. The abnormal monitoring program 211 performs data interaction with the computer programs of the cartridge condition association system 212, the analysis software 214, and the mailbox 215 respectively.
[0034] The present application also provides a monitoring system for abnormal cigarette packs, such as Figure 3As shown, it includes a monitoring device 2 for abnormal cigarettes and a reminder device, and the monitoring device 2 is communicatively connected to the reminder device; the reminder device is configured to receive a first data anomaly reminder message and a second data anomaly reminder message from the monitoring device 2, and perform a reminder based on the first data anomaly reminder message and the second data anomaly reminder message. Preferably, the reminder device includes: a display screen 3 and an alarm device 4, and both the display screen 3 and the alarm device 4 are communicatively connected to the monitoring device 2; the display screen 3 is configured to receive the first data anomaly reminder message and the second data anomaly reminder message from the monitoring device 2, and perform a pop-up reminder based on the first data anomaly reminder message and the second data anomaly reminder message; the alarm device 4 is configured to receive the first data anomaly reminder message from the monitoring device 2, and perform an alarm based on the first data anomaly reminder message. Specifically, the alarm device is an alarm lamp, and the alarm lamp is configured to receive the first data anomaly reminder message from the monitoring device 2, and perform an alarm based on the first data anomaly reminder message.
[0035] This application also provides a storage medium storing computer-readable instructions that, when executed by a processor, perform the method described in any one of the above.
[0036] The embodiments of the present disclosure have been described above. The above description is exemplary and not exhaustive, and is also not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other ordinary skill in the art in the technical field to understand the present disclosure.
Claims
1. A method for monitoring abnormal smoke, characterized in that: The following steps are involved: Token acquisition step: Send a request message about acquiring a token to the box condition association system; receiving a login data packet from a box condition association system; Send a login data packet to the analysis software; Receive token from analysis software and save it; The first duration monitoring step: after receiving the token, timestamp the token and start timing. When the timing reaches the first preset duration, return to the token acquisition step and refresh the token. Steps for obtaining production data: obtain the current time and convert it into time parameters; construct request information including time parameters and tokens and send it to the box condition association system; Receive a production data packet from the box condition association system; parse the production data packet to obtain the number of display report failures, the number of display association failures, and the number of display reports and save them; Second duration monitoring step: start timing when sending request information including time parameters and token to the box condition association system, and when the timing duration reaches a second preset duration, return to the step of obtaining production data; Abnormal judgment steps: compare the number of display reporting failures currently saved with the number of display reporting failures saved last time; compare the number of display association failures currently saved with the number of display association failures saved last time; compare the number in the currently saved display report with the preset threshold; when the number of display reporting failures currently saved is greater than the number of display reporting failures saved last time, and / or the number of display association failures currently saved is greater than the number of display association failures saved last time, send a first data abnormality reminder message to the reminder device; when the number in the currently saved display report is greater than the preset threshold, send a second data abnormality reminder message to the reminder device.
2. The method for monitoring abnormal smoke according to claim 1, characterized in that: The abnormality judgment step also includes: when the number of currently saved display reporting failures is greater than the number of display reporting failures saved last time, and / or the number of currently saved display association failures is greater than the number of display association failures saved last time, the first data abnormality reminder information is sent to the mailbox of the second designated staff member in the form of an email via the mailbox of the first designated staff member; when the number in the currently saved display report is greater than a preset threshold, the second data abnormality reminder information is sent to the mailbox of the second designated staff member in the form of an email via the mailbox of the first designated staff member.
3. The method for monitoring abnormal smoke according to claim 1, characterized in that: The step of sending the first data abnormality reminder information to the reminder device in the abnormality judgment step includes sending the first data abnormality reminder information to a display screen for a pop-up window prompt, and sending the first data abnormality reminder information to an alarm device for an alarm; Sending the second data abnormality reminder information to the reminder device includes sending the second data abnormality reminder information to a display screen for pop-up prompt.
4. The method for monitoring abnormal smoke according to claim 1, characterized in that: The second preset time length ranges from 0.5 to 5 minutes.
5. A device for monitoring abnormal smoke, characterized in that: The device comprises: A token acquisition module (101) is configured to send a request message for acquiring a token to a box condition association system; receive a login data packet from the box condition association system; send a login data packet to an analysis software; receive a token from the analysis software and save it; A first duration monitoring module (102) is configured to, after receiving the token, timestamp the token and start timing, and when the timing duration reaches a first preset duration, return to the token acquisition step and refresh the token; The production data acquisition module (103) is configured to acquire the current time and convert it into a time parameter; construct a request message including the time parameter and the token and send it to the box condition association system; receive a production data packet from the box condition association system; parse the production data packet to acquire the number of display report failures, the number of display association failures and the number of display reports and save them; A second duration monitoring module (104), configured to start timing when sending a request message including a time parameter and a token to the box condition association system, and when the timing duration reaches a second preset duration, return to the step of obtaining production data; The abnormality judgment module (105) is configured to compare the number of display report failures currently saved with the number of display report failures saved last time; compare the number of display association failures currently saved with the number of display association failures saved last time; compare the number in the currently saved display report with a preset threshold; when the number of display report failures currently saved is greater than the number of display report failures saved last time, and / or the number of display association failures currently saved is greater than the number of display association failures saved last time, send a first data abnormality reminder message to the reminder device; when the number in the currently saved display report is greater than the preset threshold, send a second data abnormality reminder message to the reminder device.
6. An abnormal smoke monitoring device, characterized in that: The device comprises a memory (21) and a processor (22), wherein an abnormality monitoring program (211) is stored in the memory, and when the abnormality monitoring program (211) is executed by the processor (22), a method for monitoring abnormal smoke according to any one of claims 1 to 4 is implemented.
7. The abnormal smoke monitoring device according to claim 6, characterized in that: The memory (21) also stores a computer program of a box condition association system (212), a computer program of a national bureau two-dimensional code control platform (213), a computer program of an analysis software (214), and a computer program of a mailbox (215).
8. A monitoring system for abnormal smoke, characterized in that: It comprises a monitoring device (2) for abnormal smoke and a reminder device as described in claim 6 or 7, wherein the monitoring device (2) is communicatively connected to the reminder device; the reminder device is used to receive first data abnormality reminder information and second data abnormality reminder information from the monitoring device (2), and to give a reminder based on the first data abnormality reminder information and the second data abnormality reminder information.
9. The abnormal smoke monitoring system according to claim 8, characterized in that: The reminder device comprises: a display screen (3) and an alarm device (4), both of which are connected to the monitoring device (2) in communication; the display screen (3) is used to receive first data abnormality reminder information and second data abnormality reminder information from the monitoring device (2), and to issue a pop-up window prompt based on the first data abnormality reminder information and the second data abnormality reminder information; the alarm device (4) is used to receive the first data abnormality reminder information from the monitoring device, and to issue an alarm based on the first data abnormality reminder information.
10. A storage medium, characterized in that: Computer-readable instructions are stored, and when the instructions are executed by a processor, the method according to any one of claims 1 to 4 is executed.
Citation Information
Patent Citations
Photoelectric signal anomaly detection method, device and equipment applied to tobacco equipment
CN113264339A
Two-dimensional code verification method and device
CN113570362A
Cigarette carton code early warning system
CN116957712A
Removing device and method of boxing system
CN118237295A
Methods and systems for generating address score information
US20210110343A1