Commodity identification method and electronic equipment

By constructing a similar product library and establishing the corresponding relationship between products and similar products, the problem of insufficient recognition accuracy due to environmental factors in smart vending cabinets is solved, the recognition rate is improved and labor costs are reduced.

CN118587401APending Publication Date: 2024-09-03SHENZHEN LEKE INTELLIGENT CONTROL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410821163.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Smart vending cabinets have insufficient product recognition accuracy due to environmental factors such as light and camera angle, which increases labor costs.

Method used

Construct a similar product library, and establish the corresponding relationship between products and similar products by analyzing product images and historical sales data, which is used to generate alternative orders when the product category cannot be identified.

Benefits of technology

It improves the product recognition rate, reduces labor costs, and ensures the automated recognition capabilities of smart vending cabinets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587401A
    Figure CN118587401A
Patent Text Reader

Abstract

The embodiment of the invention discloses a commodity identification method and electronic equipment. The method comprises the following steps: acquiring a commodity image acquired by a camera component of an intelligent vending cabinet; inputting the commodity image into a commodity recognition model to enable the commodity recognition model to output a commodity category corresponding to the commodity image; detecting whether the commodity category is put on a shelf in the intelligent vending cabinet or not; if yes, generating a first order according to the commodity category; if not, inputting the commodity category into a similar commodity library, so that the similar commodity library outputs a similar category corresponding to the commodity category; and generating a second order according to the similar category. According to the embodiment of the invention, the similar commodity library is constructed, so that the similar corresponding relation between all the possibly appearing commodities and other commodities is established, the order can be generated according to the other commodity category mapped by the commodity category when the commodity category cannot be identified, the commodity identification rate is improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image recognition, and in particular to a commodity recognition method and electronic equipment. Background Art

[0002] As an emerging retail and logistics equipment, smart vending machines are gradually becoming an important part of the commercial and industrial fields. Smart vending machines use automation technology to achieve fast access and intelligent identification of goods, greatly improving work efficiency and user experience.

[0003] The transaction process of the smart vending machine is to identify the product category based on the product image obtained by the camera component, and then generate the corresponding order. In actual transaction scenarios, due to environmental factors such as light and camera angle, the product is easily misidentified. However, since the consumption of cabinets involves money, the existing identification methods require the recognition accuracy of the product to reach more than 99%. In reality, there are many staff members who mistakenly add products that are not on the shelves in the vending machine to the vending machine when replenishing the goods, resulting in the inability to identify the product. This situation will lead to a decrease in the recognition rate of the product, and inevitably increase labor costs. Summary of the invention

[0004] The main technical problem solved by the embodiments of the present invention is to provide a commodity identification method and electronic equipment, which can reduce the situation where the smart vending cabinet cannot identify the commodity and improve the commodity identification rate.

[0005] To solve the above technical problems, a technical solution adopted in an embodiment of the present invention is: to provide a commodity identification method, applied to a smart vending machine, comprising: obtaining a commodity image captured by a camera component of the smart vending machine; inputting the commodity image into a commodity identification model, so that the commodity identification model outputs a commodity category corresponding to the commodity image; detecting whether the commodity category is on the shelf in the smart vending machine; if so, generating a first order according to the commodity category; if not, inputting the commodity category into a similar commodity library, so that the similar commodity library outputs a similar category corresponding to the commodity category; and generating a second order according to the similar category.

[0006] In some embodiments, inputting the product category into a similar product library so that the similar product library outputs a similar category corresponding to the product category includes: inputting the product category into the similar product library; enabling the similar product library to obtain a corresponding correspondence based on the product category; and enabling the similar product library to output a corresponding similar category based on the corresponding correspondence.

[0007] In some embodiments, product identification further includes: establishing a product identification model; and establishing a similar product library.

