Abnormal shopping behavior detection method, device, system and shopping cart for shopping cart

By installing a large-angle camera and video action recognition technology on a smart shopping cart, combined with deep learning and machine learning algorithms, it can identify shopper movements and product status, solving the problem of smart shopping carts being unable to effectively monitor abnormal shopping behaviors and achieving efficient Accurate behavior detection and product security.

CN118397568BActive Publication Date: 2024-09-03HANSHOW TECH CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202410841638.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-03
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

It is difficult for existing smart shopping carts to fully monitor customers' shopping behavior and identify abnormal shopping behaviors efficiently and accurately, resulting in frequent loss of goods.

Method used

Using large-angle cameras and video action recognition technology, combined with deep learning and machine learning algorithms, by collecting video frame data of the shopping process and action data in the basket area, it can identify shopper actions and product status, and determine whether there is abnormal shopping behavior. .

Benefits of technology

It achieves all-round monitoring of shopping behaviors, improves the accuracy and efficiency of detecting abnormal shopping behaviors, reduces the risk of product loss, and reduces labor costs and error rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397568B
    Figure CN118397568B
Patent Text Reader

Abstract

The present invention discloses a method, device, system and shopping cart for detecting abnormal shopping behavior of a shopping cart, wherein the method comprises: collecting the scanning data of a barcode scanner and the action data in the basket area monitored by the action monitoring device in the basket area; when it is determined that a shopping action occurs according to the scanning data, a first trigger shooting signal is issued; when it is determined that a shopping action occurs in the basket area according to the action data, a second trigger shooting signal is issued; when it is determined that a shopping action occurs according to the first and / or second trigger shooting signals, a visual image data acquisition device is triggered to collect video frame image data of the shopper during the shopping process; according to the video frame image data, the type of the shopper's shopping action and the number of goods in motion are determined; according to the barcode scanner data, the type of shopping action and the number of the goods, whether the shopper has abnormal shopping behavior is detected. The present invention can efficiently and accurately detect abnormal shopping behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of self-service shopping, and in particular to a method, device, system and shopping cart for detecting abnormal shopping behavior of a shopping cart. Background Art

[0002] This section is intended to provide a background or context for embodiments of the present invention. No description herein is admitted to be prior art by virtue of its inclusion in this section.

[0003] In recent years, with the continuous development of multiple technologies such as the Internet of Things, artificial intelligence, big data analysis, mobile payment and smart hardware, the supermarket industry has been continuously transforming towards intelligence and digitalization in order to better meet customer needs, improve customer shopping experience and optimize merchant operations. Among them, shopping settlement is an important part. It is in this context that smart shopping carts appear in the supermarket environment. The main purpose is to provide self-service shopping options and simplify the necessary steps for traditional shopping and payment, so that customers do not need to interact with cashiers at the checkout counter, thereby improving the shopping experience; at the same time, for merchants, it can reduce the manual configuration of cashiers, thereby reducing operating costs.

[0004] Generally speaking, smart shopping carts have a series of advanced functions, including automatic scanning and settlement, navigation and product positioning, item identification and weighing, personalized recommendations and advertising, data analysis and inventory management, etc. Among them, self-service code scanning and settlement is its core function, which generally has hardware such as code scanners, tablet devices, and visual cameras to complete intelligent detection and identification of products or barcodes, instantly update the shopping list on the tablet, and finally the shopper checks the list for settlement.

[0005] However, when smart shopping carts are actually put into use in supermarket scenarios, there is a need to prevent abnormal shopping behaviors. Because consumers use them by themselves, it is inevitable that some consumers will try to shop in a way that does not follow the normal process. Smart shopping carts need to detect and prompt or prevent these abnormal shopping behaviors.

[0006] In the prior art, stores usually use closed-circuit television cameras for monitoring in order to prevent the loss of goods. In addition, various sensors and alarm systems are used to enhance loss prevention capabilities. Or some existing shopping carts are equipped with viewing angle cameras, which only check and monitor the area inside the shopping cart. These methods often cannot fully monitor customers' shopping behavior, cannot provide a full range of viewing angles, have monitoring blind spots, and are easily bypassed. In addition, most of them rely on manual judgment, which is inefficient and prone to errors. Due to the lack of intelligent analysis, these existing systems cannot efficiently and accurately identify abnormal shopping behaviors, resulting in the loss of goods. Summary of the invention

[0007] An embodiment of the present invention provides a method for detecting abnormal shopping behavior of a shopping cart. The method is applied to an abnormal shopping behavior detection device to efficiently and accurately detect abnormal shopping behavior. The method includes:

[0008] Collect the commodity scanning data obtained by the barcode scanner and the motion data in the basket area monitored by the motion monitoring device in the basket area;

[0009] When it is determined that a shopping action has occurred according to the product scanning data, a first trigger shooting signal is issued;

[0010] When it is determined according to the action data in the basket area that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued;

[0011] When it is determined that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal, a trigger shooting instruction is sent to the visual image data acquisition device; the visual image data acquisition device is used to collect video frame image data of the shopper during the shopping process when receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device;

[0012] Determine the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process;

[0013] Detect whether shoppers have abnormal shopping behavior based on product scanner data, shoppers' shopping action types and the number of products in motion.

[0014] An embodiment of the present invention provides a method for detecting abnormal shopping behavior of a shopping cart. The method is applied to a system to efficiently and accurately detect abnormal shopping behavior. The method includes:

[0015] The barcode scanner obtains the product scanning data and sends the product scanning data to the abnormal shopping behavior detection device;

[0016] The action monitoring device in the vehicle basket area monitors the action data in the vehicle basket area, and sends the action data in the vehicle basket area to the abnormal shopping behavior detection device;

[0017] The abnormal shopping behavior detection device sends a first trigger shooting signal when determining that a shopping action has occurred according to the commodity scanning data; sends a second trigger shooting signal when determining that an action has occurred in the shopping cart basket area according to the action data in the basket area; sends a trigger shooting instruction to the visual image data acquisition device when determining that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal;

[0018] When receiving the trigger shooting instruction, the visual image data acquisition device acquires video frame image data of the shopper during the shopping process, and sends the video frame image data to the abnormal shopping behavior detection device;

[0019] The abnormal shopping behavior detection device determines the type of shopper's shopping action and the number of commodities in motion based on the video frame image data during the shopper's shopping process; and detects whether the shopper has abnormal shopping behavior based on the commodity scanner data, the type of shopper's shopping action and the number of commodities in motion.

[0020] The embodiment of the present invention provides a device for detecting abnormal shopping behavior of a shopping cart, which is used to efficiently and accurately detect abnormal shopping behavior. The device includes:

[0021] A collection unit, used to collect the commodity scanning data obtained by the barcode scanner and the motion data in the basket area monitored by the motion monitoring device in the basket area;

[0022] A first trigger shooting unit, configured to send a first trigger shooting signal when a shopping action is determined to have occurred according to the commodity code scanning data;

[0023] A second trigger shooting unit is used to send a second trigger shooting signal when it is determined that a shopping action occurs in the basket area of ​​the shopping cart according to the action data in the basket area;

[0024] The trigger shooting control unit is used to send a trigger shooting instruction to the visual image data acquisition device when it is determined that the shopping action occurs according to the first trigger shooting signal and / or the second trigger shooting signal; the visual image data acquisition device is used to collect video frame image data of the shopper during the shopping process when receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device;

[0025] An analysis unit, for determining the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper in the shopping process;

[0026] The detection unit is used to detect whether the shopper has abnormal shopping behavior based on the product scanner data, the shopper's shopping action type and the number of products in motion.

[0027] The embodiment of the present invention provides a shopping cart abnormal shopping behavior detection system for efficiently and accurately detecting abnormal shopping behavior. The system includes:

[0028] A barcode scanner, used to obtain product barcode scanning data and send the product barcode scanning data to an abnormal shopping behavior detection device;

[0029] A motion monitoring device in the vehicle basket area, used to monitor motion data in the vehicle basket area and send the motion data in the vehicle basket area to the abnormal shopping behavior detection device;

[0030] A visual image data acquisition device, for acquiring video frame image data of a shopper during shopping upon receiving a trigger shooting instruction, and sending the video frame image data to an abnormal shopping behavior detection device;

[0031] The abnormal shopping behavior detection device is used to send out a first trigger shooting signal when it is determined that a shopping action has occurred based on the commodity scanning data; send out a second trigger shooting signal when it is determined that an action has occurred in the basket area of ​​the shopping cart based on the action data in the basket area; send a trigger shooting instruction to the visual image data acquisition device when it is determined that a shopping action has occurred based on the first trigger shooting signal and / or the second trigger shooting signal; determine the shopper's shopping action type and the number of commodities in motion based on the video frame image data during the shopper's shopping process; detect whether the shopper has abnormal shopping behavior based on the commodity scanner data, the shopper's shopping action type and the number of commodities in motion.

[0032] The embodiment of the present invention provides a shopping cart for detecting abnormal shopping behavior in a shopping cart, which is used to efficiently and accurately detect abnormal shopping behavior. The shopping cart includes:

[0033] The abnormal shopping behavior detection device of the shopping cart as described above.

[0034] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for detecting abnormal shopping behavior of a shopping cart when executing the computer program.

[0035] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for detecting abnormal shopping behavior of a shopping cart is implemented.

[0036] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned method for detecting abnormal shopping behavior of a shopping cart is implemented.

