Rice taste quality detection method and device, electronic equipment and readable storage medium

By combining a feedforward neural network MLP model with rice physicochemical indicators, the accuracy and efficiency issues of rice eating quality detection were solved, achieving low-cost and high-efficiency detection suitable for evaluating large batches of rice samples.

CN121938504APending Publication Date: 2026-04-28SHANGHAI ZKW BREEDING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610044473.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing methods for testing the taste and quality of rice suffer from significant individual variations, are easily affected by environmental interference, have low accuracy and efficiency, and require expensive rice taste analyzers.

Method used

By combining a feedforward neural network MLP model with the physicochemical indicators of rice, the model is trained using the BP algorithm, and the neural network is constructed using SPSS 27 software to detect the taste quality of rice, thus avoiding the need for complex programming and high-cost instruments.

Benefits of technology

It improves the accuracy and efficiency of rice taste quality testing, is not affected by personnel experience or regional habits, reduces testing costs, and is suitable for large-scale testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121938504A_ABST
    Figure CN121938504A_ABST
Patent Text Reader

Abstract

The invention discloses a rice taste quality detection method and apparatus, an electronic device and a readable storage medium. The method comprises the steps of obtaining a physical and chemical index measurement value of to-be-detected rice, inputting the physical and chemical index measurement value of the to-be-detected rice into a pre-trained feedforward neural network MLP model to obtain a taste value, and determining the taste quality of the to-be-detected rice according to the taste value. According to the method, the taste quality of the rice is detected by combining the physical and chemical indexes of the rice based on the neural network, the method is not influenced by personnel experience and regional habits, the accuracy and the efficiency are high, an expensive rice taste instrument does not need to be arranged, and the cost is relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of rice taste quality testing technology, and particularly relates to a method, apparatus, electronic device and readable storage medium for rice taste quality testing. Background Technology

[0002] Rice is one of my country's three major staple crops, with more than half of the population relying on it as their primary food source. In recent years, with socio-economic development and the continuous improvement of people's living standards, consumers' demands for rice quality have gradually shifted from simply "eating enough" to "eating well." Among these demands, the taste quality of rice is a key indicator determining its market value, directly impacting consumer choices and the commercialization of breeding achievements. Existing methods for evaluating rice taste are mainly divided into two categories: one is manual sensory evaluation, which, while directly reflecting consumer preferences, is significantly influenced by personnel experience and regional habits, resulting in large individual differences, poor repeatability, and significant environmental interference, leading to low accuracy and efficiency; the other is instrumental analysis, with the taste analyzer method being the most commonly used, but this method requires expensive rice taste analyzers, resulting in high investment costs. Summary of the Invention

[0003] Based on this, and to address the aforementioned technical problems, a low-cost, accurate, and efficient method, apparatus, electronic device, and readable storage medium for detecting the eating quality of rice are provided.

[0004] The technical solution adopted in this invention is as follows: As a first aspect of the present invention, a method for detecting the eating quality of rice is provided, characterized in that it includes: S101. Obtain the physicochemical index values ​​of the rice to be tested; S102. Input the measured values ​​of the physicochemical indicators of the rice to be tested into a pre-trained feedforward neural network MLP model to obtain the taste value, and determine the taste quality of the rice to be tested based on the taste value. The feedforward neural network MLP model is trained using the BP algorithm and the physicochemical index measurements and taste values ​​of a pre-collected rice sample set with different taste qualities. Its hidden layer activation function adopts the hyperbolic tangent function, and its output layer activation function adopts the identity function.

[0005] As a second aspect of the present invention, a rice palatability quality testing device is provided, characterized in that it comprises: The first module is used for S101, which obtains the physicochemical index values ​​of the rice to be tested; The second module is used in S102 to input the measured values ​​of the physicochemical indicators of the rice to be tested into a pre-trained feedforward neural network MLP model to obtain the taste value, and to determine the taste quality of the rice to be tested based on the taste value. The feedforward neural network MLP model is trained using the BP algorithm and the physicochemical index measurements and taste values ​​of a pre-collected rice sample set with different taste qualities. Its hidden layer activation function adopts the hyperbolic tangent function, and its output layer activation function adopts the identity function.

[0006] As a third aspect of the present invention, an electronic device is provided, characterized in that it includes a storage module, the storage module including instructions loaded and executed by a processor, the instructions causing the processor to perform the rice taste quality detection method of the first aspect described above when executed.

[0007] As a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing one or more programs, characterized in that, when the one or more programs are executed by a processor, they implement the rice taste quality detection method of the first aspect described above.

[0008] This invention uses neural networks combined with the physicochemical indicators of rice to detect the taste quality of rice. It is not affected by human experience or regional habits, and has high accuracy and efficiency. It also does not require expensive rice taste testers, making it low-cost. Attached Figure Description

