Method and system for calculating purity of commodity cabinet based on area, and storage medium

By using an area-based calculation method to identify and determine the location of goods, the problem of inaccurate purity calculation in existing technologies is solved, enabling a more accurate assessment of goods occupancy and reducing the cost of human supervision.

CN118918171APending Publication Date: 2024-11-08QINDAO HAIER REFRIGERATOR CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310505207.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing technology calculates the purity of a product display case by counting the quantity of goods, which cannot accurately reflect the true condition of the goods and leads to losses for brand owners.

Method used

An area-based calculation method is adopted. By identifying the location information of goods, a two-dimensional plane coordinate system is established to determine whether the goods intersect. The total area of ​​the target goods and non-target goods is calculated. The goods are then classified in combination with preset information to calculate the purity.

Benefits of technology

It improves the accuracy and speed of purity calculation, is compatible with large goods, is suitable for various scenarios, and reduces the cost of manual supervision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918171A_ABST
    Figure CN118918171A_ABST
Patent Text Reader

Abstract

The invention discloses a method for calculating the purity of a commodity cabinet based on an area, the commodity cabinet and a storage medium. The method for calculating the purity of the commodity cabinet based on the area comprises the following steps: identifying position information of goods in an image; classifying the goods based on preset information; establishing a two-dimensional plane coordinate system, and mapping the position coordinates of the goods in the two-dimensional plane coordinate system based on the position information of the goods; based on the position coordinates of the goods in the two-dimensional plane coordinate system, whether the target goods and the non-target goods intersect is judged, and if not, the total area A of the target goods and the total area B of the non-target goods are calculated; if yes, calculating the total area A obtained by subtracting the intersection area from the target goods and the total area B of the non-target goods; calculating the purity K = A / (A + B); according to the invention, the purity of the commodity cabinet is calculated through area, and large-scale goods can be compatible; whether goods intersect or not is recognized through the coordinate system, calculation is more accurate, the calculation speed is high, and the method can be widely applied to various scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of calculating the purity of a merchandise cabinet, and in particular to a method for calculating the purity of a merchandise cabinet based on area, a merchandise cabinet and a storage medium. Background Art

[0002] In shopping malls, supermarkets and other places, a large number of merchandise cabinets (also called containers, which can be in the form of freezers, beverage cabinets, display cabinets, vending machines, etc.) are usually deployed. Various types of goods can be placed in the merchandise cabinets, and users can automatically purchase the goods in the merchandise cabinets without the participation of the seller.

