Control method, device, system and storage medium for cigarette case sorting

By utilizing machine learning models and hardware switching devices to identify multiple cigarette box brands during the cigarette box sorting process, the problem of errors easily encountered in manual verification and barcode scanning in existing technologies has been solved, achieving efficient cigarette box sorting control and ensuring sorting quality and efficiency.

CN123149182APending Publication Date: 2026-11-24LONGYAN CIGARETTE FACTORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611324058.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

The existing cigarette box sorting method relies on manual visual verification and barcode scanning, which is susceptible to visual fatigue and environmental influences. Furthermore, the photoelectric PLC logic lock cannot effectively prevent cigarette boxes of different brands from being mistakenly entered into the sorting channel, leading to mixed brands and missorting. It is also difficult to retain images of the cigarette box appearance, resulting in high traceability costs.

Method used

By acquiring image information of a designated area in the cigarette box conveyor line, machine learning models such as YOLOv8n network architecture are used for target detection to identify the brand of multiple cigarette boxes. In case of abnormality, the cigarette box gripping mechanism is controlled to stop operation. Hardware switching devices such as relays are used to block the gripping control loop, reducing complexity and improving sorting efficiency.

Benefits of technology

It enables accurate control of the downstream gripping mechanism to stop operation when abnormal cigarette boxes occur, reducing implementation complexity, improving the overall efficiency of cigarette box sorting, reducing manual verification workload and sorting error rate, and ensuring stable and reliable sorting quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123149182A_ABST
    Figure CN123149182A_ABST
Patent Text Reader

Abstract

This disclosure relates to a control method, apparatus, system, and storage medium for cigarette box sorting, and pertains to the field of control technology. The control method includes: determining the brand information of multiple cigarette boxes in a designated area based on image information of that area along a cigarette box conveyor line; determining that an abnormal cigarette box exists among the multiple cigarette boxes if two or more brands are present; and controlling a cigarette box gripping mechanism located downstream of the designated area to stop gripping operations in the case of an abnormal cigarette box. The technical solution of this disclosure can improve the overall efficiency of cigarette box sorting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of control technology, and in particular to a control method, apparatus, system and storage medium for cigarette box sorting. Background Technology

[0002] In the tobacco industry, the process of warehousing, sorting and palletizing finished cigarette cartons typically involves manual visual inspection, barcode scanning verification, and photoelectric detection combined with PLC (Programmable Logic Controller) logic locking to verify brand and prevent diversion.

[0003] In related technologies, a single-point detection mode is used for cigarette box verification, that is, when the cigarette box moves to a specific detection point, the verification is triggered, and each cigarette box is compared with the preset task number in turn. Summary of the Invention

[0004] One technical problem this disclosure aims to solve is to provide a control method, apparatus, system, and storage medium for cigarette box sorting that can improve the overall efficiency of cigarette box sorting.

[0005] According to one aspect of this disclosure, a control method for sorting cigarette boxes is proposed, comprising: determining the brand information of multiple cigarette boxes in a designated area based on image information of a designated area in a cigarette box conveying line; determining that there are abnormal cigarette boxes among the multiple cigarette boxes if there are two or more brands of cigarette boxes; and controlling the cigarette box gripping mechanism in the cigarette box conveying line to stop gripping operation if there are abnormal cigarette boxes, wherein the cigarette box gripping mechanism is located downstream of the designated area.

[0006] In some embodiments, image information is obtained by extracting single-frame images from video information of a specified area at a specified frame rate.

[0007] In some embodiments, determining the brand information of multiple cigarette boxes in a specified area includes: using a machine learning model to perform object detection on the image information to obtain the position of each cigarette box in the image information, and outputting the brand information of the cigarette box corresponding to each position. The machine learning model is trained using image samples of cigarette boxes of various brands.

[0008] In some embodiments, the machine learning model employs the YOLOv8n network architecture.

[0009] In some embodiments, controlling the cigarette box gripping mechanism in the cigarette box conveying line to stop gripping operations includes: sending a disconnect signal to a switching device to block the gripping control circuit of the cigarette box gripping mechanism, wherein the switching device is connected in series in the gripping control circuit.

