Commodity distribution auxiliary method and device

Through cargo layer detection, commodity detection and category detection, combined with the image generation network of the diffusion model, a distribution guide map that complies with the distribution rules is generated, which solves the problems of high distribution error rate and low efficiency in the existing technology, and achieves efficient and accurate commodity placement.

CN120451631AInactive Publication Date: 2025-08-08广州市玄瞳科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510496575.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, commodity distribution mainly relies on manual operations, and there are problems of high error rate and low execution efficiency, making it difficult to efficiently and accurately complete the placement of commodities in display scenarios.

Method used

Through cargo layer detection, product detection and category detection, an image generation network based on the diffusion model is generated, and a distribution guide map that conforms to the distribution rules is created to assist the distribution staff to complete the distribution task.

Benefits of technology

The generated distribution guide map is consistent with the actual scenario and is highly authentic. It can significantly improve the efficiency and accuracy of distribution, helping distribution personnel complete distribution tasks efficiently and accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451631A_ABST
    Figure CN120451631A_ABST
Patent Text Reader

Abstract

The invention discloses a commodity distribution auxiliary method and device, and the method comprises the steps: carrying out the detection of a goods layer according to a distribution map, and obtaining the goods layer information of a goods shelf in the distribution map; commodity detection is carried out according to the commodity distribution map, and position information of all commodities in the commodity distribution map is obtained; performing category detection according to a distribution map and the position information to obtain category information of all commodities in the distribution map; according to the goods layer information, the position information and the category information, carrying out goods distribution statistics to obtain goods distribution information of all goods in the goods distribution map; performing image generation according to a preset goods distribution rule and the goods distribution information to obtain a goods distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model. Compared with the prior art, the method and the device have the advantages that the more real goods laying guide map conforming to the goods laying rule can be generated, and a goods laying worker can be assisted to complete the goods laying task more efficiently and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision, and in particular to a commodity distribution assistance method and device. Background Art

[0002] In the beverage, liquor, and food sectors, companies need to precisely control the placement of their products within display scenarios to ensure both quantity and positioning within refrigerators, shelves, and other display areas, thereby increasing their market share. Currently, product placement is primarily performed manually by salespeople who follow company-specified placement rules. This results in high error rates and low execution efficiency, leading to a pressing need for efficient and accurate product placement. Summary of the Invention

[0003] The present invention provides a commodity distribution assistance method, which can generate a more realistic distribution guide map that complies with distribution rules, and assists distribution staff to complete distribution tasks more efficiently and accurately.

[0004] In a first aspect, an embodiment of the present invention provides a product distribution assistance method, comprising:

[0005] Cargo layer detection is performed according to the cargo distribution map to obtain cargo layer information of the shelves in the cargo distribution map;

[0006] Detecting products based on a distribution map to obtain location information of all products in the distribution map;

[0007] Perform category detection based on the product layout map and the location information to obtain category information of all products in the product layout map;

[0008] Performing distribution statistics based on the cargo layer information, location information, and category information to obtain distribution information for all commodities in the distribution map;

[0009] An image is generated according to a preset distribution rule and the distribution information to obtain a distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model.

[0010] The embodiment of the present invention obtains cargo layer information through cargo layer detection, providing a data basis for subsequently obtaining complete cargo distribution information; obtains location information through commodity detection, providing a data basis for subsequently obtaining complete cargo distribution information; obtains category information through category detection, providing a data basis for subsequently obtaining complete cargo distribution information; compares the complete cargo distribution information with preset cargo distribution rules, and generates an image to obtain a cargo distribution guide map that complies with the cargo distribution rules. The scene of the cargo distribution guide map is consistent with the actual scene and has high authenticity. The cargo distribution staff can complete the cargo distribution task efficiently and accurately according to the cargo distribution guide map.

[0011] Furthermore, category detection is performed based on the distribution map and the location information to obtain category information of all commodities in the distribution map, including:

[0012] Performing location segmentation based on the distribution map and the location information to obtain a location map of all commodities in the distribution map;

[0013] Category detection is performed according to the location map to obtain category information of all commodities in the distribution map.

[0014] The embodiment of the present invention obtains category information through category detection, providing a data basis for subsequently obtaining complete distribution information.

[0015] Furthermore, the image generation based on the preset distribution rules and the distribution information to obtain the distribution guide map includes:

[0016] Verifying and adjusting the distribution information according to preset distribution rules to obtain a first distribution guide map and a mask map;

[0017] Generate an image based on the first product placement guide map to obtain a second product placement guide map;

[0018] An image synthesis is performed based on the product placement map, the mask map and the second product placement guide map to obtain a product placement guide map.

[0019] The embodiment of the present invention adjusts the distribution map through preset distribution rules to obtain a distribution guide map and a mask map, which provide a data basis for subsequent image generation and image synthesis.

