Dynamic and static combined fruit and vegetable commodity identification method, server, medium and program product

Through the identification method of combining dynamic and static, dynamic and static fruit and vegetable recognition models, combined with optical and deep learning technology, the problem of insufficient fruit and vegetable recognition accuracy and stability in the existing technology is solved, and more efficient and accurate fruit and vegetable recognition is achieved.

CN119904862AInactive Publication Date: 2025-04-29XIAMEN HEMA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510404834.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-04-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When identifying fruit and vegetable products, the prior art is interfered with by complex lighting conditions, reflection and shadows, resulting in insufficient recognition accuracy and stability.

Method used

The recognition method of combining dynamic and static is adopted to obtain dynamic and static image information through the camera, and the dynamic and static fruit and vegetable recognition models are used for identification respectively. Dynamic image information reflects the characteristics of fruits and vegetables when they are moving, and static image information reflects the characteristics of fruits and vegetables when they are still. The two types of information are analyzed through deep learning training models to finally determine the final information of fruits and vegetables.

Benefits of technology

The accuracy and stability of fruit and vegetable identification are improved. Through the combination of dynamic and static information, the error caused by a single information source is reduced and the recognition quality of the identification system is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904862A_ABST
    Figure CN119904862A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic and static combined fruit and vegetable commodity identification method, a server, a medium and a program product, and relates to the technical field of commodity identification. The method comprises the following steps: acquiring image information of a target fruit and vegetable commodity by using a camera, acquiring multi-frame continuous dynamic image information when the target fruit and vegetable commodity moves, and acquiring single-frame or multi-frame static image information when the target fruit and vegetable commodity is relatively static; then, first fruit and vegetable information is determined according to the dynamic image information by means of a dynamic fruit and vegetable recognition model constructed through deep learning training based on a large amount of labeled fruit and vegetable motion image data in advance; meanwhile, through a static fruit and vegetable identification model trained based on labeled fruit and vegetable static image data, second fruit and vegetable information is determined in combination with static image information, and finally, when the first fruit and vegetable information is consistent with the second fruit and vegetable information, the first fruit and vegetable information is determined as final information of the target fruit and vegetable commodity, so that more accurate fruit and vegetable commodity identification can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of commodity identification, and in particular to a method, server, medium and program product for combining dynamic and static fruit and vegetable commodity identification. Background Art

[0002] With the development of retail industries such as supermarkets and fresh food stores, improving the efficiency and accuracy of fruit and vegetable settlement has become the key to optimizing customer shopping experience and improving operational efficiency.

[0003] At present, there are many fruit and vegetable recognition algorithms on the market, such as the vegetable recognition algorithm based on the improved YOLOv3. By optimizing the structure of the YOLOv3 model and training a large amount of vegetable image data, it can quickly locate and identify vegetable targets to a certain extent. Its principle is to use the convolutional neural network in the model to extract and analyze image features, and can achieve real-time detection of a variety of vegetables during the detection process. The vegetable and fruit type recognition algorithm based on the deep learning network uses the powerful feature learning ability of the deep neural network to perform multi-layer feature extraction and abstraction on the image data of vegetables and fruits. It can mine information from multiple dimensions such as color, texture, and shape of the image to determine the type of vegetables and fruits.

[0004] However, when encountering scenes with complex lighting conditions, such as natural light at different times or in an environment with uneven artificial lighting, factors such as reflections and shadows on the surface of vegetables will interfere with the model's accurate extraction of vegetable features, resulting in a decrease in recognition accuracy. Therefore, although the algorithms in the prior art can identify fruit and vegetable types, there is still room for improvement in recognition accuracy and stability. Summary of the invention

[0005] The present application provides a method, server, medium and program product for identifying fruit and vegetable commodities by combining dynamic and static methods, which are used to accurately and efficiently identify fruit and vegetable commodities.

[0006] In a first aspect, the present application provides a method for identifying fruit and vegetable products by combining motion and stillness, which is applied to a server. The method comprises: obtaining dynamic image information and still image information of a target fruit and vegetable product through a camera, wherein the dynamic image information is a plurality of frames of continuous image information collected during the movement of the target fruit and vegetable product, and the still image information is a single frame or a plurality of frames of image information collected when the fruit and vegetable product is in a relatively static state; combining the dynamic image information, determining first fruit and vegetable information through a dynamic fruit and vegetable recognition model, wherein the dynamic fruit and vegetable recognition model is constructed in advance based on a plurality of different fruit and vegetable motion image data with annotations through deep learning training; combining the still image information, determining second fruit and vegetable information through a static fruit and vegetable recognition model, wherein the static fruit and vegetable recognition model is constructed in advance based on a plurality of different fruit and vegetable still image data with annotations through deep learning training; if the first fruit and vegetable information is equal to the second fruit and vegetable information, determining the final fruit and vegetable information of the target fruit and vegetable product.

[0007] By adopting the above technical solution, the dynamic and static image information of the target fruit and vegetable products is obtained through the camera, and the image information in different states is used for identification. The dynamic image information reflects the characteristics of fruits and vegetables when they are in motion, and the static image information reflects the characteristics when they are relatively still. The dynamic and static fruit and vegetable recognition models are respectively based on the different fruit and vegetable motion and static image data with annotations and trained through deep learning. In this way, the information of fruits and vegetables in different states can be fully utilized and identified through multi-dimensional information. When the first fruit and vegetable information and the second fruit and vegetable information are equal, the final fruit and vegetable information is determined, which can not only improve the accuracy of identification, but also can verify each other, avoiding the errors that may be caused by a single information source, thereby achieving more accurate fruit and vegetable product identification and improving the recognition quality of the entire recognition system.

[0008] In combination with some embodiments of the first aspect, in some embodiments, the step of obtaining dynamic image information and static image information of the target fruit and vegetable product through a camera specifically includes: detecting whether the target fruit and vegetable product enters a set detection range through multiple sensors; if so, controlling the camera to take pictures of the target fruit and vegetable product at a set time interval to determine the dynamic image information; calculating the center coordinate difference of the fruits and vegetables in each frame of the dynamic image information; if the center coordinate difference is less than a set coordinate threshold, determining that the target fruits and vegetables are in a stable state; and determining the last frame of the dynamic image information as the static image information.