[0010] In some embodiments, the switching device is a relay, and blocking the grabbing control circuit of the cigarette box grabbing mechanism includes: driving the normally closed contact of the relay to open through the PLC communication gateway to block the grabbing control circuit.

[0011] In some embodiments, the control method further includes: in the event of an abnormal cigarette box, storing image information, the acquisition time corresponding to the image information, the cigarette box brand number indicated by the image information, and the number of cigarette boxes corresponding to each brand number to a local database.

[0012] In some embodiments, the control method further includes: in response to receiving an abnormality cancellation signal, activating the gripping control loop of the cigarette box gripping mechanism so that the cigarette box gripping mechanism continues its gripping operation.

[0013] In some embodiments, the fault clearing signal is triggered by a hardware reset button.

[0014] According to a second aspect of this disclosure, a control device for sorting cigarette boxes is also provided, comprising: a determining module configured to determine the brand information of multiple cigarette boxes in a designated area based on image information of a designated area in a cigarette box conveying line; a judging module configured to determine that there is an abnormal cigarette box among the multiple cigarette boxes if there are cigarette boxes of two or more brands among the multiple cigarette boxes; and a control module configured to control a cigarette box gripping mechanism in the cigarette box conveying line to stop gripping operation when there is an abnormal cigarette box, wherein the cigarette box gripping mechanism is located downstream of the designated area.

[0015] According to a third aspect of this disclosure, a control device for sorting cigarette boxes is also proposed, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the control method of any of the above embodiments based on instructions stored in the memory.

[0016] According to a fourth aspect of this disclosure, a cigarette box sorting system is also proposed, comprising: an image acquisition device configured to acquire image information of a designated area in a cigarette box conveying line; a control device in any of the above embodiments; and a PLC communication gateway connected in series with a gripping control loop of a cigarette box gripping mechanism in the cigarette box conveying line, configured to adjust the on / off state of the gripping control loop according to instructions sent by the control device to control the gripping operation of the cigarette box gripping mechanism.

[0017] In some embodiments, the cigarette box sorting system further includes an alarm device configured to issue an alert in the presence of an abnormal cigarette box.

[0018] In some embodiments, the PLC communication gateway is connected to the grasping control loop via a relay. In the event of an abnormal smoke box, the PLC communication gateway blocks the grasping control loop via the relay.

[0019] According to a fifth aspect of this disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the control method of any of the above embodiments.

[0020] According to a sixth aspect of this disclosure, a computer program product is also proposed, including instructions that, when executed by a processor, cause the processor to perform the control method of any of the above embodiments.

[0021] In the above embodiments, by acquiring image information of a designated area in the cigarette box conveying line, the brand numbers of multiple cigarette boxes within the designated area can be identified simultaneously, and the presence of abnormal cigarette boxes can be directly determined based on the number of brand numbers. This allows for accurate control of the downstream gripping mechanism to stop operation in the event of an abnormal cigarette box. In this process, multi-category comparison is performed solely based on image information, without the need for external task brand numbers or preset benchmark values, reducing implementation complexity and improving the overall efficiency of cigarette box sorting.

[0022] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0023] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.

[0024] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:

[0025] Figure 1 This is a flowchart illustrating some embodiments of the control method disclosed herein;

[0026] Figure 2 This is a schematic diagram of some embodiments of the control system of this disclosure;

[0027] Figure 3 This is a flowchart illustrating some other embodiments of the control method of this disclosure;

[0028] Figure 4 These are schematic diagrams of some embodiments of the cigarette box brand number detection screen disclosed herein;

[0029] Figure 5 Block diagrams of some embodiments of the control device of this disclosure;

[0030] Figure 6 Block diagrams showing some embodiments of the electronic devices disclosed herein. Detailed Implementation