[0037] In an embodiment of the present invention, a solution for detecting abnormal shopping behavior of a shopping cart is provided by: collecting commodity scanning data acquired by a barcode scanner and motion data in a basket area monitored by a motion monitoring device in the basket area; when it is determined that a shopping action has occurred according to the commodity scanning data, a first trigger shooting signal is issued; when it is determined that a shopping action has occurred in the basket area of ​​the shopping cart according to the motion data in the basket area, a second trigger shooting signal is issued; when it is determined that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal, a trigger shooting instruction is sent to a visual image data acquisition device; the visual image data acquisition device is used to collect video frame image data of a shopper's shopping process upon receiving the trigger shooting instruction, and send the video frame image data to an abnormal shopping behavior detection device; according to the video frame image data of the shopper's shopping process, the type of the shopper's shopping action and the number of commodities in motion are determined; according to the commodity barcode scanner data, the type of the shopper's shopping action and the number of commodities in motion, whether the shopper has abnormal shopping behavior is detected, and abnormal shopping behavior can be detected efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0039] Figure 1 It is a flow chart of a method for detecting abnormal shopping behavior of a shopping cart applied to a device in an embodiment of the present invention;

[0040] Figure 2 It is a flowchart of a method for detecting abnormal shopping behavior in a shopping cart of a system according to an embodiment of the present invention;

[0041] Figure 3 Schematic diagram of the structure of a device for detecting abnormal shopping behavior of a shopping cart in an embodiment of the present invention;

[0042] Figure 4 Schematic diagram of the structure of the abnormal shopping behavior detection system of the shopping cart in an embodiment of the present invention;

[0043] Figure 5 Schematic diagram of the circuit structure of a shopping cart in an embodiment of the present invention;

[0044] Figure 6 The figure is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0046] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of laws and regulations.

[0047] The embodiment of the present invention provides a solution for detecting abnormal shopping behavior in a shopping cart, which is a solution for preventing abnormal shopping behavior in a shopping cart based on a wide-angle camera and video action recognition. The embodiment of the present invention proposes to configure and install a wide-angle visual camera and a computing and interactive device (the abnormal shopping behavior detection device for the shopping cart in the embodiment of the present invention) on the shopping cart, and use the wide-angle camera to collect video frame data of the shopper's shopping process, which is processed by a computer vision algorithm, including detecting the target product, identifying and judging the shopper's behavior, etc., and finally analyzing whether the shopper has abnormal shopping behavior during the shopping process. The abnormal shopping behavior detection solution for the shopping cart is introduced in detail below.

[0048] Figure 1 FIG. 1 is a flow chart of a method for detecting abnormal shopping behavior in a shopping cart of a device according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0049] Step 101: collecting commodity code scanning data obtained by a code scanner and motion data in the basket area monitored by a motion monitoring device in the basket area;

[0050] Step 102: When it is determined that a shopping action has occurred according to the product scanning data, a first trigger shooting signal is issued;

[0051] Step 103: when it is determined that a shopping action has occurred in the basket area of ​​the shopping cart according to the action data in the basket area, a second trigger shooting signal is issued;

[0052] Step 104: When it is determined that a shopping action occurs according to the first trigger shooting signal and / or the second trigger shooting signal, a trigger shooting instruction is sent to a visual image data acquisition device; the visual image data acquisition device is used to collect video frame image data of the shopper during the shopping process upon receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device;

[0053] Step 105: determining the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process;

[0054] Step 106: Detect whether the shopper has abnormal shopping behavior based on the product scanner data, the type of shopping action of the shopper, and the number of products in motion.

[0055] The abnormal shopping behavior detection method of the shopping cart provided by the embodiment of the present invention, when working: collecting the commodity scanning data obtained by the scanner and the action data in the basket area monitored by the action monitoring device in the basket area; when it is determined that a shopping action has occurred according to the commodity scanning data, a first trigger shooting signal is issued; when it is determined that a shopping action has occurred in the basket area of ​​the shopping cart according to the action data in the basket area, a second trigger shooting signal is issued; when it is determined that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal, a trigger shooting instruction is sent to the visual image data acquisition device; the visual image data acquisition device is used to collect the video frame image data of the shopper's shopping process when receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device; according to the video frame image data of the shopper's shopping process, the shopper's shopping action type and the number of commodities in motion are determined; according to the commodity scanner data, the shopper's shopping action type and the number of commodities in motion, whether the shopper has abnormal shopping behavior can be detected efficiently and accurately. The method is described in detail below.

[0056] Based on the shopping cart, the embodiment of the present invention provides a method for detecting abnormal shopping behaviors in the shopping cart, which solves the following abnormal shopping behaviors including but not limited to the following by integrating deep learning, machine learning and computer vision algorithms:

[0057] 1. Missed scan and added: The shopper puts the product into the shopping cart without scanning the code. This includes various situations, such as missing a single product, missing multiple products, scanning a single product and adding multiple products, etc. In summary: n products are added to the shopping cart, but the number of scanned code information is less than n;

[0058] 2. Wrong scan and put: The shopper scanned the code for product A2, but put another product B2 into the cart.

[0059] The hardware devices involved in the embodiments of the present invention may include:

