Bellamya piriformis gender prediction method based on machine learning and application

Through a machine learning-based method, a multi-layer perceptron model is constructed and the shell-shaped trait parameters of the ring-prick spiral are used for gender prediction, which solves the problems of low accuracy and complex operation of ring-prick spiral gender identification in the prior art, and achieves a gender prediction effect with high accuracy and simple operation.

CN120105200APending Publication Date: 2025-06-06HUAZHONG AGRI UNIV

Patent Information

Application Number
CN202510235240.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing methods of ring-bladder sex identification have problems such as low accuracy, complex operation, and susceptible to the thickness and color of the screw shell, which is difficult to effectively implement in practical applications.

Method used

Using a machine learning-based method, a multi-layer perceptron (MLP) model is constructed to predict gender by measuring and recording the shell-shaped trait parameters of the ring-shaped vertebrae. This method includes dataset acquisition, data preprocessing, model construction and model verification, and optimize model hyperparameters using grid search to improve prediction accuracy.

Benefits of technology

The high accuracy of the predicted gender of the ring prismatic screw is achieved, reaching 99.1%, and the operation process is simplified, reducing artificial errors, and is suitable for ring prismatic screws with different screw shell characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120105200A_ABST
    Figure CN120105200A_ABST
Patent Text Reader

Abstract

The invention discloses a machine learning-based Bellamya piriformis gender prediction method and application, and belongs to the technical field of aquatic animal gender determination. According to the method, shell shape character data of the Bellamya piriformis is taken as a training sample, and a multilayer perceptron model (MLP), a principal component analysis dimensionality reduction model (PCA) and a random forest model are respectively constructed to extract gender difference characteristics of the Bellamya piriformis. The performance and prediction accuracy of the constructed MLP model are optimal, the prediction accuracy reaches 99.1%, and the recall rate and the F1 score both exceed 95%. The method breaks through the limitation of the existing bellamya piriformis sex identification method, can quickly and accurately predict the sex of the bellamya piriformis, and provides convenience for breeding of new varieties of the bellamya piriformis and screening of male and female parents in artificial propagation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of aquatic animal sex identification, and in particular to a method and application for sex prediction of aquatic animal based on machine learning. Background Art

[0002] The pear-shaped Bellamyia is the fastest growing, largest and highest amino acid species in the genus Bellamyia. Bellamyia, commonly known as snails, is the core raw material of "Liuzhou snail noodles". In recent years, with the rapid development of the snail noodle industry, the large-scale farming of Bellamyia has also been rapidly popularized, and the selection and breeding of excellent new varieties is an important basis for ensuring the healthy and sustainable development of the Bellamyia farming industry.

[0003] Accurate and rapid identification of male and female sex is the first step in the selection and breeding of new varieties of Ring-rimmed Snails. However, the current method of identifying the sex of Ring-rimmed Snails is mainly based on the difference in antennae morphology between male and female individuals. The antennae of female snails are slender and symmetrical, and both extend forward. The right antennae of male snails are thick and short, curled inward, and specialized into a copulatory organ (Zhang Xi & Liu Yueying, 1960). However, in breeding practice, the practicality of using antennae morphology to identify males and females is poor. On the one hand, when Ring-rimmed Snails are slightly stimulated, they will quickly retract their antennae, viscera, and ventral feet into the shell, and seal the shell opening with opercula. Then, they will feel the external environment for a long time to ensure safety and no risks before extending their antennae and ventral feet again to start activities. On the other hand, during mating, the antennae of males are easily damaged. To solve the above problems, Bin Shiyu et al. (2019) developed a method for quickly identifying the sex of Chinese round field snails (CN110074025B), that is, using light to illuminate the junction of the spiral part and the body whorl, the one with a half-moon-shaped shadow (testis) is a male snail, and the one with no shadow or a granular shadow (embryo) is a female snail. This method also has the following three problems. First, it is impossible to distinguish between the male and female of sexually immature ring-shaped snails. Second, the distinction between the half-moon-shaped shadow (testis) and the granular shadow (embryo) is prone to human errors. Third, the shell of the ring-shaped snail is much thicker than that of the field snail, and the shell color is also darker. Therefore, using this method to identify the sex of the ring-shaped snail will also affect the accuracy and efficiency. In addition, Wen Yanhong et al. (2024) developed a method for rapid identification of the sex of Ring-edge Snails (CN117898239A), which has certain similarities with CN110074025B. In addition, the surface of wild Ring-edge Snails is often covered with thick moss, which is difficult to remove by manual brushing and is time-consuming and laborious. The machine brushing in production is very intense and can easily damage the parents. In summary, the existing methods for sex identification of Ring-edge Snails have certain limitations, which affect their effectiveness in practical applications. Therefore, inventing a method for distinguishing males and females with high accuracy, strong practicality and high efficiency is a technical problem that technicians in this field urgently need to solve.