[0003] In some cases, brand owners will provide merchandise cabinets to shopping malls, supermarkets and other places. For this type of merchandise cabinet, specified types of merchandise (i.e., the brand owner's merchandise) need to be placed in the cabinet, and other types of merchandise are not allowed to be placed, or only a small number of other types of merchandise are allowed to be placed.

[0004] Due to the excessive number of shopping malls and supermarkets, as well as issues such as staffing costs, it is difficult for brand owners to monitor the quantity of specified types of goods in merchandise cabinets on site, which damages the interests of brand owners.

[0005] Based on such problems, a method has been introduced on the market to calculate the purity of merchandise cabinets by counting the number of goods. However, this method cannot accurately reflect the actual situation of the goods placed in the merchandise cabinets.

[0006] For example, if the brand's goods are very large, two or three goods occupy 90% of the storage area of ​​the merchandise cabinet. If the remaining 10% of the space is used to store goods of another brand, but the goods are small in size and large in quantity, then calculating the purity based on the number of goods will seriously deviate from the actual situation. Summary of the invention

[0007] The purpose of the present invention is to provide a method for calculating the purity of a merchandise cabinet based on area, a merchandise cabinet and a storage medium, so as to solve the problem that the method of calculating the purity of a merchandise cabinet by calculating the number of goods in the prior art cannot accurately reflect the actual situation of the goods placed in the merchandise cabinet.

[0008] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides a method for calculating the purity of a merchandise cabinet based on area, the method comprising: identifying the location information of goods in an image; classifying the goods based on preset information, the classification including non-target goods and target goods; establishing a two-dimensional plane coordinate system and mapping the location coordinates of the goods in the two-dimensional plane coordinate system based on the location information of the goods; judging whether the target goods and non-target goods intersect based on the location coordinates of the goods in the two-dimensional plane coordinate system, if not, respectively calculating the total area A of the target goods and the total area B of the non-target goods; if so, calculating the total area A of the target goods minus the intersection area and the total area B of the non-target goods; and calculating the purity K=A / (A+B).

[0009] As a further improvement of the present invention, the method further includes: a method for determining whether there is an intersection is: based on the position information of the reference goods and the comparison goods, a position coordinate set is assigned through a two-dimensional plane coordinate system, the position coordinate set is the coordinates of each pixel point in the images of the reference goods and the comparison goods, the reference goods represent any target goods or non-target goods, and the comparison goods represent any target goods or non-target goods that are judged to intersect with the reference goods; traversing the position coordinate sets of the reference goods and the comparison goods, and determining whether the position coordinates of each pixel point of the reference goods and the position coordinates of each pixel point of the comparison goods have the same coordinates; if so, determining that the reference goods and the comparison goods intersect; if not, determining that the reference goods and the comparison goods do not intersect.

[0010] As a further improvement of the present invention, the method further includes: the “if not, then respectively calculating the total area A of the target goods and the total area B of the non-target goods” specifically includes: respectively obtaining the union of the position coordinate sets of the target goods and the non-target goods; calculating the quantity in the union of the target goods and the quantity in the union of the non-target goods, the total area A of the target goods is the quantity in the union of the target goods, and the total area B of the non-target goods is the quantity in the union of the non-target goods.

[0011] As a further improvement of the present invention, the method also includes: the "if yes, then calculate the total area A of the target goods minus the intersection area" specifically includes: traversing the position coordinate sets of the target goods and the non-target goods, obtaining the intersection of the position coordinate sets of the target goods and the non-target goods, the intersection being the coordinate set of each pixel point in the intersection area of ​​the target goods and the non-target goods; comparing the intersection with the position coordinate set of each target goods, if the intersection belongs to the position coordinate set of the target goods, deleting the coordinates in the intersection in the position coordinate set of the target goods; obtaining the union of the position coordinate sets of the target goods; and calculating the quantity in the union.

[0012] As a further improvement of the present invention, the method also includes: "classifying the goods based on preset information" specifically includes: identifying the goods based on the object detection model, extracting image features on the goods and converting them into text information, and traversing and comparing the preset information according to the extracted text information; if the text information is the same as the preset information, it is classified as a target product; if the text information is different from the preset information, it is classified as a non-target product.

[0013] As a further improvement of the present invention, the method also includes: the text information includes the type and name of the goods in the image, the preset information includes the type and name of the goods provided by the brand, and the goods in the image are classified based on comparing the type and name of the goods in the image with the type and name of the goods provided by the brand.

[0014] As a further improvement of the present invention, the method also includes: the specific steps of "classifying the goods according to comparing the type and name of the goods in the image with the type and name of the goods provided by the brand" include: comparing the type of goods in the image with the type of goods provided by the preset brand, if they are the same, comparing the names, if they are different, classifying them as non-target goods; comparing the name of the goods in the image with the name provided by the preset brand, if they are the same, classifying them as target goods, if they are different, classifying them as non-target goods.

[0015] As a further improvement of the present invention, the method further includes: presetting at least two area ratio threshold ranges, determining the area ratio threshold range in which the purity is located, and defining the purity level based on different area ratio threshold ranges.

[0016] The present invention also provides a commodity cabinet, including a camera, a memory and a processor, wherein the commodity cabinet includes: the camera is installed on the commodity cabinet and is used to capture images of commodities;

[0017] The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the method for calculating the purity of a merchandise cabinet based on area are implemented.

[0018] The present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps in the method for calculating the purity of a merchandise cabinet based on area.

[0019] Compared with the prior art, the present invention has the following beneficial effects: the purity of the merchandise cabinet is calculated by area, the calculation method is more reasonable and can be compatible with large goods; the location information of the goods is identified by recognition technology, and whether the goods intersect is identified by the coordinate system, and the purity is calculated by distinguishing different situations, the calculation is more accurate, the calculation speed is fast, and it can be widely used in various scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a flow chart of the method for calculating the purity of a merchandise cabinet based on area according to the present invention.

[0021] Figure 2 It is a flow chart of calculating the total area in the present invention under the two situations that the target goods and the non-target goods intersect and do not intersect.

[0022] Figure 3 It is a flow chart of calculating the total area of ​​target goods and the total area of ​​non-target goods according to the present invention. DETAILED DESCRIPTION

[0023] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0024] In the first embodiment of the present invention, a method for calculating the purity of a commodity cabinet based on area is provided. Although the present application provides the following implementation method or process Figure 1 The method operation steps shown are, however, based on routine or without creative labor, in the steps of the method where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the implementation manner of the present application.