[0020] Furthermore, the product distribution information is checked and adjusted according to the preset product distribution rules to obtain a first product distribution guide map and a mask map, including:

[0021] Generate an initial mask image with the same scale as the product layout image; wherein the value of the initial mask image is all 1;

[0022] Traversing and checking the distribution information according to the preset distribution rules to obtain the position information that needs to be adjusted;

[0023] According to the position information that needs to be adjusted, the position map of the corresponding area in the distribution map is adjusted to obtain a first distribution guide map;

[0024] According to the position information that needs to be adjusted, the value of the corresponding area in the initial mask map is set to 0 to obtain a mask map.

[0025] The embodiment of the present invention implements product distribution adjustment by formulating a traversal algorithm according to preset product distribution rules.

[0026] Furthermore, before generating an image based on the first distribution guide map to obtain the second distribution guide map, the method further includes:

[0027] Obtain image generation sample set;

[0028] Based on the image generation sample set, the initial image generation network is iteratively trained until the image generation network reaches a preset convergence condition, thereby obtaining an optimal image generation network.

[0029] The embodiment of the present invention iteratively trains an image generation network through an image generation sample set, providing a model basis for subsequent image generation.

[0030] Furthermore, the acquiring of images to generate a sample set includes:

[0031] Acquire a distribution image sample set; wherein the distribution image sample set includes a first distribution image sample set and a second distribution image sample set;

[0032] Performing commodity detection based on the first product distribution image sample set to obtain a commodity sample set;

[0033] Commodity detection and category detection are performed based on the second distribution image sample set and the commodity sample set to obtain an image generation sample set.

[0034] The embodiment of the present invention performs commodity detection and category detection on a distribution image sample set to obtain an image generation sample set, thereby providing a data basis for subsequent training of an image generation network.

[0035] Furthermore, performing commodity detection based on the first distribution image sample set to obtain a commodity sample set includes:

[0036] Performing commodity detection based on the first distribution image sample set to obtain first position information of all commodities in the first distribution image sample set;

[0037] Position segmentation is performed according to the first distribution image sample set and the first position information to obtain a product sample set; wherein the product sample set includes the first position maps of all products in the first distribution image sample set.

[0038] The embodiment of the present invention performs position segmentation through the first position information to obtain a position map of all commodities in the first distribution image sample set, thereby providing a data basis for the subsequent construction of an image generation sample set.

[0039] Furthermore, performing commodity detection and category detection based on the second distribution image sample set and the commodity sample set to obtain an image generation sample set includes:

[0040] Perform category detection based on the commodity sample set to obtain first category information of all commodities in the commodity sample set; wherein one piece of the first category information corresponds to one first location map;

[0041] Performing commodity detection based on the second distribution image sample set to obtain second position information of all commodities in the second distribution image sample set;

[0042] Performing position segmentation based on the second distribution image sample set and the second position information to obtain a second position map of all commodities in the second distribution image sample set;

[0043] Performing category detection based on the second location map to obtain second category information of all commodities in the second distribution image sample set; wherein one piece of second category information corresponds to one second location map;

[0044] Comparing the first category information with the second category information, replacing the corresponding second position map with the first position map with the highest similarity, to obtain a third distribution image sample set;

[0045] An image generation sample set is obtained by correspondingly combining the second distribution image sample set and the third distribution image sample set.

[0046] The embodiment of the present invention replaces location graphs of similar categories to provide a data basis for subsequent construction of an image generation sample set.

[0047] Furthermore, the image synthesis is performed based on the product distribution map, the mask map and the second product distribution guide map to obtain the product distribution guide map, specifically:

[0048] P f =MASK×P1+(1-MASK)×P2;

[0049] Among them, P f is the distribution guide map; P1 is the distribution map; P2 is the second distribution guide map; MASK is the mask map.

[0050] The embodiment of the present invention realizes the synthesis of the distribution guide map through a preset synthesis formula.

[0051] In a second aspect, an embodiment of the present invention provides a product distribution assistance device, comprising: a product layer detection module, a product detection module, a product classification module, a product distribution information module, and an image generation module;

[0052] The cargo layer detection module is used to perform cargo layer detection according to the cargo layout map to obtain cargo layer information of the shelves in the cargo layout map;

[0053] The commodity detection module is used to detect commodities according to the distribution map and obtain the location information of all commodities in the distribution map;

[0054] The commodity classification module is used to perform category detection based on the distribution map and the location information to obtain category information of all commodities in the distribution map;

[0055] The distribution information module is used to perform distribution statistics based on the cargo layer information, location information and category information to obtain distribution information of all commodities in the distribution map;

[0056] The image generation module is used to generate an image according to a preset distribution rule and the distribution information to obtain a distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model.