[0031] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0032] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0033] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0034] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0035] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0036] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0037] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0038] As mentioned earlier, the tobacco industry currently uses manual visual inspection, barcode scanning verification, and photoelectric detection combined with PLC logic locking to verify brand names and prevent diversion in the process of finished cigarette cartons entering the warehouse, sorting and palletizing.

[0039] Manual visual verification involves operators manually comparing the brand name or barcode on cigarette cartons at key logistics nodes. Barcode scanning verification uses fixed barcode scanners installed on the side or top of the cigarette carton conveyor line to read the barcode label on the outer packaging and compare it with the task brand name in the WMS (Warehouse Management System). The photoelectric sensor combined with PLC logic locking uses photoelectric sensors to detect the arrival of cigarette cartons and indirectly deduce the brand name of the currently conveyed cigarette carton by combining this with WMS task data.

[0040] However, the above methods have some problems in practical applications. For example, manual visual verification depends on the operator's condition, and prolonged staring at moving cigarette boxes can easily cause visual fatigue. When frequently switching brands on the production line or during nighttime operations, operators' attention decreases, making it easy to confuse cigarette boxes of different brands with similar shapes and printing positions, posing a risk of missed inspections due to fatigue and subjective misjudgment. Photoelectric detection combined with PLC logic locking is an indirect judgment method. If upstream equipment sends the wrong brand of cigarette box onto the conveyor line due to human error, or if the cigarette box is accidentally repositioned on the conveyor path, the PLC logic cannot detect any abnormalities. Furthermore, barcode scanning is easily affected by environmental factors such as densely packed cigarette boxes, conveyor position deviations, barcode stains, or damaged labels, which may lead to incorrect reading or misreading.

[0041] Furthermore, the above methods cannot preserve images of the cigarette box's appearance. Once a mixed-brand incident occurs, there is a lack of visual traceability evidence, making it difficult to quickly locate the time and channel where the mixed-brand incident occurred. The traceability cost is high, and subsequent root cause analysis is difficult.

[0042] It is evident that the above-mentioned cigarette box sorting methods are all single-point detection modes and rely on preset task brands. In cases of excessively dense cigarette boxes, conveyor deviation, or damaged barcodes, it is difficult to effectively prevent cigarette boxes of different brands from entering the sorting channel by mistake, and the problem of mixed brands and missorting occurs frequently.

[0043] To address the aforementioned technical problems, this disclosure provides a control method that, by acquiring image information of a designated area in the cigarette box conveyor line, can simultaneously identify the brand numbers of multiple cigarette boxes within that area and directly determine the presence of abnormal cigarette boxes based on the number of brand numbers. This allows for accurate control of the downstream gripping mechanism to stop operation in the event of an abnormal cigarette box. In this process, multi-category comparison is performed solely based on image information, eliminating the need for external task brands or preset benchmark values, thus reducing implementation complexity and improving the overall efficiency of cigarette box sorting.

[0044] The present disclosure will now be described in conjunction with specific embodiments.

[0045] like Figure 1 As shown, Figure 1 This is a flowchart illustrating some embodiments of the control method disclosed herein, which includes steps S11-S13.

[0046] In step S11, the brand information of multiple cigarette boxes in a designated area is determined based on the image information of that area in the cigarette box conveying line. For example, the designated area is a continuous area in the cigarette box conveying line that can accommodate multiple cigarette boxes simultaneously.

[0047] In step S12, if multiple cigarette boxes contain cigarette boxes of two or more brands, it is determined that there are abnormal cigarette boxes among the multiple cigarette boxes. For example, if multiple cigarette box targets are detected in the same frame image, and the brand categories of the multiple cigarette box targets are inconsistent, the system determines that a mixed brand event has occurred, that is, there are abnormal cigarette boxes of non-target brands.

[0048] In step S13, if there is an abnormal smoke box, the smoke box gripping mechanism in the smoke box conveying line is controlled to stop gripping operations. The smoke box gripping mechanism is located downstream of the designated area.