[0060] 1. Visual sensors (such as Figure 4The visual image data acquisition device in the embodiment of the present invention may be a camera with a wide viewing angle. The wide viewing angle camera may include but is not limited to a large field of view, a fisheye camera, a panoramic camera, a stereo camera, a camera installed at a height, etc. Its coverage range may include the area within the shopping cart basket and a certain distance outside the shopping cart basket. That is, in one embodiment, the visual image data acquisition device in the embodiment of the present invention may be a camera with a wide viewing angle. The meaning of a camera with a wide viewing angle is: a camera with a field of view greater than a preset angle, a fisheye camera, a panoramic camera, a stereo camera, a camera installed at a height greater than a preset angle, etc.

[0061] 2. The motion monitoring device in the basket area. In the embodiment of the present invention, the motion monitoring device in the basket area may include: a distance sensor (distance data acquisition device), a depth data acquisition device (depth camera), that is, it can be configured as at least one depth camera or at least one ultrasonic sensor or millimeter wave sensor. Its sensing range covers the entire shopping cart basket area. The two implementation methods of the motion monitoring device in the basket area are described in the following embodiments.

[0062] 3. Computing and interactive devices (such as Figure 4 The abnormal shopping behavior detection device 04 shown is used to connect and receive image data of the visual sensor (such as Figure 4 The visual image data acquisition device 03 shown in FIG. Figure 4 The motion monitoring device 02 in the basket area shown (distance data or depth data acquisition device of the ranging sensor); connect the barcode scanner (such as Figure 4 The barcode scanner 01 shown in the figure is used to receive the barcode scanning information of the barcode scanner; it may include an operation processing unit for processing visual image data, distance data or depth image data, algorithm calculation and other processes (such as Figure 3 The functions of the analysis unit 045 and the detection unit 046 shown in the figure); an interactive display screen can also be connected to display a shopping interaction interface.

[0063] 4. Barcode scanner: used to scan the barcode on the product packaging and send it to the computing device (abnormal shopping behavior detection device).

[0064] The method involved in the embodiment of the present invention may include:

[0065] Using a wide-angle camera, we collect video frame data of the shopper's shopping process, and process it through a computer vision algorithm, including detecting the target product, identifying and judging the shopper's behavior, etc. Finally, we analyze whether the shopper has stolen or damaged items during the shopping process. If so, we will give a prompt. The general method flow is as follows:

[0066] 1. A distance measuring sensor continuously obtains distance measuring data in the basket area; or a depth camera (depth data acquisition device) obtains depth data (depth image data).

[0067] 2. Equipment ( Figure 4 The corresponding algorithm processing module ( Figure 4 Acquisition device), continuously receives and processes ranging data or depth data, as well as barcode scanner data.

[0068] 3. Determine whether a new shopping action has occurred based on the data from the barcode scanner; determine whether an action has occurred in the cart basket based on fluctuations in distance data or changes in depth image data.

[0069] 4. When an action occurs, the visual sensor (visual image data acquisition device) is triggered to wake up and start capturing video frame images.

[0070] 5. When the distance data no longer fluctuates or the depth data no longer changes, stop the visual sensor's shooting action.

[0071] 6. Send the captured video segment data to the corresponding algorithm module (for example Figure 3 The analysis unit and detection unit in the system perform calculations and processing to confirm the action type, quantity of goods, etc.

[0072] 7. Combine the data from the scanner with the type of shopping action, the number of goods, etc. to determine whether there is any abnormal shopping behavior.

[0073] The detailed process of the method involved in the embodiment of the present invention is as follows:

[0074] 1. Receive data from the barcode scanner. If there is barcode scanning information, it is determined that a shopping action has occurred and a signal A (the first trigger shooting signal) is sent.

[0075] 2. Turn on the distance measurement sensor to obtain the distance measurement data in the basket area, or turn on the depth data acquisition device to obtain depth image data.

[0076] When the device enters the shopping process, the distance measuring sensor is turned on to continuously measure the distance in the basket. Here, taking the depth camera as an example, when the device enters the shopping process, the depth camera is turned on to continuously obtain the depth image data in the basket.

[0077] From the above, it can be seen that in one embodiment, the action monitoring device in the basket area is a depth data acquisition device, which is used to obtain depth image data in the basket area of ​​the shopping cart and send the depth image data to the abnormal shopping behavior detection device;

[0078] When it is determined according to the action data in the basket area that a shopping action occurs, a second trigger shooting signal is issued, including: when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued.

[0079] In specific implementation, the depth image data in the shopping cart basket area acquired by the depth data acquisition device (depth camera) is used to determine whether shopping action occurs in the shopping cart basket area. If so, a second trigger shooting signal (the A1 signal described below) is issued.

[0080] That is, the depth image continuously collected by the depth camera is received. Assume that the depth image received at time t (current time) is marked as D t , calculate D t With D t-1 The average depth difference between the two moments, t-1 is the moment before the current moment.

[0081] If the average depth difference exceeds the preset average depth difference threshold, it is determined that the image disturbance occurs at time t, and the disturbance frame number r is recorded as +1. When the r value exceeds the preset disturbance frame number threshold, it is determined that the action occurs, and a signal B (second trigger shooting signal) is sent. At this time, the static frame number s is initialized to 0.

[0082] If the average depth difference is always 0 or a very small floating difference, it is determined that there is no image disturbance at time t, and the number of still frames s is recorded as + 1. When the s value is equal to the preset still frame number threshold, it is determined that the action is over and a signal C (turn off the shooting trigger signal) is sent.

[0083] As can be seen from the above, in one embodiment, when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, sending a second trigger shooting signal includes:

[0084] Get the depth image data at the current moment;

[0085] Determine an average depth difference between the depth image data at a current moment and the depth image data at a previous moment;

[0086] If the average depth difference exceeds the preset average depth difference threshold, it is determined that a picture disturbance occurs at the current moment, and the number of disturbance frames is increased by 1;

[0087] When the value of the disturbance frame number exceeds a preset disturbance frame number threshold, it is determined that a shopping action occurs in the shopping cart basket area, and a second trigger shooting signal is issued.

[0088] In specific implementation, the above implementation method of determining whether a shopping action occurs in the shopping cart basket area based on the depth image data can improve the accuracy of detecting the occurrence of shopping actions and further improve the accuracy of subsequent abnormal behavior detection.

[0089] As can be seen from the above, in one embodiment, the abnormal shopping behavior detection method of the shopping cart further includes:

[0090] Initialize the number of still frames to 0;

[0091] If the average depth difference is 0 or a floating difference less than the preset depth value within the preset time period, it is determined that there is no picture disturbance at the current moment, and the number of still frames is increased by 1;

[0092] When the value of the still frame number is equal to the preset still frame number threshold, the shopping action is determined to be completed and a closing shooting trigger signal is issued; the visual image data acquisition device is also used to stop capturing video frame image data when receiving the closing shooting trigger signal.

[0093] In specific implementation, the above-mentioned implementation method of stopping capturing video frame image data can improve the accuracy of determining the end of the shopping action, and further improve the accuracy of subsequent abnormal behavior detection.

[0094] Next, we will introduce a solution for using a distance data acquisition device to monitor movements within the basket area.

[0095] In one embodiment, the action monitoring device in the basket area is a distance data acquisition device, which is used to obtain the fluctuation of the distance data in the basket area of ​​the shopping cart, and send the distance fluctuation data to the abnormal shopping behavior detection device;

[0096] When it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the action data in the basket area, a second trigger shooting signal is issued, including: when it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the fluctuation of the distance data, a second trigger shooting signal is issued.

[0097] In specific implementation, the specific implementation method of using the distance data acquisition device to monitor the actions in the basket area can further improve the accuracy of monitoring the occurrence of shopping actions and further improve the accuracy of subsequent abnormal behavior detection.

[0098] In one embodiment, the above-mentioned abnormal shopping behavior detection method of the shopping cart further includes:

[0099] When it is detected that the distance data no longer fluctuates, a shutdown shooting trigger signal is issued; the visual image data acquisition device is also used to stop shooting video frame image data when receiving the shutdown shooting trigger signal.

[0100] In specific implementation, the specific implementation method of sending a trigger signal to turn off shooting when the distance data no longer fluctuates can further improve the accuracy of monitoring the occurrence of shopping actions and further improve the accuracy of subsequent abnormal behavior detection.

[0101] 3. Wake up the visual sensor (visual image data acquisition device) and obtain the video frame image.

[0102] When signal A (first trigger shooting signal) or signal A1 (second trigger shooting signal) is sent, the visual sensor is started to start taking pictures and obtain video frame image data. As explained above, signal A is the information that the barcode scanner has scanned the code, and it is believed that the shopper is doing shopping, while signal A1 is the depth camera sensor finding that there is an action within the basket boundary. The difference between the two trigger signals is that some shoppers want to put the goods into the shopping cart without scanning the code. At this time, there is only signal A1. Therefore, in order to accurately and flexibly start the visual sensor to start taking pictures and obtain video frame image data, the shopping action is determined according to the first trigger shooting signal and / or the second trigger shooting signal. If the visual sensor is in the process of taking pictures, when signal A or signal A1 is received again, the visual sensor is not started again, that is, in one embodiment, the above-mentioned abnormal shopping behavior detection method of the shopping cart also includes: when it is detected that the visual image data acquisition device is shooting video frame image data, when the first trigger shooting signal and / or the second trigger shooting signal are received again, the trigger shooting instruction is not sent to the visual image data acquisition device again, which can save scheduling resources and improve the accuracy of abnormal behavior detection.

[0103] When the photo-taking stops, the acquired video segment data is sent to the algorithm processing module (abnormal shopping behavior detection device).

[0104] 4. The algorithm processing module performs computational processing on the video segment image data, including:

[0105] 1) Test the target product

[0106] Extract each frame of the video frame image data obtained in step 3 and feed it into the target detection algorithm model to obtain the target detection bounding box data B of all products in each frame. The target detection bounding box data of all frames are processed according to the time sequence of the video frames to form the product bounding box time series data B T .

[0107]

[0108] Among them, N is the total number of goods, and i is the current number of goods.

[0109] 2) Recognize the action

[0110] The video segment image data in step 3 is fused with the product bounding box time series data in the previous step and sent to the action recognition algorithm model. The corresponding action type and the number of products in motion are output. The action types include: putting the product into the car after scanning the code, changing the product after scanning the code and putting it into the car, putting the product into the car without scanning the code, taking the product out of the car, etc.

[0111]

[0112] Among them, action_cls is the action type, num is the number of products in motion, t is the time of the video frame image, T is the total duration of the video frame image, I T is the video segment image data, B T B is the time series data of the product boundary box T , xi, yi, wi, hi are the coordinate data of the four sides of the bounding box respectively. The algorithm model of action recognition used in the embodiment of the present invention is based on the technology of video action recognition. The embodiment of the present invention innovatively designs a new method, that is, a method of fusing image data with the time series data of the commodity boundary box and feeding it into the time series transformer model (the model can realize the method of determining the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper in the shopping process). It can be known from the above that in one embodiment, the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper in the shopping process can include:

[0113] Extract each frame image from the video frame image data;

[0114] Input each frame of image into a pre-trained target detection algorithm model to obtain target detection bounding box data of all commodities in each frame of image; the target detection algorithm model is pre-trained and generated using a sample data set of relationships between the frame images of commodities and the corresponding target detection bounding boxes;

[0115] The object detection bounding box data of the goods corresponding to all frame images are formed into the time sequence data of the goods bounding box according to the time sequence of the video frames;

[0116] The video frame image data is fused with the commodity boundary frame time series data to obtain current fusion data of the video frame image data and the commodity boundary frame time series data;

[0117] The current fusion data is input into the action recognition algorithm model to obtain the shopper's action type and the number of goods in motion; the action recognition algorithm model is pre-trained and generated based on a sample data set of the relationship between the historical fusion data and the corresponding action type and the number of goods in motion.

[0118] In specific implementation, the details fed into the time series transformer model can be:

[0119] a) Perform fusion representation of input data: extract and divide the input video segment into a preset fixed number of frames M, and then divide each frame image into a fixed number of non-overlapping image blocks. Send each image block to a linear network layer to convert it into a feature vector f with a dimension of L. Then splice the N corresponding commodity target bounding box data in each frame image with the above feature vector (wherein the intersection and union ratio of each bounding box and the image block is determined, and the information of the commodity bounding box is spliced ​​with its feature vector if the intersection and union ratio with the image block is larger. If no bounding box falls into a certain image block, a fixed dimension of 0 is added for splicing, that is, in one embodiment, the target detection bounding box data of all commodities in each frame image are spliced ​​with the feature vectors of all image blocks in each frame image to obtain a feature vector with target detection bounding box data in each frame image, including: determining the intersection and union ratio of each bounding box and each image block; splicing the bounding box with a larger intersection and union ratio with the image block with the feature vector of the image block to obtain a feature vector with target detection bounding box data in each frame image). Then the temporal position information Tpos (dimension is 4) and the spatial position information of the image block (dimension is 4) are also concatenated with the feature vector. Finally, the entire video segment is represented as a matrix with a shape of T×M×(L+4×N+4+4).

[0120] b) Build a Transformer encoder: pass the feature vector with target bounding box information, temporal position encoding, and spatial position encoding of the image block to a multi-layer Transformer encoder. These Transformer encoders contain multi-head self-attention layers and feedforward neural network layers. The encoder is used to capture the spatiotemporal dependencies in video sequences. The BoundingBox-Space-Time attention mechanism it contains enables the model to automatically learn and assign weights to different temporal frames, image blocks, and product bounding boxes, thereby focusing on contextual information related to product position changes and action recognition.

[0121] It includes the innovative joint BoundingBox-Space-Time attention module of the embodiment of the present invention, and its design features are:

[0122] First, the attention score is calculated for the input: that is, each element of each input feature sequence (with target bounding box information, temporal position encoding, spatial position encoding of image blocks) is projected into the three spaces of Query (Q), Key (K) and Value (V) (algorithmic concepts in transformers) and the dot product between the Query vector and all Key vectors is calculated to obtain the attention score. Then the attention score is normalized, that is, the attention score is divided by a scaling factor (algorithmic concept in transformers), and then the Softmax function is applied to convert it into a probability distribution between 0 and 1. Then the input feature sequence is weighted summed, that is, the Value vector is weighted summed using the normalized attention score. For this process, a fixed number of attention modules are set to perform multiple parallel calculations in order to form multiple different projection spaces. Finally, the output of each attention module is spliced.

[0123] From the above, it can be seen that in one embodiment, the current feature vector with target detection bounding box data, time series data position information, and spatial position information of the image block in each frame of the image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data, including:

[0124] Map the target detection bounding box data, time series data location information, and image block spatial location information in each frame of the image to the projection space of the Query vector, Key vector, and Value vector in the transformer algorithm;

[0125] Determine the dot product between the query vector and all key vectors to get the attention score;

[0126] Divide the attention score by a preset scaling factor, apply a Softmax function, convert the quotient of the attention score divided by the preset scaling factor into a probability distribution between 0 and 1, and obtain a normalized attention score;

[0127] Use the normalized attention scores to perform weighted summation on the Value vectors to obtain the current fused data.

[0128] The key to the joint BoundingBox-Space-Time attention module is to integrate the spatial information, temporal information, and product bounding box information of the image block into one sequence. During the training process, the attention mechanism can simultaneously capture the relationship between adjacent image blocks in space, adjacent frames in time, and the bounding boxes of the contained product targets.

[0129] c) Build a classifier (action recognition algorithm model): Get the output of the Transformer encoder and set it as the global representation of the video segment. Then build a classifier containing a multi-layer perceptron or a linear layer. The classifier can calculate the global representation of the video segment and output the probability distribution of the action category (action type) to which the representation belongs.

[0130] d) Based on the above method for the fusion of input data and the construction of the model, the model can be trained using a training set that has been collected and labeled in advance, so that the entire model can output the type of action action_cls to which the video segment belongs and the number of products in motion num according to the definition of formula 2.