[0009] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments: Figure 1 A flowchart of a method for detecting the eating quality of rice provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a rice taste quality testing device provided in an embodiment of the present invention; Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present invention; Figure 4 (a)-(c) are correlation diagrams between the taste values ​​of the japonica rice groups 1-3 of the present invention and the taste values ​​fitted by the model. Figure 5 (a)-(c) are correlation diagrams of the taste values ​​of the indica rice groups 1-3 and the taste values ​​fitted by the model, respectively, in embodiments of the present invention. Detailed Implementation

[0010] The embodiments of the present invention will be described below with reference to the accompanying drawings. It should be noted that the embodiments described in this specification are not exhaustive and do not represent the only embodiments of the present invention. The corresponding embodiments below are only for clearly illustrating the inventive content of this patent and are not intended to limit its implementation. For those skilled in the art, different variations and modifications can be made based on the embodiments described. Any variations or modifications that fall within the technical concept and inventive content of this invention and are obvious are also within the protection scope of this invention.

[0011] like Figure 1 As shown in the figure, this application provides a method for detecting the eating quality of rice, the specific process of which is as follows: S101. Obtain the physicochemical index values ​​of the rice to be tested.

[0012] In this embodiment, the physicochemical indicators include amylose content, protein content, peak viscosity, hot paste viscosity, disintegration value, final viscosity, and reduction value.

[0013] Specifically, the measurement process for the physicochemical indicators is as follows: 1. Use a rice huller and a rice polisher to process brown rice and polished rice, and select whole polished rice; 2. Take a certain amount of whole rice, grind it into powder using a FOSS milling machine, pass it through a 100-mesh sieve, and let it stand at room temperature for 24 hours to balance the moisture content, thus obtaining rice flour. 3. Weigh 0.05g of refined rice flour and determine the amylose content according to the flow injection method in the spectrophotometric method for the determination of amylose in rice, NY / T 2639-2014. 4. Weigh 0.50g of refined rice flour and determine the protein content according to the Kjeldahl method in GB / T 5511-2008, which specifies the determination of nitrogen content and calculation of crude protein content in cereals and legumes. 5. Weigh 3.00g of refined rice flour and determine the gelatinization characteristics of rice flour according to GB / T 24852-2010 Determination of Gelatinization Characteristics of Rice and Rice Flour by Rapid Viscometer Method. Use a Boton RVA-tech Master Rapid Viscometer to determine the peak viscosity, hot paste viscosity, disintegration value, final viscosity and loss value of rice flour.

[0014] S102. Input the measured values ​​of the physicochemical indicators of the rice to be tested into a pre-trained feedforward neural network MLP model to obtain the taste value, and determine the taste quality of the rice to be tested based on the taste value.

[0015] After obtaining the taste value, the taste quality grade of rice can be determined according to multiple preset ranges. For example, a taste value greater than 0 and less than or equal to 30 is low grade, greater than 30 and less than or equal to 60 is medium grade, and greater than 60 and less than or equal to 100 is high grade.

[0016] Among them, the feedforward neural network MLP model is trained by the BP algorithm and the physicochemical index measurement values ​​and taste values ​​of rice sample sets with different taste qualities collected in advance. It has 7 input layer nodes and 1 output layer node. The hidden layer activation function adopts the hyperbolic tangent function, and the output layer activation function adopts the identity function.

[0017] The rice sample sets include a japonica rice sample set, an indica rice sample set, a batch prediction sample set of japonica rice eating quality, and a batch prediction sample set of indica rice eating quality, all of which have differences in eating quality. The japonica rice sample set includes 31 japonica rice samples with differences in eating quality, numbered JD01 to JD31 (as shown in Table 1). The indica rice sample set includes 39 indica rice samples with differences in eating quality, numbered XD01 to XD39 (as shown in Table 2). The batch prediction sample set of japonica rice eating quality includes 77 japonica rice samples with differences in eating quality, and the batch prediction sample set of indica rice eating quality includes 105 indica rice samples with differences in eating quality.

[0018] The determination process for the physicochemical indicators of rice samples is the same as above. In addition, the taste value needs to be tested for each sample. The specific process is as follows: 1. Weigh an appropriate amount of whole rice, rinse it twice until the water is clear, add water after rinsing to make the rice-to-water ratio 1:1.1-1.5 (see Table 3 for details), add water by weighing, and soak for 30 minutes. 2. After steaming in a rice cooker for 30 minutes, let it simmer for another 10 minutes. Gently stir the rice in the pot to make it fluffy and prevent it from clumping together. 3. Place in a cooling box and cool for 20 minutes; 4. Weigh 8g of cooked rice and place it into a stainless steel sample ring. Press the rice into a rice cake using a rice press and then use a rice taste meter to determine the taste value by selecting either the Chinese japonica rice test line or the indica rice test line.

[0019] Each sample was measured three times, and the average value was taken as its taste value, as shown in Tables 1 and 2.

[0020] Table 1