[0049] In the above embodiments, by acquiring image information of a designated area in the cigarette box conveying line, the brand numbers of multiple cigarette boxes within the designated area can be identified simultaneously, and the presence of abnormal cigarette boxes can be directly determined based on the number of brand numbers. This allows for accurate control of the downstream gripping mechanism to stop operation in the event of an abnormal cigarette box. In this process, multi-category comparison is performed solely based on image information, without the need for external task brand numbers or preset benchmark values, reducing implementation complexity and improving the overall efficiency of cigarette box sorting.

[0050] In some embodiments, a machine learning model is used to perform target detection on the image information to obtain the position of each cigarette box in the image information and output the brand information of the cigarette box corresponding to each position. The machine learning model is trained using image samples of cigarette boxes of various brands.

[0051] In this way, by using a machine learning model trained with image samples of cigarette boxes of various brands to perform target detection on image information, the position of each cigarette box in the image can be accurately located and the corresponding brand number can be output. This provides a basis for subsequent brand number comparison and shutdown control, thereby improving the efficiency of cigarette box sorting.

[0052] For example, the machine learning model can employ the YOLOv8n network architecture. This machine learning model is trained using image samples of various brands of cigarette boxes, and can simultaneously detect multiple cigarette box targets in a single frame image, classifying and identifying the brand category of each cigarette box.

[0053] In some embodiments, image information is obtained by extracting single-frame images from video information of a specified area at a specified frame rate.

[0054] For example, real-time video footage of a specified area can be continuously captured at a fixed frame rate using an image acquisition device (e.g., a camera), and a YOLOv8n model can be run to perform target detection on each frame or image frames at specified intervals in the video. This allows for the real-time output of the bounding box positions of all cigarette box targets in the video footage, along with their corresponding brand category labels.

[0055] In this embodiment, by extracting single-frame images from the video information of a specified area at a specified frame rate, image information for brand identification can be stably obtained from a continuous video stream. This ensures the real-time performance of brand detection and guarantees that abnormal cigarette boxes are detected in a timely manner and trigger a shutdown, thereby improving the accuracy of cigarette box sorting.

[0056] In some embodiments, in the event of an abnormal cigarette box, the image information, the acquisition time corresponding to the image information, the cigarette box brand indicated by the image information, and the number of cigarette boxes corresponding to each brand are stored in a local database.

[0057] For example, the image information at the moment an anomaly detection was triggered, the corresponding acquisition time, all identified brands, and the number of cigarette boxes corresponding to each brand can be saved to a local database. In this way, based on the information stored in the local database, abnormal batches and their brand composition can be quickly located according to dimensions such as time and brand. Simultaneously, the original image at the moment an anomaly detection was triggered and all target detection results are completely preserved, providing data support for the investigation and handling of abnormal events, thereby shortening manual intervention time, reducing the duration of sorting operations interrupted due to downtime, and ultimately improving sorting efficiency.

[0058] The following examples illustrate how to control the cigarette box gripping mechanism to stop gripping operations in step S13.

[0059] In some embodiments, a disconnect signal is sent to the switching device to block the gripping control circuit of the cigarette box gripping mechanism, and the switching device is connected in series in the gripping control circuit.

[0060] This allows the stop command to be applied directly to the gripping mechanism via hardware on / off switching, avoiding the delays that may occur when issuing commands through upper computer communication or software logic. This enables the cigarette box gripping mechanism to respond quickly in abnormal situations, thereby improving the efficiency of cigarette box sorting.

[0061] For example, the switching device is a relay, and the normally closed contact of the relay is opened by the programmable logic controller (PLC) communication gateway to block the grasping control loop.

[0062] The normally closed contact design ensures that the grabbing control circuit remains conductive even if the system loses power or experiences communication failures during normal operation, thus not affecting normal production and improving the reliability of cigarette box sorting.

[0063] In some embodiments, in response to receiving an anomaly clearing signal, the gripping control loop of the cigarette box gripping mechanism is activated so that the cigarette box gripping mechanism can continue its gripping operation. For example, the anomaly clearing signal can be triggered by a hardware reset button.