[0131] Check shopping behavior

[0132] According to the data of the action recognition model in the previous step, different action types action_cls and the number of goods in motion num can be obtained. The action types include: Action types include: putting goods into the car after scanning the code, changing goods and putting them into the car after scanning the code, putting goods into the car without scanning the code, and taking goods out of the car. Then further combined with the data of the barcode scanner, several behaviors can be checked: normal placement, missed scanning and placement, wrong scanning and placement, etc., that is, in one embodiment, shopping action types include: the type of putting goods into the shopping cart after scanning the code, the type of changing goods and putting them into the shopping cart after scanning the code, the type of putting goods into the shopping cart without scanning the code, and the type of taking goods out of the shopping cart, one of them or any combination. In particular:

[0133] d1) If action_cls does not scan the code to put the product into the car, it will be checked and judged as "missed scanning behavior";

[0134] d2) If action_cls is to scan the code and then put it in the car, then check whether the number n sent by the scanner is consistent with the num output by the model. If num is greater than n, the check is judged as "missed scan behavior". If n is equal to num, the check is "normal behavior";

[0135] d3) If action_cls is to scan the code and then change the product to put it in the cart, then check and judge it as "wrong scan and put in";

[0136] d4) If action_cls is taking out goods from the car, then check and judge it as "normally taking out num goods" and report it.

[0137] As can be seen from the above, in one embodiment, based on the product barcode scanner data, the type of shopping action of the shopper and the number of products in motion, detecting whether the shopper has abnormal shopping behavior includes:

[0138] If the shopping action type is the type of placing the product into the shopping cart without scanning the code, it is confirmed that the shopper has missed scanning;

[0139] If the shopping action type is to put the product into the shopping cart after scanning the code, check whether the number of products in the scanner data is consistent with the number of products in motion; if the number of products in motion is greater than the number of products in the scanner data, it is confirmed that the shopper has missed scanning;

[0140] If the shopping action type is to scan the code and then change the product to put it in the shopping cart, confirm that the shopper has made a wrong scan and placed the product in the cart.

[0141] In summary, the advantages of the abnormal shopping behavior detection method for a shopping cart provided by the embodiment of the present invention include:

[0142] 1) Use the ranging sensor to determine when an action has occurred, and then trigger the visual sensor to work, thereby obtaining effective video segment data of the shopping process, avoiding the visual sensor from taking pictures all the time, and reducing power consumption.

[0143] 2) Install a camera with a wide viewing angle on a mobile shopping cart to obtain a wide viewing angle video frame image, which enables all-round monitoring of the complete shopping process of shoppers and the status of the goods during the process, overcoming the limitations of traditional loss prevention methods. The reason for choosing a camera with a wide viewing angle is that it can monitor the complete shopping process of shoppers under a wide viewing angle, so as to perform subsequent action recognition.

[0144] 3) A new video action recognition algorithm was designed, which includes fusing image data with product bounding box time series data and feeding it into a time series transformer model containing a “BoundingBox-Space-Time” attention module.

[0145] 4) Based on computer vision technology, using deep learning, machine learning and artificial intelligence algorithms, we design a complete process and logical judgment, which can analyze the images captured by the camera, the items in the shopping cart, and the abnormal behavior of shoppers in real time.

[0146] The embodiment of the present invention also provides an abnormal shopping behavior detection method applied to the system, as described in the following embodiment. Since the principle of solving the problem by this method is similar to that of the abnormal shopping behavior detection method applied to the device, the implementation of this method can refer to the implementation of the abnormal shopping behavior detection method applied to the device, and the repeated parts will not be repeated.

[0147] Figure 2 FIG. 1 is a flow chart of a method for detecting abnormal shopping behavior in a shopping cart of a system according to an embodiment of the present invention. Figure 2As shown, the method comprises the following steps:

[0148] Step 201: The barcode scanner obtains the product barcode scanning data and sends the product barcode scanning data to the abnormal shopping behavior detection device;

[0149] Step 202: The action monitoring device in the vehicle basket area monitors the action data in the vehicle basket area, and sends the action data in the vehicle basket area to the abnormal shopping behavior detection device;

[0150] Step 203: When the abnormal shopping behavior detection device determines that a shopping action has occurred according to the commodity scanning data, the device sends a first trigger shooting signal; when it determines that an action has occurred in the basket area of ​​the shopping cart according to the action data in the basket area, the device sends a second trigger shooting signal; when it determines that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal, the device sends a trigger shooting instruction to the visual image data acquisition device;

[0151] Step 204: upon receiving the trigger shooting instruction, the visual image data acquisition device acquires video frame image data of the shopper during the shopping process, and sends the video frame image data to the abnormal shopping behavior detection device;

[0152] Step 205: The abnormal shopping behavior detection device determines the type of the shopper's shopping action and the number of commodities in motion based on the video frame image data during the shopper's shopping process; and detects whether the shopper has abnormal shopping behavior based on the commodity scanner data, the type of the shopper's shopping action and the number of commodities in motion.

[0153] In one embodiment, determining the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process includes:

[0154] Extract each frame image from the video frame image data;

[0155] Input each frame of image into a pre-trained target detection algorithm model to obtain target detection bounding box data of all commodities in each frame of image; the target detection algorithm model is pre-trained and generated using a sample data set of relationships between the frame images of commodities and the corresponding target detection bounding boxes;

[0156] The object detection bounding box data of the goods corresponding to all frame images are formed into the time sequence data of the goods bounding box according to the time sequence of the video frames;

[0157] The video frame image data is fused with the commodity boundary frame time series data to obtain current fusion data of the video frame image data and the commodity boundary frame time series data;

[0158] The current fusion data is input into the action recognition algorithm model to obtain the shopper's action type and the number of goods in motion; the action recognition algorithm model is pre-trained and generated based on a sample data set of the relationship between the historical fusion data and the corresponding action type and the number of goods in motion.

[0159] In one embodiment, the video frame image data is fused with the commodity boundary frame time series data to obtain current fused data of the video frame image data and the commodity boundary frame time series data, including:

[0160] Extract and divide the current video frame image data into a preset number of frame images;

[0161] Divide each frame image into a fixed number of non-overlapping image blocks;

[0162] Input each image block into a linear network layer, convert each image block into a feature vector of a preset dimension, and obtain the feature vectors of all image blocks in each frame image;

[0163] The object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image;

[0164] The time series data position information in each frame of the image and the spatial position information of the image block are concatenated with the feature vector with the target detection bounding box data in each frame of the image to obtain a current feature vector with the target detection bounding box data, the time series data position information, and the spatial position information of the image block in each frame of the image;

[0165] The current feature vector containing target detection bounding box data, temporal data position information, and spatial position information of image blocks in each frame of image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated based on a sample data set of the relationship between historical feature vectors containing target detection bounding box data, temporal data position information, and spatial position information of image blocks and historical fusion data.

[0166] In one embodiment, the current feature vector with target detection bounding box data, temporal data position information, and spatial position information of the image block in each frame of the image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data, including:

[0167] Map the target detection bounding box data, time series data location information, and image block spatial location information in each frame of the image to the projection space of the Query vector, Key vector, and Value vector in the transformer algorithm;

[0168] Determine the dot product between the query vector and all key vectors to get the attention score;

[0169] Divide the attention score by a preset scaling factor, apply a Softmax function, convert the quotient of the attention score divided by the preset scaling factor into a probability distribution between 0 and 1, and obtain a normalized attention score;

[0170] Use the normalized attention scores to perform weighted summation on the Value vectors to obtain the current fused data.

[0171] In one embodiment, the object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image, including:

[0172] Determine the intersection-over-union ratio of each bounding box with each image patch;

[0173] The bounding box with a larger intersection-over-union ratio with the image block is concatenated with the feature vector of the image block to obtain a feature vector with target detection bounding box data in each frame of the image.

[0174] In one embodiment, the action monitoring device in the basket area is a depth data acquisition device, which is used to obtain depth image data in the basket area of ​​the shopping cart and send the depth image data to the abnormal shopping behavior detection device;

[0175] When it is determined according to the action data in the basket area that a shopping action occurs, a second trigger shooting signal is issued, including: when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued.

[0176] In one embodiment, when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, sending a second trigger shooting signal includes:

[0177] Get the depth image data at the current moment;

[0178] Determine an average depth difference between the depth image data at a current moment and the depth image data at a previous moment;

[0179] If the average depth difference exceeds the preset average depth difference threshold, it is determined that a picture disturbance occurs at the current moment, and the number of disturbance frames is increased by 1;

[0180] When the value of the disturbance frame number exceeds a preset disturbance frame number threshold, it is determined that a shopping action occurs in the shopping cart basket area, and a second trigger shooting signal is issued.

[0181] In one embodiment, the above-mentioned abnormal shopping behavior detection method of the shopping cart further includes:

[0182] Initialize the number of still frames to 0;

[0183] If the average depth difference is 0 or a floating difference less than the preset depth value within the preset time period, it is determined that there is no picture disturbance at the current moment, and the number of still frames is increased by 1;

[0184] When the value of the still frame number is equal to the preset still frame number threshold, the shopping action is determined to be completed and a closing shooting trigger signal is issued; the visual image data acquisition device is also used to stop capturing video frame image data when receiving the closing shooting trigger signal.

[0185] In one embodiment, the action monitoring device in the basket area is a distance data acquisition device, which is used to obtain the fluctuation of the distance data in the basket area of ​​the shopping cart, and send the distance fluctuation data to the abnormal shopping behavior detection device;

[0186] When it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the action data in the basket area, a second trigger shooting signal is issued, including: when it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the fluctuation of the distance data, a second trigger shooting signal is issued.

[0187] In one embodiment, the above-mentioned abnormal shopping behavior detection method of the shopping cart further includes:

[0188] When it is detected that the distance data no longer fluctuates, a shutdown shooting trigger signal is issued; the visual image data acquisition device is also used to stop shooting video frame image data when receiving the shutdown shooting trigger signal.

[0189] In one embodiment, the above-mentioned method for detecting abnormal shopping behavior of a shopping cart further includes: when it is detected that the visual image data acquisition device is shooting video frame image data, when the first trigger shooting signal and / or the second trigger shooting signal are received again, the trigger shooting instruction is no longer repeatedly sent to the visual image data acquisition device.

[0190] In one embodiment, the shopping action types include: one or any combination of the type of putting the product into the shopping cart after scanning the code, the type of changing the product and putting it into the shopping cart after scanning the code, the type of putting the product into the shopping cart without scanning the code, and the type of taking the product out of the shopping cart.

[0191] In one embodiment, based on the product barcode scanner data, the type of shopping action of the shopper, and the number of products in motion, detecting whether the shopper has abnormal shopping behavior includes:

[0192] If the shopping action type is the type of placing the product into the shopping cart without scanning the code, it is confirmed that the shopper has missed scanning;

[0193] If the shopping action type is to put the product into the shopping cart after scanning the code, check whether the number of products in the scanner data is consistent with the number of products in motion; if the number of products in motion is greater than the number of products in the scanner data, it is confirmed that the shopper has missed scanning;

[0194] If the shopping action type is to scan the code and then change the product to put it in the shopping cart, confirm that the shopper has made a wrong scan and placed the product in the cart.

[0195] The embodiment of the present invention also provides a device for detecting abnormal shopping behavior of a shopping cart, as described in the following embodiment. Since the principle of solving the problem by the device is similar to the abnormal shopping behavior detection method applied to the device, the implementation of the device can refer to the implementation of the abnormal shopping behavior detection method applied to the device, and the repeated parts will not be repeated.

[0196] Figure 3 FIG. 1 is a schematic diagram of a structure of a device for detecting abnormal shopping behavior of a shopping cart in an embodiment of the present invention. Figure 3 As shown, the device comprises:

[0197] The collection unit 041 is used to collect the commodity scanning data obtained by the barcode scanner and the motion data in the basket area monitored by the motion monitoring device in the basket area;

[0198] A first trigger shooting unit 042, configured to send a first trigger shooting signal when a shopping action is determined to have occurred according to the product code scanning data;

[0199] The second trigger shooting unit 043 is used to send a second trigger shooting signal when it is determined that a shopping action occurs in the shopping cart basket area according to the action data in the basket area;

[0200] The trigger shooting control unit 044 is used to send a trigger shooting instruction to the visual image data acquisition device when it is determined that the shopping action occurs according to the first trigger shooting signal and / or the second trigger shooting signal; the visual image data acquisition device is used to collect video frame image data of the shopper during the shopping process when receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device;

[0201] An analysis unit 045 is used to determine the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process;

[0202] The detection unit 046 is used to detect whether the shopper has abnormal shopping behavior based on the product scanner data, the shopper's shopping action type and the number of products in motion.

[0203] In one embodiment, the analysis unit is specifically used for:

[0204] Extract each frame image from the video frame image data;

[0205] Input each frame of image into a pre-trained target detection algorithm model to obtain target detection bounding box data of all commodities in each frame of image; the target detection algorithm model is pre-trained and generated using a sample data set of relationships between the frame images of commodities and the corresponding target detection bounding boxes;

[0206] The object detection bounding box data of the goods corresponding to all frame images are formed into the time sequence data of the goods bounding box according to the time sequence of the video frames;

[0207] The video frame image data is fused with the commodity boundary frame time series data to obtain current fusion data of the video frame image data and the commodity boundary frame time series data;

[0208] The current fusion data is input into the action recognition algorithm model to obtain the shopper's action type and the number of goods in motion; the action recognition algorithm model is pre-trained and generated based on a sample data set of the relationship between the historical fusion data and the corresponding action type and the number of goods in motion.

[0209] In one embodiment, the video frame image data is fused with the commodity boundary frame time series data to obtain current fused data of the video frame image data and the commodity boundary frame time series data, including:

[0210] Extract and divide the current video frame image data into a preset number of frame images;

[0211] Divide each frame image into a fixed number of non-overlapping image blocks;

[0212] Input each image block into a linear network layer, convert each image block into a feature vector of a preset dimension, and obtain the feature vectors of all image blocks in each frame image;

[0213] The object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image;

[0214] The time series data position information in each frame of the image and the spatial position information of the image block are concatenated with the feature vector with the target detection bounding box data in each frame of the image to obtain a current feature vector with the target detection bounding box data, the time series data position information, and the spatial position information of the image block in each frame of the image;

[0215] The current feature vector containing target detection bounding box data, temporal data position information, and spatial position information of image blocks in each frame of image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated based on a sample data set of the relationship between historical feature vectors containing target detection bounding box data, temporal data position information, and spatial position information of image blocks and historical fusion data.

[0216] In one embodiment, the current feature vector with target detection bounding box data, temporal data position information, and spatial position information of the image block in each frame of the image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data, including:

[0217] Map the target detection bounding box data, time series data location information, and image block spatial location information in each frame of the image to the projection space of the Query vector, Key vector, and Value vector in the transformer algorithm;

[0218] Determine the dot product between the query vector and all key vectors to get the attention score;

[0219] Divide the attention score by a preset scaling factor, apply a Softmax function, convert the quotient of the attention score divided by the preset scaling factor into a probability distribution between 0 and 1, and obtain a normalized attention score;

[0220] Use the normalized attention scores to perform weighted summation on the Value vectors to obtain the current fused data.

[0221] In one embodiment, the object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image, including:

[0222] Determine the intersection-over-union ratio of each bounding box with each image patch;

[0223] The bounding box with a larger intersection-over-union ratio with the image block is concatenated with the feature vector of the image block to obtain a feature vector with target detection bounding box data in each frame of the image.

[0224] In one embodiment, the action monitoring device in the basket area is a depth data acquisition device, which is used to obtain depth image data in the basket area of ​​the shopping cart and send the depth image data to the abnormal shopping behavior detection device;

[0225] The second trigger shooting unit is specifically used to send a second trigger shooting signal when it is determined that a shopping action occurs in the basket area of ​​the shopping cart according to the depth image data.

[0226] In one embodiment, the second trigger shooting unit is specifically used for:

[0227] Get the depth image data at the current moment;

[0228] Determine an average depth difference between the depth image data at a current moment and the depth image data at a previous moment;

[0229] If the average depth difference exceeds the preset average depth difference threshold, it is determined that a picture disturbance occurs at the current moment, and the number of disturbance frames is increased by 1;