[0009] By adopting the above technical solution, multiple sensors are used to detect whether the target fruit and vegetable products have entered the set detection range, and the fruits and vegetables to be identified can be accurately located. The center coordinate difference of the fruits and vegetables in each frame of dynamic image information is calculated and compared with the set coordinate threshold, which can accurately determine whether the fruits and vegetables are stable. The last frame of the dynamic image is used as static image information, which not only makes full use of the information in the motion process, but also cleverly realizes the conversion from dynamic to static, providing a comprehensive and orderly data foundation for the subsequent recognition process, making the recognition process smoother and more accurate.

[0010] In combination with some embodiments of the first aspect, in some embodiments, if the confidence data is lower than the set confidence threshold, then after the step of sending an error message to the user terminal, it also includes: after determining the three recognition results with the highest confidence based on the confidence data, sending the recognition results to the user terminal; receiving the first selection instruction sent by the user terminal to determine the final fruit and vegetable information.

[0011] By adopting the above technical solution, the reliability of the recognition result can be evaluated to avoid outputting inaccurate information as the final result, thereby improving the reliability of the entire recognition system.

[0012] In combination with some embodiments of the first aspect, in some embodiments, if the confidence data is lower than the set confidence threshold, then after the step of sending an error message to the user terminal, it also includes: determining three recognition results with the highest confidence based on the confidence data; receiving a selection instruction sent by the user terminal to determine the final fruit and vegetable information.

[0013] By adopting the above technical solution, when the recognition result is uncertain, the system can provide users with more valuable information, allow users to participate in decision-making, make full use of users' judgment ability, combine users' experience and cognition, and maximize the accuracy of the final fruit and vegetable information when the system cannot make an accurate judgment, thereby improving users' trust in the system and usage experience.

[0014] In combination with some embodiments of the first aspect, in some embodiments, if the first fruit and vegetable information is equal to the second fruit and vegetable information, after the step of determining the final fruit and vegetable information of the target fruit and vegetable commodity, the method further includes: if the first fruit and vegetable information is different from the second fruit and vegetable information, sending the first fruit and vegetable information and the second fruit and vegetable information to a user terminal for user selection; after receiving the second selection instruction sent by the user terminal, determining the final fruit and vegetable information.

[0015] By adopting the above technical solution, possible differences in system recognition results are fully taken into account, allowing users to make judgments based on actual conditions, achieving human-computer collaboration, ensuring the accuracy of the final fruit and vegetable information, and avoiding errors caused by inconsistent system recognition results.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining the second fruit and vegetable information through a static fruit and vegetable recognition model in combination with the static image information, the method further includes: if the first fruit and vegetable information is equal to the second fruit and vegetable information, determining the fruit and vegetable weight information of the target fruit and vegetable product through a weight sensor; determining the fruit and vegetable volume information and the fruit and vegetable quantity of the target fruit and vegetable product according to the dynamic image information; and determining the final fruit and vegetable information in combination with the fruit and vegetable weight information, the fruit and vegetable volume information, the fruit and vegetable quantity, and a preset fruit and vegetable information database.

[0017] By adopting the above technical solution, multi-dimensional information is fully integrated, and information such as weight, volume and quantity complements the image information, providing more comprehensive information support for the final fruit and vegetable information. It not only improves the integrity of the information, but also can more accurately reflect the actual situation of fruit and vegetable commodities through comprehensive consideration of multi-dimensional information, and achieve more accurate identification and information determination.

[0018] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining the final fruit and vegetable information by combining the fruit and vegetable weight information, the fruit and vegetable volume information, the fruit and vegetable quantity and a preset fruit and vegetable information database, the step also includes: determining a fruit and vegetable type recognition model based on historical fruit and vegetable commodity identification information and corresponding historical fruit and vegetable cashier results within a set time period in different previous seasons, the historical fruit and vegetable commodity identification information at least including the fruit and vegetable volume information and the fruit and vegetable type; determining current season information, inputting the current season information and the fruit and vegetable volume information of the target fruit and vegetable commodity into the fruit and vegetable type recognition model to determine the target fruit and vegetable type; and adjusting the final fruit and vegetable information according to the target fruit and vegetable type.

[0019] By adopting the above technical solution, historical data and seasonal information are fully utilized, and the differences in the characteristics of fruits and vegetables in different seasons are taken into consideration, so that the final fruit and vegetable information is more in line with the actual situation, and the recognition results can be adjusted according to seasonal characteristics, thereby improving the accuracy and pertinence of the recognition results, and enhancing the adaptability and recognition effect of the system in different seasons.

[0020] In a second aspect, the present application provides a server, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the server to execute the method described in the first aspect and any possible implementation of the first aspect.

[0021] In a third aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a server, causes the server to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, the present application provides a computer program product, which, when executed on a server, enables the server to execute the method described in the first aspect and any possible implementation manner of the first aspect.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Since a dynamic and static image information acquisition method is adopted, and dynamic and static fruit and vegetable recognition models are obtained through deep learning training based on annotated fruit and vegetable image data in different states, the problem of inaccurate fruit and vegetable recognition caused by a single information source or incomplete recognition model in the prior art is effectively solved, thereby achieving more accurate fruit and vegetable commodity recognition and improving the recognition quality of the entire recognition system.

[0024] 2. The use of multiple sensors to detect the target fruits and vegetables entering the range and control the camera to take pictures at time intervals, as well as calculating the difference in the center coordinates of fruits and vegetables in the dynamic image to determine the static image information, effectively solves the problem of disordered and incomplete image information collection in the prior art, thereby achieving comprehensiveness and orderliness of information collection, providing a more accurate data basis for subsequent identification, and making the identification process smoother and more accurate.