[0057] The embodiment of the present invention obtains cargo layer information through the cargo layer detection module, providing a data basis for subsequently obtaining complete cargo distribution information; obtains location information through the commodity detection module, providing a data basis for subsequently obtaining complete cargo distribution information; obtains category information through the commodity classification module, providing a data basis for subsequently obtaining complete cargo distribution information; obtains a cargo distribution guide map through the image generation module, the scene of the cargo distribution guide map is consistent with the actual scene, and the authenticity is high. The cargo distributor can complete the cargo distribution task efficiently and accurately according to the cargo distribution guide map. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic diagram of the flow of a product distribution assistance method provided by an embodiment of the present invention;

[0059] Figure 2 A schematic diagram of image pairs of an image generation sample set provided by an embodiment of the present invention;

[0060] Figure 3 A schematic diagram of the execution flow of the product distribution assistance method provided by an embodiment of the present invention;

[0061] Figure 4 A schematic diagram of the structure of a product distribution auxiliary device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0063] Please refer to Figure 1 , a commodity distribution auxiliary method provided by an embodiment of the present invention, including steps S101 to S105, which are described in detail as follows:

[0064] Step S101: perform cargo layer detection according to a cargo distribution map to obtain cargo layer information of the shelves in the cargo distribution map.

[0065] Furthermore, step S101 is specifically as follows:

[0066] Input the cargo distribution map into the cargo layer detection network to perform cargo layer segmentation, and output the cargo layer segmentation results of the shelves in the cargo distribution map;

[0067] The centroid ordinates of each cargo layer in the cargo layer segmentation result are sorted from top to bottom to obtain cargo layer information of the shelf in the cargo distribution map.

[0068] Furthermore, before step S101, the method further includes:

[0069] Obtain a sample set of cargo layer images;

[0070] Based on the cargo layer image sample set, the initial cargo layer detection network is iteratively trained until the cargo layer detection network reaches a preset convergence condition, thereby obtaining an optimal cargo layer detection network; wherein, the classification branches of the optimal cargo layer detection network are two categories: cargo layer and background.

[0071] Optionally, the cargo layer image sample set is obtained by manual annotation, and the annotation content is the position of the cargo layer.

[0072] Optionally, a mask-RCNN network is used as a cargo layer detection network and trained through supervised learning; wherein, the mask-RCNN network is a two-stage target segmentation network with high accuracy and is suitable for fast-moving consumer goods scenarios.

[0073] The embodiment of the present invention iteratively trains a cargo layer detection network through a cargo layer image sample set, providing a model basis for subsequent cargo layer detection.

[0074] Step S102 : detecting commodities according to the distribution map to obtain location information of all commodities in the distribution map.

[0075] Furthermore, step S102 is specifically as follows:

[0076] Input the product distribution map into the product detection network to perform product segmentation, and output the product segmentation results of all products in the product distribution map;

[0077] It is determined that the centroid of each commodity in the commodity segmentation result is located on which shelf in the distribution map, and the position information of all commodities in the distribution map is obtained.

[0078] Furthermore, before step S102, the method further includes:

[0079] Obtain a sample set of product images;

[0080] Based on a sample set of product images, an initial product detection network is iteratively trained until the product detection network reaches a preset convergence condition, thereby obtaining an optimal product detection network; wherein the classification branches of the optimal product detection network are two categories: product and background.

[0081] Optionally, the product image sample set is obtained through manual annotation, and the annotation content is the location of the product.

[0082] Optionally, a faster-RCNN network is used as a product detection network and trained through supervised learning. The faster-RCNN network is a two-stage target segmentation network with high accuracy and is suitable for fast-moving consumer goods scenarios.

[0083] The embodiment of the present invention iteratively trains a commodity detection network through a commodity image sample set, providing a model basis for subsequent commodity detection.

[0084] Step S103 : performing category detection based on the product layout map and the location information to obtain category information of all products in the product layout map.

[0085] Furthermore, step S103 is specifically as follows:

[0086] Performing location segmentation based on the distribution map and the location information to obtain a location map of all commodities in the distribution map;

[0087] Category detection is performed according to the location map to obtain category information of all commodities in the distribution map.

[0088] Optionally, performing position segmentation based on the distribution map and the position information to obtain a position map of all commodities in the distribution map is specifically as follows:

[0089] Cutting the rectangular area where the product is located in the distribution map according to the location information;

[0090] The cropped rectangular area is used as the position map.

[0091] Optionally, performing category detection based on the location map to obtain category information of all commodities in the distribution map is specifically as follows:

[0092] Inputting the location map into a commodity classification network for category detection, and outputting category information of the commodities in the location map;

[0093] The characteristic information of the commodities in the location map is used as the category information of the commodities in the distribution map.

[0094] The embodiment of the present invention obtains category information through category detection, providing a data basis for subsequently obtaining complete distribution information.

