Agricultural product tracing method and system based on data analysis
By extracting and analyzing the image characteristics of different parts of the river crab, calculating features highlight the characterization parameters and sorting sequence, optimizing the traceability analysis sequence, solving the problem of low traceability efficiency and accuracy of the origin of river crabs in the existing technology, and achieving more efficient and accurate traceability results.
Patent Information
- Application Number
- CN202411855723.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art does not consider the data characterization of different parts of river crabs in different origins in the image dimensions of river crabs in the traceability of river crabs, resulting in slow analysis speed and low efficiency.
By extracting sample images from different parts of river crabs in each place of origin, determine their feature highlighting factors and texture complexity, calculate the feature highlighting characterization parameters, establish the feature highlighting sorting sequence, and optimize the comparison sequence to improve traceability efficiency and accuracy.
The efficiency and accuracy of tracing the origin of river crabs has been improved, and the problems of low efficiency and low accuracy in the existing technology have been overcome, so that the origin information of river crabs can be quickly and accurately determined.
Smart Images

Figure CN119762090A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of feature fingerprint recognition, and in particular to a method and system for tracing agricultural products based on data analysis. Background Art
[0002] Most of the existing origin tracing methods analyze the crab as a whole, lacking targeted research on the characteristics of different parts of the crab. Crabs from different origins may differ in appearance, texture, and feature highlighting factors, and these differences may be more obvious in different parts of the crab. Therefore, it is necessary to develop an origin tracing method based on the characteristic fingerprints of different parts of the crab to improve the accuracy and reliability of origin tracing.
[0003] Chinese Patent Publication No.: CN114241248B, discloses a crab origin traceability method and system, including: obtaining a carapace image of a purchased target crab; uploading the carapace image of the target crab to a blockchain, and determining the target origin traceability information of the target crab by calling a traceability smart contract deployed on the blockchain. The system executes the method. The present invention applies image classification technology to the origin identification and traceability of crabs, avoiding the phenomenon that traditional crab buckle anti-counterfeiting methods are easily counterfeited and used later, and can prevent market disorder caused by illegal merchants counterfeiting the origin, thereby safeguarding the legitimate rights and interests of consumers and merchants.
[0004] However, the prior art still has the following problems:
[0005] In the existing method of tracing the origin using images, the data representation of different parts of river crabs from different origins in the image dimension is not taken into account. In actual situations, river crabs from some origins have more obvious characteristics in certain parts, and some characteristics of river crabs from some origins are more similar to the corresponding parts of river crabs from other origins. If the same analysis method is used for sample images of various types of river crabs, the analysis speed will be slow and the efficiency will be low when faced with massive image samples. Summary of the invention
[0006] To this end, the present invention provides a method and system for tracing agricultural products based on data analysis, so as to overcome the problem that the prior art does not consider the different data representativeness of different parts of river crabs from different origins in the image dimension, and adopts the same analysis method for sample images of various types of river crabs. When faced with massive image samples, the analysis speed is slow and the efficiency is low.
[0007] To achieve the above object, the present invention provides a method for tracing agricultural products based on data analysis, comprising:
[0008] Extract sample images of different parts of river crabs from different origins to determine the characteristic highlighting factors of each part of river crabs from different origins, including:
[0009] Compare the sample images of different parts of river crabs from a single origin with the sample images of corresponding parts of river crabs from other origins, calculate the mean similarity, and obtain the texture complexity of each part of the river crabs from the single origin;
[0010] According to the characteristic highlighting factors of each part of the river crab from different origins, the characteristic highlighting characterization parameters of each part of the river crab from each origin are calculated to determine the characteristic highlighting ranking sequence of each part of the river crab from each origin;
[0011] Obtaining the actual image of the river crab uploaded by the user and the corresponding origin information of the river crab, obtaining the maximum feature highlighting characterization parameters of each part of the river crab of the corresponding origin according to the origin information, and analyzing each actual image according to the determination result, including:
[0012] Acquire a feature highlighting sorting sequence according to the origin information, determine a comparison order for the actual images of each part of the crab according to the feature highlighting sorting sequence, and call the actual images of the corresponding parts and the sample images of the corresponding parts in sequence according to the comparison order to compare them, determine the similarity, and judge whether the origin information is correct;
[0013] Alternatively, obtain the complete actual image of the river crab and compare it with the corresponding complete sample image to determine the similarity to judge whether the origin information is correct.
[0014] Furthermore, the characteristic parameters of river crabs from different origins and parts were calculated, including:
[0015] Obtain feature highlighting factors, including similarity mean and texture complexity;
[0016] Determine the ratio of the preset similarity standard threshold to the similarity mean as the first feature highlighting factor;
[0017] Determining a ratio of the texture complexity to a preset texture complexity standard threshold as a second feature highlighting factor;
[0018] The sum of the first feature highlighting factor and the second feature highlighting factor is determined as the feature highlighting characterization parameter.
[0019] Furthermore, the process of obtaining the texture complexity of each part of the river crab from a single origin includes:
[0020] Calibrate the texture contours in the sample images of the crab parts from a single origin and determine the average number of texture contours;
[0021] Extracting RGB values of the image area in the texture profile and determining an average number of the extracted RGB values;
[0022] Solving the ratio of the average number of texture contours to the average number of reference texture contours as the first texture complexity factor;
[0023] Calculating the ratio of the average number of extracted RGB values to the average number of reference RGB values as a second texture complexity factor;
[0024] The texture complexity is determined by performing a weighted summation of the first texture complexity factor and the second texture complexity factor.
[0025] Furthermore, the process of determining the characteristic highlight ranking sequence of each part of the river crab from each origin includes:
[0026] Determine the characteristic highlighting parameters corresponding to each part of the crab from a single origin;
[0027] The feature highlighting characterization parameters are arranged in descending order to obtain the feature highlighting sorting sequence.
[0028] Further, each actual image is analyzed according to the determination result, including:
[0029] Determine the feature highlighting sorting sequence of each part of the crab corresponding to the origin according to the origin information, and determine the maximum feature highlighting characterization parameter;
[0030] If the maximum feature highlighting characterization parameter is greater than a predetermined highlighting characterization parameter threshold reference, a feature highlighting sorting sequence is obtained according to the origin information, a comparison order for the actual images of each part of the crab is determined according to the feature highlighting sorting sequence, and the actual images of the corresponding parts are sequentially called and compared with the sample images of the corresponding parts according to the comparison order to determine the similarity, so as to determine whether the origin information is correct;
[0031] If the maximum feature highlighting characterization parameter is less than or equal to the predetermined highlighting characterization parameter threshold benchmark, the complete actual image of the river crab is obtained and compared with the corresponding complete sample image to determine the similarity to determine whether the origin information is correct.
[0032] Furthermore, the process of determining the comparison order of the actual images of various parts of the crab according to the feature highlighting sorting sequence includes:
[0033] Determine the parts corresponding to the feature highlight sorting sequence in turn, obtain the part sorting, and generate the part number sorting;
[0034] Among them, each part corresponds to the part number one by one.
[0035] Furthermore, the actual image of the corresponding part and the sample image of the corresponding part are called in sequence according to the comparison order for comparison, and the similarity is determined to determine whether the origin information is correct, including:
[0036] If the similarity of the actual image of any part is greater than the preset part similarity standard threshold, the origin information is determined to be correct, and the actual image of the corresponding part is stopped from being compared with the sample image of the corresponding part;
[0037] If the similarity corresponding to the actual images of each part is less than the preset part similarity standard threshold, the origin information is incorrect.
[0038] Further, obtaining the complete actual image of the river crab and comparing it with the corresponding complete sample image to determine the similarity, so as to determine whether the origin information is correct, including:
[0039] If the similarity between the current complete actual image of the river crab and the corresponding complete image is less than the preset complete sample similarity standard threshold, the origin information is incorrect.
[0040] Furthermore, the actual image of the river crab uploaded by the user terminal must include actual images of various parts of the river crab and the complete actual image of the river crab.
[0041] Furthermore, the present invention also provides an agricultural product traceability system based on data analysis, comprising:
[0042] A database module is used to store pre-extracted sample images of different parts of river crabs from different origins, and determine the characteristic highlighting factors of various parts of river crabs from different origins;
[0043] A feature comparison module, which is connected to the database module, is used to calculate the feature highlighting characterization parameters of each part of the crab from each origin according to the feature highlighting factors of each part of the crab from different origins, so as to determine the feature highlighting ranking sequence of each part of the crab from each origin;
[0044] An information receiving module, which is connected to the user terminal, and the user obtains the actual image of the river crab uploaded by the user terminal and the corresponding origin information of the river crab;
[0045] The verification module is connected to the database module, the feature comparison module and the information receiving module respectively, and is used to obtain the maximum feature highlighting characterization parameters of each part of the crab of the corresponding origin according to the origin information, and analyze each actual image according to the determination result, including:
[0046] Acquire a feature highlighting sorting sequence according to the origin information, determine a comparison order for the actual images of each part of the crab according to the feature highlighting sorting sequence, and call the actual images of the corresponding parts and the sample images of the corresponding parts in sequence according to the comparison order to compare them, determine the similarity, and judge whether the origin information is correct;
[0047] Alternatively, obtain the complete actual image of the river crab and compare it with the corresponding complete sample image to determine the similarity to judge whether the origin information is correct.
[0048] Compared with the prior art, the present invention establishes a sample image library by extracting sample images of different parts of river crabs from different origins, and can calculate the feature highlighting characterization parameters of each part of river crabs from different origins by determining the feature highlighting factors of each part of river crabs from different origins, thereby quickly determining the feature highlighting sorting sequence of each part of river crabs from different origins, improving the efficiency of river crab origin tracing, and at the same time, by obtaining the actual image of river crabs uploaded by the user end and the origin information corresponding to the river crabs, the maximum feature highlighting characterization parameters of each part of river crabs from this origin can be accurately obtained, improving the accuracy of river crab origin tracing, and overcoming the problem of low efficiency and low accuracy in determining the corresponding origin information due to different feature highlighting factors of different parts of river crabs from different origins in the prior art. By determining the comparison order of the actual images of each part of the river crab, and calling the actual image of the corresponding part and the sample image of the corresponding part in turn according to the comparison order for comparison, it can accurately determine whether the origin information of the river crab uploaded by the user end is correct.
[0049] In particular, the present invention compares sample images of different parts of river crabs from a single origin with images of corresponding parts from other origins, and comprehensively considers the characteristic differences of different parts. In actual situations, river crabs from some origins have more obvious characteristics in certain parts, and some characteristics of river crabs from some origins are more similar to the corresponding parts of river crabs from other origins. Therefore, the data representativeness of sample images of various parts is different. In some cases, the origin can be identified based on sample images of parts with strong data representativeness. Therefore, the present invention considers determining the characteristic highlighting characterization parameters of each part to provide data support for the subsequent selection of analysis methods when analyzing actual images, and then adaptively selects the analysis method for the actual images, reduces the data processing volume and improves the traceability efficiency while ensuring reliability.
[0050] In particular, the present invention provides an important feature dimension for origin tracing by obtaining the texture complexity of each part of the crab from a single origin. Texture complexity reflects the microstructural characteristics of parts such as the crab shell. Environmental factors from different origins may cause different texture complexities in different parts of the crab. Combining texture complexity with image similarity can characterize the feature prominence of the parts and the data representation.
[0051] In particular, the present invention analyzes actual images in which the maximum feature highlighting characterization parameter is greater than a predetermined highlighting characterization parameter threshold benchmark. In the above case, there are areas where the characteristics of the river crabs corresponding to the origin are more prominent, and the data representativeness is strong. Therefore, the comparison order of the actual images of various parts of the river crabs is determined according to the feature highlighting sorting sequence, and the actual images of the corresponding parts are called in turn according to the comparison order for comparison with the sample images of the corresponding parts, which can reduce the noise data introduced by the global comparison, and give priority to analyzing the actual images corresponding to the parts with strong data representativeness, thereby improving the analysis efficiency and ensuring the traceability accuracy under the premise of ensuring reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a flowchart of the steps of the agricultural product traceability method based on data analysis according to an embodiment of the present invention;
[0053] Figure 2 A flowchart of the steps for calculating characteristic highlighting characterization parameters of various parts of river crabs from various origins according to an embodiment of the present invention;
[0054] Figure 3 A flowchart of the steps for obtaining the texture complexity of each part of a river crab from a single origin according to an embodiment of the present invention;
[0055] Figure 4 The present invention is a structural block diagram of an agricultural product traceability system based on data analysis according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0057] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0058] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0059] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0060] See also Figure 1 As shown, it is a flowchart of the steps of the agricultural product traceability method based on data analysis according to an embodiment of the present invention. The present invention provides an agricultural product traceability method based on data analysis, comprising:
[0061] Step S1, extracting sample images of different parts of river crabs from different origins to determine the characteristic highlighting factors of each part of river crabs from different origins, including:
[0062] Compare the sample images of different parts of river crabs from a single origin with the sample images of corresponding parts of river crabs from other origins, calculate the mean similarity, and obtain the texture complexity of each part of the river crabs from the single origin;
[0063] Step S2, calculating the characteristic highlighting parameters of each part of the crab from each origin according to the characteristic highlighting factors of each part of the crab from different origins, so as to determine the characteristic highlighting ranking sequence of each part of the crab from each origin;
[0064] Step S3, obtaining the actual image of the river crab uploaded by the user and the origin information of the river crab, obtaining the maximum feature highlighting characterization parameters of each part of the river crab of the corresponding origin according to the origin information, and analyzing each actual image according to the determination result, including:
[0065] Acquire a feature highlighting sorting sequence according to the origin information, determine a comparison order for the actual images of each part of the crab according to the feature highlighting sorting sequence, and call the actual images of the corresponding parts and the sample images of the corresponding parts in sequence according to the comparison order to compare them, determine the similarity, and judge whether the origin information is correct;
[0066] Alternatively, obtain the complete actual image of the river crab and compare it with the corresponding complete sample image to determine the similarity to judge whether the origin information is correct.
[0067] Specifically, the types of river crabs are the biological species of river crabs, which will not be elaborated here.
[0068] Specifically, there is no limitation on the parts of the river crab. In practice, they can be divided into the crab shell, head, crab legs, and tail. Other forms can also be used, which will not be elaborated here.
[0069] Specifically, the present invention establishes a sample image library by extracting sample images of different parts of river crabs from various origins, and by determining the feature highlighting factors of various parts of river crabs from different origins, the feature highlighting characterization parameters of river crabs and parts from various origins can be calculated. The purpose is to quantify the feature highlighting of corresponding parts of various types of river crabs from various origins. In actual situations, there are obvious differences between the parts of river crabs from some origins and the corresponding parts of river crabs from other origins, and the parts have certain texture characteristics. In this case, the highlighting of the corresponding parts of this type of river crabs has strong data representation. Therefore, by identifying the feature highlighting factors and calculating the feature highlighting parameters corresponding to each part to characterize the above situation, for this type of river crabs, when tracing the source later, it is possible to preferentially extract images of parts with strong data representation for analysis, thereby improving the traceability efficiency while ensuring the traceability accuracy.
[0070] Specifically, there is no limitation on the method of determining the similarity between images. The corresponding image processing algorithm or model can be imported into the logic component to implement the corresponding function. There is no specific limitation on the image processing algorithm. For example, the method of calculating the structural similarity index can be used, or a pre-trained deep learning model can be used to extract the feature representation of the image, and then the cosine similarity between the features is calculated as the similarity. Of course, other methods can also be used, which will not be repeated here.
[0071] See also Figure 2 As shown, it is a flow chart of the steps of calculating the characteristic highlighting characterization parameters of each part of the river crab from each origin according to an embodiment of the present invention. In step S1, calculating the characteristic highlighting characterization parameters of each part of the river crab from each origin includes:
[0072] Step S11, obtaining feature highlighting factors, including similarity mean and texture complexity;
[0073] Step S12: determining the ratio of the preset similarity standard threshold to the similarity mean as the first feature highlighting factor;
[0074] Step S13, determining the ratio of the texture complexity to a preset texture complexity standard threshold as a second feature highlighting factor;
[0075] Step S14: determine the sum of the first feature highlighting factor and the second feature highlighting factor as the feature highlighting representation parameter.
[0076] In implementation, the preset similarity standard threshold is pre-set, wherein the similarity mean of the same parts of various types of river crabs is predetermined, and the similarity threshold is set to the product of the similarity mean and the precision coefficient, and the precision coefficient is selected within the interval [0.85, 0.95].
[0077] In implementation, the preset texture complexity standard threshold is pre-set, wherein the texture complexity of images of different parts of various types of river crabs is pre-determined, the texture complexity mean is solved, and the texture complexity standard threshold is set to the product of the texture complexity mean and the complexity offset coefficient, and the complexity offset coefficient is between the interval [1.2, 1.3].
[0078] The present invention compares sample images of different parts of river crabs from a single origin with images of corresponding parts from other origins, and comprehensively considers the characteristic differences of different parts. In actual situations, river crabs from some origins have more obvious characteristics in certain parts, and some characteristics of river crabs from some origins are more similar to the corresponding parts of river crabs from other origins. Therefore, the data representativeness of sample images of various parts is different. In some cases, the origin can be identified based on sample images of parts with strong data representativeness. Therefore, the present invention considers determining the characteristic highlighting characterization parameters of each part to provide data support for the subsequent selection of analysis methods when analyzing actual images, and then adaptively selects the analysis method for the actual image, reduces the data processing amount and improves the traceability efficiency while ensuring reliability.
[0079] See also Figure 3 As shown, it is a flowchart of the steps of obtaining the texture complexity of each part of the river crab from a single origin according to an embodiment of the present invention. In step S1, the process of obtaining the texture complexity of each part of the river crab from a single origin includes:
[0080] Step S21, calibrating the texture contours in the sample images of the crab parts from a single origin, and determining the average number of texture contours;
[0081] Step S22, extracting RGB values of the image area in the texture profile, and determining the average number of the extracted RGB values;
[0082] Step S23, calculating the ratio of the average number of texture contours to the average number of reference texture contours as a first texture complexity factor;
[0083] Step S24, calculating the ratio of the average number of extracted RGB values to the average number of reference RGB values as a second texture complexity factor;
[0084] Step S25: Determine the texture complexity by taking a weighted sum of the first texture complexity factor and the second texture complexity factor.
[0085] Specifically, the benchmark texture contour average number and the benchmark RGB value are pre-set, wherein sample images of several parts of river crabs are obtained, the texture contour average number and the RGB value of the image area are determined, the average number of RGB values is extracted, and the average number of RGB values is used as the benchmark RGB value average number, and the texture contour average number is used as the benchmark texture contour average number.
[0086] The present invention provides an important feature dimension for origin tracing by obtaining the texture complexity of each part of the crab from a single origin. Texture complexity reflects the microstructural characteristics of the crab shell and other parts. Environmental factors from different origins may cause the texture complexity of different parts of the crab to be different. Combining texture complexity with image similarity can characterize the feature prominence of the parts and the data representation.
[0087] Specifically, the process of determining the characteristic highlight ranking sequence of each part of river crabs from each origin includes:
[0088] Determine the characteristic highlighting parameters corresponding to each part of the crab from a single origin;
[0089] The feature highlighting characterization parameters are arranged in descending order to obtain the feature highlighting sorting sequence.
[0090] Specifically, in step S3, each actual image is analyzed according to the determination result, including:
[0091] Determine the feature highlighting sorting sequence of each part of the crab corresponding to the origin according to the origin information, and determine the maximum feature highlighting characterization parameter;
[0092] If the maximum feature highlighting characterization parameter is greater than a predetermined highlighting characterization parameter threshold reference, a feature highlighting sorting sequence is obtained according to the origin information, a comparison order for the actual images of each part of the crab is determined according to the feature highlighting sorting sequence, and the actual images of the corresponding parts are sequentially called and compared with the sample images of the corresponding parts according to the comparison order to determine the similarity, so as to determine whether the origin information is correct;
[0093] If the maximum feature highlighting characterization parameter is less than or equal to the predetermined highlighting characterization parameter threshold benchmark, the complete actual image of the river crab is obtained and compared with the corresponding complete sample image to determine the similarity to determine whether the origin information is correct.
[0094] In implementation, the predetermined salient characterization parameter threshold is in the interval [2.25, 2.5].
[0095] Specifically, the process of determining the comparison order of the actual images of various parts of the crab according to the feature highlighting sorting sequence includes:
[0096] Determine the parts corresponding to the feature highlight sorting sequence in turn, obtain the part sorting, and generate the part number sorting;
[0097] Among them, each part corresponds to the part number one by one.
[0098] In implementation, optionally,
[0099] The parts can be assigned numbers. For example, the four parts are: 1. Shell; 2. Head; 3. Leg; 4. Tail;
[0100] For example, the characteristic highlighting parameter of the crab legs is 2.6, the characteristic highlighting parameter of the head is 2.75, the characteristic highlighting parameter of the crab shell is 2.55, and the characteristic highlighting parameter of the crab legs is 2.65;
[0101] The corresponding feature highlight ranking sequence is 2.75, 2.65, 2.6, 2.55;
[0102] The corresponding parts are ranked as 2, 3, 1, 2.
[0103] Specifically, in step S3, the actual image of the corresponding part and the sample image of the corresponding part are called in sequence according to the comparison order to compare and determine the similarity to determine whether the origin information is correct, including:
[0104] If the similarity of the actual image of any part is greater than the preset part similarity standard threshold, the origin information is determined to be correct, and the actual image of the corresponding part is stopped from being compared with the sample image of the corresponding part;
[0105] If the similarity corresponding to the actual images of each part is less than the preset part similarity standard threshold, the origin information is incorrect.
[0106] In implementation, the part similarity standard threshold is pre-set, and several sample images of the same part of the same type of river crab from the same origin are obtained in advance, the mean similarity between the sample images is determined, and the ratio of the similarity mean to the offset coefficient is determined as the part similarity standard threshold, and the local image offset coefficient is selected between the interval [0.85, 0.95].
[0107] Specifically, in step S3, the complete actual image of the river crab is obtained and compared with the corresponding complete sample image to determine the similarity to determine whether the origin information is correct, including:
[0108] If the similarity between the current complete actual image of the river crab and the corresponding complete image is less than the preset complete sample similarity standard threshold, the origin information is incorrect.
[0109] The complete sample similarity standard threshold is preset. Several complete sample images of the same type of crabs from the same origin are obtained in advance, and the mean similarity between the complete sample images is determined. The ratio of the similarity mean to the offset coefficient is determined as the part similarity standard threshold. The complete image offset coefficient is selected between the interval [1.05, 1.1].
[0110] Specifically, the actual images of the river crab uploaded by the user terminal must include actual images of various parts of the river crab and the complete actual image of the river crab.
[0111] See also Figure 4 As shown, it is a structural block diagram of an agricultural product traceability system based on data analysis according to an embodiment of the present invention. The present invention provides an agricultural product traceability system based on data analysis, comprising:
[0112] A database module is used to store pre-extracted sample images of different parts of river crabs from different origins, and determine the characteristic highlighting factors of various parts of river crabs from different origins;
[0113] A feature comparison module, which is connected to the database module, is used to calculate the feature highlighting characterization parameters of each part of the crab from each origin according to the feature highlighting factors of each part of the crab from different origins, so as to determine the feature highlighting ranking sequence of each part of the crab from each origin;
[0114] An information receiving module, which is connected to the user terminal, and the user obtains the actual image of the river crab uploaded by the user terminal and the corresponding origin information of the river crab;
[0115] The verification module is connected to the database module, the feature comparison module and the information receiving module respectively, and is used to obtain the maximum feature highlighting characterization parameters of each part of the crab of the corresponding origin according to the origin information, and analyze each actual image according to the determination result, including:
[0116] Acquire a feature highlighting sorting sequence according to the origin information, determine a comparison order for the actual images of each part of the crab according to the feature highlighting sorting sequence, and call the actual images of the corresponding parts and the sample images of the corresponding parts in sequence according to the comparison order to compare them, determine the similarity, and judge whether the origin information is correct;
[0117] Alternatively, obtain the complete actual image of the river crab and compare it with the corresponding complete sample image to determine the similarity to judge whether the origin information is correct.
[0118] Specifically, each module may be composed of logic components, including field programmable components, computers or microprocessors in computers.
[0119] The present invention analyzes actual images in which the maximum feature highlighting characterization parameter is greater than a predetermined highlighting characterization parameter threshold benchmark. In the above case, there are areas where the characteristics of the river crabs corresponding to the origin are relatively prominent, and the data representativeness is strong. Therefore, the comparison order of the actual images of various parts of the river crabs is determined according to the feature highlighting sorting sequence, and the actual images of the corresponding parts are called in turn according to the comparison order for comparison with the sample images of the corresponding parts. This can reduce the noise data introduced by the global comparison, and give priority to analyzing the actual images corresponding to the parts with strong data representativeness, thereby improving the analysis efficiency and ensuring the traceability accuracy under the premise of ensuring reliability.
[0120] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A method for tracing agricultural products based on data analysis, characterized in that: include: Extract sample images of different parts of river crabs from different origins to determine the characteristic highlighting factors of each part of river crabs from different origins, including: Compare sample images of different parts of river crabs from a single origin with sample images of corresponding parts of river crabs from other origins, calculate the mean similarity, and obtain the texture complexity of each part of the river crabs from the single origin; According to the characteristic highlighting factors of each part of the river crab from different origins, the characteristic highlighting characterization parameters of each part of the river crab from each origin are calculated to determine the characteristic highlighting ranking sequence of each part of the river crab from each origin; Obtaining the actual image of the river crab uploaded by the user and the corresponding origin information of the river crab, obtaining the maximum feature highlighting characterization parameters of each part of the river crab of the corresponding origin according to the origin information, and analyzing each actual image according to the determination result, including: Acquire a feature highlighting sorting sequence according to the origin information, determine a comparison order for the actual images of each part of the crab according to the feature highlighting sorting sequence, and call the actual images of the corresponding parts and the sample images of the corresponding parts in sequence according to the comparison order to compare them, determine the similarity, and judge whether the origin information is correct; Alternatively, obtain the complete actual image of the river crab and compare it with the corresponding complete sample image to determine the similarity to judge whether the origin information is correct.
2. The agricultural product traceability method based on data analysis according to claim 1, characterized in that: The characteristic parameters of each part of river crabs from different origins are calculated, including: Obtain feature highlighting factors, including similarity mean and texture complexity; Determine the ratio of a preset similarity standard threshold to the similarity mean as a first feature highlighting factor; Determining a ratio of the texture complexity to a preset texture complexity standard threshold as a second feature highlighting factor; The sum of the first feature highlighting factor and the second feature highlighting factor is determined as the feature highlighting characterization parameter.
3. The agricultural product traceability method based on data analysis according to claim 2 is characterized in that: The process of obtaining the texture complexity of each part of the river crab from a single origin includes: Calibrate the texture contours in the sample images of the crab parts from a single origin and determine the average number of texture contours; Extracting RGB values of the image area in the texture profile and determining an average number of the extracted RGB values; Solving the ratio of the average number of texture contours to the average number of reference texture contours as the first texture complexity factor; Calculating the ratio of the average number of extracted RGB values to the average number of reference RGB values as a second texture complexity factor; The texture complexity is determined by performing a weighted summation of the first texture complexity factor and the second texture complexity factor.
4. The agricultural product traceability method based on data analysis according to claim 1, characterized in that: The process of determining the characteristic highlighting sequence of each part of the river crab from each origin includes: Determine the characteristic highlighting parameters corresponding to each part of the crab from a single origin; The feature highlighting characterization parameters are arranged in descending order to obtain the feature highlighting sorting sequence.
5. The agricultural product traceability method based on data analysis according to claim 1, characterized in that: Analyze each actual image based on the judgment result, including: Determine the feature highlighting sorting sequence of each part of the crab corresponding to the origin according to the origin information, and determine the maximum feature highlighting characterization parameter; If the maximum feature highlighting characterization parameter is greater than a predetermined highlighting characterization parameter threshold reference, a feature highlighting sorting sequence is obtained according to the origin information, a comparison order for the actual images of each part of the crab is determined according to the feature highlighting sorting sequence, and the actual images of the corresponding parts are sequentially called and compared with the sample images of the corresponding parts according to the comparison order to determine the similarity, so as to determine whether the origin information is correct; If the maximum feature highlighting characterization parameter is less than or equal to the predetermined highlighting characterization parameter threshold benchmark, the complete actual image of the river crab is obtained and compared with the corresponding complete sample image to determine the similarity to determine whether the origin information is correct.
6. The agricultural product traceability method based on data analysis according to claim 4 is characterized in that: The process of determining the comparison order of the actual images of various parts of the crab according to the feature highlighting sorting sequence includes: Determine the parts corresponding to the feature highlight sorting sequence in turn, obtain the part sorting, and generate the part number sorting; Among them, each part corresponds to the part number one by one.
7. The agricultural product traceability method based on data analysis according to claim 1, characterized in that: According to the comparison order, the actual image of the corresponding part and the sample image of the corresponding part are called in sequence for comparison to determine the similarity so as to determine whether the origin information is correct, including: If the similarity of the actual image of any part is greater than the preset part similarity standard threshold, the origin information is determined to be correct, and the actual image of the corresponding part is stopped from being compared with the sample image of the corresponding part; If the similarity corresponding to the actual images of each part is less than the preset part similarity standard threshold, the origin information is incorrect.
8. The agricultural product traceability method based on data analysis according to claim 1, characterized in that: Obtaining the complete actual image of the river crab and comparing it with the corresponding complete sample image to determine the similarity, so as to determine whether the origin information is correct, including: If the similarity between the current complete actual image of the river crab and the corresponding complete image is less than the preset complete sample similarity standard threshold, the origin information is incorrect.
9. The agricultural product traceability method based on data analysis according to claim 1, characterized in that: The actual images of the river crab uploaded by the user terminal must include actual images of various parts of the river crab and the complete actual image of the river crab.
10. A system using the agricultural product traceability method based on data analysis according to any one of claims 1 to 9, characterized in that: include, A database module is used to store pre-extracted sample images of different parts of river crabs from different origins, and determine the characteristic highlighting factors of various parts of river crabs from different origins; A feature comparison module, which is connected to the database module, is used to calculate the feature highlighting characterization parameters of each part of the crab from each origin according to the feature highlighting factors of each part of the crab from different origins, so as to determine the feature highlighting ranking sequence of each part of the crab from each origin; An information receiving module, which is connected to the user terminal, and the user obtains the actual image of the river crab uploaded by the user terminal and the corresponding origin information of the river crab; The verification module is connected to the database module, the feature comparison module and the information receiving module respectively, and is used to obtain the maximum feature highlighting characterization parameters of each part of the crab of the corresponding origin according to the origin information, and analyze each actual image according to the determination result, including: A feature highlighting sorting sequence is obtained according to the origin information, and a comparison order of actual images of various parts of the crab is determined according to the feature highlighting sorting sequence. According to the comparison order, the actual images of corresponding parts and the sample images of corresponding parts are called in turn for comparison to determine the similarity, so as to determine whether the origin information is correct; or, the complete actual image of the crab is obtained for comparison with the corresponding complete sample image to determine the similarity, so as to determine whether the origin information is correct.
Citation Information
Patent Citations
Methods and systems for tracing the origin of river crabs
CN114241248B
A pork production place tracing method based on mineral element fingerprints
CN110530705A
Traceability of swine tissue
CN111448580A
River crab anti-counterfeiting traceability method and system
CN113610540A
River crab phenotype analysis method and equipment based on computer vision
CN117274963A
Cited By
Network security monitoring method and system for intelligent coal mine production
CN120263450A
Paper textbook publishing digitalization method based on artificial intelligence
CN120279558A
Artificial intelligence-based method for digitizing paper textbooks
CN120279558B
Internet-based agricultural material data management method and system
CN120853161A
An internet-based agricultural material data management method and system
CN120853161B