[0025] 3. The system combines historical fruit and vegetable commodity identification information, historical fruit and vegetable checkout results and current season information, and uses the fruit and vegetable volume information to adjust the final fruit and vegetable information through the constructed fruit and vegetable type identification model. Therefore, the problem of inaccurate fruit and vegetable identification results caused by not considering seasonal factors in the existing technology is effectively solved, and the identification results are adjusted according to the characteristics of different seasons, which improves the accuracy and pertinence of the identification results and enhances the adaptability and recognition effect of the system in different seasons. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of a method for identifying fruit and vegetable products by combining motion and stillness in an embodiment of the present application; Figure 2 It is another flowchart of the method for identifying fruit and vegetable products by combining motion and stillness in an embodiment of the present application; Figure 3 It is a schematic diagram of a physical device structure of a server in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0029] For ease of understanding, the following is a description of the process of the method provided by this implementation. Figure 1 , is a flow chart of a method for identifying fruit and vegetable products by combining static and dynamic methods in an embodiment of the present application.

[0030] S101, acquiring dynamic image information and static image information of a target fruit and vegetable product through a camera, wherein the dynamic image information is multiple frames of continuous image information collected during the movement of the target fruit and vegetable product, and the static image information is single frame or multiple frames of image information collected when the fruit and vegetable product is in a relatively static state; The server will first send detection instructions to multiple sensors deployed in the fruit and vegetable display area. These sensors can be infrared sensors or pressure sensors. Taking infrared sensors as an example, when the target fruit and vegetable products enter their detection range, the infrared rays are blocked, and the photoelectric conversion device inside the sensor will produce an electrical signal change. The sensor sends this change signal to the server. After receiving the sensor signal, the server will analyze the data in real time. The server pre-sets the sensor's detection range and trigger conditions. When the data transmitted by the sensor indicates that the infrared rays are blocked and the duration exceeds a certain threshold (such as 50 milliseconds, which can be adjusted according to the actual scene), the server determines that the target fruit and vegetable products have entered the set detection range. In order to ensure the accuracy of the detection, the server will use multi-sensor fusion technology and combine the pressure sensor data. If the pressure sensor also detects a certain pressure change, and the change trend matches the object entry detected by the infrared sensor, the server further confirms that the target fruit and vegetable products have entered the detection range. When the server determines that the target fruit and vegetable products have entered the detection range, it starts to control the camera to shoot. The server and the camera are connected and communicated through a network protocol or a dedicated image transmission interface. The server pre-sets the shooting time interval. The setting of this time interval needs to take into account many factors. The server sends a shooting command to the camera at a set time interval. Before sending the command, the server will check the working status of the camera to ensure that the camera is in a normal shooting state. After receiving the shooting command from the server, the camera quickly captures the dynamic image of the target fruit and vegetable product during the moving process and transmits the image data back to the server in the form of a digital signal.

[0031] After receiving the dynamic image information, the server uses a special image recognition algorithm to calculate the difference in the center coordinates of the fruits and vegetables in each frame. The server uses a contour extraction algorithm based on threshold segmentation to preprocess the image. By setting an appropriate pixel threshold, the fruits and vegetables are separated from the background. For fruits and vegetables of different colors, the server can select different threshold ranges according to their color characteristics. For green vegetables, the threshold range of the green component can be set in the RGB color space to separate the vegetables from the background. After obtaining the contours of the fruits and vegetables, the server uses a geometric algorithm to calculate their center coordinates. A common method is to calculate the centroid coordinates of the contour, and perform a weighted average of the coordinates of each pixel on the contour, with the weight being the gray value (for grayscale images) or color component value (for color images) of the pixel. The result is the center coordinates of the fruits and vegetables. When calculating the center coordinate difference, the server compares the center coordinates of the current frame with the center coordinates of the previous frame. In order to improve computing efficiency, the server can use parallel computing technology to use the parallel computing capabilities of multi-core processors or graphics processing units (GPUs) to simultaneously process the center coordinate calculation and difference calculation of multiple frames of images. The server will filter the calculated center coordinate difference to remove abnormal differences caused by image noise or shooting jitter. The median filter algorithm is used to sort the center coordinate differences of several consecutive frames and take the middle value as the effective center coordinate difference of the current frame to improve the stability and reliability of the data.

[0032] After obtaining the center coordinate difference of fruits and vegetables in each frame of dynamic image, the server will compare it with the pre-set coordinate threshold. The setting of this coordinate threshold needs to be optimized according to the actual application scenario. In the fruit and vegetable recognition scenario in the supermarket, if the target fruit and vegetable products move slowly in the hands of the customer, the server can set the coordinate threshold to 5 pixels (X-axis and Y-axis direction). The server determines whether the center coordinate difference is less than the set coordinate threshold through a simple numerical comparison operation. If the center coordinate difference is less than the set coordinate threshold in multiple consecutive frames (such as 5 frames), the server determines that the target fruit and vegetable is in a stable state.

[0033] In order to avoid misjudgment due to accidental factors, the server will also make a comprehensive judgment based on other information. The server can analyze the posture changes of fruits and vegetables in the image. If the posture of the fruits and vegetables remains basically unchanged in several consecutive frames and the center coordinate difference is also less than the threshold, then it is further confirmed that the target fruits and vegetables are in a stable state. The server can also refer to the time factor. If the state where the center coordinate difference is less than the threshold lasts for more than a certain period of time (such as 200 milliseconds), it will finally determine that the target fruits and vegetables are in a stable state.

[0034] When the server determines that the target fruit and vegetable is in a stable state, it will determine the last frame of the dynamic image information as static image information. The server will first mark this frame of image, separate it from the dynamic image sequence and determine it as a static image. The server will store this frame of static image information in a dedicated cache area, waiting for subsequent recognition processing. During the storage process, the server will add relevant metadata to this frame of image, such as shooting time, shooting equipment information, sensor information that detects the entry of target fruits and vegetables, etc., to facilitate subsequent management and query of images.