[0064] In this way, the grabbing control circuit can be activated in time after the abnormal cigarette box is processed, which can quickly restore the normal operation of the cigarette box grabbing mechanism without restarting the system or waiting for instructions to be issued, thereby shortening the recovery time and improving the overall efficiency of cigarette box sorting.

[0065] The following is through Figure 2 The embodiments described above illustrate the control scheme for cigarette box sorting.

[0066] Figure 2 This is a schematic diagram of some embodiments of the control system disclosed herein.

[0067] like Figure 2 As shown, the control system is a YOLO vision detection-based anti-mixing system for cigarette box brands, including a high-definition industrial camera 21, an LED (Light Emitting Diode) supplementary light source 22, an embedded AI (Artificial Intelligence) edge computing unit 23, an audible and visual alarm 24, and a PLC communication gateway 25.

[0068] High-definition industrial cameras 21 are mounted above each independent channel of the conveyor line (i.e., the aforementioned smoke box conveyor line) to take pictures from a top-down perspective. The camera's field of view is calibrated to frame a continuous area covering the channel (i.e., the aforementioned designated area), which can accommodate multiple smoke boxes simultaneously.

[0069] The embedded AI edge computing unit 23 deploys a multi-category cigarette box brand detection model based on YOLOv8n. This model is pre-trained using image samples of cigarette boxes of various brands and can simultaneously detect multiple cigarette box targets in a single frame image and classify and identify the brand category of each cigarette box.

[0070] The PLC communication gateway 25 is interconnected with the main control PLC of the conveyor line and is connected to the gripping control loop of the cigarette box gripping mechanism through a series connection of hardware contacts.

[0071] In this embodiment, a switching device is connected in series with the cigarette box gripping mechanism via normally closed contacts. Under normal conditions, it does not output any signals, thus not increasing delays in normal production and having minimal impact on the original control logic. Furthermore, by sending a disconnect signal to the switching device upon detecting an abnormal cigarette box, the gripping control circuit is physically blocked, and the gripping action stops immediately. This switching device is driven to open its normally closed contacts via the PLC communication gateway 25. The normally closed contact design ensures that even if the system itself experiences a power outage or communication failure, the gripping control circuit remains conductive, without affecting normal production. In addition, the gripping interruption under abnormal conditions directly affects the hardware circuit, unaffected by software logic or communication delays, ensuring reliable execution and rapid response of stop commands and avoiding sorting efficiency losses due to execution failures or response delays.

[0072] The following is through Figure 3 The embodiments described herein exemplify the workflow of the cigarette box brand anti-mixing system. Figure 3 The following are schematic flowcharts illustrating other embodiments of the control method disclosed herein.

[0073] like Figure 3 As shown, in step S302, the system starts.

[0074] In step S304, the high-definition industrial camera 21 continuously captures real-time video images within a specified area at a fixed frame rate.

[0075] In step S306, the embedded AI edge computing unit 23 runs a multi-category cigarette box brand detection model, performs target detection on each frame or a specified interval of image frames, and outputs the detection box position and corresponding brand category label of each cigarette box target in the picture in real time.

[0076] Figure 4 These are schematic diagrams illustrating some embodiments of the cigarette box brand number detection screen disclosed herein. For example... Figure 4 As shown, the high-definition industrial camera identifies multiple cigarette boxes and displays the detection frame and corresponding brand type for each cigarette box on the detection screen.

[0077] In step S308, the embedded AI edge computing unit 23 performs a traversal comparison of the brand categories of all cigarette box targets detected within the same frame image.

[0078] In step S310, it is determined whether there are two or more different brands in the same frame image.

[0079] In step S312, if only one brand category exists in the same frame image or no tobacco box exists, the system determines it to be in a normal state.

[0080] In step S314, under normal conditions, no alarm signal is output, and the smoke capture signal is allowed to remain on, that is, the capture control loop remains on.

[0081] In step S316, if two or more cigarette box targets are detected in the same frame image and the brand categories of these cigarette boxes are inconsistent, it is determined that two or more different brand categories appear simultaneously in the specified area, i.e., a mixed brand event has occurred.