[0025] like Figure 1 As shown, a method for calculating the purity of a merchandise cabinet based on area, the steps are as follows:

[0026] S1: Identify the location information of the goods in the image;

[0027] S2: Classifying the goods based on preset information, the classification includes non-target goods and target goods;

[0028] S3: Establishing a two-dimensional plane coordinate system and mapping the position coordinates of the goods in the two-dimensional plane coordinate system based on the position information of the goods;

[0029] S4: judging whether the target goods and the non-target goods intersect based on the position coordinates of the goods in the two-dimensional plane coordinate system, such as Figure 2 If not, the total area A of the target goods and the total area B of the non-target goods are calculated respectively; if so, the total area A of the target goods minus the intersection area and the total area B of the non-target goods are calculated;

[0030] S5: Calculate the purity K=A / (A+B).

[0031] In the first embodiment of the present invention, a camera is used to capture an image of goods, identify the goods in the image, and detect the location information of the goods in the image. Specifically, when an object detection model is used to identify goods, an identification box is used to select the goods in the image to indicate that the goods are identified.

[0032] It should be further explained that whether the target product and the non-target product intersect is determined by whether the identification box representing the target product in the image intersects with the identification box of the non-target product.

[0033] It should be further explained that when the target goods and non-target goods are in the same image, the area occupied by the target goods and non-target goods can be represented by the number of pixels in the image. Therefore, the area of ​​the target goods and non-target goods is represented by the number of image pixels in the recognition frame when the object detection model recognizes the target goods and non-target goods.

[0034] In a specific implementation of the present invention, the method of “determining whether there is intersection”, i.e., determining whether there is an overlapping portion of the identification frame, is:

[0035] Based on the position information of the reference goods and the comparison goods, a position coordinate set is assigned through a two-dimensional plane coordinate system, and the position coordinate set includes the coordinates of each pixel point in the reference goods and the comparison goods images. Specifically, the pixel points of the reference goods and the comparison goods in the image are equal in size and the same in distance, and a position coordinate set can be established through the two-dimensional plane coordinate system, wherein the position coordinate set includes the coordinates of all pixel points in the identification frame used to select the target goods / non-target goods in the image.

[0036] It should be noted that the two-dimensional plane coordinate system is established in the coordinate system model, the reference product represents any target product or non-target product, and the comparison product represents any target product or non-target product that is intersected with the reference product. In this embodiment, the reference product can be a target product or a non-target product, and the comparison product can be a target product or a non-target product.

[0037] Further, such as Figure 3 As shown, if it is determined whether the target goods and non-target goods intersect, the reference goods can represent the target goods, while the comparison goods represent the non-target goods; if it is determined whether multiple target goods or multiple non-target goods intersect, both the reference goods and the comparison goods can represent the target goods or non-target goods.

[0038] Further, the position coordinate sets of the reference goods and the comparison goods are traversed to determine whether the position coordinates of each pixel of the reference goods and the position coordinates of each pixel of the comparison goods have the same coordinates. It can be understood that based on the two-dimensional plane coordinate system, the pixel coordinates of the reference goods and the comparison goods in the recognition frame in the image are used to determine whether there is overlap. When the two recognition frames have overlapping parts, the pixel coordinates in the overlapping area must be the same. Based on this principle, it is determined whether the reference goods and the comparison goods intersect.