[0008] In some embodiments, the establishment of a similar product library includes: selecting comparison products from the various categories of products in a preset order; obtaining the number of similar images between the comparison products and the remaining categories of products in turn; determining whether the number of similar images is greater than a preset first image threshold; if so, the corresponding product is similar to the comparison product, and a corresponding relationship is established; repeating the above steps until all products have been selected.

[0009] In some embodiments, the establishment of a library of similar products further includes: if the number of similar images between the remaining categories of products and the comparison product is not greater than the first image threshold, obtaining a first selling price of the comparison product; obtaining similar products of the remaining categories of products whose number of similar images with the comparison product is greater than a preset second image threshold; obtaining a second selling price of the similar products; and establishing a corresponding relationship between the comparison product and the corresponding similar products of the comparison product whose difference between the second selling price and the first selling price does not exceed the preset price threshold.

[0010] In some embodiments, the method of obtaining the number of similar images between the comparison product and any other category of products includes: obtaining all captured images of each category of products; obtaining the similarity confidence between all captured images of the comparison product and all captured images of any other category of products based on an image recognition algorithm; judging in turn whether the similarity confidence between all captured images of the comparison product and all captured images of any other category of products is greater than a preset confidence threshold; if so, judging that the corresponding two captured images are similar images; and counting the number of similar images between the comparison product and any other category of products.

[0011] In some embodiments, obtaining the commodity image captured by the camera component of the smart vending machine includes: obtaining a real-time recorded video captured by the camera component of the smart vending machine; and extracting frames from the real-time recorded video to obtain the commodity image.

[0012] In some embodiments, the establishing of the commodity recognition model includes: obtaining sampling images of various commodities in the smart vending machine at different angles and under different lighting conditions; drawing bounding boxes for the commodities in the sampling images, marking commodity categories, and forming a data set; selecting a model to be trained, and adding a feature extraction model for extracting commodity feature information to the model to be trained; and using the data set to train the model to be trained to obtain a commodity recognition model.

[0013] To solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: to provide an electronic device, comprising: at least one processor; at least one network interface, the network interface is communicatively connected to the corresponding processor; and a memory communicatively connected to the at least one processor; wherein the network interface is used to establish a communication connection between the processor and other external devices; the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can execute a commodity identification method as described above.

[0014] To solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: providing a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, so that the one or more processors can execute a commodity identification method as described above.

[0015] The beneficial effect of the embodiments of the present invention is as follows: Different from the prior art, the embodiments of the present invention establish a similar product library so that all possible products establish similar corresponding relationships with other products, so that when the product category cannot be identified, an order can be generated according to another product category mapped by the product category, thereby improving the product recognition rate and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of a commodity identification method provided by an embodiment of the present invention;

[0017] Figure 2 is a flow chart of step S100 in the commodity identification method provided in an embodiment of the present invention;

[0018] Figure 3 is a schematic diagram of a sub-flow of step S200 in the commodity identification method provided in an embodiment of the present invention;

[0019] Figure 4 is another sub-flow diagram of step S200 in the commodity identification method provided in an embodiment of the present invention;

[0020] Figure 5 It is a schematic diagram of a process of obtaining the number of similar images of a compared product and any other category of products provided by an embodiment of the present invention;

[0021] Figure 6 is a flow chart of step S300 in the commodity identification method provided in an embodiment of the present invention;

[0022] Figure 7is a flow chart of step S700 in the commodity identification method provided in an embodiment of the present invention;

[0023] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to facilitate the understanding of the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on another element or there can be one or more centered elements therebetween. When an element is described as "connected" to another element, it can be directly connected to another element or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" and the like used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are used only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0025] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.

[0026] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0027] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0028] In order to improve the recognition accuracy, the commodity recognition algorithm set in the existing intelligent vending machine

[0029] When replenishing goods, the staff may mistakenly add goods that are not on the shelves in the sales cabinet to the sales cabinet, resulting in the inability to identify the goods. This will lead to a decrease in the recognition rate of goods and inevitably increase labor costs.