[0035] S102, determining first fruit and vegetable information by using a dynamic fruit and vegetable recognition model in combination with the dynamic image information, wherein the dynamic fruit and vegetable recognition model is constructed in advance by deep learning training based on a plurality of different fruit and vegetable motion image data with annotations; After acquiring the dynamic image information, the server inputs it into the dynamic fruit and vegetable recognition model, which is built by the server based on the deep learning framework. During the training phase, the server reads data from a large number of annotated fruit and vegetable motion image datasets. These datasets contain images of various fruits and vegetables in different motion states, different lighting conditions, and different angles, and each image is annotated with the corresponding fruit and vegetable type, variety, and other information.

[0036] The server uses convolutional neural networks (CNNs) to extract features from these image data. The convolution layer in CNN slides over the image through the convolution kernel to extract local features of the image, such as texture and shape. For example, for a dynamic image of an apple, the convolution layer can extract the texture features of the apple surface and the shape change features during movement. The pooling layer performs dimensionality reduction processing on the features extracted by the convolution layer to reduce the amount of data while retaining key features.

[0037] After multiple layers of convolution and pooling operations, the server inputs the extracted features into the fully connected layer for classification and identification. The fully connected layer calculates the probability values ​​belonging to different fruit and vegetable categories based on the previously extracted features. For example, after calculation, if the model believes that the fruits and vegetables in the dynamic image have a 90% probability of being apples, a 5% probability of being oranges, and a 5% probability of being other fruits, then apples are the predicted result with the highest probability. The server temporarily stores this prediction result as the first fruit and vegetable information. When training the dynamic fruit and vegetable recognition model, the server uses the back propagation algorithm to continuously adjust the model's parameters to minimize the error between the model's prediction results and the labeled information.

[0038] S103, determining the second fruit and vegetable information by using a static fruit and vegetable recognition model in combination with the static image information, wherein the static fruit and vegetable recognition model is constructed in advance by deep learning training based on a plurality of different annotated still image data of fruits and vegetables; After the server obtains the static image information, it also inputs it into the static fruit and vegetable recognition model. The construction and training principles of the static fruit and vegetable recognition model are similar to those of the dynamic fruit and vegetable recognition model. However, due to the different characteristics of static images and dynamic images, the parameters and structure of the model may be adjusted in a targeted manner. When training the static fruit and vegetable recognition model, the server uses a large number of annotated still image datasets of different fruits and vegetables. These datasets cover static images of various fruits and vegetables at different placement angles and backgrounds, and also annotate detailed fruit and vegetable information. The server also uses a deep learning framework and uses a convolutional neural network to extract features from static images.

[0039] For static images, more attention is paid to stable features such as shape and color. For example, when identifying bananas, the convolutional layer can accurately extract the unique curved shape and yellow color features of bananas. Unlike the dynamic fruit and vegetable recognition model, the static fruit and vegetable recognition model can appropriately add some convolutional layers with larger receptive fields to better capture the global features in the image. Convolutional layers with larger receptive fields can see larger areas in the image, which is more helpful for identifying the overall shape and layout of fruits and vegetables.

[0040] After being processed by the convolutional layer and the pooling layer, the server inputs the extracted features into the fully connected layer for classification prediction. The fully connected layer calculates the probability that the fruits and vegetables in the static image belong to different categories based on the features. The category with the highest probability is the prediction result, and the server uses it as the second fruit and vegetable information.

[0041] S104: If the first fruit and vegetable information is equal to the second fruit and vegetable information, determining final fruit and vegetable information of the target fruit and vegetable commodity.

[0042] After the server completes the determination of the first fruit and vegetable information and the second fruit and vegetable information, it enters the critical comparison and final information determination stage. The server will first compare the first fruit and vegetable information and the second fruit and vegetable information field by field. Since these two information contain multi-dimensional data such as the type, variety, possible origin of fruits and vegetables, the server uses a string matching algorithm to compare the text fields in the information. For example, a dynamic programming algorithm is used to calculate the similarity of two strings to determine whether the information such as "Apple (Red Fuji, Shandong)" is completely consistent; for numerical data, such as the predicted fruit size, weight range, etc., a direct numerical comparison is performed.

[0043] If the first fruit and vegetable information is exactly the same as the second fruit and vegetable information, the server will not directly determine it as the final fruit and vegetable information, but will further evaluate the reliability of this result. The server will retrieve the performance data of the two recognition models during training and past recognition from the storage system, including accuracy, recall, recognition stability in different scenarios, etc. For example, check the recognition history of the dynamic fruit and vegetable recognition model under similar lighting conditions and similar motion speeds, and the recognition of the static fruit and vegetable recognition model under similar placement angles and background environments. If the recognition accuracy of the two models in the relevant scenarios is high and the recall rate is in line with expectations, this indicates that the recognition result is relatively reliable. Next, the server will also make a comprehensive judgment based on the current environmental data, which includes but is not limited to the light intensity, temperature, humidity, etc. when the image is collected. The server can obtain these real-time data by connecting to environmental sensors, such as using light sensors to obtain light intensity values, and temperature and humidity sensors to obtain temperature and humidity data. If the recognition process is in an environment with large changes in lighting, the server will be more vigilant even if the recognition results of the two models are consistent. Because the lighting factor may affect the image quality, and thus affect the accuracy of recognition. At this time, the server will appropriately reduce the trust in the recognition result according to the preset rules and take additional verification measures.

[0044] As an additional verification measure, the server can search for other fruits and vegetables with similar appearance and features to the currently identified fruits and vegetables from local or cloud databases to compare their identification difficulty in the current environment. For example, if the current identification is an orange, but the database shows that the identification of oranges and certain citrus fruits is easily confused under the current lighting and humidity conditions, the server will extract and analyze the features of the image again, focusing on the difference between the two, such as the shape of the navel of the orange and the skin texture of the citrus.