[0039] If so, it is determined that the reference product and the comparison product intersect; if not, it is determined that the reference product and the comparison product do not intersect.

[0040] In one embodiment of the present invention, “if not, respectively calculating the total area A of the target goods and the total area B of the non-target goods” specifically includes, for example Figure 3 As shown:

[0041] The union of the position coordinate sets of the target goods and the non-target goods is obtained respectively; it should be noted that there may be multiple or single target goods and non-target goods in the image. If the target goods or non-target goods are single, the union of the position coordinate sets is only the position coordinate set of the target goods or non-target goods themselves, which can also be understood as the union of the target goods or non-target goods with the empty set; when there are multiple target goods or non-target goods respectively, the union of the multiple target goods forms a whole union, and the union of the multiple non-target goods also forms a whole union.

[0042] The number of target goods in the union and the number of non-target goods in the union are calculated. The total area A of the target goods is the number of target goods in the union, and the total area B of the non-target goods is the number of non-target goods in the union. The number in the union is represented by the number of pixels occupied by all target goods / non-target goods in the image, that is, the total area occupied by the image.

[0043] like Figure 3 As shown, in one embodiment of the present invention, "if yes, then calculate the total area A of the target product minus the intersection area" specifically includes:

[0044] The position coordinate sets of the target goods and the non-target goods are traversed to obtain the intersection of the position coordinate sets of the target goods and the non-target goods, where the intersection is the coordinate set of each pixel point in the intersection area of ​​the target goods and the non-target goods; that is, it can be understood that the overlapping area of ​​the identification frames of the target goods and the non-target goods is the intersection of the position coordinate sets of the target goods and the non-target goods.

[0045] The intersection is compared with the position coordinate set of each target product. If the intersection belongs to the position coordinate set of the target product, the coordinates in the intersection are deleted from the position coordinate set of the target product. It can be understood that when the identification frames of the target product and the non-target product overlap, it is considered that the non-target product occupies the display area of ​​the target product. Therefore, when calculating the purity, the area of ​​the intersection area is deleted from the total area of ​​the target product, which is represented by deleting the coordinates in the intersection from the position coordinate set of the target product.

[0046] Get the union of the location coordinate sets of the target goods; it should be explained that if there is only one target product, the union of the location coordinate sets is the location coordinate set of the single target product itself, or it can be the union of the location coordinate set of the single target product itself and the empty set; if there are multiple target products, a union operation is performed.

[0047] Calculate the number of the union. The number of the union is represented by the total number of pixels occupied by all target products in the image, that is, the area occupied in the image.

[0048] “If yes, calculate the total area B of the non-target goods”. The specific calculation method is the same as the method for calculating the total area B of the non-target goods in the above “If no, calculate the total area A of the target goods and the total area B of the non-target goods separately”, which is:

[0049] Obtain the union of the position coordinate sets of the non-target goods; it should be explained that if there is only one non-target product, the union of the position coordinate sets is the position coordinate set of the single non-target product itself, or it can be the union of the position coordinate set of the single non-target product itself and the empty set; if there are multiple non-target products, a union operation is performed.

[0050] Calculate the number of non-target items in the union. The number in the union is represented by the total number of pixels occupied by all non-target items in the image, that is, the area occupied in the image.

[0051] In one embodiment of the present invention, "classifying the goods based on preset information" specifically includes: identifying the goods based on an object detection model, extracting image features on the goods and converting them into text information, and traversing and comparing the preset information based on the extracted text information; the image features on the goods include information such as the name of the ingredients on the goods, the type of ingredients, etc., and converting this type of image with text information into text information.

[0052] If the text information is the same as the preset information, it is classified as a target product; if the text information is different from the preset information, it is classified as a non-target product.

[0053] Specifically, the text information includes the type and name of the goods in the image, the preset information includes the type and name of the goods provided by the brand, and the goods in the image are classified based on the comparison between the type and name of the goods in the image and the type and name of the goods provided by the brand.