[0095] Furthermore, before step S103, the method further includes:

[0096] Get a sample set of product categories;

[0097] Based on the product category sample set, the initial product classification network is iteratively trained until the product classification network reaches a preset convergence condition, thereby obtaining an optimal product classification network; wherein the optimal product classification network removes the fully connected layer and activation layer used for classification at the end.

[0098] Optionally, the commodity category sample set is obtained through manual annotation and open source classification sample set, and the annotation content is the type of commodity.

[0099] Optionally, the resnext101 network is used as the product classification network and trained through supervised learning. The resnext101 network is a residual network with high accuracy and is suitable for fast-moving consumer goods scenarios.

[0100] The embodiment of the present invention iteratively trains a commodity classification network through a commodity category sample set, providing a model basis for subsequent category detection.

[0101] Step S104 , performing distribution statistics based on the cargo layer information, location information, and category information to obtain distribution information of all commodities in the distribution map.

[0102] Optionally, the distribution information includes the positional relationship of each commodity in each cargo layer in the distribution map, and the type of each commodity.

[0103] The embodiment of the present invention iteratively trains a commodity detection network through a commodity image sample set, providing a model basis for subsequent commodity detection.

[0104] Step S105 , performing image generation according to the preset distribution rules and the distribution information to obtain a distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model.

[0105] Furthermore, step S105 is specifically as follows:

[0106] Verifying and adjusting the distribution information according to preset distribution rules to obtain a first distribution guide map and a mask map;

[0107] Generate an image based on the first product placement guide map to obtain a second product placement guide map;

[0108] An image synthesis is performed based on the product placement map, the mask map and the second product placement guide map to obtain a product placement guide map.

[0109] The embodiment of the present invention implements product distribution adjustment by formulating a traversal algorithm according to preset product distribution rules.

[0110] Furthermore, the product distribution information is checked and adjusted according to the preset product distribution rules to obtain a first product distribution guide map and a mask map, including:

[0111] Generate an initial mask image with the same scale as the product layout image; wherein the value of the initial mask image is all 1;

[0112] Traversing and checking the distribution information according to the preset distribution rules to obtain the position information that needs to be adjusted;

[0113] According to the position information that needs to be adjusted, the position map of the corresponding area in the distribution map is adjusted to obtain a first distribution guide map;

[0114] According to the position information that needs to be adjusted, the value of the corresponding area in the initial mask map is set to 0 to obtain a mask map.

[0115] The embodiment of the present invention implements product distribution adjustment by formulating a traversal algorithm according to preset product distribution rules.

[0116] Exemplarily, the preset distribution rules include Rule 1 and Rule 2. Rule 1 is "Product A must be placed on the Xth layer and the quantity should be no less than N1", and Rule 2 is "The total number of Product A on display is no less than N2", where Rule 1 has a higher priority than Rule 2. Calculate the average width of each layer of products in the distribution map based on the distribution information. If there is no product on the current layer, the average width of the products on the adjacent layer is used as the average width of the products on the current layer. Calculate the number of vacancies on each layer (one vacancy is a hypothetical product) based on the average width of each layer of products. The calculation method is: divide the area without products into integers based on the average width of the products on that layer. If it is less than an average width, ignore it. Check the products on each layer according to the rules. If the number of Product A on the current layer is greater than the number N1 required by Rule 1, then add the coordinates of the first N1 Products A on the current layer to the fixed set, and the coordinates of the remaining Products A to the candidate set, and so on, until all layers and Rule 1 are cycled through. If the number of Product A on the current layer is less than the number N1 required by Rule 1, then record the out-of-stock quantity of Product A in the layer record table. According to rule 2, traverse and check the products of each layer, first calculate the sum of the number of product A in the fixed set and the hierarchical record table. If the number is less than N2 (the difference is N0), then the coordinates of the first N0 product A that are not included in the fixed set in the distribution map are added to the fixed set and their records in the candidate table are deleted, and the coordinates of the remaining product A are added to the candidate set; if the number is still less than N2, then the out-of-stock quantity of product A is recorded in the global record table. Add the coordinates of all products that are not included in the fixed set and the candidate set to the candidate set. Generate a mask map of the same size as the distribution map, with an initial value of 1, and set the corresponding area where the product is detected to 0. Set the corresponding area of all products in the fixed set in the mask map to 1. Traverse the hierarchical record table, if the out-of-stock quantity of product A is N c , then fill the empty space of the layer with commodity A. If the quantity of commodity A is still insufficient (the gap is N z ), then the top N in the current layer of the candidate set z The filling method is as follows: assuming that the adjustment is for product B, take an image of product A (if there is no product A in this layer, take a product A from another layer; if there is no product A in this scene, take an image of product A from the database) and scale it to the size of product B, covering the position of product B. At the same time, the area corresponding to product B in the mask image is set to 0. After traversing the layered record tables of all layers, the product placement guide map with product placement adjustments is output. At the same time, the corresponding areas of all products in the candidate list in the mask image are set to 1, and the final mask image is output.