[0021] Material Number Amylose content / % Protein content / % Peak viscosity / cP Hot paste viscosity / cP Disintegration value / cP Final viscosity / cP Impairment value / cP Taste value / Y JD01 15.86 8.08 3659.0 2410.0 1249.0 3387.0 -272.5 62.50 JD02 16.01 7.73 3839.0 2400.0 1439.0 3625.0 -213.5 67.25 JD03 8.78 7.73 3212.0 1176.0 2036.0 1579.0 -1633.5 83.50 JD04 8.58 7.61 3919.0 1394.0 2525.0 1908.0 -2011.0 83.25 JD05 15.55 7.60 2828.0 1714.0 1113.0 2241.0 -58.0 62.90 JD06 15.90 8.00 2412.0 1877.0 535.0 2618.0 205.0 53.50 JD07 17.92 7.57 2812.0 2011.0 801.0 2726.0 -86.0 57.00 JD08 10.64 7.53 3305.0 1973.0 1333.0 2744.0 -562.0 74.00 JD09 9.80 8.27 2698.0 1346.0 1353.0 1919.0 -779.0 70.13 JD10 10.85 8.37 2659.0 1444.0 1215.0 1997.0 -663.0 66.93 JD11 17.25 6.08 2630.0 1427.0 1202.0 2555.0 -74.0 67.23 JD12 16.35 6.70 2432.0 1538.0 894.0 2566.0 134.0 61.00 JD13 17.92 6.58 2569.0 1611.0 959.0 2644.0 75.0 66.90 JD14 16.56 8.26 2357.0 1472.0 885.0 2636.0 279.0 52.73 JD15 9.00 7.40 2495.0 1305.0 1892.0 1190.0 -452.0 88.10 JD16 13.40 9.60 1789.0 955.0 834.0 1279.0 -210.0 48.00 JD17 8.72 8.11 2466.0 1358.0 1107.0 1963.0 -503.0 66.17 JD18 8.72 8.15 2876.8 1589.2 1287.7 1843.8 -1033.0 76.87 JD19 9.83 8.68 2717.5 1457.3 1260.2 1827.2 -890.4 70.01 JD20 12.20 8.40 2146.0 1311.0 1135.0 1515.0 -631.0 65.00 JD21 14.20 8.70 1677.0 846.0 931.0 1556.0 -121.0 51.00 JD22 16.24 7.13 3050.0 1679.5 1370.5 2875.6 -174.5 66.50 JD23 13.70 8.40 2154.0 1139.0 915.0 1419.0 65.0 52.00 JD24 12.80 7.90 2687.0 1257.0 1222.0 1830.0 -657.0 67.00 JD25 12.50 8.20 2378.0 1058.0 1069.0 1656.0 -722.0 69.00 JD26 13.60 9.30 2095.0 1036.0 1059.0 1299.0 -196.0 51.00 JD27 10.90 8.40 1974.0 1205.0 1320.0 1715.0 -759.0 70.00 JD28 10.60 8.30 3391.0 2176.0 1215.0 2863.0 -528.0 74.70 JD29 9.10 7.60 3446.0 1921.0 1526.0 2566.0 -881.0 83.40 JD30 9.80 7.40 3403.0 2093.0 1310.0 2781.0 -622.0 78.60 JD31 10.00 7.40 3159.0 1909.0 1251.0 2852.0 -308.0 74.60 Table 2 Material Number Amylose content / % Protein content / % Peak viscosity / cP Hot paste viscosity / cP Disintegration value / cP Final viscosity / cP Impairment value / cP Taste value / Y SD01 17.60 8.17 3363.3 1654.0 1757.3 2574.3 -793.7 89.87 SD02 19.70 7.90 3770.0 1883.0 1887.0 3047.0 -723.0 86.00 SD03 19.50 6.70 4160.0 1717.0 2443.0 2795.0 -1365.0 89.00 SD04 19.40 7.70 4056.0 1913.0 2143.0 3060.0 -996.0 87.00 SD05 19.50 6.70 3952.0 1682.0 2270.0 2767.0 -1185.0 90.00 SD06 14.82 9.61 3577.6 1676.5 1901.0 3002.5 -575.0 65.20 SD07 19.54 11.45 3124.0 2060.5 1063.6 3936.5 812.5 54.00 SD08 15.66 9.32 3279.6 1805.0 1474.6 3289.6 10.0 67.40 SD09 13.18 10.54 3130.1 1643.0 1487.0 3090.0 -40.0 65.70 SD10 15.71 10.03 3423.0 1762.1 1661.0 3278.5 -144.6 63.50 SD11 17.24 11.23 3438.5 1837.6 1601.0 3318.5 -120.0 67.40 SD12 16.50 10.18 3671.0 1760.0 1911.0 3150.6 -520.6 64.80 SD13 21.45 9.47 3846.0 2096.0 1750.1 4140.0 294.0 57.00 SD14 16.61 10.25 3226.6 1840.6 1386.0 3481.6 255.0 60.70 SD15 17.32 9.27 3623.0 1788.6 1834.6 3213.5 -409.6 68.10 SD16 16.10 8.64 3291.0 1740.6 1550.5 3257.5 -33.5 67.80 SD17 13.82 9.35 3679.6 1810.6 1869.0 3207.5 -472.1 70.70 SD18 16.53 8.87 3752.5 1638.5 2114.0 2893.6 -859.1 69.90 SD19 15.64 9.87 3677.0 1519.6 2157.6 2797.0 -880.1 68.50 SD20 14.26 9.70 3645.5 1751.0 1894.6 3128.5 -517.0 69.80 SD21 20.21 10.70 3476.5 2251.1 1225.6 4201.6 725.0 56.50 SD22 16.14 9.29 3543.5 1682.5 1861.0 3100.6 -443.0 67.40 SD23 16.63 10.54 3369.6 1719.5 1650.0 2972.5 -397.0 66.20 SD24 19.03 10.30 3316.6 2172.5 1144.1 4146.0 829.6 53.50 SD25 15.92 9.74 3621.0 1843.6 1777.6 3180.0 -441.0 71.70 SD26 15.54 9.75 3121.0 1768.0 1353.0 3225.0 104.0 65.30 SD27 20.14 11.06 3317.5 1770.6 1547.0 3544.6 227.0 53.60 SD28 17.52 6.71 4035.5 1906.6 2129.0 3251.5 -784.1 79.20 SD29 16.97 6.44 3941.0 1790.5 2150.5 3172.0 -769.1 85.10 SD30 17.65 6.77 4116.0 1779.6 2336.5 3190.6 -925.6 80.70 SD31 18.45 7.62 3941.0 1983.0 1958.0 3426.5 -514.6 78.50 SD32 19.98 6.84 4119.6 1946.0 2173.6 3327.5 -792.0 80.90 SD33 22.67 7.01 3983.5 2154.0 1829.5 3932.5 -51.0 62.20 SD34 20.28 9.67 3887.0 2209.0 1678.1 3986.0 99.0 59.60 SD35 15.53 8.69 4040.0 1748.0 2292.0 2820.0 -1220.0 72.80 SD36 16.16 7.79 4224.6 1685.0 2539.6 2781.6 -1443.0 72.00 SD37 17.14 8.63 2877.0 1696.8 1180.3 2947.3 70.3 84.00 SD38 16.09 8.78 2774.8 1593.8 1181.0 2702.5 -72.3 85.00 SD39 18.11 8.10 2737.8 1724.3 1013.5 2910.5 172.8 81.30 Table 3 Serial Number Amylose content / % Rice to water ratio 1 ≤13 1:1.1 2 13.1~17.0 1:1.2 3 17.1~21.0 1:1.3 4 21.1~25.0 1:1.4 5 >25.0 1:1.5 After obtaining the physicochemical index and taste values ​​of the rice sample set, it was divided into training set, validation set and test set in a ratio of 8:2:0.