[0004] In order to better promote the healthy and sustainable development of the ring-shaped snail farming industry, accurate and efficient sex identification technology is particularly important. With the rapid development of machine learning technology, especially the multi-layer perceptron (MLP) neural network, gender prediction can be effectively achieved with its superior performance in nonlinear data processing. This breakthrough is expected to solve the key technical bottlenecks in current breeding and promote the further development of the ring-shaped snail industry. Summary of the invention

[0005] To achieve the above object, the present invention develops a method for predicting the sex of Pyriformis annularis based on machine learning, comprising the following steps: S1. Acquisition of training sample data set: Measure and record the shell shape parameters of the ring-shaped snails; dissect the ring-shaped snails and determine the actual sex based on the gonadal characteristics, assigning male = 1 and female = 0 respectively; S2, data set division: After cleaning and standardizing the data set in S1, divide it into training data set and test data set in a ratio of 7:3; S3, model construction: construct the multi-layer perceptron model MLP, principal component analysis dimensionality reduction model PCA and random forest model respectively; S4, model training: Use the training data set in S2 to train the three models respectively, and optimize the hyperparameters of each model through grid search to minimize the loss function value; S5, model testing: the performance and accuracy of the three trained models were evaluated using the test data set in S2, and the MLP model was determined to be the optimal model for sex prediction of the ring-shaped snails through comparison; S6, Interface display: Integrate the constructed MLP model into a Web-based visualization application and display it using a local web interface to facilitate user use; S7. Model verification: Collect a new dataset of the Acutus sphenanthera population, input the shell shape trait parameters into the corresponding parameter positions on the S6 web page, compare the model prediction results with the actual sex, and calculate the actual prediction accuracy.

[0006] Preferably, the shell shape parameters in S1 include the shell width, shell height, first whorl width, second whorl width, shell mouth height, shell mouth width, body whorl height, spiral height, first whorl height and second whorl height of the ring-edge snail.

[0007] Preferably, the Adam algorithm is used to construct and train the multilayer perceptron model MLP in S3 and S4; the principal component analysis dimensionality reduction model PCA reduces the 10 shell shape trait parameters to 3 principal components on the principle of retaining more than 80% of the data variance.

[0008] Preferably, the PCA models in S3 and S4 are independent prediction models, and the gender prediction is performed by using discriminant analysis after reducing the dimension of multiple shell shape trait parameters in S1.

[0009] Preferably, the grid search in S4 optimizes the hyperparameters of each model, that is, under each set of hyperparameter configurations, the model updates internal parameters according to minimizing the cross entropy loss of the training set; then the trained model is evaluated using the validation set to compare its accuracy, recall rate and F1 score; and the hyperparameter combination with the best comprehensive performance on the validation set is selected for subsequent gender prediction.

[0010] The present invention also provides an application of a method for predicting the sex of Pyriformis annularis based on machine learning, comprising the following steps: Step 1, sample data collection: measure various shell shape parameters according to the shell morphology measurement standard of the ring-shaped snail; Step 2, data input: input the shell shape parameters of the ring-shaped snail to be predicted in the local webpage constructed above; Step 3: Result output: After receiving the prediction instruction, the system displays the prediction result through the front-end interface.

[0011] Compared with the prior art, the present invention has the following advantages: 1) High accuracy. The present invention makes full use of the subtle differences in the shell shape of male and female snails, combined with the advantages of machine learning (especially the superior performance of the multi-layer perceptron model MLP in capturing complex nonlinear data relationships), to improve the accuracy of sex prediction of the ring-shaped snails to 99.1%.