[0117] Furthermore, before generating an image based on the first distribution guide map to obtain the second distribution guide map, the method further includes:

[0118] Obtain image generation sample set;

[0119] Based on the image generation sample set, the initial image generation network is iteratively trained until the image generation network reaches a preset convergence condition, thereby obtaining an optimal image generation network.

[0120] Optionally, an instructPix2Pix network is used as an image generation network; wherein the instructPix2Pix network is a diffusion model that can generate images with high authenticity and is suitable for fast-moving consumer goods scenarios.

[0121] The embodiment of the present invention iteratively trains an image generation network through an image generation sample set, providing a model basis for subsequent image generation.

[0122] Furthermore, the acquiring of images to generate a sample set includes:

[0123] Acquire a distribution image sample set; wherein the distribution image sample set includes a first distribution image sample set and a second distribution image sample set;

[0124] Performing commodity detection based on the first product distribution image sample set to obtain a commodity sample set;

[0125] Commodity detection and category detection are performed based on the second distribution image sample set and the commodity sample set to obtain an image generation sample set.

[0126] The embodiment of the present invention performs commodity detection and category detection on a distribution image sample set to obtain an image generation sample set, thereby providing a data basis for subsequent training of an image generation network.

[0127] Furthermore, performing commodity detection based on the first distribution image sample set to obtain a commodity sample set includes:

[0128] Performing commodity detection based on the first distribution image sample set to obtain first position information of all commodities in the first distribution image sample set;

[0129] Position segmentation is performed according to the first distribution image sample set and the first position information to obtain a product sample set; wherein the product sample set includes the first position maps of all products in the first distribution image sample set.

[0130] The embodiment of the present invention performs position segmentation through the first position information to obtain a position map of all commodities in the first distribution image sample set, thereby providing a data basis for the subsequent construction of an image generation sample set.

[0131] Furthermore, performing commodity detection and category detection based on the second distribution image sample set and the commodity sample set to obtain an image generation sample set includes:

[0132] Perform category detection based on the commodity sample set to obtain first category information of all commodities in the commodity sample set; wherein one piece of first category information corresponds to one first location map;

[0133] Performing commodity detection based on the second distribution image sample set to obtain second position information of all commodities in the second distribution image sample set;

[0134] Performing position segmentation based on the second distribution image sample set and the second position information to obtain a second position map of all commodities in the second distribution image sample set;

[0135] Performing category detection based on the second location map to obtain second category information of all commodities in the second distribution image sample set; wherein one piece of second category information corresponds to one second location map;

[0136] Comparing the first category information with the second category information, replacing the corresponding second position map with the first position map with the highest similarity, to obtain a third distribution image sample set;

[0137] An image generation sample set is obtained by correspondingly combining the second distribution image sample set and the third distribution image sample set.

[0138] The embodiment of the present invention replaces location graphs of similar categories to provide a data basis for subsequent construction of an image generation sample set.

[0139] For example, a batch of store inspection pictures of a certain brand is obtained, and unclear pictures are eliminated, and the remaining pictures are divided into two batches. For the first batch of pictures, the product detection network is used to perform product segmentation to obtain a product location map; the product location map is passed through the product classification network for category detection, and the product location map is stored according to category to obtain a product sample set. For the second batch of pictures, the product detection network is used to perform product segmentation, and the product classification network is used to perform category detection; the fully connected layer and activation layer of the product classification network used for classification are removed to obtain a product feature extraction network, and the product feature extraction network is used to extract the feature vector of each product in the second batch of pictures and the feature vector of the corresponding category of products in the product sample set; the cosine similarity is used to compare the feature vectors of the two, and the location map corresponding to the feature vector with the highest similarity in the product sample set is scaled and pasted to the product position corresponding to the second batch of pictures to obtain a picture containing the map; the picture containing the map and the corresponding original picture are taken as an image pair, such as Figure 2As shown, a sample set of image generation is formed. This sample set is used as training data, and a text prompt, such as "Adjust the product posture to make the image more realistic," is given and fed into the InstructPix2Pix network for iterative training. The pre-trained weights of the InstructPix2Pix network are fine-tuned using LoRa technology.

[0140] Furthermore, the image synthesis is performed based on the product distribution map, the mask map and the second product distribution guide map to obtain the product distribution guide map, specifically:

[0141] P f =MASK×P1+(1-MASK)×P2;

[0142] Among them, P f is the distribution guide map; P1 is the distribution map; P2 is the second distribution guide map; MASK is the mask map.

[0143] The embodiment of the present invention realizes the synthesis of the distribution guide map through a preset synthesis formula.