[0230] When the value of the disturbance frame number exceeds a preset disturbance frame number threshold, it is determined that a shopping action occurs in the shopping cart basket area, and a second trigger shooting signal is issued.

[0231] In one embodiment, the abnormal shopping behavior detection device of the shopping cart further includes:

[0232] A still frame initialization unit, used for initializing the number of still frames to 0;

[0233] A still frame number processing unit, configured to determine that there is no picture disturbance at the current moment and increase the still frame number by 1 if the average depth difference is 0 or a floating difference less than a preset depth value within a preset period of time;

[0234] The first shutdown shooting trigger unit is used to determine that the shopping action is completed and send out a shutdown shooting trigger signal when the value of the still frame number is equal to a preset still frame number threshold; the visual image data acquisition device is also used to stop shooting video frame image data when receiving the shutdown shooting trigger signal.

[0235] In one embodiment, the action monitoring device in the basket area is a distance data acquisition device, which is used to obtain the fluctuation of the distance data in the basket area of ​​the shopping cart, and send the distance fluctuation data to the abnormal shopping behavior detection device;

[0236] The second trigger shooting unit is further specifically used for: when it is determined that a shopping action has occurred in the shopping cart basket area according to the fluctuation of the distance data, issuing a second trigger shooting signal.

[0237] In one embodiment, the abnormal shopping behavior detection device of the shopping cart further includes:

[0238] The second shooting-off trigger unit is used to send out a shooting-off trigger signal when it detects that the distance data no longer fluctuates; the visual image data acquisition device is also used to stop capturing video frame image data when receiving the shooting-off trigger signal.

[0239] In one embodiment, the abnormal shopping behavior detection device of the shopping cart further includes a trigger processing unit, which is used for: when it is detected that the visual image data acquisition device is shooting video frame image data, when the first trigger shooting signal and / or the second trigger shooting signal are received again, the trigger shooting instruction is no longer repeatedly sent to the visual image data acquisition device.

[0240] In one embodiment, the shopping action types include: one or any combination of the type of putting the product into the shopping cart after scanning the code, the type of changing the product and putting it into the shopping cart after scanning the code, the type of putting the product into the shopping cart without scanning the code, and the type of taking the product out of the shopping cart.

[0241] In one embodiment, the detection unit is specifically used for:

[0242] If the shopping action type is the type of placing the product into the shopping cart without scanning the code, it is confirmed that the shopper has missed scanning;

[0243] If the shopping action type is to put the product into the shopping cart after scanning the code, check whether the number of products in the scanner data is consistent with the number of products in motion; if the number of products in motion is greater than the number of products in the scanner data, it is confirmed that the shopper has missed scanning;

[0244] If the shopping action type is to scan the code and then change the product to put it in the shopping cart, confirm that the shopper has made a wrong scan and placed the product in the cart.

[0245] The embodiment of the present invention also provides an abnormal shopping behavior detection system, as described in the following embodiment. Since the principle of solving the problem by the system is similar to that of the abnormal shopping behavior detection method applied to the device, the implementation of the system can refer to the implementation of the abnormal shopping behavior detection method applied to the device, and the repeated parts will not be repeated.

[0246] Figure 4 FIG. 1 is a schematic diagram of the structure of a system for detecting abnormal shopping behavior of a shopping cart in an embodiment of the present invention. Figure 4 As shown, the system includes:

[0247] Scanner 01, used to obtain product scanning data and send the product scanning data to the abnormal shopping behavior detection device;

[0248] The action monitoring device 02 in the vehicle basket area is used to monitor the action data in the vehicle basket area and send the action data in the vehicle basket area to the abnormal shopping behavior detection device;

[0249] The visual image data acquisition device 03 is used to collect video frame image data of the shopper during the shopping process upon receiving a trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device;

[0250] The abnormal shopping behavior detection device 04 is used to send out a first trigger shooting signal when it is determined that a shopping action has occurred based on the product scanning data; send out a second trigger shooting signal when it is determined that an action has occurred in the basket area of ​​the shopping cart based on the action data in the basket area; send a trigger shooting instruction to the visual image data acquisition device when it is determined that a shopping action has occurred based on the first trigger shooting signal and / or the second trigger shooting signal; determine the shopper's shopping action type and the number of goods in motion based on the video frame image data during the shopper's shopping process; detect whether the shopper has abnormal shopping behavior based on the product scanner data, the shopper's shopping action type and the number of goods in motion.

[0251] In one embodiment, determining the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process includes:

[0252] Extract each frame image from the video frame image data;

[0253] Input each frame of image into a pre-trained target detection algorithm model to obtain target detection bounding box data of all commodities in each frame of image; the target detection algorithm model is pre-trained and generated using a sample data set of relationships between the frame images of commodities and the corresponding target detection bounding boxes;

[0254] The object detection bounding box data of the goods corresponding to all frame images are formed into the time sequence data of the goods bounding box according to the time sequence of the video frames;

[0255] The video frame image data is fused with the commodity boundary frame time series data to obtain current fusion data of the video frame image data and the commodity boundary frame time series data;

[0256] The current fusion data is input into the action recognition algorithm model to obtain the shopper's action type and the number of goods in motion; the action recognition algorithm model is pre-trained and generated based on a sample data set of the relationship between the historical fusion data and the corresponding action type and the number of goods in motion.

[0257] In one embodiment, the video frame image data is fused with the commodity boundary frame time series data to obtain current fused data of the video frame image data and the commodity boundary frame time series data, including:

[0258] Extract and divide the current video frame image data into a preset number of frame images;

[0259] Divide each frame image into a fixed number of non-overlapping image blocks;

[0260] Input each image block into a linear network layer, convert each image block into a feature vector of a preset dimension, and obtain the feature vectors of all image blocks in each frame image;

[0261] The object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image;

[0262] The time series data position information in each frame of the image and the spatial position information of the image block are concatenated with the feature vector with the target detection bounding box data in each frame of the image to obtain a current feature vector with the target detection bounding box data, the time series data position information, and the spatial position information of the image block in each frame of the image;

[0263] The current feature vector containing target detection bounding box data, temporal data position information, and spatial position information of image blocks in each frame of image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated based on a sample data set of the relationship between historical feature vectors containing target detection bounding box data, temporal data position information, and spatial position information of image blocks and historical fusion data.

[0264] In one embodiment, the current feature vector with target detection bounding box data, temporal data position information, and spatial position information of the image block in each frame of the image is input into a pre-built Transformer encoder, and the current video frame image data is represented as a matrix as the current fusion data, including:

[0265] Map the target detection bounding box data, time series data location information, and image block spatial location information in each frame of the image to the projection space of the Query vector, Key vector, and Value vector in the transformer algorithm;

[0266] Determine the dot product between the query vector and all key vectors to get the attention score;

[0267] Divide the attention score by a preset scaling factor, apply a Softmax function, convert the quotient of the attention score divided by the preset scaling factor into a probability distribution between 0 and 1, and obtain a normalized attention score;

[0268] Use the normalized attention scores to perform weighted summation on the Value vectors to obtain the current fused data.

[0269] In one embodiment, the object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image, including:

[0270] Determine the intersection-over-union ratio of each bounding box with each image patch;

[0271] The bounding box with a larger intersection-over-union ratio with the image block is concatenated with the feature vector of the image block to obtain a feature vector with target detection bounding box data in each frame of the image.

[0272] In one embodiment, the action monitoring device in the basket area is a depth data acquisition device, which is used to obtain depth image data in the basket area of ​​the shopping cart and send the depth image data to the abnormal shopping behavior detection device;

[0273] When it is determined according to the action data in the basket area that a shopping action occurs, a second trigger shooting signal is issued, including: when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued.

[0274] In one embodiment, when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, sending a second trigger shooting signal includes:

[0275] Get the depth image data at the current moment;

[0276] Determine an average depth difference between the depth image data at a current moment and the depth image data at a previous moment;

[0277] If the average depth difference exceeds the preset average depth difference threshold, it is determined that a picture disturbance occurs at the current moment, and the number of disturbance frames is increased by 1;

[0278] When the value of the disturbance frame number exceeds a preset disturbance frame number threshold, it is determined that a shopping action occurs in the shopping cart basket area, and a second trigger shooting signal is issued.

[0279] In one embodiment, the abnormal shopping behavior detection device of the shopping cart is further used for:

[0280] Initialize the number of still frames to 0;

[0281] If the average depth difference is 0 or a floating difference less than the preset depth value within the preset time period, it is determined that there is no picture disturbance at the current moment, and the number of still frames is increased by 1;

[0282] When the value of the still frame number is equal to the preset still frame number threshold, the shopping action is determined to be completed and a closing shooting trigger signal is issued; the visual image data acquisition device is also used to stop capturing video frame image data when receiving the closing shooting trigger signal.

[0283] In one embodiment, the action monitoring device in the basket area is a distance data acquisition device, which is used to obtain the fluctuation of the distance data in the basket area of ​​the shopping cart, and send the distance fluctuation data to the abnormal shopping behavior detection device;

[0284] When it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the action data in the basket area, a second trigger shooting signal is issued, including: when it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the fluctuation of the distance data, a second trigger shooting signal is issued.

[0285] In one embodiment, the abnormal shopping behavior detection device of the shopping cart further includes:

[0286] When it is detected that the distance data no longer fluctuates, a shutdown shooting trigger signal is issued; the visual image data acquisition device is also used to stop shooting video frame image data when receiving the shutdown shooting trigger signal.