[0045] When the server considers various factors and confirms that the recognition result is reliable, it will determine the first (or second, because the two are the same) fruit and vegetable information as the final fruit and vegetable information of the target fruit and vegetable product. After determining the final information, the server will store this result in a local database or a commodity identification record system in the cloud. When storing, in addition to recording the final fruit and vegetable information, key data in the recognition process will also be saved, such as the collected images, the version of the recognition model, environmental data, etc., for subsequent query, statistics and analysis. At the same time, the server will send the final fruit and vegetable information to other receiving devices connected to it, such as the cash register system, inventory management system, etc. After receiving the data, the receiver obtains accurate fruit and vegetable information. In this way, the cash register system can accurately price according to the final fruit and vegetable information, and the inventory management system can also update the inventory data in a timely manner to achieve efficient operation of the entire retail business process.

[0046] After discovering that the first and second fruit and vegetable information are inconsistent, the server will sort out the two sets of information. Since the information contains multi-dimensional data such as fruit and vegetable types, varieties, and possible origins, the server needs to convert it into a format that is easy for users to understand. The server will sort out information such as "Apple (Red Fuji, Shandong)" and "Apple (Snake, United States)" into clear text descriptions, such as "The first recognition result is Red Fuji apple, originating from Shandong; the second recognition result is Snake, originating from the United States". For numerical data, such as predicted fruit size and weight range, the server will also perform normalization processing and present it to the user in an intuitive form, such as "Predicted fruit weight range: Red Fuji is 180-250 grams, and Snake is 200-300 grams". The server communicates with the client through the network, encapsulates the sorted first and second fruit and vegetable information into data packets that meet the network transmission specifications and sends them to the client. The client here can be a display terminal for staff operation. After the client receives the two sets of fruit and vegetable information sent by the server, the user, such as the staff, can make a choice based on the actual situation and issue a second selection instruction. The server continuously monitors the command transmission of the client through the network. After receiving the instruction data packet, the server first unpacks the data packet and extracts the instruction content. Since the instruction may contain the selected fruit and vegetable information identifier, instruction sending time and other data, the server will accurately parse which group of fruit and vegetable information the user has selected according to the pre-set format specification. After the server parses the information selected by the user, it determines it as the final fruit and vegetable information.

[0047] In some embodiments, when identifying fruits and vegetables, the recognition model will output the corresponding fruit and vegetable information based on the input image, weight and other multi-dimensional information, and will also give the confidence of the recognition result. Confidence is a numerical value indicating the reliability of the recognition result, usually presented in the form of a percentage. The higher the value, the more reliable the recognition result. If the server adopts a recognition model based on machine learning or deep learning, such as a convolutional neural network (CNN), the model will simultaneously output the probability distribution of the prediction result when making a prediction. For example, for the first fruit and vegetable information, the model may output that the probability of "apple" is 80%, the probability of "pear" is 10%, and the probability of "orange" is 10%, then the confidence of the recognition result of "apple" is 80%. In order to ensure the reliability of the recognition result, the server will pre-set a confidence threshold. When the confidence data of the first fruit and vegetable information or the second fruit and vegetable information is lower than this threshold, it means that the reliability of the recognition result is low and there may be errors. The server will immediately send an error message to the user end, and the error message may include the confidence of the recognition result, possible problems, etc. After receiving the error message, the user end can perform corresponding operations according to the prompts, such as reshooting the fruit and vegetable image, checking the sensor data, etc. At the same time, the server will sort all the recognition results (including the first fruit and vegetable information and the second fruit and vegetable information, etc.) according to the confidence, and sort them by traversing the confidence data of all recognition results using a sorting algorithm (such as bubble sort, quick sort, etc.) to find the three recognition results with the highest confidence. The server sends the three recognition results with the highest confidence to the user end, and the user end displays this information to the user. The user can select one of the three recognition results as the final fruit and vegetable information according to the actual situation, and send the first selection instruction to the server through the user end. The first selection instruction can be a simple identifier to indicate which recognition result the user has selected. For example, the three recognition results sent by the server are "apple", "pear" and "orange", and the user selects "apple". The user end will send a first selection instruction containing the "apple" identifier to the server.

[0048] After receiving the first selection instruction, the server will determine the final fruit and vegetable information according to the identifier in the instruction. Then, the server can apply the final fruit and vegetable information to subsequent business processes, such as pricing in the cash register system, updating of the inventory management system, etc.

[0049] Since a dynamic and static image acquisition method is adopted, and dynamic and static fruit and vegetable recognition models are trained based on labeled fruit and vegetable image data in different states, and comprehensive judgments are made in many aspects when determining the final fruit and vegetable information, it is possible to obtain and analyze the characteristic information of fruits and vegetables from multiple dimensions, improve the accuracy and reliability of recognition, and effectively solve the problems in the prior art of inaccurate fruit and vegetable recognition caused by a single information source or incomplete recognition model, great interference from environmental factors, and inability to effectively verify the recognition results, thereby achieving more accurate fruit and vegetable commodity recognition.

[0050] After combining the above content, the following is a more detailed description of the process of the method provided by this implementation. Figure 2 , is another flow chart of the method for identifying fruit and vegetable products by combining motion and stillness in an embodiment of the present application.

[0051] S201: If the first fruit and vegetable information is equal to the second fruit and vegetable information, determining the fruit and vegetable weight information of the target fruit and vegetable commodity by using a weight sensor; When the server determines that the first fruit and vegetable information is consistent with the second fruit and vegetable information, it starts the process of obtaining the weight information of the target fruit and vegetable products. The server will first send an activation command to the connected weight sensor, which is usually installed below the fruit and vegetable placement area, such as the load-bearing tray of a supermarket shelf or inside the weighing device at the checkout counter. Taking the common resistive strain type weight sensor as an example, its working principle is to cause the resistance strain gauge to deform based on pressure, thereby changing the resistance value, and calculating the weight of the object by measuring the change in resistance value. When the target fruit and vegetable product is placed in the sensing area of ​​the sensor, the Wheatstone bridge inside the sensor will convert the change in resistance value into a voltage signal output.

[0052] The server is connected to the weight sensor through a dedicated analog-to-digital conversion (ADC) interface, converting the analog voltage signal output by the sensor into a digital signal for processing. To ensure the accuracy of the measurement, the server will filter the collected weight data to remove noise signals caused by environmental interference.

