Method, device and shopping cart for detecting the status of goods entering and leaving shopping cart
By combining the detection method of the weight sensor and the visual sensor, the weight waveform category identifier and the average weight value difference are used to detect the entry and exit status of the goods in the smart shopping cart, which solves the problem of low detection accuracy in the existing technology and achieves a more efficient and Reliable shopping checkout process.
Patent Information
- Application Number
- CN202410841121.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-26
AI Technical Summary
Existing smart shopping carts have low accuracy when detecting the status of items entering and exiting the shopping cart, making it difficult to effectively improve shopping settlement efficiency and prevent abnormal shopping behaviors.
The weight sensor is combined with the pre-trained weight waveform category identifier to identify the weight waveform category by obtaining the sensed weight value collected at the preset time interval of the weight sensor, and detect the entry and exit status of the goods through the average weight value difference in a stable state. Combined with visual sensors for secondary inspection to improve accuracy.
Significantly improves the accuracy of detecting the status of goods entering and exiting the shopping cart, ensuring shopping settlement efficiency and preventing abnormal behavior, providing higher reliability and accuracy.
Smart Images

Figure CN118395330B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of self-service shopping, and in particular to a method, device and shopping cart for detecting the status of commodities entering or leaving a shopping cart. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] At present, in order to better meet customer needs, improve customer shopping experience and optimize merchant operations, the supermarket industry is also constantly transforming towards intelligence and digitalization. Among them, shopping settlement is an important part. Smart shopping carts have appeared in the supermarket environment in this context. 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] In the shopping process, the detection and identification of goods is the most important part. Accurate detection of goods put in or taken out is a basic requirement. Only by good detection of goods can the efficiency of shopping settlement be effectively improved. At the same time, it plays an important role in preventing abnormal shopping behavior. The existing methods for detecting the status of goods entering and leaving the shopping cart have the problem of low accuracy. Summary of the invention
[0006] The embodiment of the present invention provides a method for detecting the status of goods entering or leaving a shopping cart, so as to improve the accuracy of detecting the status of goods entering or leaving a shopping cart. The method includes:
[0007] Obtaining the sensed weight values at multiple moments in the current period collected by the weight sensor at preset time intervals;
[0008] Inputting the sensed weight values at multiple moments in the current period into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current period; the weight waveform category identifier is pre-trained and generated using a data sample set of the relationship between the sensed weight values and the weight waveform category at multiple historical moments;
[0009] When the weight waveform category of the weight sensor in the current period is the steady state category, the status of the goods entering and leaving the shopping cart is detected based on the weight difference between the average weight value of all moments corresponding to the current period of the weight sensor and the average weight value of all moments corresponding to the previous steady state category period.
[0010] The embodiment of the present invention further provides a device for detecting the state of goods entering or leaving a shopping cart, so as to improve the accuracy of detecting the state of goods entering or leaving a shopping cart. The device comprises:
[0011] An acquisition unit, used to acquire sensed weight values at multiple moments in a current period collected by the weight sensor at preset time intervals;
[0012] The identification unit is used to input the sensed weight values at multiple moments in the current period into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current period; the weight waveform category identifier is pre-trained and generated using a data sample set of the relationship between the sensed weight values and the weight waveform category at multiple historical moments;
[0013] The detection unit is used to detect the status of goods entering or leaving the shopping cart based on the weight difference between the average weight value of all moments corresponding to the current period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category period when the weight waveform category of the current period of the weight sensor is a stable state category.
[0014] The embodiment of the present invention further provides a shopping cart for improving the accuracy of detecting the state of goods entering and exiting the shopping cart. The shopping cart includes:
[0015] A weight sensor, used to collect the sensed weight values at multiple moments in each time period at preset time intervals, and send the sensed weight values at multiple moments in each time period to a device for detecting the status of goods entering or leaving the shopping cart;
[0016] The device for detecting the status of goods entering or leaving a shopping cart as described above.
[0017] 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 the status of goods entering or exiting a shopping cart when executing the computer program.
[0018] 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 method for detecting the status of a product entering or exiting a shopping cart is implemented.
[0019] 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 method for detecting the status of a commodity entering or exiting a shopping cart is implemented.
[0020] In an embodiment of the present invention, a scheme for detecting the status of goods entering or leaving a shopping cart comprises: obtaining the sensed weight values at multiple moments in the current time period collected by a weight sensor at preset time intervals; inputting the sensed weight values at multiple moments in the current time period into a pre-trained and generated weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period; the weight waveform category identifier is pre-trained and generated using a sample set of relationship data between the sensed weight values at multiple historical moments and the weight waveform category; when the weight waveform category of the weight sensor in the current time period is a stable state category, detecting the status of goods entering or leaving the shopping cart based on the weight difference between the average weight value of all moments corresponding to the current time period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category time period, thereby improving the accuracy of detecting the status of goods entering or leaving the shopping cart. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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:
[0022] Figure 1 It is a flowchart of a method for detecting the status of goods entering or leaving a shopping cart in an embodiment of the present invention;
[0023] Figure 2 Schematic diagram of weight waveforms in multiple time periods in an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the principle of detecting the status of goods entering and leaving the shopping cart in an embodiment of the present invention;
[0025] Figure 4 Schematic diagram of the structure of a device for detecting the status of goods entering or leaving a shopping cart in an embodiment of the present invention;
[0026] Figure 5 Schematic diagram of the circuit structure of a shopping cart in an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of the circuit structure of a shopping cart in another embodiment of the present invention;
[0028] Figure 7 The figure is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] 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.
[0030] Figure 1 FIG. 1 is a flow chart of a method for detecting the status of goods entering or leaving a shopping cart in an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0031] Step 101: obtaining the sensed weight values at multiple moments in the current period collected by the weight sensor at preset time intervals;
[0032] Step 102: Inputting the sensed weight values at multiple moments in the current period into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current period; the weight waveform category identifier is pre-trained and generated using a data sample set of the relationship between the sensed weight values at multiple historical moments and the weight waveform category;
[0033] Step 103: When the weight waveform category of the weight sensor in the current period is a steady state category, the status of the goods entering or leaving the shopping cart is detected based on the weight difference between the average weight value of all moments corresponding to the current period of the weight sensor and the average weight value of all moments corresponding to the previous steady state category period.
[0034] In an embodiment of the present invention, a method for detecting the status of goods entering or leaving a shopping cart, when working: obtaining the sensed weight values of multiple moments in the current time period collected by the weight sensor at preset time intervals; inputting the sensed weight values of multiple moments in the current time period into a pre-trained and generated weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period; the weight waveform category identifier is pre-trained and generated using a sample set of relationship data between the sensed weight values and the weight waveform category at multiple historical moments; when the weight waveform category of the weight sensor in the current time period is a stable state category, the status of goods entering or leaving the shopping cart is detected and judged based on the weight difference between the average weight value of all moments corresponding to the current time period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category period, thereby improving the accuracy of detecting and judging the status of goods entering or leaving the shopping cart. The method for detecting the status of goods entering or leaving a shopping cart is described in detail below.
[0035] The embodiment of the present invention proposes a method for detecting and judging the status of goods entering and leaving a shopping cart based on a weight sensor and a visual sensor. The method uses a fusion method of machine learning and deep learning to calculate, process and analyze the acquired weight sensor data and image data to accurately judge the status of goods being placed in or taken out. The following is a detailed introduction.
[0036] The method for detecting the status of goods entering or leaving a shopping cart provided by the embodiment of the present invention may use the following components:
[0037] 1.Weight sensor, installed at the bottom of the shopping cart basket or the bottom of the shopping cart.
[0038] 2. At least one visual sensor (collection device, camera) is installed on the shopping cart, and its vision can cover the shopping cart basket area.
[0039] 3. Computing device (the method for detecting the status of goods entering or leaving a shopping cart provided in an embodiment of the present invention is applied to the computing device, and the computing device is the apparatus for detecting the status of goods entering or leaving a shopping cart provided in an embodiment of the present invention).
[0040] The method for detecting the status of goods entering or leaving a shopping cart provided by an embodiment of the present invention is as follows:
[0041] The embodiment of the present invention samples, processes, and determines the weight fluctuation change mode (weight waveform category) of the weight sensor, combines the visual information collected by the visual sensor, checks and determines the effective "stable" state, and then determines whether the product is put in or taken out by calculating the weight difference between the two stable states. Figure 2 and Figure 3 ( Figure 3 The method for detecting the status of goods entering and leaving the shopping cart is introduced in detail.
[0042] 1. Sampling weight value. The weight sensor samples the sensed gravity value at a fixed time interval (preset time interval, such as 20 milliseconds), that is, samples and calculates the physical gravity value, for example, once every 20 milliseconds, and sends it to the computing device (a device for detecting and judging the status of goods entering and leaving the shopping cart).
[0043] 2. Kalman filter correction. In order to further eliminate errors, the computing device performs Kalman filter denoising correction on the data sent by the weight sensor; that is, in one embodiment, the above method for detecting the status of goods entering and leaving the shopping cart also includes: performing Kalman filter denoising correction processing on the sensed weight value within each preset time interval to obtain the sensed weight value within each preset time interval after correction, and in subsequent steps, sampling the sensed weight values at multiple moments in the current time period from the sensed weight values within each preset time interval after correction and inputting them into the pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period, so as to obtain a more accurate weight waveform category and further improve the accuracy of detecting the status of goods entering and leaving the shopping cart.
[0044] 3. Sample the time interval weight value. According to the preset fixed time interval value m, sample n weight values in the time series. Specifically, if n is set to 5, for the current time t, a total of 5 corresponding weight values at time t, t-1, t-2, t-3, and t-4 can be sampled.
[0045] In actual implementation, n can be set to a more practical value. For example, if the sampling frequency is 20 milliseconds, then n can be set to a value in the interval [25,50]. Assuming n=50, then we are looking at the time series weight value in the interval of 1000 milliseconds. For example Figure 2 The width of a green box, a blue box or a red box in the image (the interval is 1000 milliseconds, and 50 values are sampled and fed into the subsequent classifier, namely the weight waveform category identifier).
[0046] As can be seen from the above, in one embodiment, obtaining the sensed weight values at multiple moments in the current period collected by the weight sensor at preset time intervals includes:
[0047] Obtaining the sensed weight value within the current time interval collected by the weight sensor at a preset time interval;
[0048] The sensed weight values at multiple moments in the current time period are sampled from the sensed weight values in the current time interval.
[0049] During specific implementation, in the above-mentioned step 1, the weight sensor collects a large number of induced weight values at fixed time intervals. The embodiment of the present invention samples the induced weight values at multiple moments that can represent the characteristics of the current time period from the large number of induced weight values and inputs them into the weight waveform category identifier, which can improve the accuracy and efficiency of subsequent weight waveform category identification.
[0050] 4. Determine the weight waveform type. The n weight values sampled at the current moment are normalized and sent to the "weight change mode" classifier (weight waveform category identifier) to obtain the current weight fluctuation category. That is, in one embodiment, the sensed weight values at multiple moments in the current time period are input into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period, including: normalizing the sensed weight values at multiple moments in the current time period and then inputting them into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period, so as to obtain a more accurate weight waveform category, thereby improving the accuracy of detecting the status of goods entering and exiting the shopping cart.
[0051] In specific implementation, the normalization process here can use the "minimum-maximum" normalization method, that is, for each value of the n weight values of the time series:
[0052]
[0053] Finally, it is normalized to a value between 0 and 1.
[0054] The classifier (weight waveform category identifier) in the embodiment of the present invention uses a machine learning algorithm model, including but not limited to a decision tree, KNN, support vector machine, random forest, recurrent neural network RNN, etc. The embodiment of the present invention preferably uses an LSTM algorithm model to capture time series change information, that is, in one embodiment, the weight waveform category identifier is a long short-term memory network LSTM identifier, which can obtain a more accurate weight waveform category and further improve the accuracy of detecting the status of goods entering and leaving the shopping cart.
[0055] In specific implementation, the categories of the classifiers (weight waveform category identifiers) in the embodiment of the present invention can be divided into the following 7 categories, as shown in the following Table 1:
[0056]
[0057] Table 1
[0058] In specific implementation, in the embodiment of the present invention, Figure 2 The waveform changes shown in the figure are only for illustration. There should be a certain gap between the waveform diagrams of each type in reality. Therefore, before deploying the classifier model on the shopping cart, first collect the actual weight fluctuation data in accordance with the above category settings. After collecting a certain amount, use it to train the above classifier, i.e., the weight waveform category identifier. The input of the weight waveform category identifier is the sensed weight value at multiple moments in the current period. The output of the identifier is: the weight waveform category shown in Table 1 above. Figure 2As shown, it may include multiple time periods (the width of each rectangular box corresponds to a time period), each time period corresponds to a weight waveform category, each time period includes multiple moments, and each moment corresponds to a weight value.
[0059] In specific implementation, in the embodiments of the present invention, "stable value of 0" and "stable fluctuation" both belong to "stable state".
[0060] 5. As Figure 3 As shown, determine whether it is "zero-value stable". According to the weight change pattern category (weight waveform category) output by the classifier (weight waveform category identifier), if it is zero-value stable, calculate the weight difference between the last "stable state" before time t and the weight value at this time (for example, Figure 2 The weight difference between the weight value corresponding to the medium dark green box and the weight value corresponding to the same dark green box or the light green box in the real fluctuating state) is detected and reported. That is, in one embodiment, when the weight waveform category of the weight sensor in the current period is the stable state category, the state of the goods entering and leaving the shopping cart is detected according to the weight difference between the average weight value of all moments corresponding to the current period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category period, including (or also including): when the weight waveform category of the weight sensor in the current period is the 0-value stable state category, the third weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category period before the current period and the average weight value of the current period is determined; according to the third weight difference, the state of the goods entering and leaving the shopping cart is detected.
[0061] 6. Such as Figure 3 As shown, it is determined whether it is "stable fluctuation". According to the weight change pattern category output by the classifier, if it is determined that the current state is "stable fluctuation", the next step 7 is performed.
[0062] 7. Such as Figure 3As shown, detect the hand. The n RGB images sampled at the current moment are sent to the detection model, i.e., the hand detection model, to determine whether a hand appears in the basket area (e.g., the edge). The input of the hand detection model can be multiple shopping cart basket area images in each period, and the output can be: whether a hand appears in the shopping cart basket area (e.g., the edge) or whether there is a detection result of a downward pressure. The detection model uses a yolov5 target detection model trained by a deep learning method. In one embodiment, the hand detection model is a yolov5 target detection model trained by a deep learning method, which can improve the accuracy of the hand detection results, thereby improving the accuracy of detecting the state of goods entering and exiting the shopping cart. Before deployment, a certain number of image data sets of hands pressing down on the edge of the shopping cart basket or on the goods are used to annotate the hand area. After the annotation is completed, the data set is used to train the target detection model.
[0063] 8. If in step 7, the output result does not show the presence or pressure of the hand, it is judged as "real stable fluctuation". At this time, calculate the average weight value under the "real stable fluctuation" state, and then calculate the weight difference between the last "0 value stable" or "real stable fluctuation" before the moment t and the average weight value at this time, and report it to determine the status of the goods entering and leaving the shopping cart.
[0064] As can be seen from the above, in one embodiment, when the weight waveform category of the weight sensor in the current period is the steady state category, the state of the goods entering and leaving the shopping cart is detected according to the weight difference between the average weight value of all moments corresponding to the current period of the weight sensor and the average weight value of all moments corresponding to the previous steady state category period, including:
[0065] When the weight waveform category of the weight sensor in the current period is not a 0-value stable state category, determining whether the weight fluctuation category of the weight sensor in the current period is a fluctuating stable state category;
[0066] When the weight waveform category of the weight sensor in the current period is a fluctuating stable state category, a plurality of images of the basket area of the shopping cart in the current period collected by the acquisition device are input into the hand detection model to detect whether a hand appears on the basket area of the shopping cart; the hand detection model is pre-trained and generated using an image data set of a hand pressing on the basket area (e.g., the edge) of the shopping cart, and the acquisition device is set at a position on the shopping cart that visually covers the basket area of the shopping cart;
[0067] When no hand is detected on the shopping cart basket area, the weight waveform category of the current time period is judged to be a real fluctuating stable category, the average weight value of the goods in the current time period under the real fluctuating stable state category is determined, and the first weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category period before the current time period and the average weight value of the current time period is determined; based on the first weight difference, the status of the goods entering and exiting the shopping cart is detected.
[0068] In specific implementation, the embodiment of the present invention can accurately determine the status of goods being placed in or taken out of the shopping cart by using a weight sensor as the main sensor and a visual camera as the auxiliary sensor, with higher accuracy and reliability.
[0069] 9. As Figure 3 As shown, a second check is performed. If the output result in step 7 shows that the hand is pressed down, the second check is continued for confirmation. The confirmation method is: check whether there is a waveform of "artificial downward pressure and rise" or "abnormal fluctuation and rise" in the previous waveform category before the "stable fluctuation" state at this moment, and at the same time, calculate the variance of n weight values in the time series interval under the "stable fluctuation" state at this time. If it is judged to be a waveform of "artificial downward pressure and rise" or "abnormal fluctuation and rise", and the weight fluctuation variance value is greater than a certain threshold, it proves that the "stable fluctuation" is caused by artificial downward pressure, and it is judged as "abnormal fluctuation and stability", and the abnormality is reported. If it is judged not to be a waveform of "artificial downward pressure and rise" or "abnormal fluctuation and rise", it is judged to be "real fluctuation and stability". At this time, calculate the average weight value under the "real fluctuation and stability" state, and then calculate the weight difference between the last "0 value stability" or "real fluctuation and stability" before the moment t (current moment) and the average weight value at this time, and report it to determine the status of the goods entering and leaving the shopping cart.
[0070] As can be seen from the above, in one embodiment, the method for detecting the status of goods entering or exiting a shopping cart further includes: when a hand is detected to be on the basket area of the shopping cart and a hand is detected to be pressing down, performing the following operation of continuing the secondary check and confirmation:
[0071] Check whether the previous weight waveform category before the current period's fluctuation stable state category has an artificial downward pressure rise or an abnormal fluctuation rise weight waveform category;
[0072] When it is found that there is an artificial downward pressure rise or abnormal fluctuation rise in the weight waveform category, the variance value of the induced weight value at all times in the current period under the fluctuation stable state category of the current period is determined;
[0073] When the variance value of the sensed weight value is greater than the preset variance threshold, it is determined that the fluctuation stable state in the current period is caused by artificial downward pressure, and the weight waveform category of the current period is judged to be an abnormal fluctuation stable state category, and an abnormal alarm is issued.
[0074] In specific implementation, the embodiment of the present invention proposes a secondary inspection method that combines vision with weight fluctuation change patterns (weight waveform categories), which can improve the accuracy of detecting the status of goods entering and leaving the shopping cart.
[0075] As can be seen from the above, in one embodiment, the secondary verification and confirmation operation further includes:
[0076] When it is checked that there is no artificial downward pressure or abnormal fluctuation and increase in the weight waveform category, the weight waveform category of the current time period is determined to be a real fluctuating and stable category, and the average weight value of the current time period under the real fluctuating and stable state is calculated; the second weight difference between the average weight value of the previous real fluctuating and stable state category or the 0-value stable state category before the current period and the average weight value of the current period is determined; based on the second weight difference, the status of the goods entering and leaving the shopping cart is detected.
[0077] In specific implementation, the embodiment of the present invention proposes a secondary inspection using a combination of vision and weight waveform category. The above specific implementation method of detecting the status of goods entering and leaving the shopping cart based on the weight difference can further improve the accuracy of detecting the status of goods entering and leaving the shopping cart.
[0078] 10. Determine whether goods are in or out. Determine whether goods are in or out based on the weight difference between two "stable states". That is, if the difference is a positive number and the value is greater than a certain threshold (preset weight difference threshold), it is determined that the goods are put in; if the difference is a negative number and greater than a certain threshold (preset weight difference threshold), it is determined that the goods are taken out.
[0079] From the above, it can be seen that in one embodiment, the status of goods entering or leaving the shopping cart is detected based on the weight difference between the average weight value of all moments corresponding to the current time period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category time period, including: if the weight difference is a positive number and the weight difference is greater than the preset weight difference threshold, the goods are detected to be in the state of being placed in the shopping cart; if the weight difference is a negative number and the weight difference is greater than the preset weight difference threshold, the goods are detected to be taken out of the shopping cart.
[0080] In specific implementation, the specific implementation scheme of detecting the state of goods entering and exiting the shopping cart based on the weight difference of the pairwise stable states of the weight sensors in the embodiments of the present invention can further improve the accuracy of detecting the state of goods entering and exiting the shopping cart.
[0081] In summary, the advantages of the method for detecting the status of goods entering and exiting the shopping cart provided by the embodiment of the present invention are:
[0082] 1) The embodiment of the present invention proposes a method of using an LSTM classifier to define, sample, label, and train a classifier model, and ultimately determine the pattern category of the time series weight fluctuation change, which can improve the accuracy of detecting the status of goods entering and exiting the shopping cart.
[0083] 2) The embodiment of the present invention proposes a secondary inspection method that combines vision with weight fluctuation change patterns (weight waveform categories), which can improve the accuracy of detecting the status of goods entering and leaving the shopping cart.
[0084] 3) The embodiment of the present invention performs denoising and normalization processing on the weight change value to achieve more accurate judgment and avoid errors, and further improve the accuracy of detecting the status of goods entering and leaving the shopping cart.
[0085] 4) The embodiment of the present invention can accurately determine the status of goods being placed in or taken out of the shopping cart by using a weight sensor as the main sensor and a visual camera as the auxiliary sensor, with higher accuracy and reliability.
[0086] The present invention also provides a device for detecting the state of goods entering and exiting a shopping cart, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the method for detecting the state of goods entering and exiting a shopping cart, the implementation of the device can refer to the implementation of the method for detecting the state of goods entering and exiting a shopping cart, and the repeated parts will not be repeated.
[0087] Figure 4 FIG. 1 is a schematic diagram of the structure of a device for detecting the state of goods entering or leaving a shopping cart (i.e., the computing device mentioned above) in an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0088] An acquisition unit 21 is used to acquire sensed weight values at multiple moments in a current period collected by a weight sensor at preset time intervals;
[0089] The identification unit 22 is used to input the sensed weight values at multiple moments in the current period into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current period; the weight waveform category identifier is pre-trained and generated using a data sample set of the relationship between the sensed weight values and the weight waveform category at multiple historical moments;
[0090] The detection unit 23 is used to detect the status of goods entering or leaving the shopping cart based on the weight difference between the average weight value of all moments corresponding to the current period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category period when the weight waveform category of the current period of the weight sensor is a stable state category.
[0091] In one embodiment, the detection unit is specifically used for:
[0092] When the weight waveform category of the weight sensor in the current period is not a 0-value stable state category, determining whether the weight fluctuation category of the weight sensor in the current period is a fluctuating stable state category;
[0093] When the weight waveform category of the weight sensor in the current period is a fluctuating stable state category, a plurality of shopping cart basket area images collected by the acquisition device in the current period are input into a hand detection model to detect whether a hand appears on the shopping cart basket area; the hand detection model is pre-trained and generated using an image data set of a hand pressing down on the shopping cart basket area, and the acquisition device is set at a position on the shopping cart that visually covers the shopping cart basket area;
[0094] When no hand is detected on the shopping cart basket area, the weight waveform category of the current time period is judged to be a real fluctuating stable category, the average weight value of the goods in the current time period under the real fluctuating stable state category is determined, and the first weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category period before the current time period and the average weight value of the current time period is determined; based on the first weight difference, the status of the goods entering and exiting the shopping cart is detected.
[0095] In one embodiment, the detection unit is further configured to: upon detecting that a hand is present on the basket area of the shopping cart and upon detecting that a hand is pressing down, perform the following operation of continuing the secondary check and confirmation:
[0096] Check whether the previous weight waveform category before the current period's fluctuation stable state category has an artificial downward pressure rise or an abnormal fluctuation rise weight waveform category;
[0097] When it is found that there is an artificial downward pressure rise or abnormal fluctuation rise in the weight waveform category, the variance value of the induced weight value at all times in the current period under the fluctuation stable state category of the current period is determined;
[0098] When the variance value of the sensed weight value is greater than the preset variance threshold, it is determined that the fluctuation stable state in the current period is caused by artificial downward pressure, and the weight waveform category of the current period is judged to be an abnormal fluctuation stable state category, and an abnormal alarm is issued.
[0099] In one embodiment, the secondary verification and confirmation operation further includes:
[0100] When it is checked that there is no artificial downward pressure or abnormal fluctuating weight waveform category, the weight waveform category of the current time period is judged to be a real fluctuating stable state category, and the second weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category before the current time period and the average weight value of the current time period is determined; based on the second weight difference, the status of the goods entering and leaving the shopping cart is detected.
[0101] In one embodiment, the detection unit is further used for:
[0102] When the weight waveform category of the weight sensor in the current period is the 0-value steady state category, determine the third weight difference between the average weight value of the previous real fluctuating steady state category or the 0-value steady state category period before the current period and the average weight value of the current period; based on the third weight difference, detect the status of the goods entering and exiting the shopping cart.
[0103] In one embodiment, the acquisition unit is specifically used for:
[0104] Obtaining the sensed weight value within the current time interval collected by the weight sensor at a preset time interval;
[0105] The sensed weight values at multiple moments in the current time period are sampled from the sensed weight values in the current time interval.
[0106] In one embodiment, the hand detection model is a yolov5 target detection model trained using a deep learning method.
[0107] In one embodiment, the above-mentioned device for detecting the status of goods entering and exiting the shopping cart also includes: a correction processing unit, which is used to perform Kalman filtering denoising correction processing on the sensed weight values at multiple moments in each time period to obtain the sensed weight values at multiple moments in each time period after correction processing.
[0108] In one embodiment, the identification unit is specifically used to: normalize the sensed weight values at multiple moments in the current period and then input them into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current period.
[0109] In one embodiment, the weight waveform category identifier is a long short-term memory network (LSTM) identifier.
[0110] In one embodiment, the detection unit is specifically used for:
[0111] If the weight difference is a positive number and is greater than a preset weight difference threshold, the detected product is in a state of being placed in the shopping cart; if the weight difference is a negative number and is greater than a preset weight difference threshold, the detected product is in a state of being taken out of the shopping cart.
[0112] The embodiment of the present invention also provides a shopping cart for detecting the status of goods entering and exiting the shopping cart, as described in the following embodiment. Since the principle of solving the problem by the shopping cart is similar to the method for detecting the status of goods entering and exiting the shopping cart, the implementation of the shopping cart can refer to the implementation of the method for detecting the status of goods entering and exiting the shopping cart, and the repeated parts will not be repeated.
[0113] Figure 5 FIG. 1 is a schematic diagram of the structure of a shopping cart circuit in an embodiment of the present invention. Figure 5 As shown, the shopping cart includes:
[0114] The weight sensor 1 is used to collect the sensed weight values at multiple moments in each time period at preset time intervals, and send the sensed weight values at multiple moments in each time period to a device for detecting the status of goods entering or leaving the shopping cart;
[0115] Device 2 for detecting the status of goods entering or leaving the shopping cart.
[0116] like Figure 6 As shown, in one embodiment, the shopping cart may further include: a collection device 3, which is disposed at a position on the shopping cart that visually covers the shopping cart basket area, and is used to collect multiple shopping cart basket area images in the current period and input them into a hand detection model.
[0117] Based on the above invention concept, Figure 7 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 the status of goods entering or exiting a shopping cart when executing the computer program 530.
[0118] 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 method for detecting the status of a product entering or exiting a shopping cart is implemented.
[0119] 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 method for detecting the status of a commodity entering or exiting a shopping cart is implemented.
[0120] In an embodiment of the present invention, a scheme for detecting the status of goods entering or leaving a shopping cart comprises: obtaining the sensed weight values at multiple moments in the current time period collected by a weight sensor at preset time intervals; inputting the sensed weight values at multiple moments in the current time period into a pre-trained and generated weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period; the weight waveform category identifier is pre-trained and generated using a sample set of relationship data between the sensed weight values at multiple historical moments and the weight waveform category; when the weight waveform category of the weight sensor in the current time period is a stable state category, detecting the status of goods entering or leaving the shopping cart based on the weight difference between the average weight value of all moments corresponding to the current time period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category time period, thereby improving the accuracy of detecting the status of goods entering or leaving the shopping cart.
[0121] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of laws and regulations.
[0122] 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.
[0123] 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 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0124] 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.
[0125] 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.
[0126] 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 the status of goods entering or leaving a shopping cart, characterized in that: include: Obtaining the sensed weight values at multiple moments in the current period collected by the weight sensor at preset time intervals; Inputting the sensed weight values at multiple moments in the current period into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current period; The weight waveform category identifier is pre-trained and generated using a data sample set of the relationship between the sensed weight values and the weight waveform categories at multiple historical moments; When the weight waveform category of the weight sensor in the current time period is a stable state category, the state of the goods entering and exiting the shopping cart is detected according to the weight difference between the average weight value of all moments corresponding to the current time period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category time period, which includes: when the weight waveform category of the weight sensor in the current time period is not a 0-value stable state category, judging whether the weight fluctuation category of the weight sensor in the current time period is a fluctuating stable state category; when the weight waveform category of the weight sensor in the current time period is a fluctuating stable state category, inputting multiple shopping cart basket area images collected by the acquisition device in the current time period into a hand detection model to detect whether there is a hand on the shopping cart basket area; the hand detection model is pre-trained and generated using an image data set of a hand pressing down on the shopping cart basket area, and the acquisition device is set at The position of the shopping cart basket area is visually covered on the shopping cart; when no hand is detected on the shopping cart basket area, the weight waveform category of the current time period is judged to be a real fluctuating stable category, the average weight value of the current time period under the real fluctuating stable state category is determined, and the first weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category before the current time period and the average weight value of the current time period is determined; according to the first weight difference, the state of the goods entering and exiting the shopping cart is detected; when the weight waveform category of the weight sensor in the current time period is a 0-value stable state category, the third weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category before the current time period and the average weight value of the current time period is determined; according to the third weight difference, the state of the goods entering and exiting the shopping cart is detected.
2. The method according to claim 1, characterized in that Also includes: When a hand is detected on the shopping cart basket area and a hand is detected pressing down, the following operations are performed to continue the secondary check and confirmation: Check whether the previous weight waveform category before the current period's fluctuation stable state category has an artificial downward pressure rise or an abnormal fluctuation rise weight waveform category; When it is found that there is an artificial downward pressure rise or abnormal fluctuation rise in the weight waveform category, the variance value of the induced weight value at all times in the current period under the fluctuation stable state category of the current period is determined; When the variance value of the sensed weight value is greater than the preset variance threshold, it is determined that the fluctuation stable state in the current period is caused by artificial downward pressure, and the weight waveform category of the current period is judged to be an abnormal fluctuation stable state category, and an abnormal alarm is issued.
3. The method according to claim 2, characterized in that The secondary verification and confirmation operation also includes: When it is checked that there is no artificial downward pressure or abnormal fluctuating weight waveform category, the weight waveform category of the current time period is judged to be a real fluctuating stable state category, and the second weight difference between the average weight value of the previous real fluctuating stable state category or the 0-value stable state category before the current time period and the average weight value of the current time period is determined; based on the second weight difference, the status of the goods entering and leaving the shopping cart is detected.
4. The method according to claim 1, characterized in that The hand detection model is a yolov5 target detection model trained using a deep learning method.
5. The method according to claim 1, characterized in that Get the sensed weight values collected by the weight sensor at multiple times in the current period at preset time intervals, including: Obtaining the sensed weight value within the current time interval collected by the weight sensor at a preset time interval; The sensed weight values at multiple moments in the current time period are sampled from the sensed weight values in the current time interval.
6. The method according to claim 1, characterized in that Also includes: The sensed weight values at multiple moments in each time period are subjected to Kalman filtering denoising and correction processing to obtain the sensed weight values at multiple moments in each time period after correction processing.
7. The method according to claim 1, characterized in that The sensed weight values at multiple moments in the current time period are input into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period, including: normalizing the sensed weight values at multiple moments in the current time period and then inputting them into a pre-trained weight waveform category identifier to obtain the weight waveform category of the weight sensor in the current time period.
8. The method according to claim 1, characterized in that The weight waveform category identifier is a long short-term memory network LSTM identifier.
9. The method according to claim 1, characterized in that According to the weight difference between the average weight value of the weight sensor at all times in the current period and the average weight value at all times in the previous stable state category period, the status of the goods entering and leaving the shopping cart is detected, including: If the weight difference is a positive number and is greater than a preset weight difference threshold, the detected product is in a state of being placed in the shopping cart; if the weight difference is a negative number and is greater than a preset weight difference threshold, the detected product is in a state of being taken out of the shopping cart.
10. A device for detecting the status of goods entering or leaving a shopping cart, characterized in that: include: An acquisition unit, used to acquire sensed weight values at multiple moments in a current period collected by the weight sensor at preset time intervals; A recognition unit, used for inputting the sensed weight values at multiple moments in the current period into a pre-trained and generated weight waveform category identifier, to obtain the weight waveform category of the weight sensor in the current period; The weight waveform category identifier is pre-trained and generated using a data sample set of the relationship between the sensed weight values and the weight waveform categories at multiple historical moments; A detection unit is used to detect the state of goods entering and exiting the shopping cart according to the weight difference between the average weight value of all moments corresponding to the current time period of the weight sensor and the average weight value of all moments corresponding to the previous stable state category time period when the weight waveform category of the weight sensor in the current time period is a stable state category, which includes: when the weight waveform category of the weight sensor in the current time period is not a 0-value stable state category, judging whether the weight fluctuation category of the weight sensor in the current time period is a fluctuating stable state category; when the weight waveform category of the weight sensor in the current time period is a fluctuating stable state category, inputting multiple shopping cart basket area images of the current time period collected by the acquisition device into a hand detection model to detect whether there is a hand on the shopping cart basket area; the hand detection model is pre-trained and generated using an image data set of a hand pressing down on the shopping cart basket area, and the acquisition device is set The sensor is placed on the shopping cart at a position that visually covers the basket area of the shopping cart; when no hand is detected on the basket area of the shopping cart, it is determined that the weight waveform category of the current time period is a real fluctuating and stable category, the average weight value of the goods in the current time period under the real fluctuating and stable state category is determined, and the first weight difference between the average weight value of the previous real fluctuating and stable state category or the 0-value stable state category period before the current time period and the average weight value of the current time period is determined; based on the first weight difference, the state of goods entering and exiting the shopping cart is detected; when the weight waveform category of the weight sensor in the current time period is a 0-value stable state category, the third weight difference between the average weight value of the previous real fluctuating and stable state category or the 0-value stable state category period before the current time period and the average weight value of the current time period is determined; based on the third weight difference, the state of goods entering and exiting the shopping cart is detected.
11. A shopping cart, characterized in that: include: A weight sensor, used to collect the sensed weight values at multiple moments in each time period at preset time intervals, and send the sensed weight values at multiple moments in each time period to a device for detecting the status of goods entering or leaving the shopping cart; The device for detecting the status of goods entering or leaving a shopping cart as claimed in claim 10.
12. The shopping cart according to claim 11, wherein: Also includes: The acquisition device is arranged at a position on the shopping cart that visually covers the shopping cart basket area, and is used to acquire multiple shopping cart basket area images in the current period and input them into the hand detection model.
13. 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 9 is implemented.
14. 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 9 is implemented.
15. 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 9 is implemented.