[0082] In the event of a mixed card event, steps S318, S320, and S322 are executed.

[0083] In step S318, a command is sent to the main control PLC via the PLC communication gateway 25 to disconnect the smoke box grabbing mechanism's smoke grabbing permission signal. That is, the grabbing control loop is disconnected, the smoke box grabbing mechanism stops grabbing, and the abnormal smoke box is left in the smoke box conveying line.

[0084] In step S320, an audible and visual alarm is triggered. The audible and visual alarm 24 illuminates a red light and sounds a high-frequency buzzer to alert on-site personnel that there is a problem with mixed-brand cigarettes in the cigarette box conveyor line.

[0085] In step S322, image and event recording is performed. The system saves the image information at the time the alarm is triggered, the acquisition time, all identified brands, and the number of cigarette boxes corresponding to each brand to the local database.

[0086] In step S324, manual confirmation and reset are performed. After receiving the alarm, staff arrive at the scene, verify the mixed-brand situation, and remove the abnormal cigarette box. After the process is completed, a reset signal is triggered via the hardware reset button, and the system clears the alarm state.

[0087] In step S326, the smoke grabbing signal is restored to conduction, that is, the grabbing control loop is restored to conduction state, and the smoke box grabbing mechanism resumes normal operation.

[0088] The aforementioned control scheme enables simultaneous identification and classification of multiple cigarette box brands within the same image frame. When a mixed-brand event is detected, an alarm is triggered and the grabbing control loop is blocked. Normal operation resumes after manual confirmation and reset. This scheme achieves real-time verification of cigarette box brands on the conveyor line and immediate interception of abnormal cigarette boxes. It prevents mixing of different brands of cigarette boxes during palletizing, reduces the workload of manual visual verification, lowers the sorting error rate, improves the continuous operation efficiency of the sorting line, and ensures the stable and reliable quality of finished cigarette sorting.

[0089] Furthermore, the solution adopts a regional continuous monitoring method, with the camera's field of view covering a continuous area on the conveyor channel. It performs uninterrupted concurrent identification and comparison of the brand of all cigarette boxes in the area, which can effectively cope with complex working conditions such as cigarette box congestion, insufficient spacing, and local stacking and obstruction, and eliminate the risk of missed inspections in batches.

[0090] Below, we will combine Figure 5 The control device of this disclosure will be described.

[0091] like Figure 5 As shown, Figure 5 The diagram shows some embodiments of the control device disclosed herein, which includes a determining module 51, a judging module 52, and a control module 53.

[0092] The determining module 51 is configured to determine the brand information of multiple cigarette boxes in a designated area based on image information of that area in the cigarette box conveying line. The judging module 52 is configured to determine that there is an abnormal cigarette box among the multiple cigarette boxes if two or more brands of cigarette boxes are present. The control module 53 is configured to control the cigarette box gripping mechanism in the cigarette box conveying line to stop gripping operations when an abnormal cigarette box is found. The cigarette box gripping mechanism is located downstream of the designated area.

[0093] In the above embodiments, by acquiring image information of a designated area in the cigarette box conveying line, the brand numbers of multiple cigarette boxes within the designated area can be identified simultaneously, and the presence of abnormal cigarette boxes can be directly determined based on the number of brand numbers. This allows for accurate control of the downstream gripping mechanism to stop operation in the event of an abnormal cigarette box. In this process, multi-category comparison is performed solely based on image information, without the need for external task brand numbers or preset benchmark values, reducing implementation complexity and improving the overall efficiency of cigarette box sorting.

[0094] In some embodiments, image information is obtained by extracting single-frame images from video information of a specified area at a specified frame rate.

[0095] In some embodiments, the determining module 51 uses a machine learning model to perform target detection on the image information to obtain the position of each cigarette box in the image information and outputs the brand information of the cigarette box corresponding to each position. The machine learning model is trained using image samples of cigarette boxes of various brands.

[0096] In some embodiments, the machine learning model employs the YOLOv8n network architecture.