[0022] Traditional neural network programming requires specialized programming knowledge and complex parameter tuning, which limits its widespread application in the food industry. SPSS 27, as a mature statistical analysis software, provides a user-friendly neural network module, but its specific application in the field of rice taste quality evaluation has not been reported. Therefore, this application selects seven indicators—amylose content, protein content, peak viscosity, hot paste viscosity, disintegration value, final viscosity, and loss value—to construct an efficient neural network model on the SPSS 27 platform. The selection of input variables and parameter settings are optimized, allowing for model construction and training without complex programming. This achieves objective, accurate, and efficient evaluation of rice taste quality, demonstrating significant application value. The specific process is as follows: 1. Data preparation and import: In the SPSS 27 data view, establish variables including "amylose content", "protein content", "peak viscosity", "hot paste viscosity", "disintegration value", "final viscosity", and "loss value" as independent variables, and "taste value" as the dependent variable; 2. Import the experimentally obtained sample set data of 31 groups of japonica rice model construction samples and 39 groups of indica rice model construction samples respectively, and perform necessary standardization processing on the data through "Transform" → "Calculate Variables".

[0023] 3. Select "Analyze" → "Neural Network" → "Multilayer Perceptron" to open the main dialog box, move the taste value variable into the "Dependent Variable" box, and move the other physicochemical indicators into the "Covariate" box; 4. Use SPSS 27's automatic data partitioning function to randomly divide the dataset into training, validation and test sets: In the "Partitioning" tab, check "Randomly assign cases" and set the training set to 80% and the validation set to 20%.

[0024] 5. Network Structure Settings: In the "Architecture" tab, select "Auto-select" to let SPSS automatically optimize the number of hidden layers (1-2 layers) and the number of units; Activation Function Selection: Use the hyperbolic tangent function for hidden layers and the identity function for output layers; In the "Training" tab, select "Batch" for training type and "Gradient Descent" for optimization algorithm.