[0054] Furthermore, in an embodiment of the present invention, “classifying the goods according to comparing the type and name of the goods in the image with the type and name of the goods provided by the brand” is described in detail.

[0055] First of all, it should be explained that the image features on the goods are extracted and converted into text information. Based on the classification of the goods type and name in the text information, the goods type is divided into one category and the name is divided into another category, where the goods type corresponds to the goods name one by one; the goods type and name provided by the brand are also classified in the preset way, and the goods type provided by the brand corresponds to the goods name provided by the brand one by one. Traverse the goods type and name in the text information and the goods type and name provided by the brand, first compare the type, and then compare the corresponding name. The details are as follows:

[0056] Type comparison: Compare the product type in the image with the product type provided by the preset brand. If they are the same, compare the names. If they are different, classify them as non-target products.

[0057] Name comparison: Compare the product name in the image with the name provided by the preset brand. If they are the same, they are classified as target products. If they are different, they are classified as non-target products.

[0058] In one embodiment of the present invention, at least two area ratio threshold ranges are preset to determine the area ratio threshold range in which the purity lies, and the purity level is defined based on different area ratio threshold ranges.

[0059] In this embodiment, three area ratio threshold ranges can be preferably set: above 90%, 80% to 90% and below 80%. The total area A of the target goods and the total area B of the non-target goods are calculated according to whether the target goods and the non-target goods intersect. When they intersect, the total area A of the target goods needs to be subtracted from the area of ​​the intersection area. The purity K=A / (A+B) is calculated based on the total area A of the target goods and the total area B of the non-target goods. If the purity K is above 90%, it is determined to be high purity. If the purity K is between 80% and 90%, it is determined to be medium purity. If the purity K is below 80%, it is determined to be low purity.

[0060] In a second embodiment of the present invention, a merchandise cabinet is provided, including a camera, a memory, and a processor.

[0061] The camera is installed on the merchandise cabinet to capture images of goods. Specifically, the camera has a fixed angle and viewing angle when initially installed, and the goods on the merchandise cabinet will change according to the adjustment. The camera captures images of goods to determine whether a target goods area on the merchandise cabinet is occupied by non-target goods.

[0062] The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the method for calculating the purity of a merchandise cabinet based on area in the first embodiment are implemented.

[0063] In a third embodiment of the present invention, a storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for calculating the purity of a merchandise cabinet based on area in the first embodiment are implemented.

[0064] In summary, the present invention aims to solve the problem that the method of calculating the purity of merchandise cabinets by counting the number of goods in the current prior art cannot accurately reflect the actual situation of the goods placed in the merchandise cabinets. As a result, in many shopping malls, goods of other brands are often placed on the exclusive merchandise cabinets of brand owners, thereby infringing the interests of the brand owners. At the same time, the brand owners are unable to dispatch personnel to supervise in real time, which wastes manpower costs.

[0065] The present invention mainly adopts the method of installing a camera on a brand merchant's merchandise cabinet to monitor the goods on the merchandise cabinet in real time, using target recognition technology to distinguish the brand merchant's target goods from the non-brand merchant's non-target goods, obtaining position information in the captured image based on the distinguished target goods and non-target goods and judging whether the two intersect, then calculating the total area A of the target goods and the total area B of the non-target goods, and calculating the occupied proportion of the brand merchant's merchandise cabinet based on the comparison of the calculated purity with a preset percentage threshold.

[0066] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and modules can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.

[0067] In several embodiments provided in the present application, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system implementation described above is only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, systems or modules, which can be electrical, mechanical or other forms. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present implementation scheme.

[0068] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of hardware plus software functional modules. The above-mentioned integrated module implemented in the form of software functional modules can be stored in a computer-readable storage medium. The above-mentioned software functional modules are stored in a storage medium, including a number of instructions for a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor (processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0069] Finally, it should be noted that the above implementation modes are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned implementation modes, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned implementation modes, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various implementation modes of the present application.

Claims