[0053] In the process of obtaining weight information, the server also monitors the working status of the weight sensor in real time. It will periodically send detection instructions to the sensor, requiring the sensor to return its own working parameters, such as power supply voltage, zero offset, etc. If the server detects that the working parameters of the sensor are out of the normal range, it will promptly issue an alarm to notify maintenance personnel to check and calibrate.

[0054] In addition, considering that fruits and vegetables from different batches and different origins may have a certain range of differences in weight, the server will pre-store standard weight range data for various types of fruits and vegetables. After obtaining the weight information of the target fruits and vegetables, the server will compare the weight value with the corresponding standard weight range. If the weight value is within the standard range, the server will continue the subsequent processing flow; if the weight value deviates from the standard range by a large amount, the server will make a special mark when storing the weight information for further verification by subsequent staff. For example, for a batch of apples, the normal single weight range is 150-300 grams. If an apple is detected to weigh 500 grams, the server will mark the data, prompting the staff that there may be an abnormality and that manual confirmation is required as to whether the apple is a special variety or has other problems. Finally, the server stores the determined fruit and vegetable weight information in a temporary data cache area, waiting for integration and analysis with other information to provide data support for more accurate determination of the final information of fruit and vegetable products in the future.

[0055] S202, determining the fruit and vegetable volume information and the fruit and vegetable quantity of the target fruit and vegetable commodity according to the dynamic image information; After determining the weight information of the fruits and vegetables, the server will calculate the volume information and quantity of the target fruit and vegetable products based on the previously collected dynamic image information.

[0056] To determine the volume information, the server will first pre-process the dynamic image sequence, and then use image segmentation technology to separate the fruits and vegetables from the background. Taking the semantic segmentation model based on deep learning as an example, the server will input the dynamic image into the trained model, and the model will output the probability of each pixel belonging to the fruit or vegetable or the background, so as to accurately segment the contours of the fruits and vegetables. After obtaining the contours of the fruits and vegetables, the server will use three-dimensional reconstruction technology to estimate the volume of the fruits and vegetables. A common method is based on the principle of multi-view geometry. The server will extract the two-dimensional contour information of the fruits and vegetables from dynamic images at different angles, calculate the three-dimensional coordinates of the surface points of the fruits and vegetables through triangulation, and then construct a three-dimensional model of the fruits and vegetables. In the process of building the three-dimensional model, the server will calibrate the model according to the shooting angle and distance information of the image to improve the accuracy of the volume calculation.

[0057] In determining the number of fruits and vegetables, the server uses the target detection algorithm to count the fruits and vegetables in the dynamic image. For example, using the YOLO (You Only Look Once) algorithm based on a convolutional neural network, the server inputs the dynamic image into the trained YOLO model, and the model identifies each fruit and vegetable target in the image and generates a detection frame for it that includes the category, location, and confidence. The server can obtain the number of fruits and vegetables by counting these detection frames. In order to avoid repeated counting or missed counting, the server uses a tracking algorithm, such as the Kalman filter algorithm, to track the fruit and vegetable targets in continuous frames to ensure that each fruit and vegetable is counted only once. During the counting process, if it is detected that some fruits and vegetables are partially blocked, the server will make a judgment based on the information of the previous and next frames to count the actual number of fruits and vegetables as accurately as possible. Finally, the server stores the calculated fruit and vegetable volume information and quantity information together with the previously stored weight information in the temporary data cache area to prepare for the next step of determining the final fruit and vegetable information.

[0058] S203, determining final fruit and vegetable information by combining the fruit and vegetable weight information, the fruit and vegetable volume information, the fruit and vegetable quantity, and a preset fruit and vegetable information database; After obtaining the weight information, volume information and quantity information of the fruits and vegetables, the server will combine these data with the preset fruit and vegetable information database to determine the final fruit and vegetable information.

[0059] The server will first retrieve the corresponding data templates from the preset fruit and vegetable information database based on the previously identified types of fruits and vegetables. The database contains a wealth of fruit and vegetable information, such as the average weight range, volume range, price information, nutritional information, and origin information of different varieties of fruits and vegetables. Taking apples as an example, the database will store information such as the average weight of Red Fuji apples is between 200-300 grams, the average volume is about 150-250 cubic centimeters, and the price range of Red Fuji apples from different origins. The server compares and analyzes the weight and volume of the target fruits and vegetables obtained with the data templates in the database. If the weight and volume are within the reasonable range of the corresponding variety, the server will further confirm the quantity information and calculate the total value of the batch of fruits and vegetables in combination with the price information.

[0060] During the comparison process, the server will use a similarity calculation algorithm to measure the degree of match between the actual data and the template data in the database. For example, using the cosine similarity algorithm, the weight, volume and other data are converted into vector form, and the similarity is determined by calculating the cosine value of the angle between the vectors. If the similarity is high, the server will consider that the currently identified fruits and vegetables have a good match with the corresponding varieties in the database, and then add the relevant information in the database, such as origin, nutritional ingredients, etc., to the previously determined fruit and vegetable information to form a more complete final fruit and vegetable information.

[0061] S204, determining a fruit and vegetable category recognition model based on historical fruit and vegetable commodity recognition information and corresponding historical fruit and vegetable cashier results within a set time period in different seasons in the past, wherein the historical fruit and vegetable commodity recognition information at least includes the fruit and vegetable volume information and the fruit and vegetable category; After completing the preliminary information integration of the current fruits and vegetables, the server will build a fruit and vegetable category recognition model based on historical data to further accurately determine the fruit and vegetable categories. The server will first retrieve the historical fruit and vegetable commodity identification information and the corresponding historical fruit and vegetable cashier results within the set time of different seasons from the local or cloud database. These data may be stored in a relational database (such as MySQL) or a distributed database. The server retrieves data through SQL query statements or corresponding database operation interfaces.