[0030] To solve the above situation, the embodiment of the present invention provides a commodity identification method, the flow chart of which is as follows: Figure 1 As shown, the method specifically comprises the following steps:

[0031] Step S100: Establish a commodity recognition model.

[0032] Before the actual application of smart vending machines, it is necessary to build a product recognition model for identifying product categories. Specifically, it is necessary to collect a large amount of image data of different products, including different angles and lighting conditions of the products, to build a rich data set. Then, deep learning techniques such as convolutional neural networks (CNNs) are used to train the data set and learn the feature representation of product images. Through continuous iteration and optimization, a product recognition model that can accurately identify product categories is finally obtained. Through training, the product recognition model can extract the key features of product images and map them to predefined product categories.

[0033] Step S200: Establish a similar product database.

[0034] Before the actual application of smart vending machines, it is necessary to build a similar product library that outputs product categories similar to the input product categories. The similar product library is established to handle product categories that cannot be directly recognized by the product recognition model. The similar product library contains information on product categories similar to the products on the shelves in the smart vending machine. By analyzing the collected images, collecting and analyzing historical sales data, and using similarity algorithms such as Euclidean distance and cosine similarity, it is possible to determine which product categories have high similarity and store them in the similar product library. The similar product library can store information such as product categories and features for subsequent queries and recommendations. When the product recognition model cannot recognize a certain product, similar product categories can be found in this library as alternatives.

[0035] Step S300: Acquire commodity images captured by the camera component of the smart vending machine.

[0036] The product image is obtained through the video recorded by the camera component of the smart vending cabinet, or the product image captured by the camera component of the smart vending cabinet is directly obtained. The camera component can be installed inside or outside the smart vending cabinet to record the process of users selecting and taking out products, or to capture the image of the product selected by the user. The camera component can use a high-definition camera to obtain high-quality recorded video or product images.

[0037] Step S400: inputting a commodity image into a commodity recognition model so that the commodity recognition model outputs a commodity category corresponding to the commodity image.

[0038] The acquired product images are input into the product recognition model so that the product recognition model can extract features and classify the product images and finally output the corresponding product category. The output result can be information such as the name and category of the product.

[0039] Step S500: Detect whether the commodity category is available in the smart vending cabinet.

[0040] The commodity category output by the commodity recognition model is detected to determine whether the commodity is available in the smart vending cabinet, which is usually achieved by querying the commodity inventory information of the smart vending cabinet. If the commodity category is available in the smart vending cabinet, step S600 is executed; if the commodity category is not available in the smart vending cabinet, step S700 is executed.

[0041] Step S600: Generate a first order according to the commodity category.

[0042] If the product category is available in the smart vending machine, a first order is generated based on the product category. The process includes determining the quantity, price and other information of the product and adding this information to the first order. At the same time, the user's shopping information, such as user ID, shopping time, etc., needs to be recorded for subsequent order processing and settlement. The first order is then sent to the user for confirmation and payment.

[0043] Step S700: inputting the commodity category into the similar commodity library, so that the similar commodity library outputs similar categories corresponding to the commodity category.

[0044] If the product category output by the product recognition model is not available in the smart vending machine, the product category needs to be entered into the similar product library. The similar product library will find similar product categories based on the input product category and output these similar categories. This process is based on the historical data and algorithms in the similar product library to quickly find and output product categories similar to the input product category.

[0045] Step S800: Generate a second order based on similar categories.

[0046] A second order is generated based on the similar categories output by the similar product library. Similar to the first order, the process of generating the second order includes determining the quantity, price and other information of the product, and adding this information to the second order. At the same time, it is also necessary to record the user's shopping information, such as user ID, shopping time, etc., for subsequent order processing and settlement. The second order is then sent to the user for confirmation and payment.

[0047] In some embodiments of the present application, step S100 specifically includes the following steps, and its flowchart is as follows: Figure 2 As shown:

[0048] Step S110: Acquire sample images of various commodities in the smart vending machine at different angles and under different lighting conditions.