[0025] 6. Model Training and Output: Click "OK" to run the analysis; view the network structure diagram, model summary, and classification table in the output viewer; save the model XML file for subsequent prediction use.

[0026] Specifically, to determine the optimal parameters of the feedforward neural network MLP model, comparative analyses were conducted on japonica and indica rice sample sets. SPSS 27's output function was used to generate network structure diagrams and comparison diagrams of predicted and measured values. Correlation analysis was performed based on the fitted and measured taste values ​​of the rice to verify the feasibility of the rice taste quality evaluation model. This was achieved using R... 2 Evaluate the model's prediction accuracy and save the optimal model. The specific process is as follows: 1. Comparative analysis of japonica rice sample sets: (1) Select 31 groups of japonica rice models to construct sample set data; (2) Set three different sets of parameters for comparison: Group 1: Architecture automatically selected, learning rate 0.1; Group 2: Custom architecture with a single hidden layer, 8 units, and a learning rate of 0.2; Group 3: Custom architecture with two hidden layers, the first layer has 5 units, the second layer has 3 units, and the learning rate is 0.4. like Figure 4 (a)-(c) show the correlation between the taste values ​​of japonica rice groups 1-3 and the taste values ​​fitted by the model. The results show that the correlation coefficient R between the fitted taste values ​​and the measured taste values ​​of group 2 with parameter settings is [missing information]. 2 =0.9635; the training set sum of squares error was 0.538, and the relative error was 0.041; the validation set sum of squares error was 0.022, and the relative error was 0.009; the parameter set 2 had the best effect in terms of accuracy and training efficiency, and this set of parameters was selected as the final model for predicting the eating taste value of japonica rice.

[0027] 2. Comparative analysis of indica rice sample sets: (1) Select 39 groups of indica rice models obtained from the experiment to construct a sample set data; (2) Set three different sets of parameters for comparison: Indica rice group 1: System architecture was automatically selected with a learning rate of 0.1; Indica rice group 2: Customized architecture with a single hidden layer, 8 units, and a learning rate of 0.2; Indica rice group 3: Customized architecture with two hidden layers, the first layer has 5 units and the second layer has 3 units, with a learning rate of 0.4; like Figure 5 (a)-(c) show the correlation results between the taste values ​​measured by the taste meter and the taste values ​​fitted by the model for groups 1-3 of indica rice. The correlation coefficient R between the taste values ​​fitted by the parameter settings in group 2 and the measured taste values ​​is... 2=0.9630; the training set sum of squares error was 0.614, and the relative error was 0.038; the validation set sum of squares error was 0.070, and the relative error was 0.029; the parameter set 2 had the best performance in terms of accuracy and training efficiency, and this set of parameters was selected as the final model for predicting the eating quality of indica rice.

[0028] In summary, the feedforward neural network MLP model (the optimal MLP model for japonica / indica rice) has 7 input layer nodes, 1 output layer node, 8 hidden layer nodes, and a learning rate of 0.2, which can ensure its detection accuracy and efficiency.

[0029] Finally, using the batch processing function of SPSS 27 software, and by adapting the macro command automation script of SPSS 27 software, the data files were read in a loop, the optimal artificial neural network prediction models for japonica and indica rice were called, and S101-S102 were executed to perform batch testing of the eating quality of 77 japonica rice samples and batch testing of the eating quality of 105 indica rice samples.

[0030] The results showed that the correlation coefficient R between the fitted taste value and the measured taste value of the artificial neural network prediction model for japonica rice was [missing information]. 2 =0.9141; Correlation coefficient R between the fitted taste value and the measured taste value of indica rice artificial neural network prediction model. 2 =0.9314; R 2 All values ​​are greater than 0.9, indicating high model accuracy in batch processing.

[0031] Similarly, in scenarios involving the detection of a large number of objects to be tested, the aforementioned macro command automated scripts can also be used for batch detection.

[0032] As can be seen from the above, the rice eating quality detection method provided in this application embodiment is based on a neural network combined with the physicochemical indicators of rice (amylose content, protein content, peak viscosity, hot paste viscosity, disintegration value, final viscosity and reduction value) to detect the eating quality of rice. It is not affected by human experience or regional habits, has high accuracy and efficiency, and does not require expensive rice eating instruments, thus having a low cost.

[0033] Furthermore, the embodiments of this application utilize the graphical user interface of SPSS 27 software, which allows for the construction of neural network models without programming, significantly reducing the technical threshold. Moreover, by utilizing the batch processing function of SPSS 27 software, large-scale food quality testing can be achieved through automated scripts.

[0034] The following will describe in detail one or more embodiments of the rice eating quality testing apparatus of the present invention. Those skilled in the art will understand that these apparatuses can be configured using commercially available hardware components through the steps taught in this solution. Figure 2This invention illustrates a rice taste quality testing device provided by an embodiment of the present invention. The device includes a first module 11 and a second module 12. The two modules work together through a data transmission link to complete the fully automated processing of rice taste quality from indicator collection to result output. The specific functions are as follows.