1. A method for calculating the purity of a commodity cabinet based on area, characterized in that: include: Identify the location information of the goods in the image; Classifying the goods based on the preset information, the classification including non-target goods and target goods; Establishing a two-dimensional plane coordinate system and mapping the position coordinates of the goods in the two-dimensional plane coordinate system based on the position information of the goods; Based on the position coordinates of the goods in the two-dimensional plane coordinate system, determine whether the target goods and the non-target goods intersect. If not, calculate the total area A of the target goods and the total area B of the non-target goods respectively; if so, calculate the total area A of the target goods minus the intersection area and the total area B of the non-target goods; Calculate the purity K = A / (A+B).

2. The method for calculating the purity of a commodity cabinet based on area according to claim 1, characterized in that: The method of "judging whether they intersect" is: Based on the position information of the reference product and the comparison product, a position coordinate set is assigned through a two-dimensional plane coordinate system, wherein the position coordinate set is the coordinates of each pixel point in the images of the reference product and the comparison product, the reference product represents any target product or non-target product, and the comparison product represents any target product or non-target product that is judged to intersect with the reference product; Traversing the position coordinate sets of the reference product and the comparison product, and determining whether the position coordinates of each pixel point of the reference product and the position coordinates of each pixel point of the comparison product have the same coordinates; If so, it is determined that the reference product and the comparison product intersect; if not, it is determined that the reference product and the comparison product do not intersect.

3. The method for calculating the purity of a commodity cabinet based on area according to claim 2, characterized in that: The "if not, then respectively calculating the total area A of the target goods and the total area B of the non-target goods" specifically includes: Obtain the union of the location coordinate sets of the target goods and the non-target goods respectively; The quantity in the target goods set and the quantity in the non-target goods set are calculated, the total area A of the target goods is the quantity in the target goods set, and the total area B of the non-target goods is the quantity in the non-target goods set.

4. The method for calculating the purity of a commodity cabinet based on area according to claim 3, characterized in that: The "if yes, then calculate the total area A of the target product minus the intersection area" specifically includes: Traversing the position coordinate sets of the target goods and the non-target goods, obtaining the intersection of the position coordinate sets of the target goods and the non-target goods, wherein the intersection is the coordinate set of each pixel point in the intersection area of ​​the target goods and the non-target goods; Compare the intersection with the location coordinate set of each target product. If the intersection belongs to the location coordinate set of the target product, delete the coordinates in the intersection from the location coordinate set of the target product. Get the union of the location coordinate sets of the target goods; Count the quantities in a union.

5. The method for calculating the purity of a commodity cabinet based on area according to claim 1, characterized in that: “Classifying the goods based on preset information” specifically includes: identifying the goods based on the object detection model, extracting image features on the goods and converting them into text information, and traversing and comparing the preset information according to the extracted text information; If the text information is the same as the preset information, it is classified as the target product; If the text information is different from the preset information, it is classified as non-target goods.

6. The method for calculating the purity of a commodity cabinet based on area according to claim 5, characterized in that: The text information includes the type and name of the goods in the image, and the preset information includes the type and name of the goods provided by the brand. The goods in the image are classified based on the comparison between the type and name of the goods in the image and the type and name of the goods provided by the brand.

7. The method for calculating the purity of a commodity cabinet based on area according to claim 6, characterized in that: The specific steps of "classifying the goods according to comparing the type and name of the goods in the image with the type and name of the goods provided by the brand" include: Compare the product type in the image with the product type provided by the preset brand. If they are the same, compare the names. If they are different, classify them as non-target products. Compare the product names in the image with the names provided by the preset brand. If they are the same, they are classified as target products. If they are different, they are classified as non-target products.

8. The method for calculating the purity of a commodity cabinet based on area according to claim 1, characterized in that: At least two area ratio threshold ranges are preset to determine the area ratio threshold range in which the purity level is located, and the purity level is defined based on different area ratio threshold ranges.

9. A commodity cabinet, comprising a camera, a memory and a processor, characterized in that: The camera is installed on the merchandise cabinet and is used to capture images of merchandise; The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the method for calculating the purity of a merchandise cabinet based on area as claimed in any one of claims 1 to 8 are implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps in the method for calculating the purity of a merchandise cabinet based on area as described in any one of claims 1 to 8 are implemented.