[0097] In some embodiments, the control module 53 sends a disconnect signal to the switching device to block the gripping control loop of the cigarette box gripping mechanism, and the switching device is connected in series in the gripping control loop.

[0098] In some embodiments, the switching device is a relay, and the control module 53 drives the normally closed contact of the relay to open through the PLC communication gateway to block the grabbing control loop.

[0099] In some embodiments, the control device further includes a storage module (not shown in the figure). In the event of an abnormal cigarette box, the storage module stores the image information, the acquisition time corresponding to the image information, the cigarette box brand indicated by the image information, and the number of cigarette boxes corresponding to each brand to a local database.

[0100] In some embodiments, in response to receiving an abnormality clearance signal, the control module 53 activates the gripping control loop of the cigarette box gripping mechanism so that the cigarette box gripping mechanism can continue its gripping operation.

[0101] In some embodiments, the fault clearing signal is triggered by a hardware reset button.

[0102] It should be noted that the above modules are logical modules divided according to their specific functions, and are not used to restrict the specific implementation method. For example, they can be implemented in software, hardware, or a combination of software and hardware. In actual implementation, the above modules can be implemented as independent physical entities, or they can be implemented by a single entity (e.g., a processor (CPU or DSP, etc.), integrated circuit, etc.).

[0103] In some embodiments of this disclosure, the control device may be presented as an electronic device. For example... Figure 6 As shown, Figure 6 Block diagrams showing some embodiments of the electronic devices disclosed herein.

[0104] The electronic device 6 includes a memory 61 and a processor 62. The memory 61 is coupled to the processor 62 and is used to store instructions. When the instructions are executed by the processor 62, the processor 62 performs the control method described above.

[0105] Memory 61 is used to store one or more computer-readable instructions. Memory 61 may include any combination of various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory, including but not limited to random access memory, dynamic random access memory, static random access memory, read-only memory, and flash memory. Memory 61 may, for example, store operating systems, application programs, boot loaders, databases, and other programs, as well as various application programs and various data.

[0106] The processor 62 is configured to execute computer-readable instructions to implement the control method of any of the foregoing embodiments. Specific implementations of each step of the method can be found in the above embodiments; repeated details will not be elaborated here.

[0107] Processor 62 can be configured to perform the steps described above. Processor 62 can be various processing devices, such as a central processing unit (CPU), a network processor, etc.; it can also be a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The CPU can be based on x86 or ARM architectures, etc.

[0108] The processor 62 and the memory 61 can communicate with each other directly or indirectly. For example, the processor 62 and the memory 61 can communicate via a network. The network can include wireless networks, wired networks, and / or any combination of wireless and wired networks. The processor 62 and the memory 61 can also communicate with each other via a system bus, which is not limited in this disclosure.

[0109] It should be noted that Figure 6 The components of the electronic device 6 shown are merely exemplary and not limiting; the electronic device 6 may have other components as needed for the actual application. The processor 62 can control other components in the electronic device 6 to perform the desired functions.

[0110] In some embodiments, the processor 62 is coupled to the memory 61 via a BUS bus 63. The electronic device 6 can also be connected to an external storage device 65 via a storage interface 64 to access external data, and can also be connected to a network or another computer system (not shown) via a network interface 66. Further details are omitted here.

[0111] In other embodiments, a computer-readable storage medium is protected that stores computer program instructions that, when executed by a processor, implement the steps of the methods described above. Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, apparatus, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] In some embodiments, a computer program product is protected, comprising a computer program or instructions that, when executed by a processor, implement the methods described above. The computer program product includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. When the computer program is executed by a CPU, it performs the functions defined in the methods of embodiments of this disclosure.

[0113] In some embodiments, a computer program is protected, the computer program comprising: instructions that, when executed by a processor, cause the processor to perform the methods of any of the foregoing embodiments. For example, the instructions may be embodied in computer program code.

[0114] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0115] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0116] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0117] This concludes the detailed description of the present disclosure. To avoid obscuring the concept of the disclosure, some details known in the art have not been described. Those skilled in the art will fully understand how to implement the technical solutions disclosed herein based on the above description.