[0287] In one embodiment, the above-mentioned method for detecting abnormal shopping behavior of a shopping cart further includes: when it is detected that the visual image data acquisition device is shooting video frame image data, when the first trigger shooting signal and / or the second trigger shooting signal are received again, the trigger shooting instruction is no longer repeatedly sent to the visual image data acquisition device.

[0288] In one embodiment, the shopping action types include: one or any combination of the type of putting the product into the shopping cart after scanning the code, the type of changing the product and putting it into the shopping cart after scanning the code, the type of putting the product into the shopping cart without scanning the code, and the type of taking the product out of the shopping cart.

[0289] In one embodiment, based on the product barcode scanner data, the type of shopping action of the shopper, and the number of products in motion, detecting whether the shopper has abnormal shopping behavior includes:

[0290] If the shopping action type is the type of placing the product into the shopping cart without scanning the code, it is confirmed that the shopper has missed scanning;

[0291] If the shopping action type is to put the product into the shopping cart after scanning the code, check whether the number of products in the scanner data is consistent with the number of products in motion; if the number of products in motion is greater than the number of products in the scanner data, it is confirmed that the shopper has missed scanning;

[0292] If the shopping action type is to scan the code and then change the product to put it in the shopping cart, confirm that the shopper has made a wrong scan and placed the product in the cart.

[0293] The embodiment of the present invention also provides a shopping cart for detecting abnormal shopping behavior, as described in the following embodiment. Since the principle of solving the problem by the system is similar to the abnormal shopping behavior detection method applied to the device, the implementation of the shopping cart can refer to the implementation of the abnormal shopping behavior detection method applied to the device, and the repeated parts will not be repeated.

[0294] Figure 5 FIG. 1 is a schematic diagram of the circuit structure of a shopping cart in an embodiment of the present invention. Figure 5 As shown, the shopping cart includes: the abnormal shopping behavior detection device 04 of the shopping cart as described above. The implementation of the abnormal shopping behavior detection device 04 is detailed in the introduction of the above embodiment.

[0295] In summary, the abnormal shopping behavior detection solution for a shopping cart provided by the embodiment of the present invention realizes:

[0296] 1. By using visual cameras and pure visual algorithms without using additional expensive sensors, the status of goods being placed in or taken out of the shopping cart can be accurately detected, with lower hardware costs and more flexible installation and deployment.

[0297] 2. Effectively prevent the loss of goods. This not only improves the efficiency and accuracy of loss prevention, but also reduces labor costs and error rates.

[0298] Based on the above invention concept, Figure 6 As shown, the present invention also proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520, wherein the processor 520 implements a method for detecting abnormal shopping behavior of a shopping cart when executing the computer program 530.

[0299] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for detecting abnormal shopping behavior of a shopping cart is implemented.

[0300] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned method for detecting abnormal shopping behavior of a shopping cart is implemented.

[0301] In an embodiment of the present invention, a solution for detecting abnormal shopping behavior of a shopping cart is provided by: collecting commodity scanning data acquired by a barcode scanner and motion data in a basket area monitored by a motion monitoring device in the basket area; when it is determined that a shopping action has occurred according to the commodity scanning data, a first trigger shooting signal is issued; when it is determined that a shopping action has occurred in the basket area of ​​the shopping cart according to the motion data in the basket area, a second trigger shooting signal is issued; when it is determined that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal, a trigger shooting instruction is sent to a visual image data acquisition device; the visual image data acquisition device is used to collect video frame image data of a shopper's shopping process upon receiving the trigger shooting instruction, and send the video frame image data to an abnormal shopping behavior detection device; according to the video frame image data of the shopper's shopping process, the type of the shopper's shopping action and the number of commodities in motion are determined; according to the commodity barcode scanner data, the type of the shopper's shopping action and the number of commodities in motion, whether the shopper has abnormal shopping behavior is detected, and abnormal shopping behavior can be detected efficiently and accurately.

[0302] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0303] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0304] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0305] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0306] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting abnormal shopping behavior in a shopping cart, characterized in that: The method is applied to an abnormal shopping behavior detection device, and the abnormal shopping behavior detection method of a shopping cart includes: Collect the commodity scanning data obtained by the barcode scanner and the motion data in the basket area monitored by the motion monitoring device in the basket area; When it is determined that a shopping action has occurred according to the product scanning data, a first trigger shooting signal is issued; When it is determined according to the action data in the basket area that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued; When it is determined that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal, a trigger shooting instruction is sent to the visual image data acquisition device; the visual image data acquisition device is used to collect video frame image data of the shopper during the shopping process when receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device; According to the video frame image data of the shopper in the shopping process, the shopping action type of the shopper and the number of commodities in motion are determined, which includes: extracting each frame image from the video frame image data; inputting each frame image into a pre-trained target detection algorithm model to obtain the target detection bounding box data of all commodities in each frame image; the target detection algorithm model is pre-trained and generated by using a sample data set of the relationship between the frame image of the commodity and the corresponding target detection bounding box; the target detection bounding box data of the commodities corresponding to all the frame images are formed into commodity bounding box time series data according to the time sequence of the video frame; the video frame image data is fused with the commodity bounding box time series data to obtain the current fused data of the video frame image data and the commodity bounding box time series data; the current fused data is input into the action recognition algorithm model to obtain the shopper's action type and the number of commodities in motion. The number of commodities in a state; the action recognition algorithm model is pre-trained and generated according to a sample data set of the relationship between the historical fusion data and the corresponding action type and the number of commodities in a motion state; wherein, the video frame image data is fused with the commodity boundary box time series data to obtain the current fusion data of the video frame image data and the commodity boundary box time series data, including: extracting and dividing the current video frame image data into a preset number of frame images; dividing each frame image into a fixed number of non-overlapping image blocks; inputting the current feature vector with target detection boundary box data, time series data position information, and spatial position information of the image block in each frame image into a pre-built Transformer encoder, and representing the current video frame image data as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated according to a sample data set of the relationship between the historical feature vector with target detection boundary box data, time series data position information, and spatial position information of the image block and the historical fusion data; Detect whether shoppers have abnormal shopping behavior based on product scanner data, shoppers' shopping action types and the number of products in motion.

2. The method according to claim 1, characterized in that The video frame image data is fused with the commodity boundary frame time series data to obtain current fusion data of the video frame image data and the commodity boundary frame time series data, further comprising: Input each image block into a linear network layer, convert each image block into a feature vector of a preset dimension, and obtain the feature vectors of all image blocks in each frame image; The object detection bounding box data of all commodities in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain a feature vector with the object detection bounding box data in each frame of image; The timing data position information and the spatial position information of the image block in each frame of the image are spliced ​​together with the feature vector containing the target detection bounding box data in each frame of the image to obtain the current feature vector containing the target detection bounding box data, the timing data position information, and the spatial position information of the image block in each frame of the image.

3. The method according to claim 2, characterized in that The object detection bounding box data of all products in each frame of image are concatenated with the feature vectors of all image blocks in each frame of image to obtain the feature vector with the object detection bounding box data in each frame of image, including: Determine the intersection-over-union ratio of each bounding box with each image patch; The bounding box with a larger intersection-over-union ratio with the image block is concatenated with the feature vector of the image block to obtain a feature vector with target detection bounding box data in each frame of the image.

4. The method according to claim 1, characterized in that The action monitoring device in the basket area is a depth data acquisition device, which is used to obtain depth image data in the basket area of ​​the shopping cart and send the depth image data to the abnormal shopping behavior detection device; When it is determined according to the action data in the basket area that a shopping action occurs, a second trigger shooting signal is issued, including: when it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued.

5. The method according to claim 4, characterized in that When it is determined according to the depth image data that a shopping action occurs in the basket area of ​​the shopping cart, a second trigger shooting signal is issued, including: Get the depth image data at the current moment; Determine an average depth difference between the depth image data at a current moment and the depth image data at a previous moment; If the average depth difference exceeds the preset average depth difference threshold, it is determined that a picture disturbance occurs at the current moment, and the number of disturbance frames is increased by 1; When the value of the disturbance frame number exceeds a preset disturbance frame number threshold, it is determined that a shopping action occurs in the shopping cart basket area, and a second trigger shooting signal is issued.

6. The method according to claim 4, characterized in that Also includes: Initialize the number of still frames to 0; If the average depth difference is 0 or a floating difference less than the preset depth value within the preset time period, it is determined that there is no picture disturbance at the current moment, and the number of still frames is increased by 1; When the value of the still frame number is equal to the preset still frame number threshold, the shopping action is determined to be completed and a closing shooting trigger signal is issued; the visual image data acquisition device is also used to stop capturing video frame image data when receiving the closing shooting trigger signal.

7. The method according to claim 1, characterized in that The action monitoring device in the basket area is a distance data acquisition device, which is used to obtain the fluctuation of the distance data in the basket area of ​​the shopping cart, and send the distance fluctuation data to the abnormal shopping behavior detection device; When it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the action data in the basket area, a second trigger shooting signal is issued, including: when it is determined that shopping action occurs in the basket area of ​​the shopping cart according to the fluctuation of the distance data, a second trigger shooting signal is issued.

8. The method according to claim 7, characterized in that Also includes: When it is detected that the distance data no longer fluctuates, a shutdown shooting trigger signal is issued; the visual image data acquisition device is also used to stop shooting video frame image data when receiving the shutdown shooting trigger signal.