[0049] Obtain sufficient and representative product image data. The image data should cover various possible scenarios and conditions to ensure the generalization ability of the model in practical applications. Specifically, it should include the results of photographing the product at different angles and under different lighting conditions to ensure that the model can cope with various complex actual situations.

[0050] In order to obtain image data, the built-in camera component of the smart vending machine can be used for shooting. During the acquisition process, the stability and reliability of the camera component need to be ensured to ensure the quality of the acquired images. At the same time, a reasonable acquisition strategy needs to be designed to cover as many product categories and shooting conditions as possible. After the acquisition is completed, the image data needs to be preprocessed. This includes operations such as image cropping, scaling, and normalization to ensure the consistency and comparability of the image data. The preprocessed image data will be used as input for subsequent steps.

[0051] Step S120: Draw a bounding box for the product in the sampled image, mark the product category, and form a data set.

[0052] Specifically, a bounding box is drawn for each product in the image to mark the location of the product. The bounding box should fit the outer contour of the product closely to ensure that the model can accurately extract the contour feature information of the product. At the same time, the corresponding product category information needs to be annotated for each bounding box. During the annotation process, the accuracy and consistency of the annotation need to be ensured. This means that for the same product, the same annotation results should be obtained in different images. To achieve this, some annotation tools and techniques can be used, such as image annotation software, semi-automatic annotation algorithms, etc.

[0053] After the labeling is completed, a dataset containing a large number of labeled images is obtained. The dataset will be used as input for training the product recognition model in the subsequent steps.

[0054] Step S130: Select a model to be trained, and add a feature extraction model for extracting product feature information to the model to be trained.

[0055] Select a suitable model to be trained and add a feature extraction model to the model to extract product feature information. This enables the product recognition model to extract product feature information from product images and map it to the corresponding product category. When selecting a model to be trained, factors such as model complexity, generalization ability, and training efficiency need to be considered. Generally speaking, deep learning models such as convolutional neural networks (CNNs) have good performance in the field of image recognition. Therefore, a CNN-based model can be selected as the model to be trained.

[0056] After determining the model to be trained, you also need to add a feature extraction model to the model. The function of the feature extraction model is to extract key feature information from the input image, such as shape, texture, color, etc. The feature information will be used as the input for subsequent classification tasks. When selecting a feature extraction model, you need to consider its compatibility with the model to be trained and the effect of feature extraction. Generally speaking, you can choose some commonly used feature extraction models, such as VGG, ResNet, etc., and adjust and optimize them according to actual conditions.

[0057] Step S140: Use the data set to train the model to be trained to obtain a product recognition model.

[0058] During the training process, it is necessary to set appropriate training parameters, such as learning rate, batch size, number of iterations, etc. The training parameters will affect the training effect and convergence speed of the model. At the same time, it is also necessary to adopt some optimization algorithms and techniques, such as gradient descent, regularization, data enhancement, etc., to improve the training efficiency and generalization ability of the model.

[0059] After the training is completed, a fully trained product recognition model is obtained, which can accurately identify the category and location information of the product from the input image. Furthermore, the product recognition model is deployed in the smart vending machine to realize the automatic product recognition and settlement function.

[0060] In some implementations of the present application, step S200 specifically includes the following steps, and its flowchart is as follows: Figure 3 As shown;

[0061] Step S210: selecting comparison products from each category of products according to a preset order.

[0062] In the initial stage of establishing a similar product library, the preset order of product selection is first determined. The preset order can be set based on multiple dimensions such as product classification, launch time, sales volume, brand, etc. The preset order ensures that all products can be systematically and without omission included in the comparison range.

[0063] In specific operations, a product database can be designed and the products can be numbered in a preset order. Then, through programming or manual operation, products can be extracted from the database in the order of numbers as comparison products. Each time a comparison product is extracted, the next round of comparison process will begin.