[0035] The first module 11 is used for S101 to obtain the physicochemical index values ​​of the rice to be tested.

[0036] In this embodiment, the physicochemical indicators include amylose content, protein content, peak viscosity, hot paste viscosity, disintegration value, final viscosity, and reduction value.

[0037] Specifically, the measurement process for the physicochemical indicators is as follows: 1. Use a rice huller and a rice polisher to process brown rice and polished rice, and select whole polished rice; 2. Take a certain amount of whole rice, grind it into powder using a FOSS milling machine, pass it through a 100-mesh sieve, and let it stand at room temperature for 24 hours to balance the moisture content, thus obtaining rice flour. 3. Weigh 0.05g of refined rice flour and determine the amylose content according to the flow injection method in the spectrophotometric method for the determination of amylose in rice, NY / T 2639-2014. 4. Weigh 0.50g of refined rice flour and determine the protein content according to the Kjeldahl method in GB / T 5511-2008, which specifies the determination of nitrogen content and calculation of crude protein content in cereals and legumes. 5. Weigh 3.00g of refined rice flour and determine the gelatinization characteristics of rice flour according to GB / T 24852-2010 Determination of Gelatinization Characteristics of Rice and Rice Flour by Rapid Viscometer Method. Use a Boton RVA-tech Master Rapid Viscometer to determine the peak viscosity, hot paste viscosity, disintegration value, final viscosity and loss value of rice flour.

[0038] Among them, the first module 11 is compatible with rice processing testing equipment (such as rice hullers, rice polishers, FOSS milling machines, flow injection apparatus, Kjeldahl nitrogen determination equipment, rapid viscosity analyzers, etc.), and can directly receive physicochemical index data generated by the equipment testing, or collect physicochemical index data entered after manual measurement, ensuring the accuracy and efficiency of data acquisition.

[0039] The second module 12 is used in S102 to input the measured values ​​of the physicochemical indicators of the rice to be tested into a pre-trained feedforward neural network MLP model to obtain the taste value, and to determine the taste quality of the rice to be tested based on the taste value.

[0040] After obtaining the taste value, the taste quality grade of rice can be determined according to multiple preset ranges. For example, a taste value greater than 0 and less than or equal to 30 is low grade, greater than 30 and less than or equal to 60 is medium grade, and greater than 60 and less than or equal to 100 is high grade.

[0041] Among them, the feedforward neural network MLP model is trained by the BP algorithm and the physicochemical index measurement values ​​and taste values ​​of rice sample sets with different taste qualities collected in advance. It has 7 input layer nodes and 1 output layer node. The hidden layer activation function adopts the hyperbolic tangent function, and the output layer activation function adopts the identity function.

[0042] The rice sample sets include a japonica rice sample set, an indica rice sample set, a batch prediction sample set of japonica rice eating quality, and a batch prediction sample set of indica rice eating quality, all of which have differences in eating quality. The japonica rice sample set includes 31 japonica rice samples with differences in eating quality, numbered JD01 to JD31 (as shown in Table 1). The indica rice sample set includes 39 indica rice samples with differences in eating quality, numbered XD01 to XD39 (as shown in Table 2). The batch prediction sample set of japonica rice eating quality includes 77 japonica rice samples with differences in eating quality, and the batch prediction sample set of indica rice eating quality includes 105 indica rice samples with differences in eating quality.

[0043] The determination process for the physicochemical indicators of rice samples is the same as above. In addition, the taste value needs to be tested for each sample. The specific process is as follows: 1. Weigh an appropriate amount of whole rice, rinse it twice until the water is clear, add water after rinsing to make the rice-to-water ratio 1:1.1-1.5 (see Table 3 for details), add water by weighing, and soak for 30 minutes. 2. After steaming in a rice cooker for 30 minutes, let it simmer for another 10 minutes. Gently stir the rice in the pot to make it fluffy and prevent it from clumping together. 3. Place in a cooling box and cool for 20 minutes; 4. Weigh 8g of cooked rice and place it into a stainless steel sample ring. Press the rice into a rice cake using a rice press and then use a rice taste meter to determine the taste value by selecting either the Chinese japonica rice test line or the indica rice test line.

[0044] Each sample was measured three times, and the average value was taken as its taste value, as shown in Tables 1 and 2.

[0045] After obtaining the physicochemical index and taste values ​​of the rice sample set, it was divided into training set, validation set and test set in a ratio of 8:2:0.