9. The method according to claim 1, characterized in that Also includes: When it is detected that the visual image data acquisition device is capturing video frame image data, when the first trigger shooting signal and / or the second trigger shooting signal are received again, the trigger shooting instruction is no longer repeatedly sent to the visual image data acquisition device.

10. The method according to claim 1, characterized in that The shopping action types include: a type of putting the product into the shopping cart after scanning the code, a type of changing the product and putting it into the shopping cart after scanning the code, a type of putting the product into the shopping cart without scanning the code, and a type of taking the product out of the shopping cart, or any combination thereof.

11. The method according to claim 10, characterized in that Detect whether shoppers have abnormal shopping behaviors based on product scanner data, the type of shopping actions of shoppers, and the number of products in motion, including: If the shopping action type is the type of placing the product into the shopping cart without scanning the code, it is confirmed that the shopper has missed scanning; If the shopping action type is to put the product into the shopping cart after scanning the code, check whether the number of products in the scanner data is consistent with the number of products in motion; if the number of products in motion is greater than the number of products in the scanner data, it is confirmed that the shopper has missed scanning; If the shopping action type is to scan the code and then change the product to put it in the shopping cart, confirm that the shopper has made a wrong scan and placed the product in the cart.

12. A method for detecting abnormal shopping behavior in a shopping cart, characterized in that: The method is applied to the system, and the abnormal shopping behavior detection method of the shopping cart includes: The barcode scanner obtains the product scanning data and sends the product scanning data to the abnormal shopping behavior detection device; The action monitoring device in the vehicle basket area monitors the action data in the vehicle basket area, and sends the action data in the vehicle basket area to the abnormal shopping behavior detection device; The abnormal shopping behavior detection device sends a first trigger shooting signal when determining that a shopping action has occurred according to the commodity scanning data; sends a second trigger shooting signal when determining that an action has occurred in the shopping cart basket area according to the action data in the basket area; sends a trigger shooting instruction to the visual image data acquisition device when determining that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal; When receiving the trigger shooting instruction, the visual image data acquisition device acquires video frame image data of the shopper during the shopping process, and sends the video frame image data to the abnormal shopping behavior detection device; The abnormal shopping behavior detection device determines the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process, which includes: extracting each frame image from the video frame image data; inputting each frame image into a pre-trained target detection algorithm model to obtain the target detection bounding box data of all commodities in each frame image; the target detection algorithm model is pre-trained and generated using a sample data set of the relationship between the frame image of the commodity and the corresponding target detection bounding box; the target detection bounding box data of the commodities corresponding to all frame images are formed into commodity bounding box time series data according to the time sequence of the video frame; the video frame image data is fused with the commodity bounding box time series data to obtain the current fused data of the video frame image data and the commodity bounding box time series data; the current fused data is input into the action recognition algorithm model to obtain the type of shopper action. and the number of commodities in motion; the action recognition algorithm model is pre-trained and generated according to a sample data set of the relationship between historical fusion data and the corresponding action type and the number of commodities in motion; wherein, the video frame image data is fused with the commodity boundary box time series data to obtain the current fusion data of the video frame image data and the commodity boundary box time series data, including: extracting and dividing the current video frame image data into a preset number of frame images; dividing each frame image into a fixed number of non-overlapping image blocks; inputting the current feature vector with target detection boundary box data, time series data position information, and spatial position information of the image block in each frame image into a pre-built Transformer encoder, and representing the current video frame image data as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated according to a sample data set of the relationship between historical feature vectors with target detection boundary box data, time series data position information, and spatial position information of the image block and historical fusion data; detecting whether the shopper has abnormal shopping behavior according to the commodity scanner data, the shopper's shopping action type and the number of commodities in motion.

13. A device for detecting abnormal shopping behavior of a shopping cart, characterized in that: include: A collection unit, used to collect the commodity scanning data obtained by the barcode scanner and the motion data in the basket area monitored by the motion monitoring device in the basket area; A first trigger shooting unit, configured to send a first trigger shooting signal when a shopping action is determined to have occurred according to the commodity code scanning data; A second trigger shooting unit is used to send a second trigger shooting signal when it is determined that a shopping action occurs in the basket area of ​​the shopping cart according to the action data in the basket area; The trigger shooting control unit is used to send a trigger shooting instruction to the visual image data acquisition device when it is determined that the shopping action occurs according to the first trigger shooting signal and / or the second trigger shooting signal; the visual image data acquisition device is used to collect video frame image data of the shopper during the shopping process when receiving the trigger shooting instruction, and send the video frame image data to the abnormal shopping behavior detection device; The analysis unit is used to determine the type of shopping action of the shopper and the number of commodities in motion according to the video frame image data of the shopper during the shopping process, which includes: extracting each frame image from the video frame image data; inputting each frame image into a pre-trained target detection algorithm model to obtain the target detection bounding box data of all commodities in each frame image; the target detection algorithm model is pre-trained and generated using a sample data set of the relationship between the frame image of the commodity and the corresponding target detection bounding box; the target detection bounding box data of the commodities corresponding to all the frame images are formed into commodity bounding box time series data according to the time sequence of the video frame; the video frame image data is fused with the commodity bounding box time series data to obtain the current fused data of the video frame image data and the commodity bounding box time series data; the current fused data is input into the action recognition algorithm model to obtain the type of shopper action and the number of commodities in motion. The number of commodities in motion; the action recognition algorithm model is pre-trained and generated based on a sample data set of the relationship between historical fusion data and the corresponding action type and the number of commodities in motion; wherein, the video frame image data is fused with the commodity boundary box time series data to obtain the current fusion data of the video frame image data and the commodity boundary box time series data, including: extracting and dividing the current video frame image data into a preset number of frame images; dividing each frame image into a fixed number of non-overlapping image blocks; inputting the current feature vector with target detection boundary box data, time series data position information, and image block spatial position information in each frame image into a pre-built Transformer encoder, and representing the current video frame image data as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated based on a sample data set of the relationship between historical feature vectors with target detection boundary box data, time series data position information, and image block spatial position information and historical fusion data; The detection unit is used to detect whether the shopper has abnormal shopping behavior based on the product scanner data, the shopper's shopping action type and the number of products in motion.

14. A shopping cart abnormal shopping behavior detection system, characterized in that: include: A barcode scanner, used to obtain product barcode scanning data and send the product barcode scanning data to an abnormal shopping behavior detection device; A motion monitoring device in the vehicle basket area, used to monitor motion data in the vehicle basket area and send the motion data in the vehicle basket area to the abnormal shopping behavior detection device; A visual image data acquisition device, for acquiring video frame image data of a shopper during shopping upon receiving a trigger shooting instruction, and sending the video frame image data to an abnormal shopping behavior detection device; The abnormal shopping behavior detection device is used to send a first trigger shooting signal when it is determined that a shopping action has occurred according to the commodity scanning data; send a second trigger shooting signal when it is determined that an action has occurred in the basket area of ​​the shopping cart according to the action data in the basket area; send a trigger shooting instruction to the visual image data acquisition device when it is determined that a shopping action has occurred according to the first trigger shooting signal and / or the second trigger shooting signal; According to the video frame image data of the shopper in the shopping process, the shopping action type of the shopper and the number of commodities in motion are determined, which includes: extracting each frame image from the video frame image data; inputting each frame image into a pre-trained target detection algorithm model to obtain the target detection bounding box data of all commodities in each frame image; the target detection algorithm model is pre-trained and generated by using a sample data set of the relationship between the frame image of the commodity and the corresponding target detection bounding box; the target detection bounding box data of the commodities corresponding to all the frame images are formed into commodity bounding box time series data according to the time sequence of the video frame; the video frame image data is fused with the commodity bounding box time series data to obtain the current fused data of the video frame image data and the commodity bounding box time series data; the current fused data is input into the action recognition algorithm model to obtain the shopper's action type and the number of commodities in motion. the number of commodities in motion; the action recognition algorithm model is pre-trained and generated according to the relationship sample data set between the historical fusion data and the corresponding action type and the number of commodities in motion; wherein, the video frame image data is fused with the commodity boundary box time series data to obtain the current fusion data of the video frame image data and the commodity boundary box time series data, including: extracting and dividing the current video frame image data into a preset number of frame images; dividing each frame image into a fixed number of non-overlapping image blocks; inputting the current feature vector with target detection boundary box data, time series data position information, and spatial position information of the image block in each frame image into a pre-built Transformer encoder, and representing the current video frame image data as a matrix as the current fusion data; the encoder includes a joint BoundingBox-Space-Time attention module, which is pre-trained and generated according to the relationship sample data set between the historical feature vector with target detection boundary box data, time series data position information, and spatial position information of the image block and the historical fusion data; detecting whether the shopper has abnormal shopping behavior according to the commodity scanner data, the shopper's shopping action type and the number of commodities in motion.

15. A shopping cart for detecting abnormal shopping behavior, characterized in that: include: The abnormal shopping behavior detection device for a shopping cart as described in claim 13.

16. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 12 is implemented.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

18. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Self-service shopping device and method capable of recognizing improper shopping behaviors in shopping mall

    CN104766225A

  • Detection method and detection system for shopping abnormity

    CN105069626A

  • Data acquisition and recommendation method based on shopping behaviors

    CN113674037A

  • Order generation method for synchronously identifying commodities in same area from different visual angles and intelligent vending machine

    CN113723383A

  • Method and system for confirming number of commodities in shopping cart and storage medium

    CN114898249A