[0144] like Figure 3 As shown, based on the above method embodiment, a corresponding execution process embodiment is provided, including:

[0145] Step 1: The distributor takes pictures of the goods;

[0146] Step 2: Performing layer detection, commodity detection, and category detection on the product distribution image to obtain product distribution information;

[0147] Step 3: Analyze the distribution information according to the preset distribution rules; if it meets the distribution rules, the distribution pictures are recorded in the database; if it does not meet the distribution rules, the distribution pictures are adjusted;

[0148] Step 4: Input the adjusted product placement image into the image generation network to obtain a product placement guide map.

[0149] The embodiment of the present invention obtains cargo layer information through cargo layer detection, providing a data basis for subsequently obtaining complete cargo distribution information; obtains location information through commodity detection, providing a data basis for subsequently obtaining complete cargo distribution information; obtains category information through category detection, providing a data basis for subsequently obtaining complete cargo distribution information; compares the complete cargo distribution information with preset cargo distribution rules, and generates an image to obtain a cargo distribution guide map that complies with the cargo distribution rules. The scene of the cargo distribution guide map is consistent with the actual scene and has high authenticity. The cargo distribution staff can complete the cargo distribution task efficiently and accurately according to the cargo distribution guide map.

[0150] Please refer to Figure 4, a product distribution auxiliary device provided by an embodiment of the present invention, comprising: a product layer detection module 401, a product detection module 402, a product classification module 403, a product distribution information module 404, and an image generation module 405;

[0151] The cargo layer detection module 401 is used to perform cargo layer detection according to the cargo layout map to obtain cargo layer information of the shelves in the cargo layout map;

[0152] The commodity detection module 402 is used to detect commodities according to the distribution map and obtain the location information of all commodities in the distribution map;

[0153] The commodity classification module 403 is configured to perform category detection based on the distribution map and the location information to obtain category information of all commodities in the distribution map;

[0154] The product distribution information module 404 is used to perform product distribution statistics based on the product layer information, location information, and category information to obtain product distribution information for all products in the product distribution map;

[0155] The image generation module 405 is used to generate an image according to the preset distribution rules and the distribution information to obtain a distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model.

[0156] In the embodiment of the present invention, the commodity classification module 403 includes: a position segmentation submodule and a category detection submodule;

[0157] The location segmentation submodule is used to perform location segmentation based on the distribution map and the location information to obtain a location map of all commodities in the distribution map;

[0158] The category detection submodule is used to perform category detection based on the location map to obtain category information of all commodities in the distribution map.

[0159] The embodiment of the present invention obtains category information through the commodity classification module 403, providing a data basis for subsequently obtaining complete distribution information.

[0160] In the embodiment of the present invention, the image generation module 405 includes: a distribution adjustment submodule, an image generation submodule and an image synthesis submodule;

[0161] The product distribution adjustment submodule is configured to verify and adjust the product distribution information according to a preset product distribution rule to obtain a first product distribution guide map and a mask map;

[0162] The image generation submodule is configured to generate an image based on the first product placement guide map to obtain a second product placement guide map;

[0163] The image synthesis submodule is used to perform image synthesis based on the product distribution map, the mask map and the second product distribution guide map to obtain a product distribution guide map.

[0164] The embodiment of the present invention adjusts the distribution map through preset distribution rules to obtain a distribution guide map and a mask map, which provide a data basis for subsequent image generation and image synthesis.

[0165] In an embodiment of the present invention, the product distribution adjustment submodule includes: a first mask map unit, a product distribution adjustment unit, a product distribution guide map unit, and a second mask map unit;

[0166] The first mask map unit is used to generate an initial mask map having a size consistent with the size of the product layout map; wherein the value of the initial mask map is all 1;

[0167] The product distribution adjustment unit is configured to traverse and verify the product distribution information according to a preset product distribution rule to obtain position information that needs to be adjusted;

[0168] The product placement guide map unit is configured to adjust the position map of the corresponding area in the product placement map according to the position information that needs to be adjusted, so as to obtain a first product placement guide map;

[0169] The second mask map unit is configured to set the value of the corresponding area in the initial mask map to 0 according to the position information that needs to be adjusted, so as to obtain a mask map.

[0170] The embodiment of the present invention implements product distribution adjustment by formulating a traversal algorithm according to preset product distribution rules.

[0171] In an embodiment of the present invention, the image generation submodule includes: an image generation sample set acquisition unit and an image generation network training unit;

[0172] The image generation sample set acquisition unit is used to acquire the image generation sample set;

[0173] The image generation network training unit is used to iteratively train the initial image generation network based on the image generation sample set until the image generation network reaches a preset convergence condition, thereby obtaining an optimal image generation network.

[0174] The embodiment of the present invention iteratively trains an image generation network through an image generation sample set, providing a model basis for subsequent image generation.