[0046] Traditional neural network programming requires specialized programming knowledge and complex parameter tuning, which limits its widespread application in the food industry. SPSS 27, as a mature statistical analysis software, provides a user-friendly neural network module, but its specific application in the field of rice taste quality evaluation has not been reported. Therefore, this application selects seven indicators—amylose content, protein content, peak viscosity, hot paste viscosity, disintegration value, final viscosity, and loss value—to construct an efficient neural network model on the SPSS 27 platform. The selection of input variables and parameter settings are optimized, allowing for model construction and training without complex programming. This achieves objective, accurate, and efficient evaluation of rice taste quality, demonstrating significant application value. The specific process is as follows: 1. Data preparation and import: In the SPSS 27 data view, establish variables including "amylose content", "protein content", "peak viscosity", "hot paste viscosity", "disintegration value", "final viscosity", and "loss value" as independent variables, and "taste value" as the dependent variable; 2. Import the experimentally obtained sample set data of 31 groups of japonica rice model construction samples and 39 groups of indica rice model construction samples respectively, and perform necessary standardization processing on the data through "Transform" → "Calculate Variables".

[0047] 3. Select "Analyze" → "Neural Network" → "Multilayer Perceptron" to open the main dialog box, move the taste value variable into the "Dependent Variable" box, and move the other physicochemical indicators into the "Covariate" box; 4. In the "Partition" tab, check "Randomly assign cases" and set the training set to 80% and the validation set to 20%.

[0048] 5. Network Structure Settings: In the "Architecture" tab, select "Auto-select" to let SPSS automatically optimize the number of hidden layers (1-2 layers) and the number of units; Activation Function Selection: Use the hyperbolic tangent function for hidden layers and the identity function for output layers; In the "Training" tab, select "Batch" for training type and "Gradient Descent" for optimization algorithm.

[0049] 6. Model Training and Output: Click "OK" to run the analysis; view the network structure diagram, model summary, and classification table in the output viewer; save the model XML file for subsequent prediction use.

[0050] Specifically, to determine the optimal parameters of the feedforward neural network MLP model, comparative analyses were conducted on japonica and indica rice sample sets. SPSS 27's output function was used to generate network structure diagrams and comparison diagrams of predicted and measured values. Correlation analysis was performed based on the fitted and measured taste values ​​of the rice to verify the feasibility of the rice taste quality evaluation model. The model's prediction accuracy was evaluated using R², and the optimal model was saved. The specific process is as follows: 1. Comparative analysis of japonica rice sample sets: (1) Select 31 groups of japonica rice models to construct sample set data; (2) Set three different sets of parameters for comparison: Group 1: Architecture automatically selected, learning rate 0.1; Group 2: Custom architecture with a single hidden layer, 8 units, and a learning rate of 0.2; Group 3: Custom architecture with two hidden layers, the first layer has 5 units, the second layer has 3 units, and the learning rate is 0.4. like Figure 4 (a)-(c) show the correlation between the taste values ​​of the taste meter in groups 1-3 of japonica rice and the taste values ​​fitted by the model. The results show that the correlation coefficient R2 between the fitted taste values ​​and the measured taste values ​​with the parameter settings in group 2 is 0.9635; the sum of squares error of the training set is 0.538 and the relative error is 0.041; the sum of squares error of the validation set is 0.022 and the relative error is 0.009. The parameter settings in group 2 have the best effect in terms of accuracy and training efficiency, and this set of parameters is selected as the final model for predicting the taste value of japonica rice.

[0051] 2. Comparative analysis of indica rice sample sets: (1) Select 39 groups of indica rice models obtained from the experiment to construct a sample set data; (2) Set three different sets of parameters for comparison: Indica rice group 1: System architecture was automatically selected with a learning rate of 0.1; Indica rice group 2: Customized architecture with a single hidden layer, 8 units, and a learning rate of 0.2; Indica rice group 3: Customized architecture with two hidden layers, the first layer has 5 units and the second layer has 3 units, with a learning rate of 0.4; like Figure 5 (a)-(c) show the correlation results between the taste values ​​of the taste meter in groups 1-3 of indica rice and the taste values ​​fitted by the model. The correlation coefficient R2 between the fitted taste values ​​and the measured taste values ​​with the parameter settings in group 2 is 0.9630; the sum of squares error of the training set is 0.614 and the relative error is 0.038; the sum of squares error of the validation set is 0.070 and the relative error is 0.029. The parameter settings in group 2 have the best effect in terms of accuracy and training efficiency. This set of parameters is selected as the final model for predicting the taste value of indica rice.

[0052] In summary, the feedforward neural network MLP model (the optimal MLP model for japonica / indica rice) has 7 input layer nodes, 1 output layer node, 8 hidden layer nodes, and a learning rate of 0.2, which can ensure its detection accuracy and efficiency.

[0053] Finally, using the batch processing function of SPSS 27 software, an automated script adapted to the macro commands of SPSS 27 software was written to read data files in a loop, call the optimal artificial neural network prediction model for japonica and indica rice, and execute S101-S102 to perform batch testing on the eating quality of 77 japonica rice samples and batch testing on the eating quality of 105 indica rice samples.

[0054] The results showed that the correlation coefficient R between the fitted taste value and the measured taste value of the artificial neural network prediction model for japonica rice was [missing information]. 2 =0.9141; Correlation coefficient R between the fitted taste value and the measured taste value of indica rice artificial neural network prediction model. 2 =0.9314; R 2 All values ​​are greater than 0.9, indicating high model accuracy in batch processing.

