Agricultural product traceability identification method based on Internet of Things
Through the Internet of Things technology and image screening model, the agricultural product traceability identification method is realized, the problem of low efficiency of traditional traceability management is solved, and the purchase efficiency and accuracy and standardization of traceability records are improved.
Patent Information
- Application Number
- CN202411441908.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-16
AI Technical Summary
Traditional agricultural product traceability management relies on paper records, which leads to low backtracking and difficulty in quickly and accurately tracking agricultural product information.
The Internet of Things-based agricultural product traceability identification method is adopted to collect data through video of monitoring equipment, and combine image screening and matching of user purchasing areas, provide purchasing recommendations, and generate traceability data.
It improves the efficiency and accuracy of agricultural product selection, ensures that the picking process meets user needs, provides full traceability records, and ensures the standardization of the purchasing process and data processing efficiency.
Smart Images

Figure CN118967175B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to image processing technology, and in particular to an agricultural product traceability identification method based on the Internet of Things. Background Art
[0002] With the rapid development of modern agriculture, consumers have increasing requirements for the safety and quality of agricultural products. The traceability management of agricultural products has become an important means to ensure the quality of agricultural products and safeguard the rights and interests of consumers.
[0003] Traditional agricultural product traceability is mainly completed through paper records. Operators will record relevant information of agricultural products, such as picking date, picking location, etc. These paper records will be organized into archives. When users want to trace back the purchased agricultural products, they may need to consult a large number of paper archives to find the corresponding agricultural product information, resulting in low efficiency of traceback viewing.
[0004] Therefore, how to quickly trace the source of agricultural products based on users' purchasing data has become an urgent problem that needs to be solved. Summary of the invention
[0005] The present invention provides an agricultural product traceability identification method based on the Internet of Things, which can quickly trace the agricultural products in combination with the purchase data of users.
[0006] The first aspect of the present invention provides an agricultural product traceability identification method based on the Internet of Things, comprising:
[0007] Receiving a remote viewing location selected by a user terminal in an agricultural product purchasing area, and obtaining recorded data collected by a monitoring device based on the remote viewing location;
[0008] Filtering the multiple image frames corresponding to the recorded data according to the image filtering model to obtain a customized set corresponding to the user end;
[0009] Acquiring the purchase conditions input by the user terminal, performing condition matching analysis on the customized set according to the purchase conditions, obtaining purchase recommendation data and sending it to the user terminal;
[0010] The sorting monitoring data corresponding to the sorting end is acquired according to the purchase data of the user end, and the traceability data is generated according to the sorting monitoring data and sent to the user end.
[0011] Optionally, in a possible implementation manner of the first aspect, screening a plurality of image frames corresponding to the recorded data according to an image screening model to obtain a customized set includes:
[0012] Acquire the type of agricultural product corresponding to the remote viewing location based on the image screening model, and perform target object detection on each of the image frames according to the type of agricultural product;
[0013] An image frame in which a target object corresponding to the type of agricultural product exists is determined to be a customized frame, and a customized set is obtained according to the customized frame.
[0014] Optionally, in a possible implementation manner of the first aspect, obtaining a purchase condition input by the user terminal, performing condition matching analysis on the customized set according to the purchase condition, and obtaining purchase recommendation data and sending it to the user terminal includes:
[0015] Determining selected data of the remote viewing location, and updating the customized collection according to the selected data to obtain retained data;
[0016] receiving the purchasing conditions input by the user terminal, wherein the purchasing conditions at least include color conditions and size conditions;
[0017] The target objects in the retained data are obtained, and condition matching analysis is performed according to the purchase conditions and the characteristic information corresponding to each of the target objects to obtain purchase recommendation data that meets the purchase conditions and send the data to the user end.
[0018] Optionally, in a possible implementation manner of the first aspect, determining selected data of the remote viewing location, and updating the customized collection according to the selected data to obtain retained data includes:
[0019] Acquire the selection order of the remote viewing positions by the user terminal within a preset time period, and determine the customized set corresponding to the user terminal whose selection order is not equal to the preferred order as the set to be processed;
[0020] Counting the sorted numbers corresponding to the remote viewing positions within the preset time period, and obtaining selected data according to the sorted numbers;
[0021] Acquire multiple targets corresponding to each image frame in the set to be processed, and determine the product number corresponding to each target;
[0022] The target object corresponding to the product number that is the same as the sorted number is determined as the selected object, the selected object is cleared to obtain a retained frame, and retained data is obtained according to the retained frame.
[0023] Optionally, in a possible implementation manner of the first aspect, acquiring multiple targets corresponding to each image frame in the to-be-processed set, and determining a product number corresponding to each target, includes:
[0024] Arranging the image frames in time order to obtain an image frame sequence, and sequentially acquiring adjacent image frames in the image frame sequence as target frames;
[0025] Obtaining the center point of each target object in each target frame as a positioning point, and determining that the target object whose interval distance between the positioning points in adjacent target frames is less than the distance change threshold is a target to be determined;
[0026] Comparing the outline similarities of the objects to be determined corresponding to the adjacent target frames, and determining that the objects to be determined whose similarities are greater than a similarity threshold are the same target object combination;
[0027] The identification contours corresponding to the target object combinations are obtained, and the identification contours are numbered and identified to obtain the product numbers corresponding to the targets in the target object combinations.
[0028] Optionally, in a possible implementation manner of the first aspect, obtaining identification contours corresponding to each of the target object combinations, performing number identification on the identification contours, and obtaining product numbers corresponding to each of the targets in each of the target object combinations include:
[0029] Determine a pixel point in the target object corresponding to the target object combination whose pixel value is located in the identification pixel interval as an identification point;
[0030] Obtain a set of marking points according to the adjacent marking points, and obtain a marking contour based on the set of marking points;
[0031] The identification contour with the largest area is numbered and identified to obtain the product number corresponding to each target object in the target object combination.
[0032] Optionally, in a possible implementation manner of the first aspect, obtaining target objects in the retained data, performing condition matching analysis according to the purchase conditions and feature information corresponding to each of the target objects, and obtaining purchase recommendation data that meets the purchase conditions and sending the data to the user terminal includes:
[0033] Determine the color pixel interval corresponding to the color condition and the size level corresponding to the size condition;
[0034] Obtaining the pixel mean of each target object, and determining the target object whose pixel mean is in the color pixel interval as a first screening object;
[0035] Determine the contour area of each of the first screening objects, obtain the area interval corresponding to the size level, determine that the first screening objects with contour areas within the area interval meet the purchase conditions, and obtain the corresponding first screening objects as the second screening objects, wherein the feature information includes pixel mean and contour area;
[0036] The recommendation frame is retrieved to frame and display the secondary screening object in the corresponding image frame to obtain a recommendation frame, and video fusion is performed on each recommendation frame according to a time sequence to obtain purchase recommendation data and send it to the user end.
[0037] Optionally, in a possible implementation of the first aspect, acquiring sorting monitoring data corresponding to the sorting end according to the purchase data of the user end, and generating traceability data according to the sorting monitoring data and sending it to the user end, includes:
[0038] Acquire the product number selected by the user terminal based on the purchase recommendation data as the number to be sorted, and retrieve the agricultural product distribution map corresponding to the agricultural product purchase area;
[0039] Determine the target sorting point corresponding to the remote viewing position in the agricultural product distribution map, update the number slot corresponding to the target sorting point based on the number to be sorted, obtain sorting instruction data and send it to the sorting terminal;
[0040] In response to the sorting monitoring request sent by the sorting terminal to the corresponding number to be sorted, control the monitoring device to collect video to obtain sorting monitoring data;
[0041] Verifying the to-be-sorted numbers according to the sorting monitoring data, and determining the to-be-sorted numbers that meet the verification conditions as sorted numbers;
[0042] When all the numbers to be sorted meet the verification conditions, the sorting monitoring data are combined to obtain traceability data and sent to the user end.
[0043] Optionally, in a possible implementation of the first aspect, verifying the to-be-sorted numbers according to the sorting monitoring data, and determining that the to-be-sorted numbers that meet the verification conditions are the sorted numbers, includes:
[0044] Acquire the image frame where the target object corresponding to the to-be-sorted number in the customized set is located as a verification frame, and determine the acquisition position corresponding to the verification frame;
[0045] Determine a collection point corresponding to the collection position in the agricultural product distribution map, and connect the target sorting point and the collection point to obtain a collection positioning line;
[0046] The angle range between the collection positioning lines with the largest angle is obtained as the collection range corresponding to the number to be sorted;
[0047] Determine a collection position point when the monitoring device collects the sorting monitoring data. When the collection position point is located in the collection range and there is a personnel outline in the sorting monitoring data, determine that the to-be-sorted number meets the verification condition, and obtain the corresponding to-be-sorted number as the sorted number.
[0048] Optionally, in a possible implementation manner of the first aspect, determining a collection position point when the monitoring device collects the sorting monitoring data includes:
[0049] Retrieving the bird's-eye view azimuth map and sending it to the sorting end, and obtaining the collection azimuth selected by the sorting end based on the bird's-eye view azimuth map;
[0050] A position point in the agricultural product distribution map at a preset distance based on the target sorting point in the collection direction is obtained as a collection position point.
[0051] The second aspect of the present invention provides an agricultural product traceability identification system based on the Internet of Things, comprising:
[0052] A receiving module, used to receive a remote viewing location selected by a user terminal in the agricultural product purchasing area, and obtain the recorded data collected by the monitoring device based on the remote viewing location;
[0053] A screening module, used for screening a plurality of image frames corresponding to the recorded data according to an image screening model to obtain a customized set corresponding to the user end;
[0054] An acquisition module, used for acquiring the purchase conditions input by the user terminal, performing condition matching analysis on the customized set according to the purchase conditions, obtaining purchase recommendation data and sending it to the user terminal;
[0055] The generating module is used to obtain the sorting monitoring data corresponding to the sorting terminal according to the purchasing data of the user terminal, and generate the traceability data according to the sorting monitoring data and send it to the user terminal.
[0056] The beneficial effects of the present invention are as follows:
[0057] 1. The present invention can collect video data of agricultural products through monitoring equipment, and make purchase recommendations to users based on the collected video data. Users can purchase recommended agricultural products based on their own needs through the collected video data. After the purchase, the sorting personnel responsible for picking can remotely pick the agricultural products purchased by the users, which can not only ensure that the picked agricultural products can meet the needs of users, but also improve the picking efficiency. When the user needs, the picking process can be reviewed back to ensure the standardization of the agricultural product purchase process. When acquiring the collected data corresponding to the agricultural products, the present invention can filter the multiple image frames corresponding to the recorded data according to the image screening model, delete the image frames that do not have the image data corresponding to the agricultural products, and obtain the image frames that only have the image data corresponding to the agricultural products, thereby reducing the data processing volume and improving the data processing efficiency.
[0058] 2. When the present invention makes purchase recommendations to users, users can input corresponding purchase conditions based on their own needs, and corresponding purchase recommendations are made based on the purchase conditions input by the users, thereby obtaining corresponding purchase recommendation data, thereby being able to more accurately recommend agricultural products that meet the needs of users, and saving purchase time and improving purchase efficiency. The present invention can update the recorded data in real time based on the data of agricultural products purchased by users, thereby avoiding users from repeatedly purchasing agricultural products that have already been picked, and improving the accuracy of purchase recommendations.
[0059] 3. The present invention can record the entire picking process of the sorting personnel through monitoring equipment, and obtain the sorting detection data corresponding to each agricultural product. According to the sorting detection data, traceability data corresponding to the user end and including the picking process of all agricultural products can be generated. When problems occur in agricultural products, users can use the traceability data to conduct timely back-tracing and review. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flow chart of a method for tracing and identifying agricultural products based on the Internet of Things provided by an embodiment of the present invention;
[0061] Figure 2 is a schematic diagram of a recommended frame provided by an embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of a collection range provided by an embodiment of the present invention;
[0063] Figure 4 is a schematic diagram of a top-down azimuth diagram provided by an embodiment of the present invention;
[0064] Figure 5 The present invention provides an agricultural product traceability identification system based on the Internet of Things. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0067] See also Figure 1, is a schematic diagram of an agricultural product traceability identification method based on the Internet of Things provided by an embodiment of the present invention, Figure 1 The execution subject of the method shown may be a software and / or hardware device. The execution subject of the present application may include but is not limited to at least one of the following: user equipment, network equipment, etc. Among them, user equipment may include but is not limited to computers, smart phones, personal digital assistants (PDA) and the electronic devices mentioned above. Network equipment may include but is not limited to a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of computers or network servers, wherein cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computers. This embodiment does not limit this. It includes steps S1 to S4, as follows:
[0068] S1, receiving a remote viewing location selected by a user terminal in an agricultural product purchasing area, and obtaining recorded data collected by a monitoring device based on the remote viewing location.
[0069] Among them, the user end refers to the terminal held by the user who purchases agricultural products, such as a computer. The agricultural product purchasing area refers to an area corresponding to a variety of agricultural products that can be purchased. For example, the agricultural product purchasing area may have an area corresponding to an apple picking garden, an area corresponding to a banana picking garden, etc. When the agricultural product the user wants to purchase is apples, the user can choose to make the corresponding purchase in the area corresponding to the apple picking garden. The remote viewing location refers to the distribution location corresponding to the specific agricultural product that the user wants to purchase and view in the agricultural product purchasing area. The monitoring equipment refers to a device that can capture video of agricultural products, such as a drone equipped with a high-definition camera. The recorded data refers to the video data obtained by shooting the agricultural products with the monitoring equipment.
[0070] In order to enable users to purchase agricultural products remotely, this solution will use monitoring equipment to photograph the agricultural products, and make purchase recommendations to users based on the photographed data. Users can also purchase the recommended agricultural products based on their own needs based on the photographed data. After the purchase, the sorting staff responsible for picking can remotely pick the agricultural products based on the agricultural products purchased by the users, which not only ensures that the agricultural products can meet the needs of users, but also improves the picking efficiency. It can also be retrospectively reviewed later to ensure the standardization of the agricultural product purchasing process.
[0071] It can be understood that there are multiple locations for purchasing in the agricultural product purchasing area. For example, when the agricultural product that the user wants to purchase is apples, there can be multiple locations for the user to purchase apples in the purchasing area. The user can select one of the locations as the remote viewing location, and the agricultural product purchasing area in this scheme has its corresponding distribution map. When the user wants to purchase agricultural products, the distribution map corresponding to the agricultural product purchasing area can be sent to the user end. For example, when the agricultural product that the user wants to purchase first is apples, the distribution map can be sent to the user, and the distribution map includes the distribution area of the apple picking garden and the distribution positions of multiple apple trees in the corresponding distribution area. The user can select the distribution position corresponding to the apple tree he wants to purchase, and thus the corresponding remote viewing position can be determined according to the distribution position of the apple tree selected by the user from the distribution map.
[0072] Specifically, after obtaining the remote viewing location, the present solution can control the monitoring device to go to the remote viewing location and collect video of the purchased agricultural products selected by the user. For example, when the agricultural products the user wants to purchase are apples, the corresponding purchased agricultural products can be apples. By collecting video of the location selected by the user, the video recording data corresponding to the apple tree at the corresponding location can be obtained. Moreover, since there are multiple locations for purchase in the agricultural product purchasing area, the agricultural products corresponding to each location may be different. In order to enable the user to intuitively view the agricultural product data at the corresponding location, the present solution can configure a corresponding video collection path for each location. After the monitoring device arrives at the remote viewing location, it can collect video according to the corresponding video collection path. For example, when the remote viewing location corresponds to an apple tree, in order to collect more complete video data of the apple tree, the drone can be controlled to circle around it according to a preset collection path for video collection. The user can view the actual situation of the agricultural products corresponding to the remote viewing location in real time through the collected video data.
[0073] S2, filtering multiple image frames corresponding to the recorded data according to an image filtering model to obtain a customized set corresponding to the user end.
[0074] The image screening model refers to a model for screening image frames, and the customized set refers to a set consisting of multiple image frames of agricultural products.
[0075] It is understandable that when the monitoring equipment is collecting video according to the preset collection path, not the corresponding agricultural products can be captured in every direction. The agricultural products in some directions may be blocked, resulting in no agricultural products in the image frames collected in that direction. Therefore, in order to obtain image frames with agricultural products, this solution can filter multiple image frames corresponding to the recorded data according to the image filtering model, delete the image frames without agricultural products, so that the corresponding customized collection can be obtained.
[0076] Based on the above embodiment, the specific implementation of step S2 may be:
[0077] S21, obtaining the type of agricultural product corresponding to the remote viewing location based on the image screening model, and performing target object detection on each of the image frames according to the type of agricultural product.
[0078] Specifically, since there may be multiple types of agricultural products in the agricultural product purchasing area, the distribution areas corresponding to different types of agricultural products are different. The corresponding distribution area can be determined through the remote viewing location selected by the user, and then the type of agricultural product corresponding to the remote viewing location can be obtained. For example, when the remote viewing location selected by the user corresponds to an apple tree, the corresponding type of agricultural product is apple. After determining the type of agricultural product, target object detection can be performed on multiple image frames to determine whether there is a target object corresponding to the type of agricultural product in the image frame. For example, when the agricultural product that the user wants to purchase is apple, then the corresponding target object is apple. When performing target object detection on the image frame, it is necessary to determine whether there is image data corresponding to the apple in the image frame.
[0079] Among them, the type of agricultural product refers to the variety of agricultural products corresponding to the remote viewing location selected by the user, and the target object refers to the agricultural product that the user wants to purchase. For example, when the agricultural product that the user wants to purchase is apples, the corresponding target object is apples. When performing target object detection, it is necessary to determine whether there is a target object corresponding to the type of agricultural product in the image frame. For example, when the type of agricultural product is apples, it is necessary to determine whether there is a target object corresponding to apples in the image frame.
[0080] S22, determining that the image frame containing the target object corresponding to the agricultural product type is a customized frame, and obtaining a customized set according to the customized frame.
[0081] Specifically, by performing target object detection on multiple image frames, image frames containing target objects corresponding to the types of agricultural products are defined as customized frames. For example, when the type of agricultural product is apple, if image data corresponding to apple exists in the image frame, the corresponding image frame can be determined as a customized frame, thereby obtaining multiple customized frames. Based on the multiple customized frames, corresponding customized sets can be obtained, and subsequently, the customized sets can be combined to make purchase recommendations to users.
[0082] Through the above implementation, the data processing amount can be reduced and the data processing efficiency can be improved.
[0083] S3, obtaining the purchase conditions input by the user terminal, performing condition matching analysis on the customized set according to the purchase conditions, obtaining purchase recommendation data and sending it to the user terminal.
[0084] It is understandable that users may have their own purchasing conditions when purchasing agricultural products, and the purchasing conditions corresponding to different users are different. For example, when multiple users want to purchase apples, some users may want to purchase larger apples, and some users may want to purchase smaller apples. Therefore, users can input corresponding purchasing conditions based on their needs, and corresponding purchasing recommendations are made based on the purchasing conditions input by the users to obtain corresponding purchasing recommendation data, and the purchasing recommendation data obtained for different purchasing conditions are also different.
[0085] Specifically, when making purchase recommendations, the purchase conditions entered by the user can be matched with the customized set to determine whether the image data of the target object in the image frame in the customized set meets the purchase conditions entered by the user. Multiple image frames in the customized set that meet the user's purchase conditions can be obtained, thereby obtaining corresponding purchase recommendation data.
[0086] Among them, purchasing conditions refer to the conditions set by users according to their own needs when purchasing agricultural products, which can be used to help users screen out agricultural products that meet their expectations from a large number of optional agricultural products. When performing condition matching analysis, the purchasing conditions entered by the user can be compared with the image data corresponding to the target object in each image frame in the customized set, so as to determine whether the image data of the target object in the image frame matches the user's purchasing conditions.
[0087] Based on the above embodiment, the specific implementation of step S3 may be:
[0088] S31, determining selected data of the remote viewing location, and updating the customized collection according to the selected data to obtain retained data.
[0089] It is understandable that when acquiring recorded data, since multiple users may make purchases and view the same remote viewing location within a time period, when the viewing time of multiple users is close, in order to reduce the collection workload of the equipment, the data collected for the first time in the corresponding time period can be updated and processed in combination with the time sequence of the different users' views to obtain the corresponding purchase recommendation data for each user. For example, at 9 o'clock in the morning, the remote viewing location is selected for the first time, then the corresponding recorded data can be acquired at 9 o'clock in the morning and retained. When the location is selected again at 10 o'clock, since the two time intervals are close, the recorded data acquired at 9 o'clock can be sent to the user who selected the location for the second time, but the recorded data sent is the updated recorded data after the picked agricultural products have been deleted.
[0090] Specifically, since the present solution will only retain the recorded data acquired for the first time at the same remote viewing location within a time period, when the same remote viewing location is selected again subsequently, the recorded data acquired for the first time will contain image data of agricultural products that have been picked. In order to avoid users from repeatedly selecting and purchasing agricultural products that have already been picked and to improve the accuracy of purchase recommendations, the recorded data can be updated in combination with the picking data purchased by the user, and the updated recorded data can be sent to users who select the same remote viewing location again later. This allows the user to avoid repeated recommendations for agricultural products that have already been purchased when making purchase recommendations, thereby improving purchase efficiency and reducing workload.
[0091] Specifically, agricultural product data that has been selected by other users at the remote viewing location, ie, selected data, can be obtained, and corresponding retained data can be obtained by updating the image frames in the customized set according to the selected data.
[0092] Among them, the selected data refers to the data corresponding to the agricultural products that have been purchased at the remote viewing location, and the retained data refers to the image data corresponding to the agricultural products currently remaining at the remote viewing location.
[0093] Based on the above embodiment, the specific implementation of step S31 may be:
[0094] S311, obtaining the selection order of the remote viewing positions by the user terminal within a preset time period, and determining the customized set corresponding to the user terminal whose selection order is not equal to the preferred order as the set to be processed.
[0095] Among them, the preset time period refers to a preset time period, and the time interval between users who make purchases during this time period can be considered to be relatively close, for example, it can be between 9 am and 11 am. The selection order refers to the order in which the user terminal selects the remote viewing location within the preset time period. For example, if the user is the first to select the remote viewing location within the preset time period, then the selection order corresponding to the user is 1. The preferred order refers to the order corresponding to the user terminal that selects the remote viewing location as the purchase location for the first time within the preset time period. Only when the remote viewing location is selected for the first time within the preset time period will the monitoring device be controlled to collect video of the agricultural products at the remote viewing location. If the remote viewing location is not selected for the first time, the recorded data collected for the first time can be updated accordingly. The pending set refers to a customized set that requires an elimination operation on the target objects that have been purchased in the image frame.
[0096] Specifically, within a preset time period, if multiple users select the same remote viewing location, then each user will have his or her own exclusive selection order, and the selection order is determined based on the time sequence in which the users select the location. If the selection order is not equal to the preferred order, it can be considered that a user has selected the same remote viewing location for the purchase of agricultural products before the user, and it is necessary to update the customized collection corresponding to the user, clear the agricultural products that have been purchased, and recommend the remaining agricultural products. Therefore, the corresponding customized collection can be determined as the collection to be processed, and the image frames in the collection to be processed are subsequently updated accordingly.
[0097] S312, counting the sorted numbers corresponding to the remote viewing positions within the preset time period, and obtaining selected data according to the sorted numbers.
[0098] It can be understood that the present invention can affix numbered labels to agricultural products corresponding to each remote viewing location. When the monitoring device is collecting video, the agricultural products in the collected video have corresponding numbers. Users can determine the agricultural products to be purchased based on the numbers. When the agricultural products have been purchased, the corresponding numbers are the sorted numbers. Therefore, the sorted numbers corresponding to all the agricultural products that have been purchased at the remote viewing location within a preset time period can be counted, and the corresponding selected data can be obtained based on multiple sorted numbers.
[0099] Among them, the sorted number refers to the number corresponding to the agricultural products that have been picked.
[0100] S313, obtaining multiple targets corresponding to each image frame in the to-be-processed set, and determining a product number corresponding to each target.
[0101] Specifically, each image frame in the set to be processed contains multiple corresponding target objects, so multiple target objects corresponding to each image frame in the set to be processed can be obtained. Since the acquisition orientations corresponding to the multiple image frames in the set to be processed are different, the number of the target object can be determined through the image frames acquired at multiple orientations, thereby obtaining the product number corresponding to each target object.
[0102] The product number refers to a number that can be used to determine the product identity corresponding to each target object.
[0103] In some embodiments, the specific implementation of step S313 may be:
[0104] S3131, arranging the image frames in time order to obtain an image frame sequence, and sequentially acquiring adjacent image frames in the image frame sequence as target frames.
[0105] It is understandable that the label is located at a fixed position on the agricultural product, but at different acquisition angles, the image data in the captured image frame is different, the agricultural product number may not be visible in the image frame at some acquisition angles, and the position of the same agricultural product may also be different in the corresponding image frames at different acquisition angles. In order to accurately identify the corresponding number of the agricultural product, it is first necessary to determine the same agricultural product in each image frame, and then perform number recognition.
[0106] Specifically, the monitoring device can collect image frames of agricultural products corresponding to the remote viewing position at various orientations through a camera. When collecting, the monitoring device must always collect the agricultural products at the center of the image frame. For example, when the agricultural product corresponding to the remote viewing position is apple, the corresponding apple tree can be collected at the center of the image frame, and the span between the collection orientations corresponding to adjacent image frames during collection cannot be too large. The acquired image frames can be arranged in chronological order at the time of collection to obtain a corresponding image frame sequence. Since the monitoring device has multiple collection orientations when performing video collection, but the span between the collection orientations corresponding to adjacent image frames is very small, the position change of the target object between adjacent image frames is very small, and the change of the target object's contour in adjacent image frames is also very small. The same target object may exist in multiple adjacent image frames, so adjacent target frames in the image frame sequence can be determined as target frames in turn, and whether they are the same target object is determined based on the position of the target object between target frames and the change of its contour.
[0107] Among them, the target frame refers to the adjacent image frames in the image sequence. The orientations of adjacent target frames when they are collected are not much different, and the collection postures of the monitoring equipment are the same.
[0108] S3132, obtaining the center point of each target object in each target frame as a positioning point, and determining that the target object whose interval distance between the positioning points in adjacent target frames is less than the distance change threshold is a target to be determined.
[0109] When judging the position change of the target object between target frames, since the acquisition posture of the monitoring device in each acquisition orientation is the same, the target frame can be coordinate processed, and the coordinate origin corresponding to each target frame can be ensured to be the same. For example, the center point of the image frame can be determined as the coordinate origin, and the center point of each target object in each target frame can be determined as the positioning point. The coordinate value corresponding to each positioning point can be obtained, and the interval distance between each positioning point corresponding to adjacent target frames can be calculated according to the coordinate value. When the interval distance is less than the distance change threshold, it can be considered that the positions of the targets corresponding to the two positioning points in the adjacent target frames are almost the same. At this time, the target objects corresponding to the adjacent target frames can be determined as pending objects, and the pending objects can be re-determined later.
[0110] Among them, the positioning point refers to the point where the target object can be positioned in the image frame, and the interval distance refers to the distance between each positioning point corresponding to adjacent target frames. The distance change threshold refers to the threshold used to judge the position change of the target object. When the interval distance is less than the distance change threshold, it can be considered that the position change between the corresponding targets in adjacent image frames is small and may be the same target. When the interval distance is greater than the distance change threshold, it can be considered that the position change between the corresponding targets in adjacent image frames is large and may not be the same target.
[0111] S3133, performing contour similarity comparison on the objects to be determined corresponding to the adjacent target frames, and determining that the objects to be determined whose similarities are greater than a similarity threshold are the same target object combination.
[0112] Specifically, the contours of the objects to be determined that are closer in corresponding positions in adjacent target frames can be extracted, and the contour similarity of the contours of the objects to be determined that are closer in corresponding positions in adjacent target frames can be compared. When the similarity is greater than the similarity threshold, it can be considered that the contours of the objects to be determined corresponding to the adjacent target frames are the same contour, and further, it can be considered that the objects to be determined corresponding to the adjacent target frames are the same. Therefore, the objects to be determined corresponding to the adjacent target frames can be determined as the same target object combination.
[0113] Among them, when performing contour similarity comparison, the similarity between two contours can be calculated through contour similarity comparison technology. For example, the similarity between two contours can be calculated through a contour matching algorithm. The similarity threshold refers to a threshold that can be used to judge the degree of similarity between two objects to be determined. When the similarity is greater than the similarity threshold, it can be considered that the contours corresponding to the two objects to be determined are the same contour. When the similarity is less than the similarity threshold, it can be considered that the contours corresponding to the two objects to be determined are not the same contour.
[0114] S3134, obtaining the identification contour corresponding to each target object combination, performing number identification on the identification contour, and obtaining the product number corresponding to each target object in each target object combination.
[0115] Specifically, after obtaining the target object combination, the identification contour corresponding to each target object combination can be extracted, and then the identification contour can be numbered and identified through contour recognition technology, so as to determine the product number corresponding to the target object in each target object combination. Among them, the identification contour refers to the numbered contour on the agricultural product.
[0116] In some embodiments, step S3134 includes S31341 to S31343, which are specifically as follows:
[0117] S31341, determining a pixel point whose pixel value in the target object corresponding to the target object combination is located in the identification pixel interval as an identification point.
[0118] Specifically, in the image frame, in order to be able to distinguish between the area corresponding to the number and the area corresponding to the agricultural product, the number can be displayed by using a label with a different color from the agricultural product. For example, when the color corresponding to the agricultural product is red, the label can be white. Therefore, the pixel value corresponding to the area where the number on the target is located is different from the pixel values corresponding to other areas. The pixel value interval where the pixel point corresponding to the number on the target is located can be pre-configured, that is, the identification pixel interval, for example, it can be the pixel value interval corresponding to the white color. After obtaining the pixel values corresponding to multiple pixel points corresponding to the number on the target, the pixel values corresponding to the multiple pixel points are compared with the identification pixel interval respectively. If the pixel value corresponding to the pixel point is within the identification pixel interval, the corresponding pixel point can be considered to be the pixel point corresponding to the number on the target, that is, the identification point.
[0119] The identification pixel interval refers to a pre-configured pixel value interval where the pixel points corresponding to the target object are located, and the identification point refers to a pixel point whose pixel value is within the identification pixel interval.
[0120] S31342, obtaining a set of marking points according to the adjacent marking points, and obtaining a marking outline based on the set of marking points.
[0121] Specifically, a corresponding set of identification points can be obtained by acquiring multiple adjacent identification points, and contour extraction can be performed on multiple adjacent identification points using contour extraction technology, such as edge detection algorithm, to obtain the identification contour corresponding to the number on the target object. The identification point set refers to a set composed of adjacent pixel points.
[0122] S31343, numbering and identifying the identification contour with the largest area, and obtaining the product number corresponding to each target object in the target object combination.
[0123] When numbering and identifying the identification contours corresponding to the target object combination, since the target objects corresponding to the undetermined objects in the target object combination are the same target object, but due to different acquisition angles, the identification contours corresponding to some undetermined objects may not be complete. In order to more accurately identify the numbers corresponding to the targets, the undetermined objects with relatively complete identification contours in the target object combination can be selected for numbering and identifying. Since the more complete the identification contour, the larger the corresponding area, the identification contour with the largest area can be selected for numbering and identifying, so that the product numbers corresponding to each target object in the target object combination can be obtained more accurately.
[0124] S314, determining that the target object corresponding to the product number that is the same as the sorted number is a selected object, clearing the selected object to obtain a retained frame, and obtaining retained data according to the retained frame.
[0125] Specifically, whenever agricultural products are selected, the sorted numbers corresponding to the selected agricultural products can be recorded. When the product number is the same as the sorted number, it can be considered that the target object corresponding to the product number has been purchased. Therefore, the target object corresponding to the product number can be determined as the selected object. By clearing the selected objects in each image frame in the processing set, the corresponding retained frames can be obtained, and then the corresponding retained data can be obtained based on the retained frames. Subsequently, purchase recommendations can be made to users based on the retained data.
[0126] The selected objects refer to the agricultural products that have been selected for purchase, and the retained frames refer to the image frames used to display the image data of the remaining agricultural products that can be recommended for purchase.
[0127] S32, receiving the purchase conditions input by the user terminal, wherein the purchase conditions at least include color conditions and size conditions.
[0128] Different users have different color requirements for agricultural products. For example, some users like brightly colored agricultural products and believe that brightly colored agricultural products usually taste better, such as being sweeter, while some users like more natural-colored agricultural products and believe that such a taste is purer and more original. Therefore, color conditions become an important consideration when users purchase. In addition to color conditions, size conditions are also one of the factors that users often consider when purchasing. Different users have different preferences for the size of apples. Some people like larger apples and believe that such apples have fuller flesh and more juice, while some people prefer small apples and think that they are more convenient to carry and eat. Therefore, the purchase conditions entered by the user must at least include color conditions and size conditions.
[0129] Specifically, when a user has a purchasing need, the present solution can call up a purchasing interface and send it to the user. The purchasing interface includes a list for selecting colors and a list for selecting sizes. The user can select the color and size that meet their needs from the corresponding lists. Subsequently, the image frames in the customized set can be conditionally matched according to the color conditions and the size conditions, so as to find the purchasing recommendation data that meets the user's needs.
[0130] S33, obtaining the target objects in the retained data, performing condition matching analysis according to the purchase conditions and the feature information corresponding to each of the target objects, obtaining purchase recommendation data that meets the purchase conditions and sending the data to the user terminal.
[0131] Specifically, the target object in the retained data can be obtained, and condition matching analysis can be performed on the purchase conditions input by the user and the feature information corresponding to the target object in each image frame in the customized set. When the feature information corresponding to the target object meets the purchase conditions input by the user, purchase recommendation data that meets the purchase conditions can be generated based on the image frame corresponding to the target object and sent to the user end to make purchase recommendations to the user.
[0132] Among them, characteristic information refers to the color information and size information of agricultural products.
[0133] In some embodiments, the purchase recommendation data may be obtained in the following manner:
[0134] S331, determining the color pixel interval corresponding to the color condition and the size level corresponding to the size condition.
[0135] The color pixel interval refers to the pixel value interval corresponding to the color of the agricultural product that meets the color condition, and the size level refers to the level corresponding to the size of the agricultural product corresponding to the size condition.
[0136] Since the purchasing conditions input by the user include color conditions and size conditions, when conditional feature matching is performed on the feature information corresponding to the target object, it is first necessary to determine the color information and size information corresponding to the target object. Specifically, due to the different colors of agricultural products, the pixel values of the corresponding target area are also different. This solution can configure corresponding pixel value intervals for different color information. According to the color conditions input by the user, the corresponding pixel value interval, that is, the color pixel interval, can be determined. For example, when the color condition input by the user is bright dark red, the corresponding color pixel interval can be the pixel value interval corresponding to dark red. When the color condition input by the user is light green, the corresponding color pixel interval can be the pixel value interval corresponding to light green. In addition, this solution can configure corresponding size levels for different sizes. The larger the size of the agricultural product, the higher the corresponding size level. Therefore, the corresponding size level can be determined according to the size condition input by the user.
[0137] S332, obtaining the pixel mean of each target object, and determining the target object whose pixel mean is in the color pixel interval as a first screening object.
[0138] Specifically, the pixel values of multiple pixel points corresponding to the area where each target object is located can be obtained respectively, and the multiple pixel values corresponding to each target object can be averaged to obtain the pixel mean corresponding to each target object. The multiple pixel means are compared with the color pixel interval. When the pixel mean is within the color pixel interval, it can be considered that the corresponding target object meets the color condition and the corresponding target object can be determined as a screening object.
[0139] The pixel mean refers to the average value of the pixel values of multiple pixel points corresponding to the target object, and the primary screening object refers to the target object that meets the color conditions.
[0140] S333, determine the contour area of each of the first-screened objects, obtain the area interval corresponding to the size level, determine that the first-screened objects with contour areas in the area interval meet the purchase conditions, and obtain the corresponding first-screened objects as second-screened objects, and the feature information includes pixel mean and contour area.
[0141] It can be understood that this solution can be combined with the shooting distance of the monitoring equipment to configure corresponding area intervals for different size levels. When the shooting distance is determined, the higher the size level, the larger the area interval can be. Due to different shooting distances, the proportion of the target object in the image is also different. When the shooting distance is determined, the conversion ratio corresponding to the shooting distance can be obtained. After obtaining the area of the target object in the image, it can be converted into the actual area according to the conversion ratio. Then, the area interval corresponding to the actual area of the target object can be judged, and then it can be judged whether the target object meets the size conditions.
[0142] Specifically, the pixel points corresponding to each primary screened object can be obtained, and the contour area corresponding to the primary screened object can be obtained according to the number of pixel points. Since the corresponding size level can be determined according to the size conditions input by the user, the corresponding area interval can be obtained, and the contour area corresponding to each primary screened object is compared with the area interval. When the contour area is within the area interval, it can be determined that the primary screened object meets the purchase conditions input by the user, and the corresponding primary screened object can be determined as a secondary screened object.
[0143] Among them, the contour area refers to the area of the contour corresponding to the primary screening object, the area interval refers to the interval of the contour area corresponding to the size level, and the secondary screening object refers to the agricultural products that meet the user's purchasing conditions.
[0144] S334, calling a recommendation frame to frame and display the secondary screening object in the corresponding image frame to obtain a recommendation frame, performing video fusion on each recommendation frame according to a time sequence to obtain purchase recommendation data and sending it to the user terminal.
[0145] In actual applications, after obtaining the secondary screening items that meet the user's purchase conditions, the secondary screening items in the image frame can be highlighted and then sent to the user for recommendation. Figure 2 , is a schematic diagram of a recommended frame provided by an embodiment of the present invention, such as Figure 2 As shown in , after the recommendation frame is adjusted according to the outline of the secondary screening object, the recommendation frame will not block the key part of the secondary screening object, and can clearly distinguish it from others.
[0146] Specifically, the corresponding rectangular recommendation frame can be retrieved to frame and display the secondary screening object, and the corresponding recommendation frame can be obtained. When framing and displaying, the retrieved rectangular recommendation frame can be adjusted according to the outline size of the secondary screening object, so that the rectangular recommendation frame can completely frame the outline of the secondary screening object. After obtaining multiple recommendation frames, the recommendation frames can be fused in time sequence to form video data, and the corresponding purchase recommendation data can be obtained.
[0147] Through the above implementation, agricultural products that meet the needs of users can be recommended more accurately, and shopping time can be saved and shopping efficiency can be improved.
[0148] S4, acquiring sorting monitoring data corresponding to the sorting end according to the purchase data of the user end, generating traceability data according to the sorting monitoring data and sending it to the user end.
[0149] In actual applications, after receiving the purchase recommendation data, the user can see multiple agricultural products that meet the purchase conditions and their corresponding product numbers from the purchase recommendation data. The user can click on the corresponding agricultural products in the purchase recommendation data to purchase, so as to obtain the product number corresponding to the agricultural product that the user wants to purchase. After receiving the product number selected by the user, the sorting staff can go to the location of the agricultural product corresponding to the product number to pick it, and the monitoring equipment can record the picking process of the sorting staff in its entirety, and obtain the sorting monitoring data corresponding to each agricultural product. According to the sorting monitoring data, traceability data corresponding to the user end can be generated and sent to the user. The user can view the complete picking process of each purchased agricultural product through the traceability data.
[0150] Among them, the sorting end refers to the terminal held by the sorting personnel who are responsible for picking agricultural products, such as a mobile phone, etc. The sorting monitoring data refers to the video data obtained by recording the process of the sorting personnel picking a certain agricultural product, and the traceability data refers to the video data recording the picking process of all agricultural products purchased by the user.
[0151] Based on the above embodiment, the specific implementation of step S4 may be:
[0152] S41, obtaining the product number selected by the user terminal based on the purchase recommendation data as the number to be sorted, and retrieving the agricultural product distribution map corresponding to the agricultural product purchase area.
[0153] Among them, the number to be sorted refers to the product number corresponding to the agricultural product selected by the user. The agricultural product corresponding to the number to be sorted can be considered as the agricultural product to be picked by the sorting personnel. The agricultural product distribution map refers to a layout map that can display the distribution of various agricultural products in the agricultural product selection area.
[0154] Specifically, the product number corresponding to the agricultural product selected by the user to purchase can be used as the number to be sorted, and then the agricultural product distribution map corresponding to the agricultural product purchasing area can be retrieved, and the agricultural product distribution map can be updated according to the number to be sorted. Subsequent sorting personnel can go to the location of the agricultural product corresponding to the number to be sorted according to the updated agricultural product distribution map to carry out corresponding picking.
[0155] S42, determining the target sorting point corresponding to the remote viewing position in the agricultural product distribution map, updating the number slot corresponding to the target sorting point based on the number to be sorted to obtain sorting instruction data and sending it to the sorting terminal.
[0156] Among them, the target sorting point refers to the location point corresponding to the remote viewing location in the agricultural product distribution map, the number slot refers to the slot where the product number of the agricultural product can be displayed, and the sorting instruction data refers to the data that can instruct the sorting personnel to pick the agricultural products selected by the user.
[0157] It can be understood that each remote viewing location has a corresponding location point in the agricultural product distribution map. Therefore, according to the remote viewing location selected by the user, the corresponding target sorting point can be determined in the agricultural product distribution map, and at the target sorting point there is a corresponding slot for displaying the product number of the agricultural product, that is, the number slot. After obtaining the number to be sorted, the number slot can be updated according to the number to be sorted, so that the number to be sorted can be filled into the number slot, and the sorting indication data can be obtained and sent to the sorting personnel. The sorting personnel can intuitively see the product number of the agricultural product to be picked by clicking the target sorting point in the sorting indication data.
[0158] S43, responding to the sorting monitoring request sent by the sorting terminal to the corresponding number to be sorted, controlling the monitoring device to collect video to obtain sorting monitoring data.
[0159] It is understandable that in order to ensure the authenticity of the traceability data, the sorting process of the sorting personnel can be monitored. Specifically, after receiving the sorting indication data, the sorting personnel can click the target sorting point in the sorting indication data to view the multiple to-be-sorted numbers corresponding to the target sorting point. The sorting personnel can pick the agricultural products corresponding to each to-be-sorted number in turn, and before each picking, click the corresponding to-be-sorted number to send a corresponding sorting monitoring request. After receiving the sorting monitoring request sent by the sorting personnel, the monitoring equipment can be controlled to collect video of the sorting process of the sorting personnel, so as to obtain the sorting monitoring data corresponding to each to-be-sorted number.
[0160] The sorting monitoring request refers to a request sent by the sorting personnel to collect video of the sorting process.
[0161] S44, verifying the to-be-sorted numbers according to the sorting monitoring data, and determining that the to-be-sorted numbers that meet the verification conditions are sorted numbers.
[0162] It can be understood that after obtaining the sorting monitoring data, this solution can verify the to-be-sorted number in the sorting monitoring data to determine whether the agricultural products picked by the sorting personnel are consistent with the agricultural products corresponding to the to-be-sorted number. When the to-be-sorted number meets the verification conditions, it can be considered that the agricultural products picked by the sorting personnel are consistent with the agricultural products corresponding to the to-be-sorted number, and the corresponding to-be-sorted number can be updated to the sorted number.
[0163] In some embodiments, step S44 includes S441 to S444, which are specifically as follows:
[0164] S441, obtaining the image frame where the target object corresponding to the to-be-sorted number in the customized set is located as a verification frame, and determining a collection position corresponding to the verification frame.
[0165] It can be understood that, since the acquisition path of the monitoring device is determined, there are multiple acquisition position points on the acquisition path, and there is a corresponding image frame at each acquisition position point, so the corresponding acquisition position can be determined according to the image frame.
[0166] Specifically, since not all image frames in the customized set contain the target object corresponding to the number to be sorted, the image frame where the target object corresponding to the number to be sorted is located can be determined as the verification frame, and the acquisition position corresponding to the verification frame can be obtained. The verification frame refers to the image frame that can be used to determine the acquisition range of the monitoring device. The acquisition position refers to the shooting position corresponding to when the monitoring device acquires the verification frame.
[0167] S442, determining a collection point corresponding to the collection position in the agricultural product distribution map, and connecting the target sorting point and the collection point to obtain a collection positioning line.
[0168] Specifically, in the agricultural product distribution map, the collection point corresponding to the collection position can be determined. By connecting the collection point with the target sorting point, the corresponding collection positioning line can be obtained. Since multiple collection positions can be determined based on multiple verification frames, multiple collection positioning lines can be obtained. Figure 3 , is a schematic diagram of a collection range provided by an embodiment of the present invention, such as Figure 3 As shown in , by connecting collection point 1 with the target sorting point, collection positioning line 1 can be obtained, by connecting collection point 2 with the target sorting point, collection positioning line 2 can be obtained, and so on, by connecting multiple collection points with the target sorting point respectively, multiple collection positioning lines can be obtained.
[0169] Among them, the collection point refers to the location point corresponding to the collection position in the agricultural product distribution map, and the collection positioning line refers to the positioning lines of various directions corresponding to the video collection of agricultural products.
[0170] S443, obtaining the angle range between the collection positioning lines with the largest angle as the collection range corresponding to the number to be sorted.
[0171] Specifically, if there is an angle between the collection positioning lines, it can be considered that the range between the two collection positioning lines with the largest angle is the maximum activity range of the monitoring device when collecting the target object corresponding to the number to be sorted. Therefore, the angle range between the collection positioning lines with the largest angle can be determined as the collection range corresponding to the number to be sorted. Figure 3As shown in , the angle between the collection positioning line 1 and the collection positioning line 2 is the largest, so the angle range between the collection positioning line 1 and the collection positioning line 2 can be determined as the collection range corresponding to the number to be sorted. When the sorting personnel are within the collection range, it can be considered that the sorting personnel are picking the agricultural products selected by the user. When the sorting personnel are not within the collection range, it can be considered that the sorting personnel may not have picked the agricultural products selected by the user. Among them, the collection range refers to the maximum activity range of the monitoring equipment when collecting the target object corresponding to the number to be sorted.
[0172] S444, determining a collection position point when the monitoring device collects the sorting monitoring data; when the collection position point is located in the collection range and there is a personnel outline in the sorting monitoring data, determining that the to-be-sorted number meets the verification condition, and obtaining the corresponding to-be-sorted number as the sorted number.
[0173] Specifically, when controlling the monitoring device to collect sorting monitoring data, the monitoring device can be controlled to go to the corresponding collection location to collect sorting monitoring data, so the collection location when the monitoring device collects data can be determined. When the collection location is within the collection range, and there is a personnel profile corresponding to the sorting personnel in the sorting monitoring data, it can be considered that there are sorting personnel picking the corresponding agricultural products within the collection range of the agricultural products corresponding to the number to be sorted, so it can be considered that the number to be sorted meets the verification conditions. Since the agricultural products corresponding to the number to be sorted have been picked by the sorting personnel at this time, the number to be sorted can be determined as a sorted number. Among them, the verification condition refers to that the collection location is within the collection range and there is a personnel profile corresponding to the sorting personnel in the sorting monitoring data.
[0174] In some embodiments, the step S444 of “determining the collection location point when the monitoring device collects the sorting monitoring data” includes the following steps:
[0175] S4441, retrieve the bird's-eye view azimuth map and send it to the sorting end, and obtain the collection azimuth selected by the sorting end based on the bird's-eye view azimuth map.
[0176] When determining the collection location point of the monitoring equipment, this solution can configure a mark for each tree to display the positive direction, and determine that the direction where the mark is located is the positive direction. The sorting personnel can infer the picking direction corresponding to the agricultural products currently being picked based on the mark on the positive direction. For example, an upward arrow can be configured to indicate the positive direction. When the sorting personnel sees the upward arrow, it can be determined that the current picking direction is directly in front of the tree. When the sorting personnel do not see the upward arrow, the sorting personnel can infer that the current picking direction may be located on the side or behind the tree. After obtaining the picking direction, the overhead orientation map can be retrieved and sent to the sorting personnel. The sorting personnel can select the collection direction of the monitoring equipment in the overhead orientation map according to the current picking direction when collecting sorting monitoring data.
[0177] See also Figure 4 , is a schematic diagram of a top view azimuth diagram provided by an embodiment of the present invention, such as Figure 4 As shown in , the upward direction can be determined as the north direction, the downward direction can be determined as the south direction, the left direction can be determined as the west direction, and the right direction can be determined as the east direction. The upward direction can correspond to the positive direction, so the positive direction corresponds to the north direction in the overhead orientation map. Then, when the sorting personnel's current picking position is directly behind the tree, the sorting personnel can select the south direction as the collection direction of the monitoring equipment from the overhead orientation map.
[0178] S4442, obtaining a position point at a preset distance from the target sorting point in the collection direction in the agricultural product distribution map as a collection position point.
[0179] Specifically, this solution can pre-set a reasonable collection distance for the monitoring device, that is, a preset distance. After determining the collection orientation, in the direction corresponding to the collection orientation, a position point at the preset distance from the target sorting point can be determined as the collection position point, so that the monitoring device can be controlled to go to the corresponding collection position point to perform video collection of sorting monitoring data.
[0180] Through the above implementation, the collection location point of the monitoring device can be determined more accurately, thereby improving the accuracy of data collection.
[0181] S455, when all the numbers to be sorted meet the verification conditions, the sorting monitoring data are combined to obtain traceability data and sent to the user end.
[0182] When all the numbers to be sorted meet the verification conditions, it can be considered that the sorting personnel have completed picking all the agricultural products purchased by the user, and the picking process meets the requirements. The sorting monitoring data corresponding to each agricultural product can be merged and processed to obtain the corresponding traceability data and sent to the user. The user can trace back and view the picking process of each agricultural product.
[0183] Through the above implementation, users can use traceability data to trace back when problems occur with agricultural products.
[0184] See also Figure 5 , is a schematic diagram of a structure of an agricultural product traceability identification system based on the Internet of Things provided by an embodiment of the present invention, the agricultural product traceability identification system based on the Internet of Things includes:
[0185] A receiving module, used to receive a remote viewing location selected by a user terminal in the agricultural product purchasing area, and obtain the recorded data collected by the monitoring device based on the remote viewing location;
[0186] A screening module, used for screening a plurality of image frames corresponding to the recorded data according to an image screening model to obtain a customized set corresponding to the user end;
[0187] An acquisition module, used for acquiring the purchase conditions input by the user terminal, performing condition matching analysis on the customized set according to the purchase conditions, obtaining purchase recommendation data and sending it to the user terminal;
[0188] The generating module is used to obtain the sorting monitoring data corresponding to the sorting terminal according to the purchasing data of the user terminal, and generate the traceability data according to the sorting monitoring data and send it to the user terminal.
[0189] Figure 5 The system of the embodiment shown can be used to perform Figure 1 The implementation principles and technical effects of the steps in the method embodiment shown are similar and will not be repeated here.
[0190] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 replace some or all of the technical features therein with equivalents. 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 invention.
Claims
1. A method for tracing and identifying agricultural products based on the Internet of Things, characterized in that: include: Receiving a remote viewing location selected by a user terminal in an agricultural product purchasing area, the agricultural product purchasing area includes an area corresponding to an agricultural product picking garden, the remote viewing location refers to a distribution location corresponding to a specific agricultural product that the user wants to purchase and view in the agricultural product purchasing area, and obtaining recorded data collected by a monitoring device based on the remote viewing location, including: after obtaining the remote viewing location, controlling the monitoring device to go to the remote viewing location, performing video collection on the purchased agricultural product selected by the user, and obtaining video recording data corresponding to the agricultural product at the corresponding location; Filtering a plurality of image frames corresponding to the recorded data according to the image filtering model to obtain a customized set corresponding to the user end includes: Acquire the type of agricultural product corresponding to the remote viewing location based on the image screening model, and perform target object detection on each of the image frames according to the type of agricultural product; Determine that an image frame containing a target object corresponding to the agricultural product type is a customized frame, and obtain a customized set according to the customized frame, wherein the target object refers to the agricultural product that the user wants to purchase; Acquiring the purchase conditions input by the user terminal, performing condition matching analysis on the customized set according to the purchase conditions, obtaining purchase recommendation data and sending the data to the user terminal, wherein the purchase recommendation data is a plurality of image frames in the customized set that meet the user's purchase conditions; Acquire sorting monitoring data corresponding to the sorting end according to the purchase data of the user end, generate traceability data according to the sorting monitoring data and send it to the user end; Acquiring the purchase conditions input by the user terminal, performing condition matching analysis on the customized set according to the purchase conditions, and obtaining purchase recommendation data to send to the user terminal, including: Determining selected data of the remote viewing location, and updating the customized collection according to the selected data to obtain retained data; The determining the selected data of the remote viewing location, and updating the customized collection according to the selected data to obtain the retained data, comprises: Acquire the selection order of the remote viewing locations by the user terminal within a preset time period, and determine the customized set corresponding to the user terminal whose selection order is not equal to the preferred order as the set to be processed, wherein the selection order refers to the order in which the user terminal selects the remote viewing locations within the preset time period, and the preferred order refers to the order corresponding to the user terminal that selects the remote viewing location as the purchase location for the first time within the preset time period; Counting the sorted numbers corresponding to the remote viewing positions within the preset time period, and obtaining selected data according to the sorted numbers, including: attaching a numbered label to the agricultural product corresponding to each remote viewing position, when the monitoring device performs video acquisition, the agricultural products in the acquired video have corresponding numbers, the user determines the agricultural product to be purchased according to the number, when the agricultural product has been purchased, the corresponding number is determined as the sorted number, counting the sorted numbers corresponding to all the agricultural products that have been purchased at the remote viewing position within the preset time period, and obtaining corresponding selected data according to the multiple sorted numbers; Acquire multiple targets corresponding to each image frame in the set to be processed, and determine the product number corresponding to each target; Determine that the target object corresponding to the product number that is the same as the sorted number is a selected object, clear the selected object to obtain a retained frame, and obtain retained data according to the retained frame; receiving the purchase conditions input by the user terminal, wherein the purchase conditions at least include color conditions and size conditions; Obtaining target objects in the retained data, performing condition matching analysis according to the purchase conditions and feature information corresponding to each of the target objects, obtaining purchase recommendation data that meets the purchase conditions and sending the data to the user terminal; Acquiring sorting monitoring data corresponding to the sorting end according to the purchase data of the user end, generating traceability data according to the sorting monitoring data and sending it to the user end, including: The product number selected by the user terminal based on the purchase recommendation data is obtained as the number to be sorted, and the agricultural product distribution map corresponding to the agricultural product purchase area is retrieved, wherein the number to be sorted refers to the product number corresponding to the agricultural product purchased by the user, and the agricultural product corresponding to the number to be sorted is the agricultural product to be picked by the sorting personnel, and the agricultural product distribution map refers to a layout map showing the distribution of various agricultural products in the agricultural product purchase area; Determine the target sorting point corresponding to the remote viewing position in the agricultural product distribution map, update the number slot corresponding to the target sorting point based on the to-be-sorted number to obtain sorting instruction data and send it to the sorting end, wherein the target sorting point refers to the position point corresponding to the remote viewing position in the agricultural product distribution map, the number slot refers to the slot for displaying the product number of the agricultural product, and the sorting instruction data is data for instructing the sorting personnel to pick the agricultural products selected by the user; In response to the sorting monitoring request sent by the sorting terminal to the corresponding number to be sorted, the monitoring device is controlled to collect video to obtain sorting monitoring data, wherein the control of the monitoring device to collect video to obtain the sorting monitoring data includes: the monitoring device records the picking process of the sorting personnel in full to obtain the sorting monitoring data corresponding to each agricultural product; Verifying the to-be-sorted numbers according to the sorting monitoring data, and determining the to-be-sorted numbers that meet the verification conditions as sorted numbers; When all the numbers to be sorted meet the verification conditions, the sorting monitoring data are combined to obtain traceability data and sent to the user end; Verifying the to-be-sorted numbers according to the sorting monitoring data, and determining the to-be-sorted numbers that meet the verification conditions as sorted numbers, includes: The image frame where the target object corresponding to the to-be-sorted number in the customized set is located is obtained as a verification frame, and a collection position corresponding to the verification frame is determined, where the collection position refers to the corresponding shooting position when the monitoring device collects the verification frame; Determine a collection point corresponding to the collection position in the agricultural product distribution map, and connect the target sorting point and the collection point to obtain a collection positioning line; The angle range between the acquisition positioning lines with the largest angle is obtained as the acquisition range corresponding to the number to be sorted, wherein the acquisition range refers to the maximum activity range of the monitoring device when collecting the target object corresponding to the number to be sorted; Determine a collection position point when the monitoring device collects the sorting monitoring data. When the collection position point is located in the collection range and there is a personnel outline in the sorting monitoring data, determine that the to-be-sorted number meets the verification condition, and obtain the corresponding to-be-sorted number as the sorted number.
2. The method according to claim 1, characterized in that: Acquiring multiple targets corresponding to each image frame in the set to be processed, and determining a product number corresponding to each target, including: Arranging the image frames in the processing set in time order to obtain an image frame sequence, and sequentially acquiring adjacent image frames in the image frame sequence as target frames; The center point of each target object in each target frame is obtained as a positioning point, and the target whose interval distance between the positioning points in adjacent target frames is less than the distance change threshold is determined as the undetermined object. The interval distance calculation method is: the center point of the target frame is determined as the coordinate origin, the center point of each target object in each target frame is determined as the positioning point, the coordinate value corresponding to each positioning point is obtained, and the interval distance between each positioning point corresponding to the adjacent target frames is calculated according to the coordinate value; Comparing the outline similarities of the objects to be determined corresponding to the adjacent target frames, and determining that the objects to be determined whose similarities are greater than a similarity threshold are the same target object combination; The identification contour corresponding to each target object combination is obtained, and the identification contour is numbered and identified to obtain the product number corresponding to each target object in each target object combination, wherein the identification contour refers to the numbered contour on the agricultural product.
3. The method according to claim 2, characterized in that Acquiring the identification contours corresponding to each of the target object combinations, performing number identification on the identification contours, and obtaining the product numbers corresponding to each of the targets in each of the target object combinations, including: Determine a pixel point in the target object corresponding to the target object combination whose pixel value is located in the identification pixel interval as an identification point; Obtain a set of marking points according to the adjacent marking points, and obtain a marking contour based on the set of marking points; The identification contour with the largest area is numbered and identified to obtain the product number corresponding to each target object in the target object combination.
4. The method according to claim 1, characterized in that: Acquiring the target objects in the retained data, performing condition matching analysis according to the purchase conditions and the feature information corresponding to each of the target objects, obtaining purchase recommendation data that meets the purchase conditions and sending it to the user terminal, including: Determine the color pixel interval corresponding to the color condition and the size level corresponding to the size condition; Obtaining the pixel mean of each target object, and determining the target object whose pixel mean is in the color pixel interval as a first screening object; Determine the contour area of each of the first screening objects, obtain the area interval corresponding to the size level, determine that the first screening objects with contour areas in the area interval meet the purchase conditions, and obtain the first screening objects with contour areas in the area interval as the second screening objects, wherein the feature information includes pixel mean and contour area; The recommendation frame is retrieved to frame and display the secondary screening objects in the corresponding image frame to obtain a recommendation frame, and video fusion is performed on each of the recommendation frames according to a time sequence to obtain purchase recommendation data and send it to the user end.
5. The method according to claim 1, characterized in that Determining a collection position point when the monitoring device collects the sorting monitoring data includes: Retrieving a bird's-eye view azimuth map and sending it to the sorting end, and obtaining the collection azimuth of the monitoring equipment selected by the sorting end based on the bird's-eye view azimuth map; A position point in the agricultural product distribution map at a preset distance from the target sorting point in the collection direction is obtained as a collection position point.
Citation Information
Patent Citations
Power line inspection protection screen intelligent identification system construction method
CN107563396A
Farm management method and system
CN107657498A
A modern agricultural business model based on the Internet
CN109242258A
Method and device for detecting abnormal behaviors between objects
CN112016413A