[0064] Step S220: sequentially obtain the number of similar images between the compared product and other types of products.

[0065] After the comparison product is determined, other products similar to the comparison product are found through image recognition technology. Specifically, all images of the comparison image are compared with all images of other types of products stored in the database using an image recognition algorithm to find images similar to the comparison product.

[0066] Similarity is usually determined based on image features such as pixels, colors, shapes, and textures. The image recognition algorithm extracts and compares these features and then calculates a similarity score. When the similarity score exceeds a certain preset threshold, the two images are considered similar. After obtaining all similar images, the number of similar images of the remaining categories of products and the compared products is counted.

[0067] Step S230: determining in sequence whether the number of similar images is greater than a preset first image threshold.

[0068] After obtaining the number of similar images between the comparison product and the other products, it is necessary to determine whether the number of similar images is large enough to prove the similarity between the two products. To this end, a first image threshold needs to be set. Only when the number of similar images exceeds the first image threshold can the two products be considered similar, and then step S240 is executed.

[0069] The setting of the first image threshold needs to be adjusted according to the actual situation. If the first image threshold is set too high, some similar products may be omitted; if the first image threshold is set too low, some irrelevant products may be introduced. Therefore, when setting the first image threshold, it is necessary to comprehensively consider factors such as the diversity of products and the accuracy of image recognition.

[0070] Step S240: The corresponding product is similar to the comparison product, and a corresponding relationship is established.

[0071] If the number of similar images exceeds the first image threshold, the corresponding product can be considered similar to the comparison product. At this time, it is necessary to establish a correspondence between the two products in the product database. This correspondence can be achieved by adding a new record in the database or updating an existing record. The record can contain information such as the number, name, and similarity score of the two products.

[0072] Step S250: Determine whether all commodities have been selected.

[0073] After completing the comparison process of a comparison product, it is necessary to determine whether all products have been selected and compared. If there are still products that have not been selected as comparison products, it is necessary to return to step S210 and continue to select the next comparison product for comparison according to the preset order. If all products have been compared, it means that the similar product library has been established.

[0074] In some embodiments of the present application, in order to prevent the situation where the number of similar images of a certain product and other products does not exceed the first image threshold, resulting in the product having no similar products, step S200 further includes the following steps, and the flowchart is as follows: Figure 4 As shown:

[0075] Step S260: If the number of similar images between the other categories of products and the comparison product is not greater than the first image threshold, the first selling price of the comparison product is obtained.

[0076] When the product image is compared for similarity, the remaining products in the product library will be traversed and their image similarity will be calculated with the compared product. If the comparison result shows that the number of similar images between the remaining products and the compared product is lower than the preset first image threshold, it means that it is difficult to find products similar to the compared product through direct image similarity.

[0077] At this point, we need to turn to other methods to identify possible similar products. The setting of the first image threshold is based on a large amount of product image data and similarity calculation practice. It ensures that we will not mistakenly exclude potential similar products due to a too low threshold, nor lose the ability to find similar products due to a too high threshold.

[0078] Step S270: obtaining similar products from the remaining categories of products whose number of similar images to the comparison product is greater than a preset second image threshold.

[0079] Since direct comparison of the number of similar images cannot obtain similar images, a more relaxed standard, the second image threshold, is set. The second image threshold is set relatively low to capture products that may be similar to the comparison product in some aspects but the similarity is not high.

[0080] By traversing the product library again, the products whose similar images exceed the second image threshold are screened out and regarded as similar products. Although the image similarity of similar products is not high enough with the comparison products, they are similar in other attributes or features.

[0081] Step S280: Obtain the second selling price of similar commodities.

[0082] After identifying similar products, further collect sales price information of similar products. Price information is an important part of product attributes, reflecting the market positioning, quality and consumer acceptance of the product. By comparing the prices of similar products, further verify whether similar products are similar to the comparison products in price.