[0055] Similarly, in scenarios involving the detection of a large number of objects to be tested, the aforementioned macro command automated scripts can also be used for batch detection.

[0056] In summary, the rice taste quality testing device provided in the above embodiments can perform the rice taste quality testing methods provided in the foregoing embodiments.

[0057] Similar to the above concept, the above Figure 2 The structure of the rice palatability testing device shown can be implemented as an electronic device. Figure 3 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention is shown.

[0058] For example, the electronic device includes a storage module 21 and a processor 22. The storage module 21 includes instructions loaded and executed by the processor 22, which, when executed, cause the processor 22 to perform the steps described in the above section of this specification, "A Method for Detecting the Taste and Quality of Rice," according to various exemplary embodiments of the present invention.

[0059] It should be understood that processor 22 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, the general-purpose processor can be a microprocessor or any conventional processor.

[0060] This invention also provides a computer-readable storage medium that stores one or more programs, which, when executed by a processor, implement the steps described in the above section on a method for detecting the palatability of rice according to various exemplary embodiments of the invention.

[0061] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer-readable storage media (or non-transitory media) and communication media (or transient media).

[0062] As is known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0063] For example, the computer-readable storage medium may be an internal storage unit of the electronic device of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital card (SD), a flash card, etc., equipped on the electronic device.

[0064] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for detecting the eating quality of rice, characterized in that, include: S101. Obtain the physicochemical index values ​​of the rice to be tested; S102. Input the measured values ​​of the physicochemical indicators of the rice to be tested into a pre-trained feedforward neural network MLP model to obtain the taste value, and determine the taste quality of the rice to be tested based on the taste value. The feedforward neural network MLP model is trained using the BP algorithm and the physicochemical index measurements and taste values ​​of a pre-collected rice sample set with different taste qualities. Its hidden layer activation function adopts the hyperbolic tangent function, and its output layer activation function adopts the identity function.

2. The method for detecting the eating quality of rice according to claim 1, characterized in that, The physicochemical indicators include amylose content, protein content, peak viscosity, hot paste viscosity, disintegration value, final viscosity, and reduction value. The measurement process includes: The amylose content was determined according to the flow injection method in the spectrophotometric method for the determination of amylose in rice, as specified in NY / T 2639-2014. The protein content was determined according to the Kjeldahl method in GB / T 5511-2008, which specifies the determination of nitrogen content and calculation of crude protein content in cereals and legumes. Peak viscosity, hot paste viscosity, disintegration value, final viscosity and reduction value were determined according to GB / T 24852-2010 Determination of gelatinization characteristics of rice and rice flour using a rapid viscometer method.

3. The method for detecting the eating quality of rice according to claim 1, characterized in that, The rice sample set includes a japonica rice sample set and an indica rice sample set with differences in rice eating quality. The japonica rice sample set includes multiple japonica rice samples with differences in rice eating quality, and the indica rice sample set includes multiple indica rice samples with differences in rice eating quality.

4. The method for detecting the eating quality of rice according to claim 1, characterized in that, The input layer has 7 nodes, the hidden layer has 8 nodes, the output layer has 1 node, and the learning rate is 0.

2.

5. The method for detecting the eating quality of rice according to claim 1, characterized in that, When training the feedforward neural network MLP model, the physicochemical index measurements and taste values ​​of the rice sample set are divided into training set, validation set and test set in a ratio of 8:2:

0.

6. The method for detecting the eating quality of rice according to claim 1, characterized in that, The feedforward neural network MLP model was constructed using SPSS 27 software.

7. The method for detecting the eating quality of rice according to claim 5, characterized in that, Using the batch processing function of the SPSS 27 software, and through the macro command automation script adapted to the software, steps S101-S102 are executed to perform batch testing of the taste quality of multiple rice samples.

8. A device for detecting the eating quality of rice, characterized in that, include: The first module is used for S101, which obtains the physicochemical index values ​​of the rice to be tested; The second module is used in S102 to input the measured values ​​of the physicochemical indicators of the rice to be tested into a pre-trained feedforward neural network MLP model to obtain the taste value, and to determine the taste quality of the rice to be tested based on the taste value. The feedforward neural network MLP model is trained using the BP algorithm and the physicochemical index measurements and taste values ​​of a pre-collected rice sample set with different taste qualities. Its hidden layer activation function adopts the hyperbolic tangent function, and its output layer activation function adopts the identity function.

9. An electronic device, characterized in that, The method includes a storage module comprising instructions loaded and executed by a processor, which, when executed, cause the processor to perform a method for detecting the palatability of rice according to any one of claims 1-7.

10. A computer-readable storage medium storing one or more programs, characterized in that, When the one or more programs are executed by the processor, they implement the rice eating quality detection method according to any one of claims 1-7.