Product packaging method, electronic device and computer-readable storage medium
By extracting and screening product images, efficient and accurate product packaging is achieved, and the problem of low packaging efficiency in the existing technology is solved.
Patent Information
- Application Number
- CN202410811680.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-06-21
AI Technical Summary
In the prior art, product packaging efficiency is low and the accuracy and efficiency of packaging cannot be guaranteed.
By obtaining the product image of the target product, extracting product features, determining the candidate product characteristics, and screening them according to the preset product feature thresholds, obtaining the target product characteristics, and finally efficiently and accurately package the product based on these characteristics.
It reduces human intervention, improves the accuracy and efficiency of product packaging, and can quickly respond to packaging requirements of different specifications.
Smart Images

Figure CN118781442B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of product packaging, and in particular to a product packaging method, an electronic device, and a computer-readable storage medium. Background Art
[0002] In a product production line, products need to be packaged according to different product specifications. In the related art, manual counting is usually used for product packaging, but this method cannot guarantee the efficiency of product packaging. Therefore, how to improve the efficiency of product packaging has become an urgent problem to be solved. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a product packaging method, a product packaging system and a computer-readable storage medium, which can improve the efficiency of product packaging.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a product packaging method, comprising:
[0005] Obtain product images of target products;
[0006] Extracting product features from the product image to obtain product quantity features and product weight features;
[0007] Determine a candidate product feature according to at least one of the product quantity feature and the product weight feature;
[0008] Screening the candidate product features according to a preset product feature threshold to obtain target product features;
[0009] The target product is packaged according to the target product characteristics.
[0010] The product packaging method proposed in the embodiment of the present application has at least the following beneficial effects: by acquiring the product image of the target product, the appearance information of the product can be comprehensively collected. Then, the product feature extraction is performed on the product image to accurately extract the quantity feature and weight feature of the product. Subsequently, the candidate product features are determined based on these feature data, and the final target product features can be further confirmed by screening through the preset product feature threshold, thereby ensuring that the packaged products meet the expected standards. Finally, the products are packaged according to these target product features, thereby achieving an efficient and accurate packaging process. The product packaging method proposed in the embodiment of the present application reduces the need for human intervention, and can quickly respond to packaging requirements of different specifications, significantly improving the accuracy and efficiency of product packaging.
[0011] In some embodiments, the candidate product feature includes the product quantity feature, the preset product feature threshold includes a preset product quantity threshold, and screening the candidate product features according to the preset product feature threshold to obtain the target product feature includes:
[0012] Adding the product quantity features according to a preset direction to obtain the candidate product packaging quantity; the preset direction is the direction opposite to the conveying direction of the conveyor belt used to place the target product;
[0013] If the candidate product package quantity is equal to the preset product quantity threshold, the candidate product package quantity is used as the target product feature.
[0014] In some embodiments, the candidate product feature includes the product weight feature, the preset product feature threshold includes a preset product weight threshold, and screening the candidate product features according to the preset product feature threshold to obtain the target product feature includes:
[0015] Adding the product weight features in a preset direction to obtain the packaging weight of the candidate product; the preset direction is the direction opposite to the conveying direction of the conveyor belt used to place the target product;
[0016] If the package weight of the candidate product is greater than or equal to the preset product weight threshold, the package weight of the candidate product is used as the target product feature.
[0017] In some embodiments, the candidate product features include the product quantity feature and the product weight feature, the preset product feature threshold includes a preset product quantity threshold, a first preset product weight threshold, and a second preset product weight threshold, and the screening of the candidate product features according to the preset product feature threshold to obtain the target product features includes:
[0018] Add the product quantity features according to a preset direction to obtain the package quantity of the candidate products;
[0019] If the package quantity of the candidate product is equal to the preset product quantity threshold, then adding the product weight features according to the preset direction to obtain the package weight of the candidate product;
[0020] The candidate product packaging weights are screened according to the first preset product weight threshold and the second preset product weight threshold to obtain the target product packaging weight, and the target product characteristics are determined according to the candidate product packaging quantity and the target product packaging weight.
[0021] In some embodiments, screening the candidate product packaging weights according to the first preset product weight threshold and the second preset product weight threshold to obtain the target product packaging weight, and determining the target product characteristics according to the candidate product packaging quantity and the target product packaging weight, includes:
[0022] If the package weight of the candidate product is greater than or equal to the first preset product weight threshold, and the package weight of the candidate product is less than or equal to the second preset product weight threshold, the package weight of the candidate product is used as the package weight of the target product;
[0023] The package quantity of the candidate products and the package weight of the target product are used as the characteristics of the target product.
[0024] In some embodiments, screening the candidate product packaging weights according to the first preset product weight threshold and the second preset product weight threshold to obtain the target product packaging weight, and determining the target product characteristics according to the candidate product packaging quantity and the target product packaging weight, includes:
[0025] If the package weight of the candidate product is less than the first preset product weight threshold, or the package weight of the candidate product is greater than the second preset product weight threshold, then the target product corresponding to the package weight of the candidate product is eliminated;
[0026] Acquire the product weight feature of the next target product in sequence according to the preset direction to obtain a candidate weight feature;
[0027] Adding the candidate weight features to obtain a target weight feature;
[0028] The target weight feature is screened according to a third preset product weight threshold to obtain the target product packaging weight;
[0029] Update the package quantity of the candidate products according to the package weight of the target product;
[0030] The updated package quantity of the candidate products and the package weight of the target product are used as the target product features.
[0031] In some embodiments, the target product is placed on a conveyor belt, and the target product is packaged according to the characteristics of the target product, including:
[0032] Determining an initial product moving distance of the conveyor belt according to the target product characteristics;
[0033] Determine the compensation distance according to the product conveying rate of the conveyor belt and the preset time length; the preset time length is the time length consumed from capturing the product image to obtaining the target product feature;
[0034] Determining a target product moving distance according to the initial product moving distance and the compensation distance;
[0035] The target product is packaged according to the moving distance of the target product.
[0036] In some embodiments, before screening the candidate product features according to the preset product feature threshold to obtain the target product features, the product packaging method further includes:
[0037] Get product positive interaction data of historical packaged products;
[0038] Acquire product demand data according to the product positive interaction data;
[0039] Generate a task based on the preset product surplus data and the product demand data to obtain a product packaging task;
[0040] The preset product feature threshold is determined according to the product packaging task.
[0041] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the product packaging method described in the technical solution of the first aspect is implemented.
[0042] To achieve the above-mentioned purpose, the third aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the product packaging method described in the technical solution of the first aspect.
[0043] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0045] Figure 1 This is an optional flow chart of the product packaging method provided in the embodiment of the present application;
[0046] Figure 2It is a structural schematic diagram of an assembly line packaging device provided in an embodiment of the present application;
[0047] Figure 3 yes Figure 1 An optional flowchart of step S400;
[0048] Figure 4 yes Figure 1 An optional flowchart of step S400;
[0049] Figure 5 yes Figure 1 An optional flowchart of step S400;
[0050] Figure 6 This is a schematic diagram of a packaging scenario of the product packaging method proposed in the embodiment of the present application;
[0051] Figure 7 yes Figure 5 An optional flowchart of step S470 in FIG.
[0052] Figure 8 yes Figure 5 An optional flowchart of step S470 in FIG.
[0053] Fig. 9 yes Figure 1 An optional flowchart of step S500;
[0054] Fig.10 This is another schematic diagram of a packaging scenario provided by an embodiment of the present application;
[0055] Fig.11 is Figure 1 An optional flowchart before step S400;
[0056] Fig.12 is a schematic diagram of a system for executing a product packaging method provided by an embodiment of the present application;
[0057] Fig.13 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] First, the professional terms appearing in the embodiments of the present application are explained:
[0061] Programmable Logic Controller (PLC): A digital computing controller with a microprocessor for automated control that can load control instructions into memory for storage and execution at any time. A programmable controller consists of a CPU, instruction and data memory, input / output interface, power supply, digital-to-analog conversion and other functional units. The programmable logic controller used in industry is equivalent to or close to a compact computer host. Its advantages in scalability and reliability make it widely used in various industrial control fields.
[0062] Graphics Processing Unit (GPU): An electronic circuit specially designed to handle graphics computing tasks. Because the GPU has a large number of small processing cores, it can perform multiple computing tasks simultaneously, thereby processing more data and computing tasks per unit time. In addition, it is equipped with high-speed video memory that can provide high-bandwidth data transmission rates, which makes the GPU have strong parallel computing capabilities, high throughput and dedicated memory bandwidth.
[0063] Initially, GPUs were mainly used for rendering computer graphics, such as generating images and animations in video games. However, with the development of technology, the high parallel computing capabilities of GPUs have been widely used in various computationally intensive tasks. Since deep learning model training and reasoning require a large amount of matrix calculations and parallel processing, GPUs have been widely used in the fields of deep learning and scientific computing. Deep learning frameworks such as TensorFlow and PyTorch all provide support for GPUs.
[0064] On the production line of the food packaging industry, it is usually necessary to package according to different product specifications, such as the number of products or net content in each package have specific requirements. At present, many companies still use manual methods to package products, but this method cannot guarantee the efficiency and accuracy of packaging. In related technologies, some companies have begun to adopt computer vision-based technology, which uses cameras to collect images for target detection and recognition. The number and weight of each product can be determined according to the characteristics of the target product such as position, size and shape, and the target product and its position in the image can be determined for counting or weighing. However, this technology usually reduces the speed of the conveyor belt, and in order to adapt to the speed of the conveyor belt, the frame rate of the camera is reduced, which makes the entire process take longer. In scenarios where the food packaging speed is high and the counting requires accuracy, accurate packaging needs to be achieved on a high-speed conveyor belt, which places high demands on the accuracy and processing speed of the counting or weighing of the system. Therefore, how to improve the efficiency of product packaging while ensuring the accuracy of packaging has become an urgent problem to be solved.
[0065] Based on this, the embodiments of the present application provide a product packaging method, an electronic device, and a computer-readable storage medium, which aim to improve the efficiency of product packaging while ensuring packaging accuracy.
[0066] The product packaging method, electronic device, and computer-readable storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the product packaging method in the embodiments of the present application is described.
[0067] Figure 1 is an optional flow chart of the product packaging method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S100 to S500.
[0068] Step S100, obtaining a product image of a target product.
[0069] Step S200, extract product features from the product image to obtain product quantity features and product weight features.
[0070] Step S300, determining a candidate product feature according to at least one of a product quantity feature and a product weight feature.
[0071] Step S400, screening candidate product features according to a preset product feature threshold to obtain target product features.
[0072] Step S500: Packaging the target product according to the target product characteristics.
[0073] Steps S100 to S500 shown in the embodiment of the present application can comprehensively collect the appearance information of the product by acquiring the product image of the target product. Then, the product feature extraction is performed on the product image to accurately extract the quantity feature and weight feature of the product. Subsequently, the candidate product features are determined based on these feature data, and the candidate product features are screened by the preset product feature threshold, so that the final target product features can be further confirmed to ensure that the packaged products meet the expected standards. Finally, the products are packaged according to these target product features, thereby achieving an efficient and accurate packaging process. The method proposed in the embodiment of the present application reduces the need for human intervention, and can quickly respond to packaging requirements of different specifications, significantly improving the accuracy and efficiency of product packaging.
[0074] In step S100 of some embodiments, the target product is an object to be packaged. In the food packaging scenario, the target product may be betel nut, olive, and freeze-dried fruits of different types, etc. It should be noted that the target product is placed on the conveyor belt of the assembly line equipment, and the product image is a photo or video frame of the target product captured by a camera or other image acquisition device, which includes the actual appearance of the product on the conveyor belt, including its visual features such as shape, size, color, and position.
[0075] Please refer to Figure 2 , Figure 2It is a structural schematic diagram of an assembly line packaging device provided by an embodiment of the present application, and the perspective of the figure is front view. The assembly line packaging device includes a conveyor belt, a container, a camera, a programmable logic controller and an industrial computer. Specifically, the target product is placed on the conveyor belt. As the conveyor belt moves in the conveying direction of the conveyor belt, a container is provided below the end of the conveyor belt in its conveying direction. The target product will fall into the container after moving to the end of the conveyor belt. In the food packaging scenario, the container can be a packaging bag or packaging box for loading target products of different specifications. An image acquisition device is provided above the conveyor belt, wherein the image acquisition device can be an industrial camera, a line scan camera, an area array camera, a 3D camera, an infrared camera, etc. The type of image acquisition device can be adaptively adjusted or combined according to the actual application scenario. At present, there is a high-speed industrial camera based on the Gigabit Ethernet interface (GigE Vision), which can complete the image capture and acquisition within ten milliseconds. The image acquisition device is used to acquire images corresponding to the target product. The industrial computer can acquire the images acquired by the image acquisition device and perform image recognition, and send the analysis results to the programmable logic controller. The programmable logic controller can control the speed of the conveyor belt and other components of the assembly line according to the analysis results of the industrial computer, such as controlling the transmission components used to switch containers. When a new packaging bag is needed for a new round of product packaging, the programmable logic controller will control the relevant components to place the new packaging bag at the end of the above-mentioned conveyor belt. It is understandable that the industrial computer and the programmable logic controller communicate through different industrial communication protocols and networks, such as Ethernet, Modbus (Modbus protocol) protocol, Profibus (Process Field Bus) protocol and Profinet (PROcess FIeldNETwork) protocol.
[0076] When the conveyor belt is detected to have moved a preset distance, the image acquisition device can shoot the next product image. Usually, this preset moving distance is determined based on the camera's field of view (shooting range) to ensure that no part of the conveyor belt is missed in two consecutive shots, and to minimize the overlap of the previous and next pictures. For example, if the shooting field of view is 30 cm, the preset moving distance can be set to 22 cm to 25 cm.
[0077] In step S200 of some embodiments, product features are extracted from the product image to obtain product quantity features and product weight features. The product quantity feature refers to the quantity feature extracted from the product image, which represents the quantity of target products in the product image. For each target product, the corresponding product quantity feature is one. The product weight feature refers to the weight feature extracted from the product image, which represents the weight of the target product in the product image.
[0078] Product feature extraction is the process of obtaining product quantity features and product weight features from product images. Specifically, the image acquisition device transmits the collected product images to the industrial computer through a high-speed interface (such as a Gigabit Ethernet interface, GigE Vision), and pre-loads the trained target detection model on the GPU of the industrial computer. The target detection model can be a deep learning architecture for image processing such as a convolutional neural network (such as ResNet, YOLO and SSD). The weights and parameters of the model are initialized to prepare for reasoning operations. Next, the product image is input into the above-mentioned target detection model, and the GPU performs intelligent reasoning, that is, quickly executes a large number of matrix operations and convolution operations. The model outputs the corresponding feature information of each detected target product. In addition to the above-mentioned product quantity features and product weight features, the feature information also includes the location and category of the target product.
[0079] In step S300 of some embodiments, a candidate product feature is determined based on at least one of a product quantity feature and a product weight feature. Therefore, the candidate product feature may be composed of a product quantity feature, a product weight feature, or a product quantity feature and a product weight feature, and may be selected according to the actual packaging scenario.
[0080] Next, the specific method flow of step S400 in different candidate product feature compositions will be explained respectively: Steps S410 to S420 will explain in detail the specific flow of step S400 when the candidate product feature is the product quantity feature. Steps S430 to S440 will explain in detail the specific flow of step S400 when the candidate product feature is the product weight feature. Steps S450 to S470 will explain in detail the specific flow of step S400 when the candidate product feature includes both the product quantity feature and the product weight feature.
[0081] See also Figure 3 In some embodiments, the candidate product feature includes a product quantity feature, and the preset product feature threshold includes a preset product quantity threshold. In this case, step S400 may include but is not limited to steps S410 to S420:
[0082] Step S410, adding product quantity features according to a preset direction to obtain the package quantity of the candidate products.
[0083] Step S420: If the candidate product package quantity is equal to the preset product quantity threshold, the candidate product package quantity is used as the target product feature.
[0084] In step S410 of some embodiments, the preset direction is the direction opposite to the conveying direction of the conveyor belt used to place the target product. In this embodiment, the feature addition is to accumulate the quantity features of each product in sequence according to the above preset direction, and the accumulated result is the package quantity of the candidate products, where the package quantity of the candidate products can be stored in the counting pipeline in the memory of the industrial computer.
[0085] In step S420 of some embodiments, the preset product quantity threshold, i.e., the packing quantity required for each package, can be a value set according to the actual packaging specifications of the product. For example, the product packaging specification may be 100 pieces per bag, and the corresponding preset product quantity threshold is 100. When the packing quantity of the candidate product is equal to the preset product quantity threshold, i.e., the total counted quantity has reached the required quantity for packing, this quantity is determined as the target product feature.
[0086] Steps S410 to S420 shown in the embodiment of the present application can ensure accurate counting by accumulating the number of candidate product packages in sequence according to a preset direction, and comparing the number of candidate product packages with a preset product quantity threshold, and use the number of candidate product packages as a target product feature to trigger a packaging operation later.
[0087] See also Figure 4 In some embodiments, the candidate product feature includes a product weight feature, and the preset product feature threshold includes a preset product weight threshold. In this case, step S400 may include but is not limited to steps S430 to S440:
[0088] Step S430, adding the product weight features according to a preset direction to obtain the packaging weight of the candidate products.
[0089] Step S440: If the package weight of the candidate product is greater than or equal to the preset product weight threshold, the package weight of the candidate product is used as the target product feature.
[0090] In step S430 of some embodiments, the definition of the preset direction has been explained in step S410 and will not be repeated here. In this embodiment, the feature addition is to add each product weight feature in sequence according to the preset direction, and the result of the addition is the candidate product packaging weight, wherein the candidate product packaging weight can be stored in the weighing pipeline in the memory of the industrial computer.
[0091] In step S440 of some embodiments, the preset product weight threshold, i.e., the net content (weight) required for each package, can be a value set according to the actual packaging specifications of the product. For example, the product packaging specification can be 500 grams per bag, and the corresponding preset product weight threshold is 500 grams. When the candidate product packaging weight is greater than or equal to the preset product weight threshold, i.e., the calculated total weight has reached the required packaging weight, the candidate product packaging weight is determined as the target product feature.
[0092] In steps S430 to S440 shown in the embodiment of the present application, accurate weighting can be ensured by accumulating the number of candidate product packages in sequence according to a preset direction, and comparing the number of candidate product packages with a preset product quantity threshold. The number of candidate product packages can be used as a target product feature to trigger a packaging operation later.
[0093] It should be noted that in step S410 to step S420, the solution of screening the target product characteristics according to the preset product quantity threshold and product quantity characteristics is more suitable for the case where each target product is of uniform size. Taking the target product as betel nut as an example, since the size of each betel nut may be different, it may be sorted according to large, medium and small size levels before entering the assembly line for packaging, so as to ensure that the betel nuts packaged on the same conveyor belt are of similar size. In this application scenario, it is simpler to only count the packaging of each package, and it can ensure that the net content of each package is similar under the same size specifications.
[0094] If the betel nuts on the conveyor belt are of different sizes, packaging based solely on counting may result in a large difference in weight between packages of the same quantity and specification. For example, in the same package of 100 betel nuts, there are 60 large betel nuts, 30 medium-sized betel nuts, and 10 small betel nuts in the first package, but there are 70 small betel nuts, 20 medium-sized betel nuts, and 10 large betel nuts in the second package. Obviously, the weight of the first package will be higher than that of the second package. If the betel nuts are not pre-sorted according to size in the packaging scenario, in steps S430 to S440, the solution of screening the target product features according to the preset product weight threshold and product weight features is more suitable, and the weight is used as the basis for packaging, which can ensure that the final net content of each package is similar.
[0095] See also Figure 5 In some embodiments, the candidate product features include product quantity features and product weight features, and the preset product feature thresholds include a preset product quantity threshold, a first preset product weight threshold, and a second preset product weight threshold. In this case, step S400 may also include, but is not limited to, steps S450 to S470:
[0096] Step S450, adding the product quantity features according to a preset direction to obtain the package quantity of the candidate products.
[0097] Step S460: If the candidate product packaging quantity is equal to the preset product quantity threshold, the product weight features are added according to the preset direction to obtain the candidate product packaging weight.
[0098] Step S470, screening the candidate product packaging weights according to the first preset product weight threshold and the second preset product weight threshold to obtain the target product packaging weight, and determining the target product characteristics according to the candidate product packaging quantity and the target product packaging weight.
[0099] The specific operating principle of step S450 in the embodiment of the present application is consistent with that of step S410, so it will not be repeated here.
[0100] In step S460 of some embodiments, when the candidate product packaging quantity is equal to a preset product quantity threshold, the corresponding product weight characteristics are accumulated according to the above-mentioned preset direction. It can be understood that each product quantity characteristic corresponds to a product weight characteristic.
[0101] For example, please refer to Figure 6 , Figure 6 is a schematic diagram of an optional packaging scenario proposed in the embodiment of the present application, and its perspective is a top view. In order to clearly explain this embodiment, Figure 6 The image acquisition device is not drawn in. In this embodiment, the conveying direction of the conveyor belt is from left to right, and the preset direction is from right to left, and the target products are placed in a row. Product features are extracted from the product image to obtain the corresponding product quantity features and product weight features of each target product. In this application scenario, each product quantity feature is one. Starting from one end near the container, the product quantity features and product weight features are added from right to left. For example, the current scenario has determined that the preset quantity threshold is five. If the product quantity feature of the first target product is one and the product weight feature is 12 grams, the product quantity feature of the second target product is one and the product weight feature is 9 grams, the product quantity features are accumulated in sequence. At this time, the candidate product packaging quantity is two, and the candidate product packaging weight is 21 grams. If the candidate product packaging quantity is not equal to the preset quantity threshold, the product quantity features of the third target product will continue to be accumulated, and the product weight features will also be accumulated, thereby updating the candidate product packaging weight. By analogy, when the candidate product packaging weight is equal to five, the corresponding candidate product packaging weight is also determined. It can be understood that Figure 6 The target product placement method in the figure is only an example. In actual application scenarios, the target products can also be placed irregularly.
[0102] It should be noted that the above-mentioned application embodiment only represents a feasible solution. The product quantity characteristics can also be accumulated in the order of step S450 to step S460, and when the candidate product quantity characteristics are equal to the preset quantity threshold, the corresponding product weight characteristics are accumulated to obtain the candidate product packaging weight.
[0103] In step S470 of some embodiments, the first preset product weight threshold is the minimum weight required for any package to complete packaging, and the second preset product weight threshold is the maximum weight required for any package to complete packaging. The weight values between the first preset product weight threshold and the second preset product weight threshold constitute the net content range, which represents the weight error allowed during the packaging process. For example, the net content of a package is set to 500 grams, but in actual operation, it cannot be guaranteed that the net content of each package is exactly 500 grams. Therefore, the net content range can be set to 490 grams to 510 grams. At this time, the first preset product weight threshold is 490 grams, and the second preset product weight threshold is 510 grams. As long as the weight of the package is within this range, it can be determined that the package is qualified. If the weight of the package is not within this range, the package is unqualified and needs to be further operated. The target product characteristics include the number of products that meet the preset quantity requirements and the weight of the products within the preset weight range.
[0104] See also Figure 7 In some embodiments, step S470 includes but is not limited to steps S471 to S472:
[0105] Step S471, if the candidate product packaging weight is greater than or equal to the first preset product weight threshold, and the candidate product packaging weight is less than or equal to the second preset product weight threshold, the candidate product packaging weight is used as the target product packaging weight.
[0106] Step S472, taking the candidate product packaging quantity and the target product packaging weight as target product features.
[0107] In step S471 of some embodiments, if the candidate product packaging weight falls within the preset net content range, the current candidate product packaging weight can be determined as the target product packaging weight. For example, when the product quantity threshold is fifty, the first preset product weight threshold is four hundred and ninety grams, and the second preset product weight threshold is five hundred and ten grams, when the candidate product packaging quantity is fifty, the corresponding candidate product packaging weight is five hundred grams, and five hundred grams is used as the target product packaging weight.
[0108] In step S472 of some embodiments, as in the example of step S471, five hundred grams and fifty are both used as target product features.
[0109] In the steps S471 to S472 shown in the embodiment of the present application, by comparing the package weight of the candidate product with the preset first and second weight thresholds, only products whose weights meet the preset net content ranges are identified as qualified products. This method ensures that the weight of each package is within the specified range, ensuring the consistency of product quality.
[0110] See also Figure 8 In some embodiments, step S470 may also include but is not limited to steps S473 to S478:
[0111] Step S473: if the package weight of the candidate product is less than the first preset product weight threshold, or the package weight of the candidate product is greater than the second preset product weight threshold, the target product corresponding to the package weight of the candidate product is eliminated.
[0112] Step S474, obtaining the product weight characteristics of the next target product in sequence according to the preset direction to obtain candidate weight characteristics.
[0113] Step S475, adding the candidate weight features to obtain the target weight features.
[0114] Step S476, screening the target weight feature according to the third preset product weight threshold to obtain the target product packaging weight.
[0115] Step S477, updating the candidate product packaging quantity according to the target product packaging weight.
[0116] Step S478, using the updated candidate product packaging quantity and target product packaging weight as target product features.
[0117] In step S473 of some embodiments, if the package weight of the candidate product is less than the first preset product weight threshold, or the package weight of the candidate product is greater than the second preset product weight threshold, that is, the package weight of the candidate product does not fall within the preset net content range. Eliminating the target product corresponding to the package weight of the candidate product means that the industrial computer clears the original counting or weighing result and notifies the programmable logic controller to clear the material. Figure 6Taking the packaging scenario shown as an example, the preset product quantity threshold is five. When the corresponding candidate product packaging weight is detected and calculated, that is, the weight of the first five accumulated in the preset direction, does not fall within the preset net content range, the industrial computer determines that the packaging is invalid and notifies the programmable logic controller. The programmable logic controller controls the machine parts of the assembly line equipment to push the five target products out of the conveyor belt without packaging. These cleared target products will be further processed later. Then replace the container currently at the end of the conveyor belt with a new container for a new round of packaging. It should be noted that if the photo fails, there is foreign matter on the conveyor belt, or there is serious stacking when counting the last target product, the above-mentioned clearing operation will also be performed and the counting of the next package will start.
[0118] In step S474 of some embodiments, the product weight characteristics of the next target product are obtained in sequence according to the preset direction to obtain the candidate weight characteristics, wherein the preset direction is the opposite direction of the conveyor belt conveying direction, and the candidate weight characteristics are the product weight characteristics that need to be calculated in a new round. Figure 6 As shown, the first five target products in the preset direction need to be eliminated. Then, according to the preset direction, that is, the sixth target product, the seventh target product from right to left, until the last target product appearing in the picture, their product weight features are all candidate weight features.
[0119] In step S475 of some embodiments, the candidate weight features are added to obtain the target weight feature, wherein the target weight feature is the result of the cumulative addition of the candidate weight features. The operation of adding the features in this embodiment is the same as step S430, and will not be repeated here.
[0120] In step S476 of some embodiments, the target weight feature is screened according to the third preset product weight threshold to obtain the target product packaging weight, wherein the third preset product weight threshold can be set according to the weight specification of the package, and can be the middle value of the preset net content range. When the target weight feature is greater than or equal to the third preset product weight threshold, the current target weight feature is used as the target product packaging weight.
[0121] In step S477 of some embodiments, the target product packaging weight is the cumulative calculation result of the candidate weight features corresponding to a certain number of target products, and the number of target products participating in this cumulative calculation is replaced with the candidate product packaging quantity. For example, if the target product packaging weight is the cumulative calculation result of the candidate weight features corresponding to fifty target products, then the candidate product packaging quantity is updated to fifty.
[0122] In step S478 of some embodiments, the updated candidate product packaging quantity and target product packaging weight are used as the final target product features.
[0123] In steps S473 to S478 shown in the embodiment of the present application, when the packaging weight of the candidate product is not within the preset net content range, the current packaging is confirmed to be unqualified, the assembly line equipment will clear the current counting and weighing results, and eliminate the target product currently included in the calculation. The preset weight is then used as the basis for packaging, ensuring that the next packaging after the packaging is judged to be unqualified can meet the weight specification requirements.
[0124] Steps S450 to S470 shown in the embodiment of the present application ensure the accuracy of the weight and quantity of each package by first calculating the package quantity and of the candidate products, reduce human intervention, and improve the automation level and packaging efficiency of the production line.
[0125] See also Fig. 9 In some embodiments, step S500 includes but is not limited to steps S910 to S940:
[0126] Step S910, determining the initial product moving distance of the conveyor belt according to the target product characteristics.
[0127] Step S920, determining a compensation distance according to the product conveying speed of the conveyor belt and a preset time length.
[0128] Step S930, determining the target product moving distance according to the initial product moving distance and the compensation distance.
[0129] Step S940: Packing the target product according to the moving distance of the target product.
[0130] In step S910 of some embodiments, the target product features have been determined in step S400, and the target products corresponding to these target product features are the objects to be packaged in this packaging operation. The last target product to be packaged can be determined, and the distance from the last packaged target product to the end of the conveyor belt close to the container is the initial product moving distance.
[0131] In step S920 of some embodiments, the product conveying rate is the transmission speed of the conveyor belt when the image is captured, and the preset time length is the time length consumed from capturing the product image to obtaining the target product features. Fig.10 , Fig.10 It is a schematic diagram of an optional packaging scenario provided in an embodiment of the present application. Fig.10The circle enclosed by a dotted line represents the target product to be packaged, and the black solid circle represents the last target product to be packaged. The compensation distance is obtained by multiplying the preset time and the product transmission rate. The compensation distance is the distance that the last target product to be packaged moves from capturing the product image to obtaining the target product features. Because it takes a certain amount of time for the camera to take pictures, transmit to the industrial computer, and then infer the target product features from the internal model of the industrial computer, and during this time, the conveyor belt will not stop, so the initial product movement distance obtained when taking the product image is not the final movement distance that controls the conveyor belt to stop.
[0132] In step S930 of some embodiments, the initial product moving distance is subtracted from the compensation distance to obtain the target product moving distance, which is the actual distance that the conveyor belt needs to be controlled to move from the time the camera captures the product image to the final completion of product packaging.
[0133] In step S940 of some embodiments, the conveyor belt is controlled to slow down while obtaining the moving distance of the target product. When it is detected that the conveyor belt has moved the moving distance of the target product, the conveyor belt is controlled to stop to ensure that the last target product to be packaged just falls into the container from the end.
[0134] It should be noted that in the explanation of the above embodiments, the recognition of a single product image is used as the application scenario. However, in the actual packaging process, it is usually necessary to collect multiple product images to complete a complete packaging operation. Specifically, if the first product image is counted, and the number of all target products in the image has not yet reached the preset product quantity threshold, the current candidate product packaging quantity is saved, and then the next product image is identified. According to the position information, size information, and features of the target product in the first product image and the second product image, respectively, and the distance relationship between the two product images, a judgment is made to determine which of the current product images have been photographed in the previous product image, and the product quantity features and product target features that have been calculated in the previous image recognition are eliminated to avoid repeated calculations. The value of the current candidate product packaging quantity continues to be accumulated until the candidate product packaging quantity reaches the preset product quantity threshold, and then the subsequent corresponding operations are performed. As for the weighing method, it is consistent with the principle of counting, and will not be repeated here.
[0135] Steps S910 to S940 shown in the embodiment of the present application determine the initial moving distance of the conveyor belt by identifying the last packaged target product, and then calculate the compensation distance, taking into account the control distance deviation caused by the time from camera shooting to acquisition and subsequent recognition processing, to ensure that the last target product can be accurately delivered to the packaging container, thereby avoiding excessive or insufficient movement of the conveyor belt.
[0136] See also Fig.11 In some embodiments, before step S400, the product packaging method provided in the embodiment of the present application further includes but is not limited to steps S1110 to S1140:
[0137] Step S1110, obtaining product positive interaction data of historical packaged products.
[0138] Step S1120, obtaining product demand data according to product positive interaction data.
[0139] Step S1130, generating tasks according to preset product surplus data and product demand data to obtain product packaging tasks.
[0140] Step S1140, determining a preset product feature threshold according to the product packaging task.
[0141] In step S1110 of some embodiments, packaged products are packaged products of different packaging specifications, and product positive interaction data refers to the consumption of packaged products within a certain unit time in history, which may be market demand and customer order quantity. For example, the packaging specifications may include 200 per package and 500 grams per package, and the product positive interaction data may be the consumption of packaged products with packaging specifications of 200 per package and 500 grams per package in a month in history.
[0142] In step S1120 of some embodiments, product positive interaction data within the three months before the current moment can be obtained and input into the deep learning model pre-loaded in the industrial computer to predict the consumption of packaged products in this month. The predicted consumption is the product demand data. For products that are related to seasons, product positive interaction data of the same quarter in recent years can be obtained for prediction. For example, based on the product positive interaction data from March to May of the previous year and the product positive interaction data from March to May of last year, the possible consumption from March to May of this year can be predicted.
[0143] In step S1130 of some embodiments, the preset product surplus data is the current number of packaged products, which can be the inventory of the factory warehouse. The product demand data is subtracted from the preset product surplus data to obtain the number of packages required for different packaging specifications within this month, that is, the product packaging task is obtained.
[0144] In step S1140 of some embodiments, the industrial computer is capable of controlling multiple assembly line devices at the same time. Therefore, according to the product packaging task, the preset product feature threshold of some assembly line devices can be controlled to be the preset product quantity threshold, and the preset product feature threshold of another part of the assembly line devices can be controlled to be the preset product weight threshold, or the packaging priority of different packaging specifications can be controlled.
[0145] For example, please refer to Fig.12 , Fig.12 The system diagram of a product packaging method provided by an embodiment of the present application is shown in FIG.
[0146] The internal model of the industrial computer first obtains the product forward interaction data of historical packaged products, and predicts the product demand data for this month: 1,000 packages of 200 packages are needed, and 700 packages of 500 grams are needed. The factory warehouse already has 400 packages of 200 packages, and 300 packages of 500 grams are needed. 700 packages are needed, so the product packaging task for this month is to pack 600 packages of 200 packages and 400 packages of 500 grams.
[0147] At this time, the priority of the packaging specifications can be adjusted, giving priority to packaging specifications with heavier packaging tasks, and setting the preset product feature threshold of all assembly line equipment to 200. After packaging 600 packages of products with a specification of 200 per package, the packaging products with a specification of 500 grams per package can be packaged.
[0148] Alternatively, the packaging tasks of the assembly line equipment are allocated according to the proportion of the demand in the total demand. Assuming that the industrial computer is connected to ten assembly line equipment, that is, n is ten, the preset product feature threshold of six of the assembly line equipment is two hundred, and the preset product feature threshold of the other four assembly lines is five hundred grams.
[0149] Steps S1110 to S1140 shown in the embodiment of the present application can effectively understand market demand and customer order quantity by obtaining product positive interaction data of historical packaged products. Then, predictions are made based on these data and using deep learning models to predict product demand in the current period. In addition, detailed product packaging tasks are generated in combination with current inventory data. When the industrial computer controls multiple assembly line equipment, it can flexibly adjust the preset product feature thresholds according to the demand and priority of different packaging specifications, thereby optimizing production efficiency. Through this intelligent scheduling and control, not only can the efficiency and accuracy of the packaging process be improved, but also the inventory cost can be effectively reduced, and the overall operation efficiency and responsiveness of the production line can be improved.
[0150] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements any step of the above-mentioned product packaging method when executing the computer program.
[0151] The computer program is stored in the memory, and the processor executes at least one computer program to implement the product packaging method of the present disclosure. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.
[0152] Combine the following Fig.13 The electronic device according to the embodiment of the present application is introduced in detail.
[0153] Please refer to Fig.13 , Fig.13 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0154] The processor 1310 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present disclosure;
[0155] The memory 1320 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1320 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1320, and the processor 1310 calls and executes the product packaging method of the embodiment of the present disclosure;
[0156] Input / output interface 1330, used to implement information input and output;
[0157] The communication interface 1340 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0158] bus 1350 , which transmits information between the various components of the device (e.g., processor 1310 , memory 1320 , input / output interface 1330 , and communication interface 1340 );
[0159] The processor 1310 , the memory 1320 , the input / output interface 1330 , and the communication interface 1340 are connected to each other in communication within the device via a bus 1350 .
[0160] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned product packaging methods are implemented.
[0161] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0162] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0163] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0164] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0165] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0166] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0167] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0168] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0170] 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 storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs.
[0171] The preferred embodiments of the present disclosure are described above with reference to the accompanying drawings, but the scope of the rights of the present disclosure is not limited thereto. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present disclosure should be within the scope of the rights of the present disclosure.
Claims
1. A product packaging method, characterized in that: The product packaging method comprises: Obtain product images of target products; Extracting product features from the product image to obtain product quantity features and product weight features; Determine a candidate product feature according to at least one of the product quantity feature and the product weight feature; Screening the candidate product features according to a preset product feature threshold to obtain target product features; Packaging the target product according to the characteristics of the target product; The candidate product features include the product quantity feature and the product weight feature, the preset product feature threshold includes a preset product quantity threshold, a first preset product weight threshold and a second preset product weight threshold, and the candidate product features are screened according to the preset product feature threshold to obtain the target product features, including: Add the product quantity features according to a preset direction to obtain the package quantity of the candidate products; If the package quantity of the candidate product is equal to the preset product quantity threshold, then adding the product weight features according to the preset direction to obtain the package weight of the candidate product; The package weights of the candidate products are screened according to the first preset product weight threshold and the second preset product weight threshold to obtain the package weight of the target product, and the target product characteristics are determined according to the package quantity of the candidate products and the package weight of the target product; The step of screening the package weights of the candidate products according to the first preset product weight threshold and the second preset product weight threshold to obtain the package weight of the target product, and determining the target product characteristics according to the package quantity of the candidate products and the package weight of the target product includes: If the package weight of the candidate product is less than the first preset product weight threshold, or the package weight of the candidate product is greater than the second preset product weight threshold, then the target product corresponding to the package weight of the candidate product is eliminated; Acquire the product weight feature of the next target product in sequence according to the preset direction to obtain a candidate weight feature; Adding the candidate weight features to obtain a target weight feature; The target weight feature is screened according to a third preset product weight threshold to obtain the target product packaging weight; Update the package quantity of the candidate products according to the package weight of the target product; The updated package quantity of the candidate products and the package weight of the target product are used as the target product features.
2. The product packaging method according to claim 1, characterized in that: The candidate product features include the product quantity features, the preset product feature threshold includes the preset product quantity threshold, and the candidate product features are screened according to the preset product feature threshold to obtain the target product features, including: Adding the product quantity features according to a preset direction to obtain the candidate product packaging quantity; the preset direction is the direction opposite to the conveying direction of the conveyor belt used to place the target product; If the candidate product package quantity is equal to the preset product quantity threshold, the candidate product package quantity is used as the target product feature.
3. The product packaging method according to claim 1, characterized in that: The candidate product feature includes the product weight feature, the preset product feature threshold includes a preset product weight threshold, and the candidate product features are screened according to the preset product feature threshold to obtain the target product feature, including: Adding the product weight features in a preset direction to obtain the packaging weight of the candidate product; the preset direction is the direction opposite to the conveying direction of the conveyor belt used to place the target product; If the package weight of the candidate product is greater than or equal to the preset product weight threshold, the package weight of the candidate product is used as the target product feature.
4. The product packaging method according to claim 1, characterized in that: The step of screening the package weights of the candidate products according to the first preset product weight threshold and the second preset product weight threshold to obtain the package weight of the target product, and determining the target product characteristics according to the package quantity of the candidate products and the package weight of the target product includes: If the package weight of the candidate product is greater than or equal to the first preset product weight threshold, and the package weight of the candidate product is less than or equal to the second preset product weight threshold, the package weight of the candidate product is used as the package weight of the target product; The package quantity of the candidate products and the package weight of the target product are used as the characteristics of the target product.
5. The product packaging method according to any one of claims 1 to 4, characterized in that: The target product is placed on a conveyor belt, and the target product is packaged according to the characteristics of the target product, including: Determining an initial product moving distance of the conveyor belt according to the target product characteristics; Determine the compensation distance according to the product conveying rate of the conveyor belt and the preset time length; the preset time length is the time length consumed from capturing the product image to obtaining the target product feature; Determining a target product moving distance according to the initial product moving distance and the compensation distance; The target product is packaged according to the moving distance of the target product.
6. The product packaging method according to any one of claims 1 to 4, characterized in that: Before screening the candidate product features according to the preset product feature threshold to obtain the target product features, the product packaging method further includes: Get product positive interaction data of historical packaged products; Acquire product demand data according to the product positive interaction data; Generate a task based on the preset product surplus data and the product demand data to obtain a product packaging task; The preset product feature threshold is determined according to the product packaging task.
7. An electronic device, characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the product packaging method according to any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the product packaging method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Counting verification device, counting system and method
CN112307828A
Fixed number basis weight food intelligence sorting unit
CN205345384U