Intelligent detection method and system for melon flesh hardness based on low-field nuclear magnetic resonance
The intelligent detection method for melon flesh firmness by combining low-field nuclear magnetic resonance with machine learning solves the problems of damage and cumbersome operation in fruit firmness detection, and achieves non-destructive, rapid and accurate batch detection.
Patent Information
- Application Number
- CN202511271167.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-08
AI Technical Summary
Existing methods for testing fruit firmness have problems such as causing physical damage to the fruit, being cumbersome to operate, and being difficult to accurately infer the firmness distribution and quality of the entire batch of fruit.
A smart detection method for melon flesh firmness based on low-field nuclear magnetic resonance was adopted. A melon flesh firmness predictor was generated by training a machine learning model. Combined with correlation analysis and box plot analysis, a standard low-field nuclear magnetic resonance signal tag was constructed to achieve non-destructive detection.
It achieves non-destructive testing, improves testing efficiency and accuracy, is suitable for batch testing, expands the testing range, and ensures effective testing of melons with non-standard signals.
Smart Images

Figure CN120741547B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of fruit detection, and particularly relates to a melon flesh hardness intelligent detection method and system based on low-field nuclear magnetic resonance. BACKGROUND
[0002] At present, the method for detecting fruit hardness mainly comprises detecting by using a fruit hardness tester. The core operation of the detection method is inserting a probe of the hardness tester into melon flesh, and determining the fruit hardness by measuring the resistance suffered by the probe during insertion. The detection method belongs to a contact type and is destructive. The method has technical problems of causing physical damage to the fruit, being relatively complicated to operate, and being difficult to accurately infer the hardness distribution and overall quality of the whole batch of fruits by using a small number of samples. SUMMARY
[0003] The present application provides a melon flesh hardness intelligent detection method and system based on low-field nuclear magnetic resonance to solve the technical problems of causing physical damage to the fruit, being relatively complicated to operate, and being difficult to accurately infer the hardness distribution and overall quality of the whole batch of fruits by using a small number of samples in the prior art.
[0004] The technical scheme for solving the above technical problems is as follows:
[0005] In a first aspect, the present application provides a melon flesh hardness intelligent detection method based on low-field nuclear magnetic resonance, comprising: searching for healthy melon flesh hardness detection values under the constraints of melon varieties, planting schemes and planting time lengths, wherein the healthy melon flesh hardness detection values have labels identifying standard low-field nuclear magnetic resonance signals; when a target melon flesh low-field nuclear magnetic resonance signal is consistent with the standard low-field nuclear magnetic resonance signal, setting the healthy melon flesh hardness detection values as target melon flesh hardness values, wherein the consistent type attribute signals are all the same, and the quantitative attribute signal deviations are all less than or equal to corresponding quantitative attribute signal deviation thresholds; when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, processing the target melon flesh low-field nuclear magnetic resonance signal by using a melon flesh hardness predictor to obtain the target melon flesh hardness values, wherein the melon flesh hardness predictor is generated by using machine learning to train a plurality of groups of data, and any one group of data in the plurality of groups of data comprises a melon flesh low-field nuclear magnetic resonance record signal and a label identifying a melon flesh hardness value.
[0006] Optionally, under the constraints of melon variety, planting scheme and planting duration, the health melon fruit flesh hardness detection value is retrieved, wherein the health melon fruit flesh hardness detection value has a label identifying the standard low-field nuclear magnetic resonance signal, comprising: obtaining an initial low-field nuclear magnetic resonance signal attribute set; based on melon fruit flesh hardness, performing correlation analysis on the initial low-field nuclear magnetic resonance signal attribute set to obtain an initial low-field nuclear magnetic resonance signal attribute correlation degree set; based on the initial low-field nuclear magnetic resonance signal attribute correlation degree set, sorting the initial low-field nuclear magnetic resonance signal attribute set to obtain an associated low-field nuclear magnetic resonance signal attribute set with an association degree greater than or equal to an association degree threshold; under the constraints of melon variety, planting scheme and planting duration, retrieving a health melon fruit flesh hardness record value set, performing box plot analysis to obtain a health melon fruit flesh hardness record value box interval, which is set as the health melon fruit flesh hardness detection value; based on the associated low-field nuclear magnetic resonance signal attribute set, extracting the low-field nuclear magnetic resonance signal of the health melon fruit flesh that meets the health melon fruit flesh hardness detection value, and constructing a label identifying the standard low-field nuclear magnetic resonance signal.
[0007] Wherein, based on melon fruit flesh hardness, the initial low-field nuclear magnetic resonance signal attribute set is subjected to correlation analysis to obtain an initial low-field nuclear magnetic resonance signal attribute correlation degree set, comprising: loading a one-to-one corresponding melon fruit flesh hardness record value set, a first attribute initial low-field nuclear magnetic resonance signal detection value set to a Qth attribute initial low-field nuclear magnetic resonance signal detection value set, wherein Q represents the number of attributes of the initial low-field nuclear magnetic resonance signal attribute set; performing de-dimensioning processing on the melon fruit flesh hardness record value set to obtain a melon fruit flesh hardness characteristic value sequence; traversing the first attribute initial low-field nuclear magnetic resonance signal detection value set to the Qth attribute initial low-field nuclear magnetic resonance signal detection value set to perform de-dimensioning processing respectively to obtain a first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to a Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence; taking the melon fruit flesh hardness characteristic value sequence as a reference sequence and the first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to the Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence as comparison sequences, constructing a grey correlation degree matrix, performing grey correlation degree analysis to obtain the initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0008] The low-field nuclear magnetic resonance signal of the healthy melon fruit pulp satisfying the healthy melon fruit pulp hardness detection value is extracted based on the associated low-field nuclear magnetic resonance signal attribute set, and a label identifying the standard low-field nuclear magnetic resonance signal is constructed, including: obtaining a plurality of first associated attribute low-field nuclear magnetic resonance signal detection values of a plurality of healthy melon fruit pulps with hardness detection values belonging to the healthy melon fruit pulp hardness detection value until a plurality of Pth associated attribute low-field nuclear magnetic resonance signal detection values, P representing the total number of associated low-field nuclear magnetic resonance signal attributes; performing central value evaluation on the plurality of first associated attribute low-field nuclear magnetic resonance signal detection values to obtain a first associated attribute standard low-field nuclear magnetic resonance signal characteristic value; until the plurality of Pth associated attribute low-field nuclear magnetic resonance signal detection values are evaluated, a Pth associated attribute standard low-field nuclear magnetic resonance signal characteristic value is obtained; based on the first associated attribute standard low-field nuclear magnetic resonance signal characteristic value to the Pth associated attribute standard low-field nuclear magnetic resonance signal characteristic value, a label identifying the standard low-field nuclear magnetic resonance signal is constructed.
[0009] The target melon fruit pulp low-field nuclear magnetic resonance signal is processed by a melon fruit pulp hardness predictor to obtain the target melon fruit pulp hardness value, wherein the melon fruit pulp hardness predictor is generated by machine learning training based on a plurality of sets of data, and any one set of data of the plurality of sets of data includes a melon fruit pulp low-field nuclear magnetic resonance record signal and a label identifying a melon fruit pulp hardness value, including: based on the associated low-field nuclear magnetic resonance signal attribute set, constructing a signal input branch set; based on a fully connected neural network, configuring a main network; connecting the output nodes of the signal input branch set in parallel to the main network to obtain a melon fruit pulp hardness predictor architecture; placing the label identifying the melon fruit pulp hardness value in the output layer of the melon fruit pulp hardness predictor architecture, and placing the melon fruit pulp low-field nuclear magnetic resonance record signal in the input layer of the melon fruit pulp hardness predictor architecture, calling the plurality of sets of data, training the melon fruit pulp hardness predictor architecture, and obtaining the melon fruit pulp hardness predictor.
[0010] Based on the associated low-field nuclear magnetic resonance signal attribute set, a signal input branch set is constructed, including: extracting a first associated low-field nuclear magnetic resonance signal attribute from the associated low-field nuclear magnetic resonance signal attribute set; when the storage format of the first associated low-field nuclear magnetic resonance signal attribute is an image, configuring a signal input convolution branch; when the storage format of the first associated low-field nuclear magnetic resonance signal attribute is a numerical value, configuring a signal input fully connected branch.
[0011] Optionally, when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, the target melon flesh low-field nuclear magnetic resonance signal is processed by a melon flesh hardness predictor to obtain the target melon flesh hardness value, and then the target melon flesh low-field nuclear magnetic resonance signal and the target melon flesh hardness value are stored in association, and the target melon flesh hardness value is used as an index condition to construct a melon flesh hardness calibration database. When the melon flesh hardness calibration database is constructed, when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, a hardness value calibration is performed by the melon flesh hardness calibration database to obtain a melon flesh hardness value calibration result, and when the melon flesh hardness value calibration result is empty, the target melon flesh low-field nuclear magnetic resonance signal is processed by a melon flesh hardness predictor to obtain the target melon flesh hardness value.
[0012] In a second aspect, the present application provides a melon flesh hardness intelligent detection system based on low-field nuclear magnetic resonance, comprising:
[0013] A healthy melon flesh hardness calibration module is configured to retrieve healthy melon flesh hardness detection values with melon varieties, planting schemes, and planting durations as constraints, wherein the healthy melon flesh hardness detection values have labels identifying standard low-field nuclear magnetic resonance signals.
[0014] A target melon flesh hardness matching module is configured to set the healthy melon flesh hardness detection values as target melon flesh hardness values when a target melon flesh low-field nuclear magnetic resonance signal is consistent with the standard low-field nuclear magnetic resonance signal, wherein the consistent type attribute signals are all the same, and the quantitative attribute signal deviations are all less than or equal to corresponding quantitative attribute signal deviation thresholds.
[0015] A target melon flesh hardness prediction module is configured to process the target melon flesh low-field nuclear magnetic resonance signal by a melon flesh hardness predictor to obtain the target melon flesh hardness value when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, wherein the melon flesh hardness predictor is generated by machine learning training using multiple sets of data, and any one set of data in the multiple sets of data includes a melon flesh low-field nuclear magnetic resonance record signal and a label identifying a melon flesh hardness value.
[0016] By implementing the present application, the health melon flesh hardness detection value can be retrieved with melon variety, planting scheme and planting time as constraints, wherein the health melon flesh hardness detection value has a label identifying the standard low-field nuclear magnetic resonance signal, the setting of constraints can ensure that the retrieved health melon flesh hardness detection value is targeted and accurate, avoid the decrease of the reference value of the detection value caused by differences in variety, planting conditions and the like, and the application of correlation analysis and box plot analysis can screen out the nuclear magnetic resonance signal attributes highly related to the flesh hardness, reduce irrelevant signal interference, and improve the subsequent detection efficiency.
[0017] By implementing the present application, when the target melon flesh low-field nuclear magnetic resonance signal is consistent with the standard low-field nuclear magnetic resonance signal, the health melon flesh hardness detection value is set as the target melon flesh hardness value, wherein the type attribute signals are all the same, and the quantitative attribute signal deviations are all less than or equal to the corresponding quantitative attribute signal deviation threshold, the consistency judgment standard is clear, the rigor of the matching result is ensured, misjudgment caused by partial similarity of signals is avoided, the detection accuracy is improved, and the health melon flesh hardness detection value is directly used without complex calculation or additional detection process, so that the detection time can be greatly shortened, rapid detection is realized, and the method is especially suitable for batch detection scenarios to improve the detection efficiency.
[0018] By implementing the present application, when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, the target melon flesh low-field nuclear magnetic resonance signal is processed by a melon flesh hardness predictor to obtain the target melon flesh hardness value, wherein the melon flesh hardness predictor is generated by machine learning training of multiple groups of data, and any one group of data of the multiple groups of data includes melon flesh low-field nuclear magnetic resonance record signal and a label identifying melon flesh hardness value, the construction of the melon flesh hardness predictor fully considers different formats of nuclear magnetic resonance signal attributes, respectively configures convolution branches and full connection branches, can effectively process different types of signal data, improves the prediction applicability, and based on the machine learning training of a large amount of data, the melon flesh hardness predictor has strong data analysis and processing capability, can accurately predict the flesh hardness value even if there is a difference between the target signal and the standard signal, expands the detection range, and ensures that the melon with non-standard signal can also be effectively detected.
[0019] In summary, by implementing the present application, the hardness detection can be completed without damaging the melon, the efficiency of batch detection is greatly improved, and the accuracy and reliability of the detection result are improved. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 A flowchart of a melon flesh hardness intelligent detection method based on low-field nuclear magnetic resonance provided by the present application is shown.
[0021] Figure 2 This is a schematic diagram of the structure of an intelligent detection system for the hardness of melon flesh based on low-field nuclear magnetic resonance, provided by the present invention.
[0022] In the attached diagram, the components represented by each number are as follows:
[0023] Healthy melon flesh firmness calibration module 11, target melon flesh firmness matching module 12, target melon flesh firmness prediction module 13. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0026] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
[0027] Example 1, as Figure 1 As shown, this invention provides a method and system for intelligent detection of melon flesh firmness based on low-field nuclear magnetic resonance, comprising:
[0028] S100: Using melon variety, planting plan and planting duration as constraints, retrieve the flesh firmness test value of healthy melon, wherein the flesh firmness test value of healthy melon has a tag that identifies the standard low field nuclear magnetic resonance signal;
[0029] S200: when the target melon flesh low-field nuclear magnetic resonance signal is consistent with the standard low-field nuclear magnetic resonance signal, setting the healthy melon flesh hardness detection value as the target melon flesh hardness value, wherein the consistent represents that the type attribute signals are all the same, and the quantitative attribute signal deviations are all less than or equal to the corresponding quantitative attribute signal deviation threshold;
[0030] S300: when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, processing the target melon flesh low-field nuclear magnetic resonance signal by a melon flesh hardness predictor to obtain the target melon flesh hardness value, wherein the melon flesh hardness predictor is generated by machine learning training based on a plurality of sets of data, and any one set of data in the plurality of sets of data includes a melon flesh low-field nuclear magnetic resonance record signal and a label indicating a melon flesh hardness value.
[0031] In step S100 of the embodiment of the present application, the healthy melon flesh hardness detection value is retrieved under the constraints of melon variety, planting scheme and planting time length, wherein the healthy melon flesh hardness detection value has a label indicating a standard low-field nuclear magnetic resonance signal, and includes:
[0032] An initial low-field nuclear magnetic resonance signal attribute set is obtained;
[0033] Based on the melon flesh hardness, an initial low-field nuclear magnetic resonance signal attribute correlation degree set is obtained by performing correlation analysis on the initial low-field nuclear magnetic resonance signal attribute set;
[0034] Based on the initial low-field nuclear magnetic resonance signal attribute correlation degree set, an associated low-field nuclear magnetic resonance signal attribute set with an initial low-field nuclear magnetic resonance signal attribute correlation degree greater than or equal to a correlation degree threshold is sorted from the initial low-field nuclear magnetic resonance signal attribute set;
[0035] The healthy melon flesh hardness record value set is retrieved under the constraints of melon variety, planting scheme and planting time length, a box plot analysis is performed, a healthy melon flesh hardness record value box interval is obtained, and the healthy melon flesh hardness detection value is set;
[0036] Based on the associated low-field nuclear magnetic resonance signal attribute set, a low-field nuclear magnetic resonance signal of a healthy melon flesh meeting the healthy melon flesh hardness detection value is extracted, and a label indicating a standard low-field nuclear magnetic resonance signal is constructed.
[0037] In the embodiment of the present application, the purpose of step S100 is to screen out low-field nuclear magnetic resonance signal attributes strongly related to melon flesh hardness, and to determine the flesh hardness range of healthy melons under specific planting conditions, and to match the corresponding standard low-field nuclear magnetic resonance signal for the hardness range to form a reusable healthy melon reference label.
[0038] Firstly, the initial low-field nuclear magnetic resonance signal attribute set needs to be obtained. That is, through a low-field nuclear magnetic resonance detection device, signal collection is performed on healthy melon flesh of different varieties, planting schemes and planting time lengths, and all detectable low-field nuclear magnetic resonance signal attributes such as signal intensity, relaxation time and signal waveform are recorded to form the initial low-field nuclear magnetic resonance signal attribute set.
[0039] Further, based on the hardness of melon flesh, correlation analysis is performed on the initial low-field nuclear magnetic resonance signal attribute set to obtain an initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0040] In step S100 of the embodiment of the present application, based on the hardness of melon flesh, correlation analysis is performed on the initial low-field nuclear magnetic resonance signal attribute set to obtain an initial low-field nuclear magnetic resonance signal attribute correlation degree set, including:
[0041] A one-to-one corresponding melon flesh hardness record value set, a first attribute initial low-field nuclear magnetic resonance signal detection value set to a Qth attribute initial low-field nuclear magnetic resonance signal detection value set is loaded, where Q represents the number of attributes of the initial low-field nuclear magnetic resonance signal attribute set;
[0042] The melon flesh hardness record value set is subjected to dimensionless processing to obtain a melon flesh hardness characteristic value sequence;
[0043] The first attribute initial low-field nuclear magnetic resonance signal detection value set to the Qth attribute initial low-field nuclear magnetic resonance signal detection value set is subjected to dimensionless processing respectively to obtain a first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to a Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence;
[0044] The melon flesh hardness characteristic value sequence is taken as a reference sequence, and the first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to the Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence is taken as a comparison sequence to construct a grey correlation degree matrix, perform grey correlation degree analysis, and obtain the initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0045] In the embodiment of the present application, the purpose of the above steps is to quantify the correlation degree of each attribute in the initial low-field nuclear magnetic resonance signal attribute set with the hardness of melon flesh, to eliminate dimensional interference through loading matching data and standardization processing, and to finally generate a correlation degree set by constructing the correlation relationship between flesh hardness and signal attributes by using grey correlation degree analysis, thereby providing a quantitative basis for subsequent screening of strongly correlated signal attributes.
[0046] Firstly, a one-to-one set of melon flesh hardness record values, a first attribute initial low-field nuclear magnetic resonance signal detection value set to a Qth attribute initial low-field nuclear magnetic resonance signal detection value set need to be loaded. That is, two types of data of the same batch of healthy melon samples are extracted from the historical detection database, and the two types of data need to be strictly one-to-one. Among them, the first type of data is a set of melon flesh hardness record values, which contains the actual flesh hardness detection results of each healthy melon sample; the second type of data is a set of initial low-field nuclear magnetic resonance signal detection values, which is classified by attributes and contains initial low-field nuclear magnetic resonance signal detection values of the first attribute to the Qth attribute. Q is the total number of attribute sets of initial signal attributes, and the attributes can include low-field nuclear magnetic resonance signal attributes such as signal intensity and relaxation time.
[0047] Further, the set of melon flesh hardness record values needs to be de-dimensioned to obtain a sequence of melon flesh hardness characteristic values.
[0048] In the actual melon flesh hardness measurement process, different detection equipment may have unit differences in units of "kg / cm²" or "N". Converting the hardness record values into characteristic values of a unified scale can avoid data weight imbalance in subsequent correlation analysis due to different units and ensure the objectivity of the analysis results. Specifically, Z-score standardization, Min-Max standardization, and other standardization methods can be used to de-dimension all hardness record values and form a sequence of melon flesh hardness characteristic values. Taking Min-Max standardization as an example, the calculation formula is x' = x-min(X) / [max(X)-min(X)]. Where x is a single hardness record value, min(X) is the minimum value of the set of hardness record values, max(X) is the maximum value of the set of hardness record values, and x' is the de-dimensioned hardness characteristic value.
[0049] Next, the first attribute initial low-field nuclear magnetic resonance signal detection value set to the Qth attribute initial low-field nuclear magnetic resonance signal detection value set needs to be de-dimensioned respectively to obtain a first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to a Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence;
[0050] Similarly, the Min-Max standardization method can be used to process the initial low-field nuclear magnetic resonance signal detection value set of the first attribute to the Qth attribute one by one. The specific process includes:
[0051] First, for each attribute's initial low-field nuclear magnetic resonance signal detection value set, the minimum and maximum values of the set are calculated;
[0052] Each initial low-field nuclear magnetic resonance signal detection value in the set is converted to a characteristic value according to the Min-Max standardization de-dimensioning formula above;
[0053] The characteristic values of each attribute are respectively aggregated to form the initial low-field nuclear magnetic resonance signal characteristic value sequences of the first attribute to the Qth attribute.
[0054] Further, the initial low-field nuclear magnetic resonance signal characteristic value sequences of the first attribute to the Qth attribute are taken as the reference sequence and the comparison sequence, respectively, to construct a grey correlation degree matrix, perform grey correlation degree analysis, and obtain the initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0055] Firstly, the melon flesh hardness characteristic value sequence is taken as the reference sequence, denoted as X0, representing the target variable of analysis; and the initial signal characteristic value sequences of the first attribute to the Qth attribute are taken as the comparison sequences, denoted as (X1, X2,..., XQ), representing the influence variables of analysis. Q
[0056] Then, the correlation coefficients need to be calculated. For each comparison sequence X i (i=1, 2,..., Q), the correlation coefficient ξ i (k) with the reference sequence at each sample point is calculated, where k is the sample number, and the calculation formula is:
[0057]
[0058] min i min k ∣X0(k)-X i (k)∣ is the two-level minimum difference, ζmax i max k ∣X0(k)-X i (k)∣ is the two-level maximum difference, and ζ is the resolution coefficient, usually taking 0.5, for adjusting the sensitivity of the correlation coefficient.
[0059] Then, the correlation coefficients ξ i (1), ξ i (2),..., ξ i (n) of each comparison sequence X i and the reference sequence X0 are arranged in rows to form a grey correlation degree matrix of Q×n, where n is the sample number.
[0060] Further, the correlation coefficients of each comparison sequence Xi are averaged to obtain the correlation degree ri of the sequence and the reference sequence, and the formula is: r i = (1 / n)∑ n k=1 ξ i (k).
[0061] Finally, the correlation degrees r1, r2,..., rQ The initial low-field nuclear magnetic resonance signal attribute correlation degrees are summarized to form an initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0062] Further, based on the initial low-field nuclear magnetic resonance signal attribute correlation degree set, an associated low-field nuclear magnetic resonance signal attribute set with a correlation degree greater than or equal to a correlation degree threshold value is sorted from the initial low-field nuclear magnetic resonance signal attribute set.
[0063] A correlation degree threshold value is preset, which can be set according to the detection accuracy requirement and actual data distribution: if higher detection accuracy is required, the correlation degree threshold value can be set to 0.7-0.8; if detection efficiency and accuracy are required to be considered, the correlation degree threshold value can be set to 0.5-0.6, etc. Then, all signal attributes with a correlation degree value greater than or equal to the threshold value in the initial low-field nuclear magnetic resonance signal attribute correlation degree set are extracted to form an associated low-field nuclear magnetic resonance signal attribute set.
[0064] Further, with melon varieties, planting schemes and planting time lengths as constraints, a health melon flesh hardness record value set is retrieved, a box plot analysis is performed, and a health melon flesh hardness record value box interval is obtained, which is set as the health melon flesh hardness detection value.
[0065] First, with melon varieties, planting schemes and planting time lengths as joint constraints, all health melon flesh hardness record values under the conditions are retrieved from a historical detection database to form a health melon flesh hardness record value set.
[0066] Then, a reasonable interval is determined by box plot analysis, that is, the health melon flesh hardness record value set retrieved is subjected to box plot analysis, quartiles in the data are identified through the box plot, that is, lower quartile Q1, median Q2 and upper quartile Q3, and the Q1-Q3 interval, that is, the box interval, is used as a reasonable range of health melon flesh hardness, which can exclude abnormal values, such as excessively high / low values caused by detection errors, and finally the box interval is set as the health melon flesh hardness detection value under the specific constraint condition.
[0067] In step S100 of the embodiment of the present application, based on the associated low-field nuclear magnetic resonance signal attribute set, a low-field nuclear magnetic resonance signal of health melon flesh satisfying the health melon flesh hardness detection value is extracted, and a label identifying a standard low-field nuclear magnetic resonance signal is constructed, including:
[0068] A plurality of first associated attribute low-field nuclear magnetic resonance signal detection values to a plurality of Pth associated attribute low-field nuclear magnetic resonance signal detection values of a plurality of health melon fleshes with hardness detection values belonging to the health melon flesh hardness detection value are obtained, and P represents the total number of attribute sets of associated low-field nuclear magnetic resonance signal attributes;
[0069] performing central value evaluation on the plurality of first correlation attribute low-field nuclear magnetic resonance signal detection values to obtain first correlation attribute standard low-field nuclear magnetic resonance signal characteristic values;
[0070] performing central value evaluation on the plurality of Pth correlation attribute low-field nuclear magnetic resonance signal detection values to obtain Pth correlation attribute standard low-field nuclear magnetic resonance signal characteristic values;
[0071] constructing a label identifying the standard low-field nuclear magnetic resonance signal based on the first correlation attribute standard low-field nuclear magnetic resonance signal characteristic values to the Pth correlation attribute standard low-field nuclear magnetic resonance signal characteristic values.
[0072] In step S100 of the embodiment of the present application, the purpose of the above steps is to construct a precise binding label between the strong correlation signal attribute and the healthy melon fruit flesh hardness range: by extracting the strong correlation nuclear magnetic resonance signal corresponding to the melon sample meeting the healthy melon fruit flesh hardness condition, calculating the typical characteristic value of each signal attribute, and finally forming a standardized signal label. The label serves as the core reference for subsequent target melon hardness detection, ensuring that only the standard that meets the dual conditions of healthy melon fruit flesh hardness and strong correlation signal can be used for rapid matching detection, thereby fundamentally guaranteeing the accuracy and pertinence of the detection results.
[0073] First, a plurality of first correlation attribute low-field nuclear magnetic resonance signal detection values to a plurality of Pth correlation attribute low-field nuclear magnetic resonance signal detection values of a plurality of healthy melon fruits whose hardness detection values belong to the healthy melon fruit flesh hardness detection values need to be obtained, where P represents the total number of correlation low-field nuclear magnetic resonance signal attributes.
[0074] That is, the healthy melon samples that meet both conditions are retrieved from the historical detection database. First, the fruit flesh hardness detection value belongs to the healthy melon fruit flesh hardness detection value interval determined in the aforementioned step, that is, the [Q1, Q3] box interval. Second, the healthy melon sample has recorded the detection values of all attributes in the correlation low-field nuclear magnetic resonance signal attribute set, where there are P attributes, such as the first correlation attribute to the Pth correlation attribute.
[0075] Then, the several first associated attribute low-field nuclear magnetic resonance signal detection values need to be evaluated for the central value to obtain the first associated attribute standard low-field nuclear magnetic resonance signal characteristic value. First, the several first associated attribute signal detection values need to be removed for abnormal values, for example, by calculating the mean μ and the standard deviation σ of the group of data, and removing the extreme values beyond the range of "μ±2σ". Then, a suitable central value evaluation method needs to be selected according to the signal characteristics of the first associated attribute, and if the attribute signal data is uniformly distributed and has no obvious skewness, the arithmetic mean is used as the central value. If the attribute signal data has a skew distribution, such as part of the signal intensity data, the median can be used as the central value to avoid the influence of extreme values on the central value. Finally, the calculated central value is taken as the first associated attribute standard low-field nuclear magnetic resonance signal characteristic value, which represents the typical signal level of the first associated attribute under the condition of healthy melon flesh hardness.
[0076] Further, in accordance with the processing logic of the first associated attribute, the standard low-field nuclear magnetic resonance signal characteristic value is calculated for all P associated attributes, ensuring that each strong associated attribute has a corresponding mapping of healthy melon flesh hardness and standard low-field nuclear magnetic resonance signal characteristic value, providing standard data for all attributes for subsequent construction of a complete label.
[0077] Finally, the dispersed P associated attribute standard low-field nuclear magnetic resonance signal characteristic values are integrated into a complete, directly comparable standard low-field nuclear magnetic resonance signal characteristic value label, clearly indicating the standard low-field nuclear magnetic resonance signal pattern corresponding to healthy melon flesh hardness, providing clear and quantifiable basis for the consistency judgment between the target low-field nuclear magnetic resonance signal and the standard low-field nuclear magnetic resonance signal in S200.
[0078] In step S300 of the embodiment of the present application, the target melon flesh low-field nuclear magnetic resonance signal is processed by a melon flesh hardness predictor to obtain the target melon flesh hardness value, wherein the melon flesh hardness predictor is generated by machine learning training using a plurality of groups of data, and any one group of data of the plurality of groups of data includes a melon flesh low-field nuclear magnetic resonance recording signal and a label indicating a melon flesh hardness value, comprising:
[0079] Based on the set of associated low-field nuclear magnetic resonance signal attributes, a set of signal input branches is constructed;
[0080] Based on the fully connected neural network, a backbone network is configured;
[0081] The output nodes of the set of signal input branches are connected in parallel to the backbone network to obtain a melon flesh hardness predictor architecture;
[0082] Placing a label identifying the melon flesh firmness value at an output layer of the melon flesh firmness predictor architecture, placing a melon flesh low-field nuclear magnetic resonance signal at an input layer of the melon flesh firmness predictor architecture, calling the plurality of sets of data, training the melon flesh firmness predictor architecture, and obtaining the melon flesh firmness predictor.
[0083] In the embodiment of the present application, the purpose of step S300 is to build a machine learning melon flesh firmness predictor adapted to strong correlation low-field nuclear magnetic resonance signals: by customizing input branches to adapt to different types of correlation low-field nuclear magnetic resonance signal attributes, combining a fully connected neural network to build a prediction architecture, and then training the melon flesh firmness predictor using low-field nuclear magnetic resonance signal-melon flesh firmness labeled data, a prediction tool that can accurately process non-standard signals and output the target melon flesh firmness value is finally obtained, solving the problem of special scene detection that cannot be covered by standard signal matching in S200, and ensuring the comprehensiveness and accuracy of detection.
[0084] To implement the above steps, first, a set of signal input branches is constructed based on the set of correlation low-field nuclear magnetic resonance signal attributes.
[0085] In step S300 of the embodiment of the present application, based on the set of correlation low-field nuclear magnetic resonance signal attributes, a set of signal input branches is constructed, including:
[0086] From the set of correlation low-field nuclear magnetic resonance signal attributes, a first correlation low-field nuclear magnetic resonance signal attribute is extracted;
[0087] When the storage format of the first correlation low-field nuclear magnetic resonance signal attribute is an image, a signal input convolution branch is configured;
[0088] When the storage format of the first correlation low-field nuclear magnetic resonance signal attribute is a numerical value, a signal input fully connected branch is configured.
[0089] Specifically, first, a first correlation low-field nuclear magnetic resonance signal attribute is extracted from the set of correlation low-field nuclear magnetic resonance signal attributes, and then the storage format of the extracted first correlation low-field nuclear magnetic resonance signal attribute is identified to determine whether it belongs to an image format or a numerical value format. The image format is, for example, a nuclear magnetic resonance imaging image or a signal heat map, and the numerical value format is, for example, a specific value of a relaxation time or a signal intensity.
[0090] If the first correlation low-field nuclear magnetic resonance signal attribute is in an image format, a signal input convolution branch containing a convolution layer and a pooling layer is configured, the signal input convolution branch contains three one-dimensional convolution layers, the convolution kernel size is 7x1, and the number of channels increases layer by layer; if the attribute is in a numerical value format, a signal input fully connected branch containing a dense connection layer is configured. According to this logic, all attributes in the set of correlation low-field nuclear magnetic resonance signal attributes are traversed, the configuration of the input branch corresponding to each attribute is completed, and a set of signal input branches is formed.
[0091] Further, the backbone network needs to be configured based on a fully connected neural network. Specifically, the backbone network structure needs to be designed according to the number of associated low-field nuclear magnetic resonance signal attributes and the data complexity, and usually 3-5 fully connected layers are used.
[0092] For example, the first layer is used to receive the fusion features of the multi-branch output, the number of nodes is set to 256 to adapt to the multi-feature fusion requirement, and the activation function uses ReLU to solve the gradient disappearance problem.
[0093] The number of nodes in the middle layer gradually decreases, such as from 128 to 64, and the activation function still uses ReLU to optimize the feature mapping by gradually reducing the dimension.
[0094] The number of nodes in the second-to-last layer is set to 32, and a Dropout layer such as Dropout(0.2) is added to prevent model overfitting.
[0095] The last layer of the backbone network needs to reserve an input interface matching the output dimension of the signal input branch set to ensure that the features extracted by the multi-branch can be smoothly transmitted to the backbone network for fusion calculation.
[0096] Further, the output nodes of the signal input branch set are connected in parallel to the backbone network to obtain a melon flesh hardness predictor architecture to form a complete end-to-end prediction architecture, ensuring that different types of associated low-field nuclear magnetic resonance signal features can be used cooperatively to improve the processing capability of the melon flesh hardness predictor for complex signals.
[0097] Next, the output features of each input branch need to be adjusted in dimension. Specifically, the output of the signal input convolution branch is converted to a one-dimensional feature vector through the Flatten layer, while the output of the signal input fully connected branch is already a one-dimensional vector and can be directly retained in its original dimension. Then, all adjusted branch output feature vectors are concatenated and spliced using the Concatenate layer to form a fusion feature vector. The fusion feature vector is directly input to the first fully connected layer of the backbone network to complete the connection between the signal input branch set and the backbone network, and obtain the melon flesh hardness predictor architecture.
[0098] Further, the melon flesh hardness predictor architecture needs to be trained with labeled data to obtain the melon flesh hardness predictor. Specifically, the label indicating the melon flesh hardness value is placed in the output layer of the melon flesh hardness predictor architecture, and the melon flesh low-field nuclear magnetic resonance recording signal is placed in the input layer of the melon flesh hardness predictor architecture. The multiple sets of data are retrieved to train the melon flesh hardness predictor architecture and obtain the melon flesh hardness predictor.
[0099] Firstly, a plurality of sets of low-field nuclear magnetic resonance signals of melon flesh and corresponding label data of melon flesh hardness values are required as training data of the melon flesh hardness predictor. The input part of each set of data needs to meet the low-field nuclear magnetic resonance signal record containing all attributes of the associated low-field nuclear magnetic resonance signal attribute set. The label part needs to be the actual flesh hardness detection value corresponding to the low-field nuclear magnetic resonance signal, such as a specific numerical value in "kg / cm²" unit, which corresponds to the input low-field nuclear magnetic resonance signal one by one. The training data is divided into a training set and a validation set in a 7:3 ratio.
[0100] In the parameter setting of the melon flesh hardness predictor, an output layer is added at the end of the last layer of the melon flesh hardness predictor architecture, i.e., the end of the backbone network, with the number of nodes set to 1, corresponding to a single melon flesh hardness value output, and the activation function adopts Linear. The loss function of the melon flesh hardness predictor selects mean squared error (MSE). The optimizer adopts Adam optimizer with a learning rate of 0.001.
[0101] In the training of the melon flesh hardness predictor, the batch size is set to 32, the training round is 50-100, and the early stopping mechanism is set. If the validation set loss does not decrease for 50 consecutive times, the training is stopped, the model is judged to be converged, and the model parameters of the melon flesh hardness predictor at this time are saved.
[0102] The model parameters saved after training are loaded into the melon flesh hardness predictor architecture to form a melon flesh hardness predictor that can be directly used to process target signals. In subsequent detection, the low-field nuclear magnetic resonance signal of the target melon is input, and the predictor can output the corresponding melon flesh hardness value.
[0103] In step S300 of the embodiment of the present application, when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, the target melon flesh low-field nuclear magnetic resonance signal is processed by the melon flesh hardness predictor to obtain the target melon flesh hardness value, and then the following steps are further included:
[0104] The target melon flesh low-field nuclear magnetic resonance signal and the target melon flesh hardness value are stored in association, and a melon flesh hardness calibration database is constructed with the target melon flesh low-field nuclear magnetic resonance signal as the index condition and the target melon flesh hardness value;
[0105] When the melon flesh hardness calibration database is constructed:
[0106] When the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, the hardness value calibration is performed through the melon flesh hardness calibration database to obtain the melon flesh hardness value calibration result.
[0107] When the melon flesh hardness value calibration result is empty, the target melon flesh low-field nuclear magnetic resonance signal is processed through the melon flesh hardness predictor to obtain the target melon flesh hardness value.
[0108] In the embodiments of the present application, the above steps are used to construct a low-field nuclear magnetic resonance signal-melon flesh hardness calibration database and form a detection logic of database priority matching + melon flesh hardness predictor backup: on the one hand, by storing the historical detection of non-standard low-field nuclear magnetic resonance signal-melon flesh hardness value data, a quick matching basis is provided for subsequent similar non-standard signals, and the detection efficiency is improved; on the other hand, the resource consumption caused by repeated use of the melon flesh hardness predictor is avoided, and at the same time, the detection coverage is optimized by continuously accumulating data, and the efficiency and stability of the detection in the non-standard signal scenario are further ensured.
[0109] Firstly, the target melon flesh low-field nuclear magnetic resonance signal and the target melon flesh hardness value need to be stored in association, and the target melon flesh low-field nuclear magnetic resonance signal is used as an index condition, and the target melon flesh hardness value is used to construct a melon flesh hardness calibration database.
[0110] Specifically, the target melon flesh low-field nuclear magnetic resonance signal processed by the melon flesh hardness predictor and the corresponding target melon flesh hardness value data need to be extracted, and an association identifier is added to each group of data. Then, a structured database such as MySQL, SQLite is used to construct the calibration database, and the storage structure of the index field-data field is designed, the key features of the target melon flesh low-field nuclear magnetic resonance signal are used as the core index, and the constraint condition fields such as variety, planting scheme, and planting time are associated to ensure accurate retrieval in the future. Then, the target melon flesh hardness value corresponding to the index signal is stored. The construction of the melon flesh hardness calibration database is completed.
[0111] Further, when the melon flesh hardness calibration database is constructed, when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, the hardness value calibration is performed through the melon flesh hardness calibration database to obtain the melon flesh hardness value calibration result. That is, the target melon flesh low-field nuclear magnetic resonance signal is used as an index, and the corresponding melon flesh hardness value is directly extracted from the melon flesh hardness calibration database as the melon flesh hardness value calibration result output.
[0112] Furthermore, when the calibration result for the melon flesh firmness value is empty, the low-field nuclear magnetic resonance signal of the target melon flesh is processed by the melon flesh firmness predictor to obtain the target melon flesh firmness value. That is, if no record matching the index conditions is found after searching the aforementioned melon flesh firmness calibration database, the calibration result for the melon flesh firmness value is determined to be empty. Then, the low-field nuclear magnetic resonance signal of the target melon flesh is input into the aforementioned melon flesh firmness predictor to predict and obtain the target melon flesh firmness value.
[0113] Example 2, as Figure 2 As shown, based on the same inventive concept as the intelligent detection method for melon flesh firmness based on low-field nuclear magnetic resonance provided in Embodiment 1, this embodiment of the invention also provides an intelligent detection system for melon flesh firmness based on low-field nuclear magnetic resonance, comprising:
[0114] The healthy melon flesh firmness calibration module 11 is used to retrieve the healthy melon flesh firmness test value based on the melon variety, planting plan and planting time. The healthy melon flesh firmness test value has a label that identifies the standard low field nuclear magnetic resonance signal.
[0115] The target melon flesh firmness matching module 12 is used to set the hardness detection value of the healthy melon flesh as the hardness value of the target melon flesh when the low-field nuclear magnetic resonance signal of the target melon flesh is consistent with the standard low-field nuclear magnetic resonance signal. The consistent characterization type attribute signals are all the same, and the deviation of the quantized attribute signal is less than or equal to the corresponding quantized attribute signal deviation threshold.
[0116] The target melon flesh firmness prediction module 13 is used to process the target melon flesh low-field nuclear magnetic resonance signal to obtain the target melon flesh firmness value when the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal. The melon flesh firmness predictor is generated by machine learning training through multiple sets of data, and any set of data includes the melon flesh low-field nuclear magnetic resonance recording signal and a label identifying the melon flesh firmness value.
[0117] Furthermore, the healthy melon flesh firmness calibration module 11 includes the following execution steps:
[0118] Obtain the initial low-field nuclear magnetic resonance signal property set;
[0119] Based on the hardness of melon flesh, a correlation analysis was performed on the initial low-field nuclear magnetic resonance signal attribute set to obtain the initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0120] sorting, from the initial low-field nuclear magnetic resonance signal attribute set, an associated low-field nuclear magnetic resonance signal attribute set with an initial low-field nuclear magnetic resonance signal attribute correlation degree greater than or equal to a correlation degree threshold value based on the initial low-field nuclear magnetic resonance signal attribute correlation degree set;
[0121] retrieving a set of healthy melon fruit flesh hardness record values, performing box plot analysis to obtain a healthy melon fruit flesh hardness record value box interval, and setting the healthy melon fruit flesh hardness detection value as the healthy melon fruit flesh hardness detection value;
[0122] extracting a low-field nuclear magnetic resonance signal of healthy melon fruit flesh satisfying the healthy melon fruit flesh hardness detection value based on the associated low-field nuclear magnetic resonance signal attribute set, and constructing a label identifying a standard low-field nuclear magnetic resonance signal.
[0123] wherein, based on melon fruit flesh hardness, an initial low-field nuclear magnetic resonance signal attribute correlation degree set is obtained by performing correlation analysis on the initial low-field nuclear magnetic resonance signal attribute set, including:
[0124] loading a one-to-one set of melon fruit flesh hardness record values, a first attribute initial low-field nuclear magnetic resonance signal detection value set to a Qth attribute initial low-field nuclear magnetic resonance signal detection value set, wherein Q represents the number of attributes in the initial low-field nuclear magnetic resonance signal attribute set;
[0125] performing dimensionless processing on the set of melon fruit flesh hardness record values to obtain a melon fruit flesh hardness characteristic value sequence;
[0126] performing dimensionless processing on the first attribute initial low-field nuclear magnetic resonance signal detection value set to the Qth attribute initial low-field nuclear magnetic resonance signal detection value set to obtain a first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to a Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence;
[0127] taking the melon fruit flesh hardness characteristic value sequence as a reference sequence and taking the first attribute initial low-field nuclear magnetic resonance signal characteristic value sequence to the Qth attribute initial low-field nuclear magnetic resonance signal characteristic value sequence as comparison sequences, constructing a grey correlation degree matrix, performing grey correlation degree analysis, and obtaining the initial low-field nuclear magnetic resonance signal attribute correlation degree set.
[0128] wherein, based on the associated low-field nuclear magnetic resonance signal attribute set, a low-field nuclear magnetic resonance signal of healthy melon fruit flesh satisfying the healthy melon fruit flesh hardness detection value is extracted, and a label identifying a standard low-field nuclear magnetic resonance signal is constructed, including:
[0129] obtaining a plurality of first correlation attribute low-field nuclear magnetic resonance signal detection values of a plurality of healthy melon fruit flesh hardness detection values belonging to the healthy melon fruit flesh hardness detection value until a plurality of Pth correlation attribute low-field nuclear magnetic resonance signal detection values, P representing the total number of correlation low-field nuclear magnetic resonance signal attribute sets;
[0130] performing central value evaluation on the plurality of first correlation attribute low-field nuclear magnetic resonance signal detection values to obtain a first correlation attribute standard low-field nuclear magnetic resonance signal characteristic value;
[0131] performing central value evaluation on the plurality of Pth correlation attribute low-field nuclear magnetic resonance signal detection values to obtain a Pth correlation attribute standard low-field nuclear magnetic resonance signal characteristic value;
[0132] based on the first correlation attribute standard low-field nuclear magnetic resonance signal characteristic value to the Pth correlation attribute standard low-field nuclear magnetic resonance signal characteristic value, constructing a label identifying a standard low-field nuclear magnetic resonance signal.
[0133] Further, the target melon fruit flesh hardness prediction module 13 includes the following execution steps:
[0134] based on the correlation low-field nuclear magnetic resonance signal attribute set, constructing a signal input branch set;
[0135] based on a fully connected neural network, configuring a backbone network;
[0136] parallel connecting output nodes of the signal input branch set to the backbone network to obtain a melon fruit flesh hardness predictor architecture;
[0137] placing a label identifying a melon fruit flesh hardness value at an output layer of the melon fruit flesh hardness predictor architecture and placing a melon fruit flesh low-field nuclear magnetic resonance record signal at an input layer of the melon fruit flesh hardness predictor architecture, calling the plurality of groups of data, training the melon fruit flesh hardness predictor architecture, and obtaining the melon fruit flesh hardness predictor.
[0138] wherein, based on the correlation low-field nuclear magnetic resonance signal attribute set, constructing a signal input branch set includes:
[0139] extracting a first correlation low-field nuclear magnetic resonance signal attribute from the correlation low-field nuclear magnetic resonance signal attribute set;
[0140] when the storage format of the first correlation low-field nuclear magnetic resonance signal attribute is an image, configuring a signal input convolution branch;
[0141] when the storage format of the first correlation low-field nuclear magnetic resonance signal attribute is a numerical value, configuring a signal input fully connected branch.
[0142] When the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, the target melon flesh low-field nuclear magnetic resonance signal is processed by a melon flesh hardness predictor to obtain the target melon flesh hardness value, and then the method further comprises:
[0143] The target melon flesh low-field nuclear magnetic resonance signal and the target melon flesh hardness value are stored in association, the target melon flesh low-field nuclear magnetic resonance signal is used as an index condition, and the target melon flesh hardness value is used to construct a melon flesh hardness calibration database;
[0144] When the melon flesh hardness calibration database is constructed:
[0145] When the target melon flesh low-field nuclear magnetic resonance signal is inconsistent with the standard low-field nuclear magnetic resonance signal, a hardness value calibration is performed by using the melon flesh hardness calibration database to obtain a melon flesh hardness value calibration result.
[0146] When the melon flesh hardness value calibration result is empty, the target melon flesh low-field nuclear magnetic resonance signal is processed by a melon flesh hardness predictor to obtain the target melon flesh hardness value.
[0147] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0148] Those skilled in the art should understand that the embodiments of the present application can provide a method, a system or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0149] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowcharts and / or block diagrams. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The device for implementing the functions specified in one block or multiple blocks.
[0150] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions Figure 1 one or more functions specified in the flow Figure 1 one or more blocks or multiple blocks.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions Figure 1 one or more functions specified in the flow Figure 1 one or more blocks or multiple blocks.
[0152] Although preferred embodiments of the application have been described, those skilled in the art will recognize that additional modifications and variations can be made thereto without departing from the spirit and scope of the application.
[0153] It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.
Claims
1. A method for intelligent detection of melon flesh firmness based on low-field nuclear magnetic resonance, characterized in that, include: Using melon variety, planting plan and planting time as constraints, the firmness test value of healthy melon flesh is retrieved, wherein the firmness test value of healthy melon flesh has a tag that identifies the standard low field nuclear magnetic resonance signal; When the low-field nuclear magnetic resonance signal of the target melon flesh is consistent with the standard low-field nuclear magnetic resonance signal, the hardness detection value of the healthy melon flesh is set as the hardness value of the target melon flesh. The consistent characterization type attribute signals are all the same, and the deviation of the quantized attribute signals is less than or equal to the corresponding quantized attribute signal deviation threshold. When the low-field NMR signal of the target melon flesh is inconsistent with the standard low-field NMR signal, the low-field NMR signal of the target melon flesh is processed by a melon flesh hardness predictor to obtain the hardness value of the target melon flesh. The melon flesh hardness predictor is generated by machine learning training through multiple sets of data, and any set of data includes the low-field NMR recording signal of the melon flesh and a label identifying the hardness value of the melon flesh. Among them, the firmness test values of healthy melon flesh were retrieved, constrained by melon variety, planting plan, and planting duration, including: Obtain the initial low-field nuclear magnetic resonance signal property set; Based on the hardness of melon flesh, a correlation analysis was performed on the initial low-field nuclear magnetic resonance signal attribute set to obtain the initial low-field nuclear magnetic resonance signal attribute correlation degree set. Based on the initial low-field nuclear magnetic resonance signal attribute correlation set, related low-field nuclear magnetic resonance signal attribute sets with an initial low-field nuclear magnetic resonance signal attribute correlation degree greater than or equal to the correlation degree threshold are selected from the initial low-field nuclear magnetic resonance signal attribute set. Constrained by melon variety, planting plan and planting duration, the set of records of healthy melon flesh firmness values is retrieved, box plot analysis is performed to obtain the box interval of the records of healthy melon flesh firmness values, and set as the detection value of the healthy melon flesh firmness. Based on the associated low-field nuclear magnetic resonance signal attribute set, the low-field nuclear magnetic resonance signal of healthy melon flesh that meets the healthy melon flesh firmness detection value is extracted, and a label identifying the standard low-field nuclear magnetic resonance signal is constructed.
2. The method as described in claim 1, characterized in that, Based on the firmness of the melon flesh, a correlation analysis was performed on the initial low-field NMR signal attribute set to obtain the initial low-field NMR signal attribute correlation degree set, including: Load the corresponding set of melon flesh hardness records, the set of initial low-field nuclear magnetic resonance signal detection values for the first attribute up to the set of initial low-field nuclear magnetic resonance signal detection values for the Qth attribute, where Q represents the number of attributes in the initial low-field nuclear magnetic resonance signal attribute set. The set of recorded hardness values of melon flesh is dimensionless to obtain a sequence of characteristic values of melon flesh hardness. The first attribute initial low-field NMR signal detection value set is traversed up to the Q-th attribute initial low-field NMR signal detection value set, and dimensionless processing is performed on each set to obtain the first attribute initial low-field NMR signal feature value sequence up to the Q-th attribute initial low-field NMR signal feature value sequence. Using the melon flesh firmness feature value sequence as the baseline sequence, and the initial low-field nuclear magnetic resonance signal feature value sequence of the first attribute up to the initial low-field nuclear magnetic resonance signal feature value sequence of the Qth attribute as the comparison sequence, a grey relational degree matrix is constructed, and grey relational degree analysis is performed to obtain the attribute relational degree set of the initial low-field nuclear magnetic resonance signal.
3. The method as described in claim 1, characterized in that, Based on the associated low-field nuclear magnetic resonance (NMR) signal attribute set, low-field NMR signals of healthy melon flesh that meet the healthy melon flesh firmness detection value are extracted, and tags identifying standard low-field NMR signals are constructed, including: The hardness detection value belongs to the hardness detection value of the healthy melon flesh. The low-field nuclear magnetic resonance signal detection values of several first associated attributes of several healthy melon flesh are obtained up to several Pth associated attribute low-field nuclear magnetic resonance signal detection values, where P represents the total number of attributes in the associated low-field nuclear magnetic resonance signal attribute set. The lumped value evaluation is performed on the detected values of the low-field nuclear magnetic resonance signals of the first correlation attributes to obtain the characteristic values of the standard low-field nuclear magnetic resonance signals of the first correlation attributes. Until the detected values of the low-field NMR signals of the Pth associated attributes are evaluated by lumped value assessment, the standard low-field NMR signal feature value of the Pth associated attribute is obtained. Based on the first associated attribute standard low-field NMR signal feature value up to the Pth associated attribute standard low-field NMR signal feature value, a label identifying the standard low-field NMR signal is constructed.
4. The method as described in claim 1, characterized in that, The target melon flesh hardness predictor processes the low-field nuclear magnetic resonance signal of the target melon flesh to obtain the hardness value of the target melon flesh. The melon flesh hardness predictor is generated through machine learning training using multiple sets of data. Each set of data includes the low-field nuclear magnetic resonance recording signal of the melon flesh and a label identifying the hardness value of the melon flesh, including: Based on the attribute set of correlated low-field nuclear magnetic resonance signals, a signal input branch set is constructed; Configure the backbone network based on a fully connected neural network; The output nodes of the signal input branch set are connected in parallel to the backbone network to obtain the melon flesh firmness predictor architecture. A label identifying the firmness value of melon flesh is placed in the output layer of the melon flesh firmness predictor architecture, and the low-field nuclear magnetic resonance recording signal of melon flesh is placed in the input layer of the melon flesh firmness predictor architecture. The multiple sets of data are retrieved to train the melon flesh firmness predictor architecture and obtain the melon flesh firmness predictor.
5. The method as described in claim 4, characterized in that, Based on the associated low-field NMR signal attribute set, a signal input branch set is constructed, including: Extract the first associated low-field nuclear magnetic resonance signal attribute from the associated low-field nuclear magnetic resonance signal attribute set; When the storage format of the first associated low-field NMR signal attribute is an image, configure the signal input convolution branch; When the storage format of the first associated low-field NMR signal attribute is numerical, configure a fully connected branch for the signal input.
6. The method as described in claim 1, characterized in that, When the low-field NMR signal of the target melon flesh is inconsistent with the standard low-field NMR signal, the low-field NMR signal of the target melon flesh is processed by a melon flesh firmness predictor to obtain the firmness value of the target melon flesh. The process then includes: The low-field nuclear magnetic resonance signal of the target melon flesh and the hardness value of the target melon flesh are associated and stored. The low-field nuclear magnetic resonance signal of the target melon flesh is used as the index condition and the hardness value of the target melon flesh is used as the index condition to construct a melon flesh hardness calibration database. Once the melon flesh firmness calibration database is constructed: When the low-field nuclear magnetic resonance signal of the target melon flesh is inconsistent with the standard low-field nuclear magnetic resonance signal, the hardness value is calibrated through the melon flesh hardness calibration database to obtain the hardness value calibration result of the melon flesh. When the calibration result of the hardness value of the melon flesh is empty, the low-field nuclear magnetic resonance signal of the target melon flesh is processed by the melon flesh hardness predictor to obtain the hardness value of the target melon flesh.
7. A smart detection system for the firmness of melon flesh based on low-field nuclear magnetic resonance, characterized in that, The system is used to implement a method for intelligent detection of melon flesh firmness based on low-field nuclear magnetic resonance as described in any one of claims 1-6, comprising: A healthy melon flesh firmness calibration module is used to retrieve the healthy melon flesh firmness test value based on melon variety, planting plan and planting time constraints. The healthy melon flesh firmness test value has a tag that identifies the standard low field nuclear magnetic resonance signal. The target melon flesh firmness matching module is used to set the hardness detection value of the healthy melon flesh as the hardness value of the target melon flesh when the low-field nuclear magnetic resonance signal of the target melon flesh is consistent with the standard low-field nuclear magnetic resonance signal. The consistent characterization type attribute signals are all the same, and the deviation of the quantized attribute signals is less than or equal to the corresponding quantized attribute signal deviation threshold. The target melon flesh firmness prediction module is used to obtain the target melon flesh firmness value by processing the target melon flesh low-field NMR signal through a melon flesh firmness predictor when the target melon flesh low-field NMR signal is inconsistent with the standard low-field NMR signal. The melon flesh firmness predictor is generated by machine learning training through multiple sets of data, and any set of data includes the melon flesh low-field NMR recording signal and a label identifying the melon flesh firmness value.
Citation Information
Patent Citations
Low-field nuclear magnetic resonance-based device and method for intelligent detection of flavor of microwave-dried condiment vegetable
CA3126171A1
Low-field nuclear magnetism-based device and method for intelligent detection of microwave-dried spicy vegetable flavor
WO2020177423A1