[0012] 2) Easy to operate. When the constructed model is used, it only needs to measure more than three shell shape parameters to accurately predict its gender; for the remaining shape parameters, the model will use the spline interpolation algorithm to fill in; therefore, the operation of the model constructed by the present invention is very simple in practical application; 3) It breaks through the limitations of existing methods. The present invention reduces the inconvenience of antennae morphology observation and the human error of gonadal characteristics observation, and is not affected by the thickness and color of the shell; even if the snail body is covered with moss or other attachments, it has little effect on the accuracy of sex prediction.

[0013] 4) Strong applicability. No professional skills are required to operate the model. The model is presented in the form of an easy-to-operate front-end application. Users can input data in real time through web pages or mobile terminals to predict gender.

[0014] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1This is a web page interface diagram of a method for predicting the sex of a pear-shaped ring-edge snail based on machine learning and an application embodiment of the present invention. DETAILED DESCRIPTION

[0016] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0017] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by a person having ordinary skills in the field to which the present invention belongs.

[0018] Embodiment 1 In May 2024, we collected snails from the snail breeding base of Xiaoluoxiang Company in Qianjiang City, Hubei Province, screened 1,000 individuals with typical characteristics of snails to construct a gender prediction model, and selected another 350 for model verification. The specific steps are as follows: S1. Acquisition of training sample data set: Measure and record the shell shape parameters of all individuals, including shell width, shell height, first whorl width, second whorl width, shell mouth height, shell mouth width, body whorl height, spiral height, first whorl height and second whorl height; dissect and determine the actual sex based on gonadal characteristics, assigning male = 1, female = 0 respectively; S2, data set division: After cleaning and standardization preprocessing, the data set in S1 is divided into a training set and a test set in a ratio of 7:3. The training set is used for model training, and the test set is used for model performance evaluation. S3, model construction: construct a multi-layer perceptron model (MLP), a principal component analysis dimensionality reduction model (PCA) and a random forest model respectively; among them, the PCA model is an independent prediction model, which uses PCA to reduce the dimensions of multiple shell shape parameters obtained in S1, and then combines discriminant analysis to predict gender; The reasons for choosing to build the above three models (multilayer perceptron model MLP, principal component analysis dimensionality reduction model PCA and random forest model) are: The MLP model can capture complex nonlinear relationships and is suitable for large-scale data processing. The PCA model reduces the computational complexity of the model by extracting the main components and reducing the number of features. After dimensionality reduction, the model is easier to train and may improve the accuracy and stability of predictions. The random forest can measure the contribution of each feature to the prediction results and has strong classification capabilities.

[0019] S4, model training: Use the training set in S2 to train the three models separately, and optimize the hyperparameters of each model through grid search. Specifically, under each set of hyperparameter configuration, the model updates the internal parameters by minimizing the cross entropy loss of the training set; then use the validation set to evaluate the trained model and compare its accuracy, recall rate and F1 score; finally, select the hyperparameter combination with the best comprehensive performance on the validation set for subsequent gender prediction.

[0020] The optimal hyperparameter combination is as follows: Multilayer Perceptron (MLP) model: 70% of the data is used as training set and 30% as validation set; The model consists of 4 layers, 2 of which are hidden layers, with 10 nodes in each layer. max_iter=20 (20 iterations during training); batch_size=256 (256 sample data are used for training each time); Adam convergence: β1=0.9, β2=0.999 (when using the Adam optimizer, β1=0.9, β2=0.999 are common hyperparameter settings); In the gender prediction problem, increasing the number of hidden layers and nodes usually improves the nonlinear expression ability of the model, but it also leads to computational overhead and the risk of overfitting. Therefore, the configuration of 2 hidden layers and 10 nodes per layer can better control the complexity of the model while retaining sufficient learning ability.

[0021] The Adam optimizer is selected because it has the ability to adjust the learning rate adaptively, performs well in terms of convergence speed and stability, and is suitable for processing small and medium-sized data sets. The common β1=0.9 and β2=0.999 are selected to control the momentum, with the aim of balancing the performance of the model between fast convergence and avoiding local optimality.