[0062] During the retrieval process, the server will filter out data records containing fruit and vegetable volume information and fruit and vegetable types. For example, based on the data of the past year, the volume information of different fruits and vegetables in each season and the types of fruits and vegetables determined during actual sales are extracted according to the season. Since the amount of data may be huge, the server will use data cleaning technology to remove duplicate, erroneous or incomplete data records to ensure the accuracy and availability of the data. Next, the server will select a suitable machine learning algorithm to build a fruit and vegetable type recognition model. Considering the characteristics of the data and task requirements, the decision tree algorithm is a feasible choice. The decision tree recursively divides the data and constructs a tree structure according to different features (such as volume information), thereby realizing the prediction of the target variable (fruit and vegetable type).

[0063] The server divides the cleaned data into training sets and test sets, usually at a ratio of 70%-30% or 80%-20%. Taking the training set as an example, the server will use the fruit and vegetable volume information as input features and the fruit and vegetable types as labels, and input them into the decision tree algorithm model for training. During the training process, the decision tree algorithm will automatically find the optimal division point based on the relationship between the features and labels in the data, and construct a decision tree model. After the training is completed, the server will use the test set to evaluate the constructed fruit and vegetable type recognition model, and judge whether the performance of the model meets the requirements by calculating the accuracy, recall rate and other indicators of the model on the test set. If the model performance is not good, the server will adjust the algorithm parameters or change the algorithm for retraining until a fruit and vegetable type recognition model with good performance is obtained.

[0064] S205, determining the current season information, and inputting the current season information and the fruit and vegetable volume information of the target fruit and vegetable commodity into the fruit and vegetable category recognition model to determine the target fruit and vegetable category; The server can use a variety of technical means to determine the current season information. The server can obtain the current date by interacting with the system clock. Since the system clock records accurate time information, the server can parse the year, month, day and other data, and determine the current season based on these data. For example, March to May is spring, June to August is summer, September to November is autumn, and December to February of the following year is winter. At the same time, the server can also connect to the Internet to obtain accurate time data from the network time server to ensure the accuracy of the time and avoid incorrect season judgment due to local clock errors.

[0065] The server can also combine geographic location information to more accurately determine the season. The server's geographic location information is obtained using a global positioning system (GPS) module or through network positioning technology, and then the current season is determined based on the climate characteristics and seasonal division standards of the area. Seasonal changes may vary in different regions, and some regions may have unique climate patterns. For example, tropical regions may only have dry seasons and rainy seasons. By combining geographic location information, the season can be determined more accurately in accordance with local conditions.

[0066] After obtaining accurate current season information, the server integrates it with the fruit and vegetable volume information of the target fruit and vegetable commodity and inputs it into the previously constructed fruit and vegetable category recognition model. During the data input process, in order to ensure that the model can accurately receive and process the data, the server will preprocess the data. The volume information is normalized and the volume data of different scales are unified within a standard range, so as to avoid the influence of the model training and prediction effect due to the large difference in data scale. The server inputs the processed data into the fruit and vegetable category recognition model. If the decision tree model is used, the decision tree will make decisions according to the input season information and volume information and the tree structure constructed inside it. Starting from the root node, it makes judgments based on the characteristics of volume information and season information, and gradually branches downward until it reaches the leaf node. The category represented by the leaf node is the target fruit and vegetable category predicted by the model. In the decision-making process, the decision tree will select the optimal division condition according to the distribution of fruit and vegetable categories in different seasons and volumes in the training data to improve the accuracy of the prediction. For example, if in summer, fruits and vegetables with larger volumes are more likely to be watermelons, the decision tree will tend to judge them as watermelons when encountering data that meets this feature.

[0067] S206: Adjust the final fruit and vegetable information according to the target fruit and vegetable types.

[0068] After obtaining the prediction results of the target fruit and vegetable types, the server will make comprehensive adjustments to the final fruit and vegetable information previously determined based on the results.

[0069] The server retrieves detailed information related to the target fruit and vegetable species from a preset fruit and vegetable information database, which stores various attribute data of different fruit and vegetable species, including but not limited to variety information, origin information, price information, nutritional information, etc.

[0070] The server will compare and integrate these detailed information with the final fruit and vegetable information previously determined. If the judgment on the variety in the previous final fruit and vegetable information is inaccurate, the server will correct it according to the newly acquired target fruit and vegetable variety information. For example, it was initially judged to be an ordinary apple, but further analysis of the target fruit and vegetable varieties determined by the model showed that it was more in line with the characteristics of Red Fuji apples. The server will correct the variety in the final fruit and vegetable information to Red Fuji. For origin information, the server will make adjustments based on the common origin information of different varieties of apples in the database and the current season information. If it is summer, the database shows that Red Fuji in Yantai, Shandong is on the market in large quantities this season, and judging from the previous weight, volume and other information, this batch of apples is more in line with the characteristics of Red Fuji in Yantai, Shandong, and the server will adjust the origin information to Yantai, Shandong.

[0071] In terms of price, the server will obtain the corresponding price data from the database based on information such as the target fruit and vegetable types and origins. The prices of fruits and vegetables from different origins and varieties may vary greatly. The server will adjust the previously calculated total value based on the latest market price data. If the database shows that the current price of Red Fuji in Yantai, Shandong has fluctuated, the server will recalculate the total value of this batch of apples to ensure the accuracy of the price information. For nutritional information, the server will also supplement and improve it based on the target fruit and vegetable types. Different varieties of fruits and vegetables have different nutritional content. The server will obtain the nutritional data of the variety of fruits and vegetables from the database and add it to the final fruit and vegetable information to provide consumers with more comprehensive information.

[0072] The server will also check and adjust other relevant information in the final fruit and vegetable information previously determined. For example, the quantity information and weight information need to match the common individual size and weight range of the target fruit and vegetable types. If the quantity or weight information is found to be inconsistent with the newly determined target fruit and vegetable types, the server will conduct further verification and adjustment. If an abnormal weight is found, the measurement data of the weight sensor may be rechecked, or the volume information and quantity information may be reconfirmed to ensure the accuracy and completeness of the final fruit and vegetable information.

