Shelf layer recognition method and device for changing merchandise in vending machines and vending machine system
By setting up a camera on the vending machine to collect and analyze the user's hand movements, it can identify the events of taking out, putting back and exchanging goods, solving the problem of existing technology being unable to identify changes in goods, and achieving refined management of shelf layers and inventory updates. .
Patent Information
- Application Number
- CN202410525662.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-04-29
AI Technical Summary
The existing vending machine video solution cannot accurately identify the shelf level from which the product is taken out or put back, resulting in the inability to carry out refined operation management.
The target video is collected through a camera installed at the top of the shelf near the entrance, and the user's hand status and movements are identified. Combined with the occlusion of the shelf layer by the hand in the video frame, the shelf layer where the product changes is determined, including taking out and putting the product back. and exchange events.
It achieves accurate identification of product changes and can conduct refined operational management based on product changes and shelf levels, improving the accuracy of inventory information and operational efficiency.
Smart Images

Figure CN118097522B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vending machines, and in particular to a method and device for identifying shelf layers of merchandise changes in a vending machine, and a vending machine system. Background Art
[0002] Open vending machines are based on user credit authorization and adopt a self-collection method where users pick up the goods first and then settle the bill. Common solutions include weight sensing and video solutions. The weight sensing solution is relatively expensive and is easy to be replaced by goods and cannot be discovered in time. Therefore, the video solution is more popular.
[0003] In some video solutions, cameras are installed on each shelf layer of the vending machine shelves to effectively obtain the status of each shelf layer. However, due to cost issues, most solutions only install cameras on the top of the shelf.
[0004] In most solutions, the type of goods a user takes or puts can be determined through the screen of the user taking or putting the goods, but it is impossible to identify the specific shelf layer from which the goods are taken out or put back. Therefore, it is impossible to carry out refined operational management of the goods in combination with the changes in the goods and their corresponding shelf layers. Summary of the invention
[0005] The embodiments of the present application provide a method, device and vending machine system for identifying shelf layers of merchandise changes in a vending machine, so as to solve the technical problem that existing solutions cannot identify the specific shelf layer from which the merchandise is taken out or put back, and therefore cannot perform refined operational management of the merchandise in combination with the merchandise changes and its corresponding shelf layer.
[0006] In a first aspect, an embodiment of the present application provides a method for identifying shelf layers of a vending machine commodity change, comprising:
[0007] Collecting a target video containing images of the entrance ends of each shelf layer in the shelf; the target video is a video shot by a camera set on the top of the shelf close to the entrance ends of each shelf layer;
[0008] According to the hand state of the user in the target video, a target event in the target video is identified; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event;
[0009] The shelf layer where the commodity changes is determined according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of occurrence of the target event.
[0010] In one embodiment, the determining the shelf layer where the commodity changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of occurrence of the target event includes:
[0011] Acquire multiple video frames within the occurrence period of the target event;
[0012] The following processing is performed on each video frame: the shelf layer end portion blocked by the user's hand in the video frame is identified to obtain the blocked end portion; the blocked end portion closest to the top of the shelf among the blocked ends of the video frame is obtained to obtain the first target blocked end portion corresponding to the video frame;
[0013] Acquire a first target occlusion end portion which is closest to the top of the shelf among the first target occlusion ends of the multiple video frames to obtain a second target occlusion end portion;
[0014] The shelf layer to which the second target obstructed end portion belongs is determined as the shelf layer where the commodity changes.
[0015] In one embodiment, identifying a target event in the target video according to a hand state of a user in the target video includes:
[0016] Track the user's hand position and detect the hand's entry and exit movements on each shelf layer;
[0017] According to the holding situation of the hand on the commodity in a set of reaching-in actions and exiting actions, a target event in the target video is identified.
[0018] In one embodiment, the identifying a target event in the target video according to the holding situation of the hand on the commodity in a set of reaching-in and exiting actions includes:
[0019] If the number of commodities held by the hand in the reaching-in action is less than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity taking-out event.
[0020] In one embodiment, the identifying a target event in the target video according to the holding situation of the hand on the commodity in a set of reaching-in and exiting actions includes:
[0021] If the number of commodities held by the hand in the reaching-in action is greater than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity returning event.
[0022] In one embodiment, the identifying a target event in the target video according to the holding situation of the hand on the commodity in a set of reaching-in and exiting actions includes:
[0023] If the number of commodities held by the hand in the reaching-in action is equal to the number of commodities held by the hand in the exit action, and the type of commodities held by the hand in the reaching-in action is inconsistent with the type of commodities held by the hand in the exit action, then it is determined that the target event in the target video is a commodity exchange event.
[0024] In a second aspect, an embodiment of the present application provides a device for identifying shelf layers of merchandise changes in a vending machine, comprising:
[0025] The target video acquisition module is used to: acquire a target video including images of the entrance ends of each shelf layer in the shelf; the target video is a video shot by a camera arranged on the top of the shelf near the entrance ends of each shelf layer;
[0026] A target event recognition module is used to: recognize a target event in the target video according to the hand state of the user in the target video; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event;
[0027] The shelf layer recognition module is used to determine the shelf layer where the product changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event.
[0028] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the method for identifying shelf layers of merchandise changes in a vending machine as described in the first aspect are implemented.
[0029] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for identifying shelf layers of merchandise changes in a vending machine as described in the first aspect.
[0030] In a fifth aspect, an embodiment of the present application provides a self-service vending machine system, comprising a server and at least one self-service vending machine;
[0031] The self-service vending machine system opens the self-service vending machine based on the user's credit authorization, determines the goods consumed by the user based on the image captured by the camera, and settles the bill;
[0032] The server is used to execute the shelf layer identification method of the vending machine commodity changes described in the first aspect, and update the inventory information of each shelf layer of the self-service vending machine according to the identification result obtained by the shelf layer identification method of the vending machine commodity changes.
[0033] The present application provides a method, device and vending machine system for identifying shelf layers of commodity changes in a vending machine. The target video containing images of the entrance ends of each shelf layer in the shelf is captured by a camera set at the top of the shelf near the entrance ends of each shelf layer. The target event in the target video is identified according to the hand state of the user in the target video. The hand state includes the hand position and the hand holding of the commodity. The target event includes a commodity removal event, a commodity return event and a commodity exchange event. The shelf layer of the commodity change is determined according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event. Since the user will cause occlusion of the entrance end of the shelf layer where the action occurs and the entrance ends of the shelf layers below when taking and placing the commodity, the shelf layer where the action occurs can be determined by the occlusion of the entrance end of the shelf layer caused by the user's action, that is, the shelf layer of the commodity change can be determined, so that the commodity can be finely operated and managed in combination with the change of the commodity and its corresponding shelf layer. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 This is one of the flow charts of the method for identifying shelf layers of merchandise changes in vending machines provided in an embodiment of the present application;
[0036] Figure 2 This is the second flow chart of the method for identifying shelf layers of merchandise changes in a vending machine provided in an embodiment of the present application;
[0037] Figure 3 This is a third flow chart of the method for identifying shelf layers of vending machine merchandise changes provided in an embodiment of the present application;
[0038] Figure 4 It is a structural schematic diagram of a shelf layer identification device for a vending machine commodity change provided in an embodiment of the present application;
[0039] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] It should be noted that in the description of the embodiments of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is 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. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those skilled in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0042] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0043] Figure 1 This is one of the flow charts of the method for identifying shelf layers of vending machine commodities provided in the embodiment of the present application. Figure 1 The embodiment of the present application provides a method for identifying shelf layers of vending machine commodities, which may include:
[0044] 101. Collect a target video including images of the entrance ends of each shelf layer in the shelf;
[0045] The target video is a video shot by a camera installed on the top of the shelf near the end of the entrance of each shelf layer;
[0046] 102. Identify a target event in the target video according to a hand state of the user in the target video;
[0047] The hand state includes the hand position and the hand holding the product. The target events include product removal events, product return events, and product exchange events.
[0048] 103. Determine the shelf layer where the product changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event.
[0049] In step 101, the shelf of the vending machine generally includes multiple shelf layers, each shelf layer is usually composed of a hollow mesh metal frame, and a main camera and a secondary camera are usually installed at different angles on the top of the shelf close to the entrance end of each shelf layer. Therefore, by adjusting the lens angle of the camera, real-time video of the entrance end of each shelf layer can be captured from top to bottom, and it is ensured that the entrance ends of each shelf layer will not block each other.
[0050] Before step 101, the entrance end of each shelf layer may be calibrated through the target video.
[0051] Since the camera monitors the entrance end of each shelf layer in real time, when the user's hand is close to each shelf layer, the camera can also capture the user's hand movement, thereby obtaining the hand occlusion video of the entrance end of each shelf layer, and based on this, determine the shelf layer where the target event formed by the user's hand movement occurs, that is, the shelf layer where the product changes.
[0052] The present embodiment provides a method for identifying shelf layers of commodity changes in a vending machine, which collects a target video containing images of the entrance ends of each shelf layer in the shelf, wherein the target video is a video shot by a camera set at the top of the shelf near the entrance ends of each shelf layer, and identifies a target event in the target video according to the hand state of the user in the target video, wherein the hand state includes the hand position and the hand holding of the commodity, and the target event includes a commodity removal event, a commodity return event, and a commodity exchange event, and determines the shelf layer of the commodity change according to the occlusion of each shelf layer by the user's hand in the video frame within the occurrence period of the target event. Since the user will cause occlusion of the entrance end of the shelf layer where the action occurs and the entrance ends of the shelf layers below when taking and placing the commodity, the shelf layer where the action occurs can be determined by the occlusion of the entrance end of the shelf layer caused by the user's action, that is, the shelf layer of the commodity change can be determined, so that the commodity can be finely operated and managed in combination with the change of the commodity and its corresponding shelf layer, for example, the state of the commodity in the current vending machine can be analyzed in combination with the change of the commodity.
[0053] Furthermore, in the traditional weight sensing scheme, the weight detection equipment of the goods in each shelf layer can be combined with the setting of infrared sensing equipment to determine the user's taking and placing actions. The present embodiment uses a video scheme to accurately track the user's hand position and the hand's holding of the goods, and identify the user's goods removal events, goods return events and goods exchange events accordingly. Therefore, the present embodiment can be directly applied to the existing video scheme without the need to add weight detection equipment and infrared sensing equipment to the existing video scheme, and can conveniently, quickly and accurately identify the shelf layer.
[0054] Figure 2 This is the second flow chart of the method for identifying shelf layers of vending machine commodities provided in the embodiment of the present application. Figure 2 In one embodiment, determining the shelf layer where the commodity changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event may include:
[0055] 201. Acquire multiple video frames within a time period in which a target event occurs;
[0056] 202. Perform the following processing on each video frame: identify the shelf layer end blocked by the user's hand in the video frame to obtain the blocked end; obtain the blocked end closest to the top of the shelf among the blocked ends of the video frame to obtain the first target blocked end corresponding to the video frame;
[0057] 203. Obtain a first target occlusion end portion which is closest to the top of the shelf among the first target occlusion ends of the multiple video frames to obtain a second target occlusion end portion;
[0058] 204. Determine the shelf layer to which the second target blocked end portion belongs as the shelf layer where the commodity changes.
[0059] In step 202, since the hand position in each video frame changes on a time scale during the occurrence period of the same target event, in a certain video frame, the user's hand may have blocked the entrance end of some shelf layers, but in fact the user's hand has not yet reached the target shelf layer. Therefore, it is necessary to first determine the blocked end closest to the top of the shelf among the blocked ends of each video frame;
[0060] In step 203, during the occurrence period of the same target event, the closer the user's hand is to the target shelf layer, the higher the entrance end of the shelf layer it blocks, that is, the closest to the top of the shelf. Therefore, the first target occluded end of multiple video frames that is closest to the top of the shelf is most likely to be the entrance end of the target shelf layer, that is, the entrance end of the shelf layer where the goods change.
[0061] This embodiment first obtains the first target occlusion end portion where the user's hand blocks the entrance end of each shelf layer in a single video frame during the time period when the target event occurs, and then obtains the second target occlusion end portion from the first target occlusion end portion of each video frame, thereby obtaining the occlusion end portion at the highest position in all video frames, and determining the shelf layer to which it belongs as the shelf layer where the goods change, thereby achieving accurate identification of the shelf layers.
[0062] Figure 3 This is the third flow chart of the method for identifying shelf layers of vending machine commodities provided in the embodiment of the present application. Figure 3 In one embodiment, identifying a target event in a target video according to a hand state of a user in the target video may include:
[0063] 301. Track the user's hand position and detect the hand's entry and exit movements on each shelf layer;
[0064] 302. Identify a target event in a target video according to a holding situation of a product by a hand in a set of reaching-in and exiting actions.
[0065] In step 301, the entry time point of the hand entering the camera range and the exit time point of the hand exiting the camera range after the entry time point are detected. It should be noted that the entry time point must be before the exit time point, and there is no other hand movement entering the camera range between the entry time point and the exit time point. The hand entry movement is the hand's entry movement for a certain shelf layer, and the hand exit movement is the hand's exit movement for the shelf layer. The entry movement and exit movement are a set of movements.
[0066] In step 302, the specific determination method is as follows:
[0067] 1. If the number of commodities held by the hand in the reaching-in action is less than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity taking-out event.
[0068] 2. If the number of commodities held by the hand in the reaching-in action is greater than the number of commodities held by the hand in the exiting action, the target event in the target video is determined to be a commodity putting-back event.
[0069] 3. If the number of commodities held by the hand in the reaching-in action is equal to the number of commodities held by the hand in the exiting action, and the types of commodities held by the hand in the reaching-in action are inconsistent with the types of commodities held by the hand in the exiting action, then it is determined that the target event in the target video is a commodity exchange event.
[0070] It should be noted that, in practice, there may be a situation where the number of commodities held by the hand in the reaching-in action is less than the number of commodities held by the hand in the exiting action, and the types of commodities held by the hand in the reaching-in action are inconsistent with the types of commodities held by the hand in the exiting action. For example, the user holds commodities A and B in the reaching-in action, and commodities A, C and D in the exiting action. At this time, from the perspective of commodity type, the user returns B, and from the perspective of commodity quantity, the user takes out one commodity. In this embodiment, this situation is classified as a commodity taking-out event;
[0071] Similarly, there may be a situation where the number of commodities held by the hand in the reaching-in action is greater than the number of commodities held by the hand in the exiting action, and the types of commodities held by the hand in the reaching-in action are inconsistent with the types of commodities held by the hand in the exiting action. For example, the user holds commodities A, B and C in the reaching-in action, and holds commodities A and D in the exiting action. At this time, from the perspective of commodity types, the user returns B and C, and from the perspective of commodity quantity, the user puts back one commodity. In this embodiment, this situation is classified as a commodity return event;
[0072] To sum up, the distinction of target events is to distinguish between commodity removal events and commodity return events only when the number of commodities held by the hands in the reaching-in action and the exiting action is different. At this time, the differences and similarities of commodity types are not considered. Only when the number of commodities held by the hands in the reaching-in action and the exiting action is the same, the differences and similarities of commodity types are further considered, and the situations with different commodity types are classified as commodity exchange events.
[0073] This embodiment determines the reaching-in action and the exiting action involved in the target event by detecting the hand-in action that occurs earlier in time and the hand-out action that occurs later in time, and excludes any other actions between the two actions, and then determines various types of target events according to the different situations of the quantity and types of goods held by the user's hands in these two actions, thereby achieving rapid and accurate distinction of target events.
[0074] Furthermore, on the basis of determining the product removal events, product return events and product exchange events, the shelf layers where these three types of product change events occur are determined, which can realize refined operational management of the products on each shelf layer. For example, if the product change events that occur more frequently on a certain shelf layer are product removal events, it means that the products on this shelf layer are consumed quickly and user preferences are strong, and it is necessary to replenish the goods in time and consider adding more shelf layers; if the product change events that occur more frequently on a certain shelf layer are product return events, it means that the products on this shelf layer are consumed slowly and user preferences are weak, and it is necessary to reduce the replenishment frequency and consider reducing the number of shelf layers; if the product change events that occur more frequently on a certain shelf layer are product exchange events, it means that the products on this shelf layer are not very distinguishable for users, and you can consider replacing some products to meet the differentiated needs of users.
[0075] The following is a description of the device for identifying shelf levels of merchandise changes in a vending machine provided in an embodiment of the present application. The device for identifying shelf levels of merchandise changes in a vending machine described below and the method for identifying shelf levels of merchandise changes in a vending machine described above can be referenced to each other.
[0076] Figure 4 Schematic diagram of the structure of the shelf layer recognition device for the change of the commodity of the vending machine provided in the embodiment of the present application. Figure 4 The embodiment of the present application provides a shelf layer recognition device for changing commodities in a vending machine, which may include:
[0077] The target video acquisition module 401 is used to: acquire a target video including images of the entrance ends of each shelf layer in the shelf; the target video is a video shot by a camera arranged on the top of the shelf near the entrance ends of each shelf layer;
[0078] The target event recognition module 402 is used to: recognize the target event in the target video according to the hand state of the user in the target video; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes the commodity taking out event, commodity putting back event and commodity exchange event;
[0079] The shelf layer identification module 403 is used to determine the shelf layer where the commodity changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event.
[0080] The shelf layer recognition device for changing goods in a vending machine provided in this embodiment collects a target video including images of the entrance ends of each shelf layer in the shelf. The target video is a video shot by a camera set at the top of the shelf near the entrance ends of each shelf layer. According to the hand state of the user in the target video, the target event in the target video is recognized. The hand state includes the hand position and the hand holding of the goods. The target event includes a goods removal event, a goods return event, and a goods exchange event. According to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event, the shelf layer where the goods are changed is determined. Since the user will cause occlusion of the entrance end of the shelf layer where the action occurs and the entrance ends of the shelf layers below when taking and placing goods, the shelf layer where the action occurs can be determined by the occlusion of the entrance end of the shelf layer caused by the user's action, that is, the shelf layer where the goods are changed, so that the goods can be finely operated and managed in combination with the changes in the goods and the corresponding shelf layers, for example, the state of the goods in the current vending machine can be analyzed in combination with the changes in the goods.
[0081] In one embodiment, the shelf layer identification module 403 is specifically used to:
[0082] Acquire multiple video frames within the occurrence period of the target event;
[0083] The following processing is performed on each video frame: the shelf layer end portion blocked by the user's hand in the video frame is identified to obtain the blocked end portion; the blocked end portion closest to the top of the shelf among the blocked ends of the video frame is obtained to obtain the first target blocked end portion corresponding to the video frame;
[0084] Acquire a first target occlusion end portion which is closest to the top of the shelf among the first target occlusion ends of the multiple video frames to obtain a second target occlusion end portion;
[0085] The shelf layer to which the second target obstructed end portion belongs is determined as the shelf layer where the commodity changes.
[0086] In one embodiment, the target event identification module 402 is specifically configured to:
[0087] Track the user's hand position and detect the hand's entry and exit movements on each shelf layer;
[0088] According to the holding situation of the hand on the commodity in a set of reaching-in actions and exiting actions, a target event in the target video is identified.
[0089] In one embodiment, the target event identification module 402 is specifically configured to:
[0090] If the number of commodities held by the hand in the reaching-in action is less than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity taking-out event.
[0091] In one embodiment, the target event identification module 402 is specifically configured to:
[0092] If the number of commodities held by the hand in the reaching-in action is greater than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity returning event.
[0093] In one embodiment, the target event identification module 402 is specifically configured to:
[0094] If the number of commodities held by the hand in the reaching-in action is equal to the number of commodities held by the hand in the exit action, and the type of commodities held by the hand in the reaching-in action is inconsistent with the type of commodities held by the hand in the exit action, then it is determined that the target event in the target video is a commodity exchange event.
[0095] The embodiment of the present application provides a self-service vending machine system, including a server and at least one self-service vending machine;
[0096] The self-service vending machine system opens the self-service vending machine based on the user's credit authorization, determines the goods consumed by the user based on the image captured by the camera and settles the bill;
[0097] The server is used to execute the aforementioned shelf layer identification method for vending machine commodity changes, and update the inventory information of each shelf layer of the self-service vending machine according to the identification results obtained by the shelf layer identification method for vending machine commodity changes.
[0098] Since the self-service vending machine system of this embodiment adopts the aforementioned shelf layer identification method of vending machine commodity changes, it has the same technical effect as the aforementioned method, and will not be described in detail here.
[0099] Figure 5 An example of a structural diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the computer program in the memory 530 to execute the steps of the shelf layer identification method for the change of the commodity of the vending machine, for example, including:
[0100] Collecting a target video containing images of the entrance ends of each shelf layer in the shelf; the target video is a video shot by a camera set on the top of the shelf close to the entrance ends of each shelf layer;
[0101] According to the hand state of the user in the target video, a target event in the target video is identified; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event;
[0102] The shelf layer where the commodity changes is determined according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of occurrence of the target event.
[0103] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0104] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the steps of the method for identifying shelf layers of vending machine commodities changes provided in the above embodiments, for example including:
[0105] Collecting a target video containing images of the entrance ends of each shelf layer in the shelf; the target video is a video shot by a camera set on the top of the shelf close to the entrance ends of each shelf layer;
[0106] According to the hand state of the user in the target video, a target event in the target video is identified; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event;
[0107] The shelf layer where the commodity changes is determined according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of occurrence of the target event.
[0108] On the other hand, an embodiment of the present application further provides a non-transitory computer-readable storage medium on which a computer program is stored, wherein the computer program is used to cause a processor to execute the steps of the method for identifying shelf layers of vending machine commodities changes provided in the above embodiments, for example, including:
[0109] Collecting a target video containing images of the entrance ends of each shelf layer in the shelf; the target video is a video shot by a camera set on the top of the shelf close to the entrance ends of each shelf layer;
[0110] According to the hand state of the user in the target video, a target event in the target video is identified; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event;
[0111] The shelf layer where the commodity changes is determined according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of occurrence of the target event.
[0112] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0113] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0115] 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 it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, 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 embodiments of the present application.
Claims
1. A method for identifying shelf layers of vending machine commodities, characterized in that: include: Collecting target video including images of the entrance ends of each shelf layer in the shelf; The target video is a video shot by a camera arranged on the top of the shelf close to the entrance end of each shelf layer; According to the hand state of the user in the target video, a target event in the target video is identified; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event; Determine the shelf layer where the product changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event; The determining the shelf layer where the commodity changes according to the blocking condition of each shelf layer by the user's hand in the video frame within the occurrence period of the target event includes: Acquire multiple video frames within the occurrence period of the target event; The following processing is performed on each video frame: the shelf layer end portion blocked by the user's hand in the video frame is identified to obtain the blocked end portion; the blocked end portion closest to the top of the shelf among the blocked ends of the video frame is obtained to obtain the first target blocked end portion corresponding to the video frame; Acquire a first target occlusion end portion which is closest to the top of the shelf among the first target occlusion ends of the multiple video frames to obtain a second target occlusion end portion; The shelf layer to which the second target obstructed end portion belongs is determined as the shelf layer where the commodity changes.
2. The method for identifying shelf layers of vending machine commodities according to claim 1, characterized in that: The step of identifying a target event in the target video according to a hand state of a user in the target video includes: Track the user's hand position and detect the hand's entry and exit movements on each shelf layer; According to the holding situation of the hand on the commodity in a set of reaching-in actions and exiting actions, a target event in the target video is identified.
3. The method for identifying shelf layers of vending machine commodities according to claim 2, characterized in that: The identifying a target event in the target video according to the holding situation of the hand on the commodity in a set of reaching-in actions and exiting actions includes: If the number of commodities held by the hand in the reaching-in action is less than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity taking-out event.
4. The method for identifying shelf layers of vending machine commodities according to claim 2, characterized in that: The identifying a target event in the target video according to the holding situation of the hand on the commodity in a set of reaching-in actions and exiting actions includes: If the number of commodities held by the hand in the reaching-in action is greater than the number of commodities held by the hand in the exiting action, it is determined that the target event in the target video is a commodity returning event.
5. The method for identifying shelf layers of vending machine commodities according to claim 2, characterized in that: The identifying a target event in the target video according to the holding situation of the hand on the commodity in a set of reaching-in actions and exiting actions includes: If the number of commodities held by the hand in the reaching-in action is equal to the number of commodities held by the hand in the exit action, and the type of commodities held by the hand in the reaching-in action is inconsistent with the type of commodities held by the hand in the exit action, then it is determined that the target event in the target video is a commodity exchange event.
6. A shelf layer recognition device for changing commodities in a vending machine, characterized in that: include: The target video acquisition module is used to: acquire target videos including images of the entrance ends of each shelf layer in the shelf; The target video is a video shot by a camera arranged on the top of the shelf close to the entrance end of each shelf layer; A target event recognition module is used to: recognize a target event in the target video according to the hand state of the user in the target video; the hand state includes the hand position and the hand holding condition of the commodity, and the target event includes a commodity taking out event, a commodity putting back event, and a commodity exchange event; The shelf layer recognition module is used to: determine the shelf layer where the commodity changes according to the occlusion of each shelf layer by the user's hand in the video frame within the time period of the target event; The determining the shelf layer where the commodity changes according to the blocking condition of each shelf layer by the user's hand in the video frame within the occurrence period of the target event includes: Acquire multiple video frames within the occurrence period of the target event; The following processing is performed on each video frame: the shelf layer end portion blocked by the user's hand in the video frame is identified to obtain the blocked end portion; the blocked end portion closest to the top of the shelf among the blocked ends of the video frame is obtained to obtain the first target blocked end portion corresponding to the video frame; Acquire a first target occlusion end portion which is closest to the top of the shelf among the first target occlusion ends of the multiple video frames to obtain a second target occlusion end portion; The shelf layer to which the second target obstructed end portion belongs is determined as the shelf layer where the commodity changes.
7. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the method for identifying shelf layers of merchandise changes in a vending machine as described in any one of claims 1 to 5 are implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for identifying shelf layers of merchandise changes in a vending machine as described in any one of claims 1 to 5 are implemented.
9. A self-service vending machine system, characterized in that: Includes servers and at least one vending machine; The self-service vending machine system opens the self-service vending machine based on the user's credit authorization, determines the goods consumed by the user based on the image captured by the camera, and settles the bill; The server is used to execute the shelf layer identification method for vending machine commodity changes as described in any one of claims 1 to 5, and update the inventory information of each shelf layer of the self-service vending machine based on the identification results obtained by the shelf layer identification method for vending machine commodity changes.