[0118] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0119] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.

Claims

1. A control method for sorting cigarette boxes, comprising: Based on the image information of a designated area in the cigarette box conveying line, determine the brand information of multiple cigarette boxes in the designated area; If there are more than two brands of cigarette boxes among the multiple cigarette boxes, it is determined that there is an abnormal cigarette box among the multiple cigarette boxes; In the event of the abnormal cigarette box, the cigarette box gripping mechanism in the cigarette box conveying line is controlled to stop gripping operations. The cigarette box gripping mechanism is located downstream of the designated area.

2. The control method according to claim 1, wherein, The image information is obtained by extracting single-frame images from the video information of the specified area at a specified frame rate.

3. The control method according to claim 1, wherein, The determination of the brand information of multiple cigarette boxes in the designated area includes: A machine learning model is used to perform target detection on the image information to obtain the position of each cigarette box in the image information and output the brand information of the cigarette box corresponding to each position. The machine learning model is trained using image samples of cigarette boxes of various brands.

4. The control method according to claim 3, wherein, The machine learning model uses the YOLOv8n network architecture.

5. The control method according to any one of claims 1 to 4, wherein, The step of stopping the gripping operation of the cigarette box gripping mechanism in the cigarette box conveying line includes: A disconnect signal is sent to the switching device to block the gripping control circuit of the cigarette box gripping mechanism, wherein the switching device is connected in series in the gripping control circuit.

6. The control method according to claim 5, wherein, The switching device is a relay, and the gripping control circuit that blocks the cigarette box gripping mechanism includes: The normally closed contact of the relay is opened by driving the programmable logic controller (PLC) communication gateway to block the grasping control loop.

7. The control method according to any one of claims 1 to 4, further comprising: In the event of the presence of the abnormal cigarette boxes, the image information, the acquisition time corresponding to the image information, the cigarette box brand number indicated by the image information, and the number of cigarette boxes corresponding to each brand number are stored in the local database.

8. The control method according to any one of claims 1 to 4, further comprising: In response to receiving an anomaly clearing signal, the gripping control circuit of the cigarette box gripping mechanism is activated so that the cigarette box gripping mechanism can continue its gripping operation.

9. The control method according to claim 8, wherein, The fault clearing signal is triggered by a hardware reset button.

10. A control device for sorting cigarette boxes, comprising: The determination module is configured to determine the brand information of multiple cigarette boxes in a specified area based on image information of a specified area in the cigarette box conveying line; The judgment module is configured to determine that there is an abnormal cigarette box among the multiple cigarette boxes if there are cigarette boxes of two or more brands among the multiple cigarette boxes; The control module is configured to stop the grabbing operation of the cigarette box gripping mechanism in the cigarette box conveying line when the abnormal cigarette box is present. The cigarette box gripping mechanism is located downstream of the designated area.

11. A control device for sorting cigarette boxes, comprising: Memory; and A processor coupled to the memory, the processor being configured to execute the control method of any one of claims 1-9 based on instructions stored in the memory.

12. A cigarette box sorting system, comprising: The image acquisition device is configured to acquire image information of a designated area in the smoke box conveying line; The control device according to claim 10 or 11; A PLC communication gateway, connected in series with the gripping control loop of the cigarette box gripping mechanism in the cigarette box conveying line, is configured to adjust the on / off state of the gripping control loop according to the instructions sent by the control device, so as to control the gripping operation of the cigarette box gripping mechanism.

13. The cigarette box sorting system according to claim 12, further comprising: The alarm device is configured to issue a warning in the event of an abnormal smoke box.

14. The cigarette box sorting system according to claim 12, wherein, The PLC communication gateway is connected to the grasping control loop via a relay. In the event of an abnormal smoke box, the PLC communication gateway blocks the grasping control loop via the relay.

15. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the control method according to any one of claims 1-9.

16. A computer program product comprising instructions that, when executed by a processor, cause the processor to perform the control method according to any one of claims 1-9.