[0175] In the embodiment of the present invention, the image generation sample set acquisition unit includes: a merchandise image sample set acquisition subunit, a merchandise sample set construction subunit, and an image generation sample set construction subunit;

[0176] The goods distribution image sample set acquisition subunit is used to acquire a goods distribution image sample set; wherein the goods distribution image sample set includes a first goods distribution image sample set and a second goods distribution image sample set;

[0177] The commodity sample set construction subunit is configured to perform commodity detection based on the first distribution image sample set to obtain a commodity sample set;

[0178] The image generation sample set construction subunit is used to perform commodity detection and category detection based on the second distribution image sample set and the commodity sample set to obtain the image generation sample set.

[0179] The embodiment of the present invention performs commodity detection and category detection on a distribution image sample set to obtain an image generation sample set, thereby providing a data basis for subsequent training of an image generation network.

[0180] In an embodiment of the present invention, the commodity sample set construction subunit includes: a first commodity detection component and a first position segmentation component;

[0181] The first commodity detection component is configured to perform commodity detection based on the first distribution image sample set to obtain first position information of all commodities in the first distribution image sample set;

[0182] The first position segmentation component is used to perform position segmentation according to the first distribution image sample set and the first position information to obtain a product sample set; wherein the product sample set includes the first position maps of all products in the first distribution image sample set.

[0183] The embodiment of the present invention performs position segmentation through the first position information to obtain a position map of all commodities in the first distribution image sample set, thereby providing a data basis for the subsequent construction of an image generation sample set.

[0184] In an embodiment of the present invention, the image generation sample set construction subunit includes: a first category detection component, a second commodity detection component, a second position segmentation component, a second category detection component, a position replacement component, and an image generation sample set construction component;

[0185] The first category detection component is used to perform category detection based on the commodity sample set to obtain first category information of all commodities in the commodity sample set; wherein, one piece of first category information corresponds to one first location map;

[0186] The second commodity detection component is configured to perform commodity detection based on the second distribution image sample set to obtain second position information of all commodities in the second distribution image sample set;

[0187] The second position segmentation component is configured to perform position segmentation based on the second distribution image sample set and the second position information to obtain a second position map of all commodities in the second distribution image sample set;

[0188] The second category detection component is configured to perform category detection based on the second location map to obtain second category information of all products in the second distribution image sample set; wherein one piece of second category information corresponds to one second location map;

[0189] The position replacement component is used to compare the first category information and the second category information, and replace the corresponding second position map with the first position map with the highest similarity, to obtain a third distribution image sample set;

[0190] The image generation sample set construction component is used to perform corresponding combinations according to the second distribution image sample set and the third distribution image sample set to obtain an image generation sample set.

[0191] The embodiment of the present invention replaces location graphs of similar categories to provide a data basis for subsequent construction of an image generation sample set.

[0192] In the embodiment of the present invention, the image synthesis submodule is specifically:

[0193] P f =MASK×P1+(1-MASK)×P2;

[0194] Among them, P f is the distribution guide map; P1 is the distribution map; P2 is the second distribution guide map; MASK is the mask map.

[0195] The embodiment of the present invention realizes the synthesis of the distribution guide map through a preset synthesis formula.

[0196] The above-mentioned device can implement the method of the above-mentioned method embodiment. The optional options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the content of the embodiment of this application can refer to the content of the above-mentioned method embodiment and will not be repeated in this embodiment.

[0197] The embodiment of the present invention obtains cargo layer information through the cargo layer detection module, providing a data basis for subsequently obtaining complete cargo distribution information; obtains location information through the commodity detection module, providing a data basis for subsequently obtaining complete cargo distribution information; obtains category information through the commodity classification module, providing a data basis for subsequently obtaining complete cargo distribution information; obtains a cargo distribution guide map through the image generation module, the scene of the cargo distribution guide map is consistent with the actual scene, and the authenticity is high. The cargo distributor can complete the cargo distribution task efficiently and accurately according to the cargo distribution guide map.

[0198] Based on the above-mentioned embodiment of a product distribution assistance method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, a product distribution assistance method according to any embodiment of the present invention is implemented.

[0199] For example, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more module elements may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0200] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0201] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.

[0202] Based on the above method embodiments, another embodiment of the present invention provides a computer-readable storage medium, including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a product distribution assistance method described in any one of the above method embodiments of the present invention.

[0203] Wherein, the module / unit integrated in the device / terminal equipment, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0204] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A commodity distribution auxiliary method, characterized in that: include: Cargo layer detection is performed according to the cargo distribution map to obtain cargo layer information of the shelves in the cargo distribution map; Detecting products based on a distribution map to obtain location information of all products in the distribution map; Perform category detection based on the product layout map and the location information to obtain category information of all products in the product layout map; Performing distribution statistics based on the cargo layer information, location information, and category information to obtain distribution information for all commodities in the distribution map; An image is generated according to a preset distribution rule and the distribution information to obtain a distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model.