[0083] Step S290: Establish a corresponding relationship between the similar products of the corresponding category whose difference between the second selling price and the first selling price does not exceed the preset price threshold and the compared products.

[0084] After collecting the second selling prices of similar products, the second selling prices of similar products are compared with the first selling prices of the comparison products. If the difference between the second selling prices of similar products and the first selling prices of the comparison products does not exceed a preset price threshold, it is considered that these products are also similar in price.

[0085] Therefore, these similar products are made to correspond with the comparison products and added to the similar product library. Even if the image similarity of similar products is not high enough with the comparison products, the similarity in price makes similar products potential similar products for the comparison products, which provides more choices and references for product identification, thereby improving the product recognition rate.

[0086] In some embodiments of the present application, step S220 specifically includes the following steps, and its flowchart is as follows: Figure 5 As shown:

[0087] Step S221: Acquire all collected images of each type of commodity.

[0088] Usually a large product image database is used or data is collected from multiple online shopping platforms, product websites, social media, etc. The data collection needs to ensure comprehensiveness and accuracy so that the subsequent steps can accurately perform image comparison.

[0089] Specifically, the image collection process may include the following sub-steps: Determine the product categories that need to be compared and list the detailed products. Use web crawler technology to automatically capture product images from relevant websites. Clean the captured images to remove duplicate, blurred, incomplete or irrelevant images. Categorize and store the cleaned images to ensure that the images of each product category are correctly archived.

[0090] Step S222: According to the image recognition algorithm, the similarity confidence between all the collected images of the compared product and all the collected images of any other category of products is obtained.

[0091] Use image recognition algorithms to compare and contrast images of products with those of other categories. Image recognition algorithms can be deep learning models, such as convolutional neural networks (CNNs), or traditional image processing methods, such as feature point matching, color histogram comparison, etc.

[0092] Specifically, the image recognition algorithm extracts features from each image and compares these features with the features of images of other categories of goods in the database. By calculating the similarity or distance between the features, a similarity confidence is output, which indicates the degree of similarity between the two images.

[0093] Step S223: determining in turn whether the similarity confidence between all the collected images of the compared product and all the collected images of any other category of products is greater than a preset confidence threshold.

[0094] The similarity confidence obtained in the previous step will be thresholded. The preset confidence threshold is a key parameter that determines whether two images are considered similar. The confidence threshold needs to be set according to the specific application scenario and requirements.

[0095] The judgment process will traverse all the collected images of the comparison product and all the collected images of any other category of products, and compare the confidence of each pair of collected images. If the similarity confidence is greater than the confidence threshold, the two collected images are considered similar and step S224 is executed; otherwise, they are considered dissimilar.

[0096] Step S224: determining whether the corresponding two collected images are similar images.

[0097] If the similarity confidence of two acquired images is greater than a preset threshold, they are marked as similar images.

[0098] Step S225: Count the number of similar images between the compared product and any other category of products.

[0099] All images marked as similar will be counted. Specifically, the number of similar images between the compared product and each category of products will be calculated, and a statistical result of the number of similar images will be generated. The number of similar images is an important reference indicator for evaluating the similarity between the compared product and other product categories.

[0100] In some embodiments of the present application, step S300 specifically includes the following steps, and its flowchart is as follows: Figure 6 As shown:

[0101] Step S310: Acquire the real-time recorded video captured by the camera component of the smart vending machine.

[0102] When the camera component of the smart vending machine is turned on, it will immediately start working and start recording video in real time. This camera component is usually installed in a key position inside the vending machine so that it can fully capture the dynamics of the goods in the cabinet. The recorded video data will be transmitted to the control center or remote server of the vending machine in real time through the internal bus or wireless network to ensure the real-time and security of the data. While transmitting, the video data will also be stored in the local storage device of the vending machine or the cloud server for subsequent analysis and processing.

[0103] Specifically, the real-time recorded video captured by the camera component during the process of customers selecting and taking out goods is obtained.

[0104] Step S320: extract frames from the real-time recorded video to obtain product images.