[0073] In the embodiment of the present application, a series of technical means are adopted, including obtaining weight information by combining a weight sensor, determining volume and quantity information based on dynamic images, integrating data with the help of a preset database, and using historical data to build a model and adjust the results in combination with seasonal information. Therefore, it is possible to obtain and comprehensively analyze fruit and vegetable information from multiple dimensions, and comprehensively and accurately describe the characteristics of fruit and vegetable commodities. This effectively solves the problems in the prior art of single fruit and vegetable identification information, inaccurate identification results due to failure to consider seasonal factors, and inability to make accurate judgments based on comprehensive multi-dimensional data, thereby achieving more accurate and comprehensive fruit and vegetable commodity identification, and greatly improving the accuracy and adaptability of the identification system.

[0074] The following describes the server in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , is a schematic diagram of a physical device structure of a server in an embodiment of the present application.

[0075] It should be noted that Figure 3 The structure of the server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0076] like Figure 3 As shown, the server includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through bus 304. Input / output (I / O) interface 305 is also connected to bus 304.

[0077] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0078] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.

[0079] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.

[0081] Specifically, the server of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the static and dynamic combined fruit and vegetable commodity identification method provided in the above embodiment is implemented.

[0082] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the server described in the above embodiment; or may exist independently without being assembled into the server. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the server, the server implements the dynamic and static combined fruit and vegetable commodity identification method provided in the above embodiment.

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

[0084] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0085] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A method for identifying fruit and vegetable products by combining dynamic and static methods, applied to a server, characterized in that: The method comprises: Acquire dynamic image information and static image information of the target fruit and vegetable product through a camera, wherein the dynamic image information is multiple frames of continuous image information collected during the movement of the target fruit and vegetable product, and the static image information is single frame or multiple frames of image information collected when the fruit and vegetable product is in a relatively static state; In combination with the dynamic image information, the first fruit and vegetable information is determined by a dynamic fruit and vegetable recognition model, wherein the dynamic fruit and vegetable recognition model is constructed in advance by deep learning training based on a plurality of different fruit and vegetable motion image data with annotations; In combination with the static image information, second fruit and vegetable information is determined by a static fruit and vegetable recognition model, wherein the static fruit and vegetable recognition model is constructed in advance based on a plurality of different annotated fruit and vegetable static image data through deep learning training; If the first fruit and vegetable information is equal to the second fruit and vegetable information, the final fruit and vegetable information of the target fruit and vegetable commodity is determined.

2. The method according to claim 1, characterized in that The steps of obtaining dynamic image information and static image information of target fruit and vegetable products through a camera specifically include: Use multiple sensors to detect whether the target fruit and vegetable products enter the set detection range; If yes, then controlling the camera to take photos of the target fruit and vegetable products at a set time interval to determine the dynamic image information; Calculating the center coordinate difference of fruits and vegetables in each frame of the dynamic image information; If the center coordinate difference is less than the set coordinate threshold, it is determined that the target fruit and vegetable is in a stable state; The last frame image of the dynamic image information is determined as the static image information.

3. The method according to claim 1, characterized in that If the first fruit and vegetable information is equal to the second fruit and vegetable information, before the step of determining the final fruit and vegetable information of the target fruit and vegetable commodity, the method further includes: respectively determining confidence data of the first fruit and vegetable information and the second fruit and vegetable information; If the confidence data is lower than the set confidence threshold, an error message is sent to the user end.

4. The method according to claim 3, characterized in that If the confidence data is lower than the set confidence threshold, after the step of sending an error message to the user terminal, the method further includes: After determining the three recognition results with the highest confidence according to the confidence data, sending the recognition results to the user terminal; A first selection instruction sent by the user terminal is received to determine final fruit and vegetable information.

5. The method according to claim 1, characterized in that If the first fruit and vegetable information is equal to the second fruit and vegetable information, after the step of determining the final fruit and vegetable information of the target fruit and vegetable commodity, the method further includes: If the first fruit and vegetable information is different from the second fruit and vegetable information, sending the first fruit and vegetable information and the second fruit and vegetable information to the user terminal for the user to select; After receiving the second selection instruction sent by the user end, the final fruit and vegetable information is determined.

6. The method according to claim 1, characterized in that After the step of determining the second fruit and vegetable information by using a static fruit and vegetable recognition model in combination with the static image information, the method further includes: If the first fruit and vegetable information is equal to the second fruit and vegetable information, determining the fruit and vegetable weight information of the target fruit and vegetable commodity by using a weight sensor; Determine the fruit and vegetable volume information and the fruit and vegetable quantity of the target fruit and vegetable commodity according to the dynamic image information; The final fruit and vegetable information is determined by combining the fruit and vegetable weight information, the fruit and vegetable volume information, the fruit and vegetable quantity and a preset fruit and vegetable information database.

7. The method according to claim 6, characterized in that After the step of determining the final fruit and vegetable information by combining the fruit and vegetable weight information, the fruit and vegetable volume information, the fruit and vegetable quantity and a preset fruit and vegetable information database, the step further includes: Determine a fruit and vegetable category recognition model based on historical fruit and vegetable commodity recognition information and corresponding historical fruit and vegetable cashier results within a set time period in different seasons in the past, wherein the historical fruit and vegetable commodity recognition information at least includes the fruit and vegetable volume information and the fruit and vegetable category; Determine current season information, and input the current season information and fruit and vegetable volume information of the target fruit and vegetable commodity into the fruit and vegetable category recognition model to determine the target fruit and vegetable category; The final fruit and vegetable information is adjusted according to the target fruit and vegetable types.

8. A server, characterized in that: The server includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the server to execute the method described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a server, the server is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is run on a server, the server is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fruit and vegetable freshness identification method and related product

    CN110738250A

  • Commodity identification and commodity name input method and system

    CN115761418A

  • Fruit and vegetable identification method and device, refrigerator and computer readable storage medium

    CN115841578A

  • Method, device and equipment for identifying vehicle-mounted unmanned vending cabinet based on dynamic and static combination and storage medium

    CN119206491A

  • Method and apparatus for updating user image recognition model

    US20220044076A1