2. A commodity distribution auxiliary method according to claim 1, characterized in that: The performing category detection based on the distribution map and the location information to obtain category information of all commodities in the distribution map includes: Performing location segmentation based on the distribution map and the location information to obtain a location map of all commodities in the distribution map; Category detection is performed according to the location map to obtain category information of all commodities in the distribution map.

3. A commodity distribution auxiliary method according to claim 1, characterized in that: The image generation according to the preset distribution rules and the distribution information to obtain the distribution guide map includes: Verifying and adjusting the distribution information according to preset distribution rules to obtain a first distribution guide map and a mask map; Generate an image based on the first product placement guide map to obtain a second product placement guide map; An image synthesis is performed based on the product placement map, the mask map and the second product placement guide map to obtain a product placement guide map.

4. A commodity distribution auxiliary method according to claim 3, characterized in that: The step of checking and adjusting the distribution information according to the preset distribution rules to obtain a first distribution guide map and a mask map includes: Generate an initial mask image with the same scale as the product layout image; wherein the value of the initial mask image is all 1; Traversing and checking the distribution information according to the preset distribution rules to obtain the position information that needs to be adjusted; According to the position information that needs to be adjusted, the position map of the corresponding area in the distribution map is adjusted to obtain a first distribution guide map; According to the position information that needs to be adjusted, the value of the corresponding area in the initial mask map is set to 0 to obtain a mask map.

5. A commodity distribution auxiliary method according to claim 3, characterized in that: Before generating an image based on the first product placement guide map to obtain a second product placement guide map, the method further includes: Obtain image generation sample set; Based on the image generation sample set, the initial image generation network is iteratively trained until the image generation network reaches a preset convergence condition, thereby obtaining an optimal image generation network.

6. A commodity distribution auxiliary method according to claim 5, characterized in that: The step of acquiring an image to generate a sample set includes: Acquire a distribution image sample set; wherein the distribution image sample set includes a first distribution image sample set and a second distribution image sample set; Performing commodity detection based on the first product distribution image sample set to obtain a commodity sample set; Commodity detection and category detection are performed based on the second distribution image sample set and the commodity sample set to obtain an image generation sample set.

7. A commodity distribution auxiliary method according to claim 6, characterized in that: The performing commodity detection based on the first distribution image sample set to obtain a commodity sample set includes: Performing commodity detection based on the first distribution image sample set to obtain first position information of all commodities in the first distribution image sample set; Position segmentation is performed according to the first distribution image sample set and the first position information to obtain a product sample set; wherein the product sample set includes the first position maps of all products in the first distribution image sample set.

8. A commodity distribution auxiliary method according to claim 6, characterized in that: The performing commodity detection and category detection based on the second distribution image sample set and the commodity sample set to obtain an image generation sample set includes: Perform category detection based on the commodity sample set to obtain first category information of all commodities in the commodity sample set; wherein one piece of the first category information corresponds to one first location map; Performing commodity detection based on the second distribution image sample set to obtain second position information of all commodities in the second distribution image sample set; Performing position segmentation based on the second distribution image sample set and the second position information to obtain a second position map of all commodities in the second distribution image sample set; Performing category detection based on the second location map to obtain second category information of all commodities in the second distribution image sample set; wherein one piece of second category information corresponds to one second location map; Comparing the first category information with the second category information, replacing the corresponding second position map with the first position map with the highest similarity, to obtain a third distribution image sample set; An image generation sample set is obtained by correspondingly combining the second distribution image sample set and the third distribution image sample set.

9. A commodity distribution auxiliary method according to claim 3, characterized in that: The image synthesis is performed based on the product distribution map, the mask map and the second product distribution guide map to obtain the product distribution guide map, specifically: P f =MASK×P1+(1-MASK)×P2; Among them, P f is the distribution guide map; P1 is the distribution map; P2 is the second distribution guide map; MASK is the mask map.

10. A commodity distribution auxiliary device, characterized in that: include: Cargo layer detection module, commodity detection module, commodity classification module, distribution information module and image generation module; The cargo layer detection module is used to perform cargo layer detection according to the cargo layout map to obtain cargo layer information of the shelves in the cargo layout map; The commodity detection module is used to detect commodities according to the distribution map and obtain the location information of all commodities in the distribution map; The commodity classification module is used to perform category detection based on the distribution map and the location information to obtain category information of all commodities in the distribution map; The distribution information module is used to perform distribution statistics based on the cargo layer information, location information and category information to obtain distribution information of all commodities in the distribution map; The image generation module is used to generate an image according to a preset distribution rule and the distribution information to obtain a distribution guide map; wherein the image generation is completed by an image generation network based on a diffusion model.