Weighing cashier rechecking method and system based on artificial intelligence
By constructing a prediction model to predict the weight of commodity attachments and removing them, the problem of inaccurate net weight calculation in the prior art is solved, and more efficient and accurate cash register review is achieved, which improves user experience and customer satisfaction.
Patent Information
- Application Number
- CN202411566593.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing weighing and cashier review methods cannot effectively remove the weight of commodity surcharges, resulting in inaccurate net weight calculations, affecting the calculation of the total price of the commodity, and may lead to pricing errors and unfairness.
Using an artificial intelligence-based method, the weight of commodity attachments is predicted by constructing a prediction model and removing them from the weighing data to obtain the net weight of the commodity. The method includes data acquisition, weight prediction, product matching, cashier information generation and review, and data analysis and verification using natural language processing and deep learning algorithms.
It improves the accuracy of the net weight of the product, reduces manual processing time, improves the accuracy of cashier review and customer satisfaction, and enhances the user's shopping experience and sense of trust.
Smart Images

Figure CN119513615A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cashier verification, and in particular to an artificial intelligence-based weighing cashier verification method and system. Background Art
[0002] Commodity weighing refers to the process of measuring the weight of commodities using weighing equipment in commercial retail scenarios. Specifically, commodity weighing mainly calculates the total price of the commodity based on the unit weight price of the commodity, and cashes out based on the weighing results. Commodity weighing can improve the transaction efficiency of purchasing food and commodities, and also make it convenient for merchants to sell commodities by weight.
[0003] Commodity weighing and cashiering refers to the process of weighing commodities in real time during the shopping settlement process through weighing equipment, and calculating the price of commodities based on the weighing results to realize the automated cashiering process, while the weighing and cashiering verification method refers to the method of using various technical means to verify and verify data during the commodity weighing and cashiering process to improve the accuracy of weighing and cashiering. Since some commodities need to be packaged before weighing, they will also be affected by other attachments, such as labels, packaging boxes and packaging bags, which will interfere with the actual weight of the commodities.
[0004] In the existing weighing and cashier review method, the weight of the attachments cannot be eliminated, which will interfere with the net weight of the goods and cause the weight of the attachments to be included in the weighing data. This will lead to inaccurate calculation of the net weight and affect the total price of the goods. At the same time, if the weight of the attachments is not eliminated, the merchant may calculate the price of the goods based on the wrong weighing data, resulting in incorrect and unfair pricing, which will not only damage the merchant's reputation, but may also lead to increased customer loss and returns.
[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0006] In view of the problems in the related art, the present invention proposes a weighing and cashier review method and system based on artificial intelligence to overcome the above-mentioned technical problems existing in the existing related art.
[0007] To this end, the specific technical solution adopted by the present invention is as follows:
[0008] According to one aspect of the present invention, a weighing and cashiering review method based on artificial intelligence is provided, and the weighing and cashiering review method based on artificial intelligence comprises the following steps:
[0009] S1. Connect the weighing equipment to the intelligent management platform, and transmit the real-time collected weighing data to the intelligent management platform for analysis and processing;
[0010] S2. Build a prediction model to predict the weight of the additional items of the product, and remove the weight of the additional items from the weighing data to obtain the net weight of the product;
[0011] S3, identifying and matching the weighed goods according to a pre-established goods database to obtain the corresponding unit price of the goods in the goods database;
[0012] S4. Calculate the total price of the goods by combining the net weight of the goods with the unit price of the goods, and generate cashier information;
[0013] S5. Use artificial intelligence algorithms to review the cashier information, compare and verify it with the information in the product database, and obtain the cashier information review result;
[0014] S6. Extract the actual weighing weight and evaluate the dynamic error generated by the weighing device in combination with the usage frequency of the weighing device, and correct the cashier information review result based on the dynamic error.
[0015] Furthermore, constructing a prediction model to predict the weight of the additional items of the product, and removing the weight of the additional items from the weighing data to obtain the net weight of the product includes the following steps:
[0016] S21, obtaining the weighing data of the commodity and the corresponding additional information, calculating the weight characteristics of the additional information, and establishing a weight prediction model based on the weight characteristics;
[0017] S22, using the weighing data of the commodity as the input of the weight prediction model, and using the weight prediction model to predict the weight of the additional items corresponding to the commodity;
[0018] S23. The predicted weight of the additional items is removed from the weighing data to obtain the net weight of the goods, and the net weight of the goods is used as the actual weighing weight of the goods.
[0019] Furthermore, obtaining the weighing data of the commodity and the corresponding additional information, and calculating the weight characteristics of the additional information, and establishing a weight prediction model based on the weight characteristics includes the following steps:
[0020] S211, collecting commodity images and performing binarization processing on the commodity images, extracting contours of the binarized commodity images, and obtaining the contours of the commodity and the contours of the attachments;
[0021] S212, traversing the convex hull points of the contour of the attachment, forming a contour line with the convex hull points, and then using a convex hull function to obtain the convex hull contour of the attachment;
[0022] S213, calculating the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour in the OpenCV open source library;
[0023] S214, respectively converting the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour and calculating a proportional factor, and then calculating the weight characteristic data of the attached object based on the proportional factor;
[0024] S215, calculating the volume data of the convex hull contour based on the minimum circumscribed circle diameter data, and constructing a first prediction model in combination with the volume data;
[0025] S216, using the perimeter data and area data of the convex hull contour as input, and the weight feature data of the attached object as output, to construct a second prediction model;
[0026] S217. Use a deep learning algorithm to perform deep fitting on the first prediction model and the second prediction model to form a weight prediction model.
[0027] Furthermore, identifying and matching the weighed goods according to a pre-established goods database to obtain the corresponding unit price of the goods in the goods database includes the following steps:
[0028] S31. Construct a discriminant appearance model based on nonparametric kernel density and integrate the product profile into the discriminant appearance model;
[0029] S32, using the statistical characteristics of the optical flow field to formulate an adaptive threshold selection mechanism, and analyzing the relative movement of the product outline and the attached object outline to obtain the optical flow velocity field of the product outline evolution;
[0030] S33, performing decision-level fusion appearance in a semi-naive Bayes framework, updating the optical flow velocity field into a discriminative optical flow velocity field and using it to guide product contour tracking;
[0031] S34, integrating the product profile tracking information into the product profile to obtain the comprehensive profile features of the product, and performing similarity calculations with the products in the pre-established database respectively;
[0032] S35, sorting the similarity calculation results, determining the product with the most similar comparison results as the best matching product, and obtaining the corresponding product unit price from the product database.
[0033] Furthermore, the statistical characteristics of the optical flow field are used to formulate an adaptive threshold selection mechanism, and the relative movement of the product outline and the attached object outline is analyzed to obtain the optical flow velocity field of the product outline evolution, which includes the following steps:
[0034] S321, performing dense optical flow calculation on the product outline and the additional object outline respectively, and calculating the pixel displacement between adjacent frames in the product image to generate an optical flow velocity field;
[0035] S322, converting the product image into an optical flow field image, and performing superpixel segmentation on it using the SLIC algorithm, adopting a hierarchical local-to-global strategy to obtain an optical flow direction histogram, and then using the statistical characteristics of the optical flow field to obtain a product contour template of the product contour;
[0036] S323, performing a dot multiplication operation on the product outline template and the optical flow velocity field to obtain an optical flow gray value vector of the product outline and the additional object outline;
[0037] S324, using the maximum likelihood method to calculate two normal distributions of the product profile and the additional product profile, and applying the semi-naive Bayesian framework under the condition of equal prior probability to calculate the maximum posterior probability by maximizing the likelihood function;
[0038] S325 , constraining the maximized posterior probability to a preset interval, normalizing it, obtaining an evolution speed function, and acquiring an optical flow speed field of the product profile evolution.
[0039] Furthermore, the cashier information is reviewed using an artificial intelligence algorithm, and compared and verified with the information in the commodity database to obtain the cashier information review result, including the following steps:
[0040] S51, parsing the cash register information, and extracting keyword information from the cash register information using natural language processing technology;
[0041] S52, using a keyword matching algorithm to match the keyword information with the corresponding weighed commodity attribute information in the commodity database, thereby realizing the initial review of the cash register information;
[0042] S53, after the first review is completed, the virtual weighing calculation is performed on the goods, and the virtual weighing weight of the goods is compared with the actual weighing weight to achieve a second review of the cashier information;
[0043] S54. If the comparison result between the virtual weighing weight and the actual weighing weight is within the preset error range, it means that the cashier information review is passed and the cashier information review result is obtained; if the comparison result exceeds the preset error range, it means that there is an error in the actual weighing weight and step S6 is executed.
[0044] Furthermore, the keyword information is matched with the corresponding weighed commodity attribute information in the commodity database by using a keyword matching algorithm, and the initial review of the cash register information includes the following steps:
[0045] Convert cashier information into a keyword sequence, create a jump table and a check table, calculate the hash value of the cashier information, and check the value of the jump table;
[0046] Inspection checklist;
[0047] Calculate the text-related attributes of the relative positions of the commodity attribute information in the commodity database, and check the keyword sequence with the text-related attributes.
[0048] Furthermore, the pSkip[k] table is a jump table used to determine the jump distance during the search process;
[0049] The pCheck[k] table is a check table used to verify the accuracy of keyword matching.
[0050] Furthermore, the calculation formula for text-related attributes is:
[0051]
[0052] In the formula, w represents the weight value of the keyword;
[0053] Q represents text-related attributes;
[0054] Γ represents the matching distance;
[0055] θ represents the ratio between the adjusted matching distance and the weight value;
[0056] t indicates a keyword;
[0057] o represents a keyword set;
[0058] i represents a constant.
[0059] According to another aspect of the present invention, there is also provided an artificial intelligence-based weighing and cashier verification system, which includes a data acquisition module, a weight prediction module, a commodity matching module, a cashier information generation module, a cashier information verification module and a dynamic error correction module;
[0060] The data acquisition module is connected to the weight prediction module, the weight prediction module is connected to the commodity matching module, the commodity matching module is connected to the cashier information generation module, the cashier information generation module is connected to the cashier information review module, and the cashier information review module is connected to the dynamic error correction module;
[0061] The data acquisition module is used to connect the weighing equipment with the intelligent management platform and transmit the weighing data collected in real time to the intelligent management platform for analysis and processing;
[0062] The weight prediction module is used to build a prediction model to predict the weight of the additional items of the goods, and remove the weight of the additional items from the weighing data to obtain the net weight of the goods;
[0063] A commodity matching module is used to identify and match the weighed commodities according to a pre-established commodity database to obtain the corresponding commodity unit price in the commodity database;
[0064] A cash register information generation module is used to calculate the total price of the goods by combining the net weight of the goods with the unit price of the goods, and generate cash register information;
[0065] The cashier information review module is used to review the cashier information using an artificial intelligence algorithm, compare and verify it with the information in the commodity database, and obtain the cashier information review result;
[0066] The dynamic error correction module is used to extract the actual weighing weight and evaluate the dynamic error generated by the weighing equipment in combination with the frequency of use of the weighing equipment, and correct the cashier information review result based on the dynamic error.
[0067] The beneficial effects of the present invention are:
[0068] 1. The present invention predicts the weight of the additional items of the goods by constructing a prediction model, and removes the weight of the additional items from the weighing data, thereby improving the accuracy of the net weight of the goods. Since the weight of the additional items may interfere with the net weight of the goods, the net weight of the goods can be calculated more accurately by removing the weight of the additional items through the prediction model, thereby improving the accuracy of the weighing data. At the same time, by automatically predicting the weight of the additional items and removing them, the time and workload of manual processing can be reduced, and the efficiency of subsequent weighing and rechecking can be improved, thereby improving the accuracy of cashier rechecking and customer satisfaction, thereby enhancing the user's shopping experience and increasing user trust.
[0069] 2. The present invention extracts keyword information from cashier information through natural language processing technology, which can not only reduce the workload of manual extraction, but also improve efficiency and reduce error rate. At the same time, the extracted keyword information is matched with the corresponding weighing commodity attribute information in the commodity database by using the keyword matching algorithm, and then the commodity is virtually weighed to achieve multi-level review of the cashier information, further improve accuracy and data consistency, reduce errors caused by weighing errors, and thus provide merchants with more reliable and efficient cashier services and improve customer satisfaction.
[0070] 3. The present invention constructs a discriminant velocity function modeling method for contour tracking, extracts visual features with superpixels as basic units, and integrates them into the construction of a discriminant appearance model. This can more effectively distinguish the contours of goods and the contours of attachments. At the same time, it makes full use of the statistical information of the optical flow field to fuse it with the appearance information at the decision layer to produce a more reliable velocity function that is conducive to contour evolution and tracking, thereby improving the clarity of the product contour, thereby making the matching of the product contour more accurate, avoiding the interference caused by similar backgrounds, background blur and partial occlusion, and at the same time having strong effectiveness and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. 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 paying creative work.
[0072] Figure 1 It is a flow chart of a weighing and cashier review method based on artificial intelligence according to an embodiment of the present invention;
[0073] Figure 2 The invention discloses a principle block diagram of a weighing and cashier review system based on artificial intelligence according to an embodiment of the invention.
[0074] 1. Data collection module; 2. Weight prediction module; 3. Product matching module; 4. Cashier information generation module; 5. Cashier information review module; 6. Dynamic error correction module. DETAILED DESCRIPTION
[0075] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.
[0076] According to an embodiment of the present invention, a weighing and cashier review method and system based on artificial intelligence are provided.
[0077] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the weighing and cashiering review method based on artificial intelligence in an embodiment of the present invention, the weighing and cashiering review method based on artificial intelligence includes the following steps:
[0078] S1. Connect the weighing equipment to the intelligent management platform, and transmit the real-time collected weighing data to the intelligent management platform for analysis and processing.
[0079] It should be noted that by connecting the weighing equipment and the intelligent management platform, the weighing of the goods can be monitored in real time, and the weighing data can be collected in real time to the intelligent management platform, so that important information such as the net weight of the goods can be obtained in time, which is convenient for subsequent data analysis and processing; the intelligent management platform has powerful data analysis and processing capabilities, and can perform various statistics, calculations and analyses on the weighing data collected in real time.
[0080] S2. Construct a prediction model to predict the weight of the additional items of the product, and remove the weight of the additional items from the weighing data to obtain the net weight of the product.
[0081] It should be noted that commodity attachments usually include labels or tags. Labels, tags and other attachments on commodities will have a certain weight; packaging materials such as packaging bags and boxes. Some commodities may be packaged in packaging materials. The weight of these materials also needs to be considered when weighing.
[0082] Among them, building a prediction model to predict the weight of the additional items of the goods, and removing the weight of the additional items from the weighing data to obtain the net weight of the goods includes the following steps:
[0083] S21. Obtain the weighing data of the commodity and the corresponding additional information, calculate the weight characteristics of the additional information, and establish a weight prediction model based on the weight characteristics.
[0084] The weighing data of the commodity is used as the input of the weight prediction model, and the weight prediction model is used to predict the weight of the additional items corresponding to the commodity, including the following steps:
[0085] S211, collecting commodity images and binarizing the commodity images, extracting contours of the binarized commodity images, and obtaining commodity contours and attachment contours respectively.
[0086] It should be noted that collecting product images and binarizing the product images, extracting contours of the binarized product images, and obtaining the product contours and the attachment contours respectively include the following steps:
[0087] Use appropriate equipment or cameras to capture images of the products, ensuring that the image quality is good and the products are clearly visible.
[0088] The collected product images are preprocessed, including denoising, contrast enhancement, etc., and the preprocessed product images are converted into grayscale images. The grayscale conversion function is used to convert the color images into grayscale images.
[0089] Binarization is performed on grayscale images to convert them into binary images with only black and white colors. Binarization methods include global threshold segmentation, adaptive threshold segmentation, etc. Select the appropriate binarization method based on the characteristics and requirements of the image.
[0090] To extract the contours of the binarized product image, you can use an image processing library or algorithm, such as the findContours function in the OpenCV library, which can extract all the contours in the image based on the pixels in the binary image.
[0091] According to the characteristics of the contours, the extracted contours are classified and screened, and the product contours and the additional object contours are calibrated. Rectangular frames or polygons can be used to calibrate the position and shape of the contours.
[0092] S212, traversing the convex hull points of the contour of the attachment, forming a contour line out of the convex hull points, and then using a convex hull function to obtain the convex hull contour of the attachment.
[0093] It should be noted that the convex hull refers to the smallest convex polygon or convex polyhedron that encloses a set of points. In image processing and computational geometry, the convex hull is often used to extract the boundary or contour of an object. The convex hull function is an algorithm or function for calculating the convex hull. It can calculate the representation of the convex hull based on the input point set. In OpenCV, the cv2.convexHull function can be used to calculate the convex hull of a two-dimensional point set.
[0094] S213, calculating the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour in the OpenCV open source library;
[0095] S214, respectively converting the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour and calculating a proportional factor, and then calculating the weight characteristic data of the attachment based on the proportional factor.
[0096] It should be noted that respectively converting the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour and calculating the proportional factor, and then calculating the weight characteristic data of the attached object based on the proportional factor includes the following steps:
[0097] S215, calculating the volume data of the convex hull contour based on the minimum circumscribed circle diameter data, and constructing a first prediction model in combination with the volume data;
[0098] S216, using the perimeter data and area data of the convex hull contour as input, and the weight feature data of the attached object as output, to construct a second prediction model;
[0099] S217. Use a deep learning algorithm to perform deep fitting on the first prediction model and the second prediction model to form a weight prediction model.
[0100] It should be noted that using a deep learning algorithm to perform deep fitting on the first prediction model and the second prediction model to form a weight prediction model includes the following steps:
[0101] A set of data sets including product features and corresponding weights is collected, and the product features in the data set are ensured to include the output results of the first prediction model and the second prediction model, as well as the actual weight of the product.
[0102] Preprocess the collected data, including data cleaning, missing value processing, feature normalization or standardization, etc., to ensure the quality and consistency of the data set.
[0103] Select a suitable deep learning model architecture, such as multi-layer perceptron (MLP), convolutional neural network (CNN) or recurrent neural network (RNN), and select the model according to the characteristics of the task and the characteristics of the data set.
[0104] The dataset is divided into training and testing sets for training and evaluating the performance of the model.
[0105] The deep learning model is trained using the training set, and the model parameters are adjusted through the back-propagation algorithm and the optimization algorithm to minimize the difference between the predicted value and the actual value.
[0106] The test set is used to evaluate the performance of the trained model. Evaluation indicators include mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), etc.
[0107] S22, using the weighing data of the commodity as the input of the weight prediction model, and using the weight prediction model to predict the weight of the additional items corresponding to the commodity;
[0108] S23. The predicted weight of the additional items is removed from the weighing data to obtain the net weight of the goods, and the net weight of the goods is used as the actual weighing weight of the goods.
[0109] S3. Identify and match the weighed goods according to a pre-established goods database to obtain the corresponding unit price of the goods in the goods database.
[0110] Among them, identifying and matching the weighed goods according to the pre-established goods database to obtain the corresponding unit price of the goods in the goods database includes the following steps:
[0111] S31. Construct a discriminant appearance model based on non-parametric kernel density and integrate the product profile into the discriminant appearance model.
[0112] It should be noted that constructing a discriminant appearance model based on non-parametric kernel density and integrating the product profile into the discriminant appearance model includes the following steps:
[0113] Collect product image data containing different categories, where each category has a set of corresponding contour data, ensuring that each category has a sufficient number of samples.
[0114] For each product image, image processing and computer vision techniques (such as edge detection, contour extraction, etc.) are used to extract the contour features of the product.
[0115] For each category of product profile features, a non-parametric kernel density estimation method (such as Gaussian kernel density estimation) is used to estimate its probability density function, thereby constructing a non-parametric kernel density model for each category.
[0116] Calculate the prior probability of each category, that is, the proportion of each category of goods in the entire training data set, and multiply the non-parametric kernel density model of each category by the category prior probability to obtain the discriminant appearance model.
[0117] For a new product profile, the discriminative appearance model is used to calculate its posterior probability in each category.
[0118] S32. An adaptive threshold selection mechanism is formulated using the statistical characteristics of the optical flow field, and the relative movement of the product contour and the attachment contour is analyzed to obtain the optical flow velocity field of the product contour evolution.
[0119] Among them, the statistical characteristics of the optical flow field are used to formulate an adaptive threshold selection mechanism, and the relative movement of the product outline and the attached object outline is analyzed to obtain the optical flow velocity field of the product outline evolution, which includes the following steps:
[0120] S321, performing dense optical flow calculation on the product outline and the attachment outline respectively, and calculating the pixel displacement between adjacent frames in the product image to generate an optical flow velocity field.
[0121] It should be noted that dense optical flow calculation is performed on the contours of goods and attachments to obtain their motion information. Dense optical flow can be used to analyze the motion trajectory of objects, detect abnormal motion, track objects and other application scenarios. Dense optical flow calculation of the contours of goods and attachments can help understand their motion characteristics and relative motion relationships.
[0122] S322, converting the product image into an optical flow field image, and performing superpixel segmentation on it using the SLIC algorithm, adopting a hierarchical local to global strategy to obtain an optical flow direction histogram, and then using the statistical characteristics of the optical flow field to obtain a product contour template of the product contour.
[0123] It should be noted that the SLIC (Simple Linear Iterative Clustering) algorithm is a superpixel segmentation algorithm for image segmentation. The SLIC algorithm mainly includes the following steps:
[0124] First, the number of superpixels (i.e., the number of blocks after segmentation) and the density parameter of the superpixels are selected, and then initial seed points are evenly placed on the image, each seed point having an initial position and color.
[0125] For each seed point, similar pixels are assigned to the superpixel block represented by the seed point by calculating the color and spatial distances of the pixels in its surrounding neighborhood. This step can be done by calculating the Euclidean distance or other similarity metrics.
[0126] For each superpixel block, the average color and position of the pixels in it are calculated and used as the new seed point.
[0127] By iterating the above clustering and seed point updating steps until a predetermined number of iterations is reached or a convergence condition is satisfied, in each iteration, the boundary of the superpixel block will be adjusted to better fit the edge in the image.
[0128] S323, performing a dot multiplication operation on the product outline template and the optical flow velocity field to obtain an optical flow gray value vector of the product outline and the additional object outline;
[0129] S324. The maximum likelihood method is used to calculate the two normal distributions of the product profile and the additional product profile, and the semi-naive Bayesian framework is applied under the condition of equal prior probability to calculate the maximum posterior probability by maximizing the likelihood function.
[0130] It should be noted that the Maximum Likelihood Estimation (MLE) is a commonly used parameter estimation method, which is used to estimate the model parameters that are most likely (with the highest probability) to generate these data from the observed data. It is based on the principles of probability theory and statistics and determines the value of the parameter by maximizing the likelihood function. It mainly includes the following steps:
[0131] Establish a probability model: According to the specific situation of the problem, select an appropriate probability distribution model to describe the distribution of the observed data. For example, you can choose a normal distribution for continuous data, and a Bernoulli distribution for binary data.
[0132] Construct likelihood function: According to the selected probability distribution model, the probability density function (or probability mass function) of the observed data is expressed as a function of the parameters. This function is called the likelihood function. The likelihood function represents the probability of the observed data occurring given the parameter value.
[0133] Maximizing the likelihood function: The value of the parameter is determined by maximizing the likelihood function. The log-likelihood function is usually used for maximization because the logarithmic function can simplify the calculation and be converted into a maximum value problem.
[0134] Parameter estimation: By solving the maximum value of the likelihood function, we obtain the parameter values that maximize the likelihood function. These parameter values are considered to be the parameter estimates that are most likely to generate the observed data.
[0135] S325 , constraining the maximized posterior probability to a preset interval, normalizing it, obtaining an evolution speed function, and acquiring an optical flow speed field of the product profile evolution.
[0136] S33. Perform decision-layer fusion in a semi-naive Bayes framework, update the optical flow velocity field into a discriminative optical flow velocity field and use it to guide product contour tracking.
[0137] It should be noted that Semi-Naive Bayes is a classification algorithm based on Bayes' theorem. It is an improvement on the Naive Bayes algorithm. The Semi-Naive Bayes algorithm assumes that there is a certain dependency between attributes, so it no longer satisfies the attribute conditional independence assumption in the Naive Bayes algorithm.
[0138] It should be noted that the main idea of the semi-naive Bayes algorithm is to improve the classification accuracy by introducing some dependencies between attributes. In the semi-naive Bayes algorithm, a graphical model (such as a Bayesian network) is usually used to represent the dependencies between attributes.
[0139] S34, integrating the product profile tracking information into the product profile to obtain the comprehensive profile features of the product, and performing similarity calculations with the products in a pre-established database.
[0140] It should be noted that by integrating contour tracking information into the product contour, the shape and contour features of the product can be captured more accurately, thereby improving the recognition accuracy of the product and avoiding misidentification caused by factors such as lighting and occlusion; by integrating the contour features and combining the tracking information with other features, the distinguishability of the product can be enhanced, and not only the shape features can be considered, but also other features such as texture and color, thereby more comprehensively describing the characteristics of the product.
[0141] S35, sorting the similarity calculation results, determining the product with the most similar comparison results as the best matching product, and obtaining the corresponding product unit price from the product database.
[0142] S4. Calculate the total price of the goods by combining the net weight of the goods with the unit price of the goods, and generate cashier information;
[0143] S5. Use artificial intelligence algorithms to review the cash register information, compare and verify it with the information in the product database, and obtain the cash register information review result.
[0144] Among them, using artificial intelligence algorithms to review the cash register information, comparing and verifying it with the information in the commodity database, and obtaining the cash register information review result includes the following steps:
[0145] S51. Analyze the cash register information and extract keyword information from the cash register information using natural language processing technology.
[0146] It should be noted that the cash register information is parsed and the keyword information extracted from the cash register information using natural language processing technology includes:
[0147] Segment the text in the cash register information, including splitting the entire text into separate items, such as date, time, product name, unit price, quantity and total price;
[0148] Named entity recognition technology (conditional random field model) is used to identify product names, prices, etc. in the segmented text.
[0149] It should be noted that the conditional random field model can identify specific entity categories in the text, such as names, places, monetary amounts, etc., which mainly include:
[0150] The segmented text data is labeled to clarify which parts are product names and which parts are prices. The BIO (Begin, Inside, Outside) labeling scheme is usually used for labeling.
[0151] Input features to the conditional random field model, including word embeddings, position encoding, etc. Use the labeled data set to train the conditional random field model, which includes setting model parameters, selecting optimization algorithms, and performing cross-validation.
[0152] Extract recognized entities from the trained conditional random field model, parse and format the model's output, and associate recognized product names and prices, especially when multiple products are included in a single text.
[0153] Identify the relationships between entities in the text and use TF-IDF (Term Frequency-Inverse Document Frequency) to extract keywords from the text to quickly obtain the main content of the transaction.
[0154] It should be noted that the use of TF-IDF (term frequency-inverse document frequency) to extract keywords from text includes:
[0155] Calculate term frequency (TF): For each document, count the number of occurrences of each word.
[0156] Build a term frequency matrix: Create a matrix with rows representing documents and columns representing words. The elements in the matrix represent the frequency of the word in the corresponding document.
[0157] Calculate IDF: For each word, calculate its rarity in the document set. If the IDF is 0, the IDF calculation will be infinite. In this case, smoothing technology can be used.
[0158] Calculate the TF-IDF value of each word: multiply the TF of each word by its IDF to get the TF-IDF value of the word in the corresponding document, and for each annotation, sort the words from high to low according to their TF-IDF values, and extract the top-ranked words as keywords according to needs.
[0159] The extracted information is aggregated and organized into a format that is easy to understand and analyze, and the meaning of the text is further analyzed, such as judging customers’ attitudes toward products through sentiment analysis, or understanding certain ambiguous items through context (such as using “it” to refer to a previously mentioned product).
[0160] S52. Use a keyword matching algorithm to match the keyword information with the corresponding weighed commodity attribute information in the commodity database to achieve an initial review of the cash register information.
[0161] Among them, using a keyword matching algorithm to match the keyword information with the corresponding weighed commodity attribute information in the commodity database to achieve the initial review of the cash register information includes the following steps:
[0162] Convert cashier information into a keyword sequence, create a jump table and a check table, calculate the hash value of the cashier information, and check the value of the jump table;
[0163] Specifically, S521, use Base64 content transfer encoding to convert the cashier information into a keyword sequence, and establish pSkip[k] table and pCheck[k] table, calculate the hash value of the cashier information, and then check the pSkip[k] value. If the pSkip[k] value is greater than or equal to zero, jump backward by the pSkip[k] value distance and return to step S521. If the pSkip[k] value is less than zero, execute step S522.
[0164] It should be noted that Base64 is a commonly used content transfer encoding method that converts binary data into printable ASCII characters for transmission or storage in text protocols. Base64 encoding can convert any type of data (such as images, audio, video, etc.) into text format for easy transmission and processing.
[0165] The principle of Base64 encoding is to divide 3 bytes of data into 4 6-bit fragments (if less than 3 bytes, fill it), and then convert each 6-bit fragment into an ASCII character. Because an ASCII character can be represented by 8 bits, the Base64-encoded data will be slightly longer than the original data.
[0166] Among them, the pSkip[k] table is a jump table used to determine the jump distance during the search process.
[0167] It should be noted that the pSkip[k] table is a data structure used to optimize the search algorithm. It is mainly used to accelerate the search operation of the jump list (Skip List). The pSkip[k] table is a key data structure in the jump list, which is used to store the pointer of each node in each level. It is a two-dimensional array, in which the first dimension represents the level and the second dimension represents the node position in each level.
[0168] It should be noted that the use of the pSkip[k] table can improve the search efficiency of the jump table. When performing a search operation, the node of the corresponding level can be quickly located according to the pointer in the pSkip[k] table, and then the search can be performed on that level, thereby reducing the time complexity of the search and improving the efficiency of the search.
[0169] The pCheck[k] table is a check table used to verify the accuracy of keyword matching.
[0170] It should be noted that the pCheck[k] table is a check table used to verify the accuracy of keyword matching. It records the information that needs further checking for keywords that have been successfully matched during the search process. Usually, a hash table or binary search tree is used to store part or all of the keywords for subsequent comparison and verification.
[0171] Check the check table; specifically, S522, check the TCheckItem structure in the pCheck[k] table. If the first_code of the TcheckItem structure is equal to the long integer at the corresponding position in the keyword sequence, jump to step S524, otherwise continue to check the TcheckItem structure.
[0172] It should be noted that the TCheckItem structure is a data structure used for keyword matching or checking. It is a structure that can be customized according to specific application scenarios and is used to store and represent relevant information of a keyword.
[0173] S523, when all the TCheckltem structures in the pCheck[k] table have been checked, jump back a distance of pCheck[k] and return to step S521;
[0174] Calculate the text-related attributes of the relative position of the commodity attribute information in the commodity database, and compare the keyword sequence with the text-related attributes; specifically, S524, calculate the text-related attributes of the relative position of the commodity attribute information in the commodity database, and compare the keyword sequence with the text-related attributes, if they are equal, perform keyword matching, if not equal, return to step S522.
[0175] The calculation formula of text-related attributes is:
[0176]
[0177] In the formula, w represents the weight value of the keyword; Q represents the text-related attribute; Γ represents the matching distance; θ represents the ratio between the adjustment matching distance and the weight value; t represents the keyword; o represents the keyword set; and i represents a constant.
[0178] S53. After the first review is completed, the virtual weighing calculation is performed on the goods, and the virtual weighing weight of the goods is compared with the actual weighing weight to achieve a second review of the cashier information.
[0179] It should be noted that after the initial review is completed, the virtual weight of the goods is calculated, and the virtual weight of the goods is compared with the actual weight to achieve a secondary review of the cashier information, including:
[0180] Virtual weighing: During the initial review stage, the basic information of the goods (such as product name, unit price, estimated weight, etc.) has been entered into the system. For each product, the system performs virtual weighing calculations based on the entered estimated weight information.
[0181] Actual weighing: During the checkout process, the goods are actually placed on the weighing device to obtain the actual weight.
[0182] The system automatically compares the virtual weighing weight with the actual weighing weight. The difference can be set within a tolerance range (e.g. ±5%). If the difference exceeds this range, the system will prompt for a review. If a major difference is found, the system can prompt the cashier or manager to conduct further manual review to determine the cause and make corresponding adjustments or corrections.
[0183] S54. If the comparison result between the virtual weighing weight and the actual weighing weight is within the preset error range, it means that the cashier information review is passed and the cashier information review result is obtained; if the comparison result exceeds the preset error range, it means that there is an error in the actual weighing weight and step S6 is executed.
[0184] It should be noted that different types of goods may have different natural fluctuations in weight. For example, the weight of fresh produce such as fruits and vegetables will vary greatly due to factors such as size and maturity, while the weight of packaged goods such as canned foods is relatively stable.
[0185] Based on these characteristics of the goods, the error range can be adjusted accordingly. A looser error range can be set for goods with large natural fluctuations, and a stricter error range can be set for goods with high stability.
[0186] S6. Extract the actual weighing weight and evaluate the dynamic error generated by the weighing device in combination with the usage frequency of the weighing device, and correct the cashier information review result based on the dynamic error.
[0187] It should be noted that the actual weighing weight is extracted and combined with the frequency of use of the weighing equipment to evaluate the dynamic error generated by the weighing equipment, and the cashier information review result is corrected based on the dynamic error:
[0188] When using weighing equipment for weighing operations, record the actual value of each weighing and the value displayed by the equipment, and collect a sufficient number of data samples to make an accurate assessment.
[0189] Calculate the frequency of use of the weighing equipment, including the number of times it is used per day, the continuous usage time, etc., and analyze whether the weighing equipment with high usage frequency may cause increased measurement errors due to wear or fatigue.
[0190] The collected data is analyzed and the possible dynamic errors of the weighing equipment are evaluated based on the deviation of the actual weighing weight from the preset error range and the frequency of use of the equipment, including statistical analysis of past measurement data to identify whether there are error patterns related to the frequency of use.
[0191] If the dynamic error of the weighing display device is significantly correlated with the frequency of use, the preset error range of the corresponding product can be adjusted to more accurately reflect the actual performance of the device.
[0192] Based on the adjusted error range, the comparison result between the actual weighing weight and the virtual weighing weight is recalculated, and the cashier information review result is corrected based on the comparison result.
[0193] Regularly monitor the performance and measurement accuracy of weighing equipment to promptly detect and correct new errors, and continuously optimize error range settings and equipment maintenance strategies based on continuous monitoring results.
[0194] The correction period is determined based on the results of the error assessment. The correction period refers to the time interval for correction operations on the weighing equipment. The appropriate correction period can be determined based on the error change trend and tolerance requirements.
[0195] According to the correction cycle, the weighing equipment is adjusted and corrected regularly. Specific correction operations include calibration, adjustment of sensors, repair of mechanical parts, etc. The purpose of correction is to reduce the dynamic error of the weighing equipment within the correction cycle and maintain accuracy.
[0196] like Figure 2 As shown, according to another embodiment of the present invention, there is also provided a weighing and cashiering review system based on artificial intelligence, the weighing and cashiering review system based on artificial intelligence comprises a data acquisition module 1, a weight prediction module 2, a commodity matching module 3, a cashiering information generation module 4, a cashiering information review module 5 and a dynamic error correction module 6;
[0197] The data acquisition module 1 is connected to the weight prediction module 2, the weight prediction module 2 is connected to the commodity matching module 3, the commodity matching module 3 is connected to the cashier information generation module 4, the cashier information generation module 4 is connected to the cashier information review module 5, and the cashier information review module 5 is connected to the dynamic error correction module 6;
[0198] Data acquisition module 1, used to connect the weighing equipment with the intelligent management platform and transmit the weighing data collected in real time to the intelligent management platform for analysis and processing;
[0199] The weight prediction module 2 is used to construct a prediction model to predict the weight of the additional items of the goods, and remove the weight of the additional items from the weighing data to obtain the net weight of the goods;
[0200] The commodity matching module 3 is used to identify and match the weighed commodities according to a pre-established commodity database to obtain the corresponding commodity unit price in the commodity database;
[0201] The cash register information generating module 4 is used to calculate the total price of the goods by combining the net weight of the goods with the unit price of the goods, and generate cash register information;
[0202] The cashier information review module 5 is used to review the cashier information using an artificial intelligence algorithm, compare and verify it with the information in the commodity database, and obtain the cashier information review result;
[0203] The dynamic error correction module 6 is used to extract the actual weighing weight and evaluate the dynamic error generated by the weighing device in combination with the usage frequency of the weighing device, and correct the cashier information review result based on the dynamic error.
[0204] In summary, with the help of the above-mentioned technical scheme of the present invention, the present invention predicts the weight of the additional items of the goods by constructing a prediction model, and removes the weight of the additional items from the weighing data, so as to improve the accuracy of the net weight of the goods. Since the weight of the additional items may interfere with the net weight of the goods, the net weight of the goods can be calculated more accurately by removing the weight of the additional items through the prediction model, thereby improving the accuracy of the weighing data. At the same time, by automatically predicting the weight of the additional items and removing them, the time and workload of manual processing can be reduced, and the efficiency of subsequent weighing and re-verification can be improved, thereby improving the accuracy of cashier re-verification and customer satisfaction, thereby enhancing the user's shopping experience and increasing the user's sense of trust. The present invention extracts keyword information from the cashier information through natural language processing technology, which can not only reduce the workload of manual extraction, but also improve efficiency and reduce error rate. At the same time, the keyword matching algorithm is used to match the extracted keyword information with the goods. The corresponding weighed commodity attribute information in the database is matched, and then the virtual weighing calculation is performed on the commodity to realize multi-level review of the cashier information, further improve the accuracy and data consistency, reduce the errors caused by weighing errors, and thus provide merchants with more reliable and efficient cashier services and improve customer satisfaction; the present invention constructs a discriminant velocity function modeling method for contour tracking, extracts visual features with superpixels as basic units, and integrates them into the construction of the discriminant appearance model, which can more effectively distinguish the contour of the commodity and the contour of the attachment, and at the same time fully utilizes the statistical information of the optical flow field to fuse with the appearance information at the decision layer, so as to generate a more reliable velocity function that is conducive to contour evolution and tracking, thereby improving the clarity of the commodity contour, thereby making the matching of the commodity contour more accurate, avoiding the interference caused by similar backgrounds, background blur and partial occlusion, and having strong effectiveness and robustness.
[0205] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A weighing and cashier review method based on artificial intelligence, characterized in that: The weighing and cashier review method based on artificial intelligence includes the following steps: S1. Connect the weighing equipment to the intelligent management platform, and transmit the real-time collected weighing data to the intelligent management platform for analysis and processing; S2. Build a prediction model to predict the weight of the additional items of the product, and remove the weight of the additional items from the weighing data to obtain the net weight of the product; S3, identifying and matching the weighed goods according to a pre-established goods database to obtain the corresponding unit price of the goods in the goods database; S4. Calculate the total price of the goods by combining the net weight of the goods with the unit price of the goods, and generate cashier information; S5. Use artificial intelligence algorithms to review the cashier information, compare and verify it with the information in the product database, and obtain the cashier information review result; S6. Extract the actual weighing weight and evaluate the dynamic error generated by the weighing device in combination with the usage frequency of the weighing device, and correct the cashier information review result based on the dynamic error.
2. According to the artificial intelligence-based weighing and cashier review method of claim 1, it is characterized in that: The method of constructing a prediction model to predict the weight of the additional items of the commodity and removing the weight of the additional items from the weighing data to obtain the net weight of the commodity includes the following steps: S21, obtaining the weighing data of the commodity and the corresponding additional information, calculating the weight characteristics of the additional information, and establishing a weight prediction model based on the weight characteristics; S22, using the weighing data of the commodity as the input of the weight prediction model, and using the weight prediction model to predict the weight of the additional items corresponding to the commodity; S23. The predicted weight of the additional items is removed from the weighing data to obtain the net weight of the goods, and the net weight of the goods is used as the actual weighing weight of the goods.
3. The method for cashier weighing and verification based on artificial intelligence according to claim 2 is characterized in that: The step of obtaining the weighing data of the commodity and the corresponding additional information, calculating the weight characteristics of the additional information, and establishing a weight prediction model based on the weight characteristics comprises the following steps: S211, collecting commodity images and performing binarization processing on the commodity images, extracting contours of the binarized commodity images, and obtaining the contours of the commodity and the contours of the attachments; S212, traversing the convex hull points of the contour of the attachment, forming a contour line with the convex hull points, and then using a convex hull function to obtain the convex hull contour of the attachment; S213, calculating the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour in the OpenCV open source library; S214, respectively converting the perimeter data, area data and minimum circumscribed circle diameter data of the convex hull contour and calculating a proportional factor, and then calculating the weight characteristic data of the attached object based on the proportional factor; S215, calculating the volume data of the convex hull contour based on the minimum circumscribed circle diameter data, and constructing a first prediction model in combination with the volume data; S216, using the perimeter data and area data of the convex hull contour as input, and the weight feature data of the attached object as output, to construct a second prediction model; S217. Use a deep learning algorithm to perform deep fitting on the first prediction model and the second prediction model to form a weight prediction model.
4. The method for cashier weighing and checking based on artificial intelligence according to claim 3 is characterized in that: The identification and matching of the weighed commodities according to the pre-established commodity database to obtain the corresponding commodity unit price in the commodity database includes the following steps: S31. Construct a discriminant appearance model based on nonparametric kernel density and integrate the product profile into the discriminant appearance model; S32, using the statistical characteristics of the optical flow field to formulate an adaptive threshold selection mechanism, and analyzing the relative movement of the product outline and the attached object outline to obtain the optical flow velocity field of the product outline evolution; S33, performing decision-layer fusion appearance in a semi-naive Bayes framework, updating the optical flow velocity field into a discriminative optical flow velocity field and using it to guide product contour tracking; S34, integrating the product profile tracking information into the product profile to obtain the comprehensive profile features of the product, and performing similarity calculations with the products in the pre-established database respectively; S35, sorting the similarity calculation results, determining the product with the most similar comparison results as the best matching product, and obtaining the corresponding product unit price from the product database.
5. The method for cashier weighing and checking based on artificial intelligence according to claim 4 is characterized in that: The method of formulating an adaptive threshold selection mechanism by using the statistical characteristics of the optical flow field and analyzing the relative movement of the product outline and the appendage outline to obtain the optical flow velocity field of the product outline evolution includes the following steps: S321, performing dense optical flow calculation on the product outline and the additional object outline respectively, and calculating the pixel displacement between adjacent frames in the product image to generate an optical flow velocity field; S322, converting the product image into an optical flow field image, and performing superpixel segmentation on it using the SLIC algorithm, adopting a hierarchical local-to-global strategy to obtain an optical flow direction histogram, and then using the statistical characteristics of the optical flow field to obtain a product contour template of the product contour; S323, performing a dot multiplication operation on the product outline template and the optical flow velocity field to obtain an optical flow gray value vector of the product outline and the additional object outline; S324, using the maximum likelihood method to calculate two normal distributions of the product profile and the additional product profile, and applying the semi-naive Bayesian framework under the condition of equal prior probability to calculate the maximum posterior probability by maximizing the likelihood function; S325 , constraining the maximized posterior probability to a preset interval, normalizing it, obtaining an evolution speed function, and acquiring an optical flow speed field of the product profile evolution.
6. The method for cashier weighing and checking based on artificial intelligence according to claim 5 is characterized in that: The method of reviewing the cashier information by using an artificial intelligence algorithm, comparing and verifying the cashier information with the information in the commodity database, and obtaining the cashier information review result comprises the following steps: S51, parsing the cash register information, and extracting keyword information from the cash register information using natural language processing technology; S52, using a keyword matching algorithm to match the keyword information with the corresponding weighed commodity attribute information in the commodity database, thereby realizing the initial review of the cash register information; S53. After the first review is completed, the virtual weighing calculation is performed on the goods, and the virtual weighing weight of the goods is compared with the actual weighing weight to realize the second review of the cashier information; S54. If the comparison result between the virtual weighing weight and the actual weighing weight is within the preset error range, it means that the cashier information review is passed and the cashier information review result is obtained; if the comparison result exceeds the preset error range, it means that there is an error in the actual weighing weight and step S6 is executed.
7. The method for cashier weighing and verification based on artificial intelligence according to claim 6 is characterized in that: The method of matching the keyword information with the corresponding weighed commodity attribute information in the commodity database by using the keyword matching algorithm to realize the initial review of the cash register information includes the following steps: Convert cashier information into a keyword sequence, create a jump table and a check table, calculate the hash value of the cashier information, and check the value of the jump table; Inspection checklist; Calculate the text-related attributes of the relative positions of the commodity attribute information in the commodity database, and check the keyword sequence with the text-related attributes.
8. The method for cashier weighing and checking based on artificial intelligence according to claim 7 is characterized in that: The jump table is used to determine the jump distance during the search process; The checklist is used to verify the accuracy of keyword matching.
9. The method for cashier weighing and checking based on artificial intelligence according to claim 8 is characterized in that: The calculation formula of the text-related attributes is: In the formula, w represents the weight value of the keyword; Q represents text-related attributes; Γ represents the matching distance; θ represents the ratio between the adjusted matching distance and the weight value; t indicates a keyword; o represents a keyword set; i represents a constant.
10. An artificial intelligence-based weighing and cashiering review system, used to implement the artificial intelligence-based weighing and cashiering review method described in any one of claims 1 to 9, characterized in that: The weighing and cashier review system based on artificial intelligence includes a data acquisition module, a weight prediction module, a commodity matching module, a cashier information generation module, a cashier information review module and a dynamic error correction module; The data acquisition module is connected to the weight prediction module, the weight prediction module is connected to the commodity matching module, the commodity matching module is connected to the cashier information generation module, the cashier information generation module is connected to the cashier information review module, and the cashier information review module is connected to the dynamic error correction module; The data acquisition module is used to connect the weighing equipment with the intelligent management platform and transmit the weighing data collected in real time to the intelligent management platform for analysis and processing; The weight prediction module is used to construct a prediction model to predict the weight of the additional items of the goods, and remove the weight of the additional items from the weighing data to obtain the net weight of the goods; The commodity matching module is used to identify and match the weighed commodities according to a pre-established commodity database to obtain the corresponding commodity unit price in the commodity database; The cash register information generating module is used to calculate the total price of the goods by combining the net weight of the goods with the unit price of the goods, and generate cash register information; The cashier information review module is used to review the cashier information using an artificial intelligence algorithm, compare and verify it with the information in the commodity database, and obtain a cashier information review result; The dynamic error correction module is used to extract the actual weighing weight and evaluate the dynamic error generated by the weighing device in combination with the usage frequency of the weighing device, and correct the cashier information review result based on the dynamic error.