[0022] Principal component analysis (PCA) dimensionality reduction model: the data training set accounts for 70% and the validation set accounts for 30%. We choose to reduce the features to three principal components based on the principle of “retaining more than 80% of the data variance” to ensure that the main information of the data is retained.

[0023] Random Forest Model: The training set accounts for 70% of the data and the validation set accounts for 30%; 'bootstrap': False (each sample in the training set is used only once, without repeated sampling); 'class_weight': None (samples of each category are equally important during training); 'criterion': 'gini' (use the Gini impurity as the division criterion to evaluate the "purity" of each node); 'max_depth': None (there is no limit to the maximum depth of the tree); 'max_features': 'sqrt' (the number of features considered for each division is the square root of the number of all features to reduce the risk of overfitting); 'min_samples_leaf': 4 (each leaf node must contain at least 4 samples to avoid excessive refinement of leaf nodes); 'min_samples_split': 2 (the minimum number of samples required for internal node re-division is 2); 'n_estimators': 100 (the number of trees in the random forest is 100 trees); min_samples_leaf is set to 4, min_samples_split is set to 2, and cross-validation is used for testing and selection to ensure that the generalization ability of the model is maximized.

[0024] S5, Model testing: The performance and accuracy of the three trained models were evaluated using the test data set in S2. The results showed that the MLP model had a training set accuracy of 100% and a validation set accuracy of 99.3%; the PCA model had a training set accuracy of 79.7% and a validation set accuracy of 83.3%; the random forest model had a training set accuracy of 99.1% and a validation set accuracy of 80.3%. Therefore, the MLP model is the optimal model for predicting the sex of N. cyrtonema.

[0025] The MLP model had the highest accuracy in the validation set, probably because there is a nonlinear relationship between the morphological characteristics of the pear-shaped ring-edge snail and its sex, and MLP can learn and express this relationship more effectively. Although the random forest model has advantages in processing high-dimensional data and avoiding overfitting, it may not be as efficient as MLP in capturing complex nonlinear relationships between features. The PCA dimensionality reduction model may lose some key information during the dimensionality reduction process, resulting in the model being unable to fully utilize all useful features, thus affecting accuracy.

[0026] S6. Web page display: Integrate the constructed MLP model into the Dash application and display it using the local web page interface to facilitate user use; S7. Model verification: Input the 350 shell shape trait parameters used for verification into the corresponding parameter positions on the S6 webpage, compare the model prediction results with the actual sex, and calculate the actual prediction accuracy.

[0027] The results showed that among the 350 Pyriformis ring-shaped snails to be predicted, the sex of 347 individuals was accurately predicted (181 females and 166 males), with an accuracy rate of 99.1%, as shown in Table 1.

[0028] Table 1 Sex prediction results of Pyriformis punctatus based on MLP model

[0029] Embodiment 2 In July 2024, pear-shaped ring-angled snails were collected from Chaohu Lake, Anhui Province. A total of 1080 individuals with typical pear-shaped ring-angled snail characteristics were screened to construct a gender prediction model, and another 330 were used for model verification. The specific plan was the same as that in Example 1.

[0030] The results showed that among the 330 Pyriformis ring-ribbed snails to be predicted, the sex of 328 individuals was accurately predicted (165 females and 163 males), with an accuracy rate of 99.4%, as shown in Table 2.

[0031] Table 2 Sex prediction results of Pyriformis pyriformis from Chaohu, Anhui Province based on MLP model

[0032] Embodiment 3 In August 2024, the pear-shaped ring edge snails were collected from the Hongwei Reservoir in Liuzhou, Guangxi, and 986 individuals with typical pear-shaped ring edge snail characteristics were screened to construct a gender prediction model, and another 298 were used for model verification. The specific scheme was the same as in Example 1. The results showed that the prediction accuracy was 99.3%, as shown in Table 3.

[0033] Table 3 Sex prediction results of Pyriformis scutellariae in Hongwei Reservoir, Liuzhou, Guangxi based on MLP model