[0105] The transmitted real-time recorded video needs to be decoded and converted into a continuous sequence of image frames. In the sequence of image frames, key frames need to be selected as product images. Key frames usually correspond to image frames when customer shopping behavior occurs. Key frames can be automatically selected by setting time intervals or based on changes in video content. The selected key frames are extracted from the video frame sequence and saved as independent image files as product images.

[0106] In some embodiments of the present application, step S700 specifically includes the following steps, and its flowchart is as follows: Figure 7 As shown:

[0107] Step S710: Input the product category into the similar product library.

[0108] When inputting product categories, some special cases need to be considered, such as products may belong to multiple categories, product categories may have a hierarchical structure, etc. In order to deal with these special cases, some technical means can be used, such as using a multi-label classification algorithm to process products belonging to multiple categories, or using a tree structure to represent hierarchical product categories.

[0109] In addition, in order to ensure that the input commodity categories are representative and extensive, the input commodity categories need to be preprocessed and screened. For example, some categories that are too general or too specific can be removed, and only those categories with sufficient quantity and representativeness can be retained to improve the accuracy and generalization ability of the similar commodity library.

[0110] Step S720: enabling the similar product library to obtain corresponding correspondences according to product categories.

[0111] The similar product database stores a large number of product categories and corresponding similar category information. When a product category is entered, the similar product database can quickly find all similar category information related to the category. In order to achieve this goal, some efficient data structures and algorithms can be used, such as hash tables, inverted indexes, etc. These data structures can speed up the search speed of similar categories and improve response performance.

[0112] When obtaining the corresponding relationship, some special cases need to be considered, such as some product categories may not have clear similar categories, some product categories may have certain similarities with multiple other categories, etc. In order to deal with these special cases, some strategies can be adopted, such as setting a similarity threshold to filter out categories with low similarity, using clustering algorithms to automatically discover categories with similarities, etc.

[0113] In addition, in order to make the similar product library have better generalization ability, we can also use some machine learning algorithms to automatically learn the similarity relationship between product categories. For example, use unsupervised learning algorithms to discover potential association rules between product categories, or use supervised learning algorithms to train a classifier to predict the similar categories of new products.

[0114] Step S730: The similar product library is enabled to output corresponding similar categories according to corresponding correspondences.

[0115] After the correspondence between the commodity categories and the similar categories is obtained, the similar commodity library is made to output the corresponding similar categories according to the correspondence, and then a second order is generated according to the similar categories.

[0116] Different from the prior art, the implementation method of the present invention builds a similar product library to establish a similar correspondence between all possible products and other products. When the product category cannot be identified, an order can be generated according to another product category mapped by the product category, thereby improving the product recognition rate and reducing labor costs.

[0117] The embodiment of the present invention also provides an electronic device based on the above commodity identification method, and its structural diagram is as follows: Figure 8 As shown, the electronic device 100 includes:

[0118] One or more processors 101, network interface 102 and memory 103, Figure 8 In the figure, a processor 101, a network interface 102 and a memory 103 are taken as an example.

[0119] The network interface 102 is in communication with the corresponding processor 101, and the processor 101 and the memory 102 can be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0120] The network interface 102 is used to establish a communication connection between the processor 101 and other external devices, including the following types: RJ-45 interface, SC optical fiber interface, AUI interface, FDDI interface, Console interface and other interface types.

[0121] The memory 103 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 101 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions and units stored in the memory 103, that is, the commodity identification method of the above method embodiment is implemented.

[0122] The memory 103 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 103 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 103 may optionally include a memory remotely arranged relative to the processor 101, and these remote memories may be connected to the electronic device 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.

[0123] The one or more units are stored in the memory 103, and when executed by one or more processors 101, execute the commodity identification method in any of the above method embodiments, for example, execute the above described Figure 1 The method comprises steps S100 to S800.

[0124] The electronic device can execute the commodity identification method provided in the embodiment of the present invention, and has the corresponding program modules and beneficial effects of the execution method. For technical details not fully described in the electronic device embodiment, please refer to the commodity identification method provided in the embodiment of the present invention.

[0125] The embodiment of the present invention further provides a non-volatile computer-readable storage medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above non-volatile computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the commodity identification method of the embodiment of the present disclosure is implemented.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A commodity identification method, applied to a smart vending machine, characterized in that: include: Acquire commodity images captured by the camera component of the smart vending cabinet; Inputting the commodity image into a commodity recognition model so that the commodity recognition model outputs a commodity category corresponding to the commodity image; Detecting whether the commodity category is available in the smart vending cabinet; If yes, generating a first order according to the commodity category; If not, the commodity category is input into a similar commodity library, so that the similar commodity library outputs a similar category corresponding to the commodity category; A second order is generated based on the similar category.

2. The method according to claim 1, characterized in that The step of inputting the commodity category into a similar commodity library so that the similar commodity library outputs a similar category corresponding to the commodity category includes: Inputting the product category into the similar product library; The similar product library is enabled to obtain corresponding correspondences according to the product categories; The similar product library is enabled to output corresponding similar categories according to the corresponding correspondence.

3. The method according to claim 1, characterized in that Also includes: Establish a product identification model; Build a library of similar products.

4. The method according to claim 3, characterized in that The establishing of a similar product database comprises: Selecting comparison products from the various categories of products in a preset order; Sequentially obtain the number of similar images between the comparison product and other categories of products; determining in sequence whether the number of similar images is greater than a preset first image threshold; If so, the corresponding product is similar to the comparison product, and a corresponding relationship is established; Repeat the above steps until all products have been selected.

5. The method according to claim 4, characterized in that The establishment of a similar product database further includes: If the number of similar images between the other categories of products and the comparison product is not greater than the first image threshold, obtaining a first selling price of the comparison product; Obtain similar products from the remaining categories of products, the number of which is greater than a preset second image threshold value, that are similar to the comparison product; Obtaining a second selling price of similar products of the same category; A corresponding relationship is established between the similar products of the corresponding category whose second selling price has a difference with the first selling price that does not exceed a preset price threshold and the compared products.

6. The method according to claim 4, characterized in that Methods for obtaining the number of similar images between the comparison product and any other category of products include: Get all the collected images of various commodities; According to the image recognition algorithm, obtaining similarity confidences between all collected images of the compared product and all collected images of any other category of products; Determine in sequence whether the similarity confidence between all the collected images of the compared product and all the collected images of any other category of products is greater than a preset confidence threshold; If so, the corresponding two collected images are determined to be similar images; Count the number of similar images between the compared product and any other category of products.

7. The method according to claim 1, characterized in that The obtaining of the commodity image captured by the camera component of the smart vending cabinet includes: Obtaining real-time recorded video captured by the camera component of the smart vending machine; Extract frames from the real-time recorded video to obtain a product image.

8. The method according to claim 3, characterized in that The step of establishing a commodity identification model comprises: Acquire sample images of various commodities in the smart vending machine at different angles and under different lighting conditions; Draw a bounding box for the product in the sampled image, mark the product category, and form a data set; Selecting a model to be trained, and adding a feature extraction model for extracting product feature information to the model to be trained; The model to be trained is trained using the data set to obtain a commodity recognition model.

9. An electronic device, characterized in that: include: at least one processor; at least one network interface, the network interface being communicatively connected to a corresponding processor; as well as, a memory communicatively connected to the at least one processor; wherein, The network interface is used to establish a communication connection between the processor and other external devices; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a commodity identification method according to any one of claims 1 to 8.

10. A non-volatile computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which are executed by one or more processors, so that the one or more processors can execute a commodity identification method as described in any one of claims 1-8.

Citation Information

Cited By

  • Medical vending platform mobile management method, device and equipment and storage medium

    CN119539686A