[0034] The method for constructing and applying the sex prediction model of the pear-shaped ring-edge snail provided by the present invention is also applicable to other species of freshwater ring-edge snails, such as copper-rust ring-edge snails and square ring-edge snails.

[0035] Therefore, the present invention adopts the above-mentioned machine learning-based sex prediction method and application of pear-shaped ring-edge snails, which not only breaks through the limitations of existing sex identification technology, but also realizes accurate and efficient prediction of the sex of pear-shaped ring-edge snails, thereby facilitating the selection of new varieties of ring-edge snails and the screening of male and female parents in artificial breeding.

[0036] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for predicting the sex of Pyriformis annularis based on machine learning, characterized in that: The following steps are involved: S1. Acquisition of training sample data set: Measure and record the shell shape parameters of the ring-shaped snails; dissect the ring-shaped snails and determine the actual sex based on the gonadal characteristics, assigning male = 1 and female = 0 respectively; S2, data set division: After cleaning and standardizing the data set in S1, divide it into training data set and test data set in a ratio of 7:3; S3, model construction: construct the multi-layer perceptron model MLP, principal component analysis dimensionality reduction model PCA, and random forest model respectively; S4, model training: Use the training data set in S2 to train the three models respectively, and optimize the hyperparameters of each model through grid search to minimize the loss function value; S5, model testing: the performance and accuracy of the three trained models were evaluated using the test data set in S2, and the MLP model was determined to be the optimal model for sex prediction of the ring-shaped snails through comparison; S6, Interface display: Integrate the constructed MLP model into a Web-based visualization application and display it using a local web interface to facilitate user use; S7. Model verification: Collect a new dataset of the Acutus sphenanthera population, input the shell shape trait parameters into the corresponding parameter positions on the S6 web page, compare the model prediction results with the actual sex, and calculate the actual prediction accuracy.

2. A method for predicting the sex of Pyriformis annularis based on machine learning according to claim 1, characterized in that: The shell shape parameters in S1 include shell width, shell height, first whorl width, second whorl width, shell opening height, shell opening width, body whorl height, spiral height, first whorl height and second whorl height.

3. A method for predicting the sex of Pyriformis annularis based on machine learning according to claim 1, characterized in that: The Adam algorithm is used to construct and train the multilayer perceptron model MLP in S3 and S4; the principal component analysis dimensionality reduction model PCA reduces the 10 shell shape parameters to 3 principal components based on the principle of retaining more than 80% of the data variance.

4. The method for predicting the sex of Pyriformis annularis based on machine learning according to claim 1, characterized in that: The PCA models in S3 and S4 are independent prediction models, which are based on the dimensionality reduction of multiple shell shape trait parameters in S1 and then use discriminant analysis to predict gender.

5. The method for predicting the sex of Pyriformis annularis based on machine learning according to claim 1, characterized in that: The grid search in S4 optimizes the hyperparameters of each model, which means that under each set of hyperparameter configurations, the model updates the internal parameters according to minimizing the cross entropy loss of the training set; then the trained model is evaluated using the validation set to compare its accuracy, recall rate and F1 score; and the hyperparameter combination with the best comprehensive performance on the validation set is selected for subsequent gender prediction.

6. The application of the method for predicting the sex of Pyriformis annularis based on machine learning according to any one of claims 1 to 5, characterized in that: The following steps are involved: Step 1, sample data collection: measure various shell shape parameters according to the shell morphology measurement standard of the ring-shaped snail; Step 2, data input: input the shell shape parameters of the ring-shaped snail to be predicted in the local webpage constructed in S6; Step 3: Result output: After receiving the prediction instruction, the system displays the prediction result through the front-end interface.

Citation Information

Patent Citations

  • A method for quickly identifying the sex of the Chinese round snail

    CN110074025B

  • Method for rapidly identifying male and female bellamya

    CN117898239A

Cited By

  • Application of primer for amplifying molecular marker related to sex of Bellamya piriformis in sex identification of Bellamya piriformis

    CN120945073A

  • Primers for amplifying gender-related molecular markers of bellamya aeruginosa in the identification of bellamya aeruginosa gender

    CN120945073B