Intelligent traditional Chinese medicinal material variety identification system based on photovoltaic agricultural medicine-light complementation

By integrating computer vision and spectral analysis technology into the photovoltaic agricultural pharmaceutical-optical complementary system, an intelligent identification system is built, and the problem of rapid and accurate identification of Chinese medicinal materials varieties is solved, achieving efficient and accurate identification results.

CN119863790AInactive Publication Date: 2025-04-22CHANGCHUN UNIV OF CHINESE MEDICINE

Patent Information

Application Number
CN202510348201.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the photovoltaic agricultural pharmaceutical-optical complementary system, how to quickly and accurately identify the varieties of Chinese medicinal materials has become an urgent problem.

Method used

An intelligent identification system integrating computer vision and spectral analysis technology is adopted. The data acquisition module collects spectral data, image data and environmental parameters, and the data preprocessing module performs preprocessing. The image recognition module and the spectral recognition module build a deep convolutional neural network and a random forest model respectively. The fusion recognition module weights and averages the output results of the two to obtain the final Chinese medicinal material variety identification results.

Benefits of technology

It realizes the rapid and accurate identification of Chinese medicinal materials in a complex photovoltaic agricultural environment, improves the identification efficiency and accuracy, reduces the time and cost of manual identification, and ensures the stability and reliability of the identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863790A_ABST
    Figure CN119863790A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of photovoltaic agriculture, discloses a traditional Chinese medicinal material variety intelligent identification system based on photovoltaic agricultural medicine-light complementation, and aims to solve the problem that traditional Chinese medicinal material varieties are difficult to identify in a photovoltaic agricultural environment. The system integrates a data acquisition module, a data preprocessing module, an image recognition module, a spectrum recognition module, a fusion recognition module and the like. The data acquisition module is responsible for collecting multi-dimensional data under the growth environment of the traditional Chinese medicinal materials; the data preprocessing module processes the data to form a preprocessed data set; the image recognition module constructs a model by using a deep convolutional neural network algorithm and recognizes the varieties of traditional Chinese medicinal materials; the spectrum identification module adopts a random forest algorithm to construct a model and analyze the spectrum characteristics of the traditional Chinese medicinal materials; and the fusion identification module fuses the image and the spectrum identification result to obtain a final identification result. According to the invention, through combination of computer vision and spectral analysis technologies, intelligent and precise identification of traditional Chinese medicinal material varieties is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic agriculture, and in particular to an intelligent identification system for Chinese medicinal materials varieties based on photovoltaic agriculture medicine-light complementarity. Background Art

[0002] With the continuous development of modern agricultural technology, photovoltaic agriculture, as a new agricultural model, organically combines photovoltaic power generation with agricultural production, achieving efficient land utilization and green and sustainable energy. In the photovoltaic agricultural medicine-photovoltaic complementary system, photovoltaic panels provide shade for Chinese medicinal materials, and the space under the photovoltaic panels provides a suitable growth environment for Chinese medicinal materials. This model effectively promotes the planting and development of Chinese medicinal materials. However, how to quickly and accurately identify Chinese medicinal materials in the photovoltaic agricultural medicine-photovoltaic complementary system has become an urgent problem to be solved.

[0003] In recent years, computer vision and spectral analysis technologies have been increasingly used in the agricultural field, providing new ideas for the intelligent identification of Chinese herbal medicines. Computer vision technology can capture the morphological characteristics of Chinese herbal medicines through image data, while spectral analysis technology can use the absorption and reflection characteristics of different Chinese herbal medicines to obtain their unique spectral characteristics. However, a single technical means is often difficult to fully and accurately identify Chinese herbal medicines, especially in the complex and changeable photovoltaic agricultural environment. Summary of the invention

[0004] The purpose of the present invention is to provide an intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementarity to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solution: an intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation, the system comprising:

[0006] Data acquisition module, used to collect spectral data, image data and environmental parameters of the growth environment of Chinese medicinal materials;

[0007] The data preprocessing module performs format conversion, denoising, calibration and feature extraction on the collected data to form a preprocessed data set;

[0008] Image recognition module, which builds a Chinese herbal medicine image recognition model based on a deep convolutional neural network algorithm. The model is trained using a preprocessed image feature dataset to identify Chinese herbal medicine varieties;

[0009] Spectral recognition module, which builds a spectrum analysis model for Chinese medicinal materials based on the random forest algorithm. The model uses preprocessed spectral feature data and environmental parameters to identify the spectral feature patterns of different Chinese medicinal materials.

[0010] The fusion recognition module fuses the output results of the image recognition model and the spectral analysis model to obtain the final Chinese medicinal material variety recognition results.

[0011] Preferably, the spectral data includes a visible light spectrum and a near infrared spectrum; the image data is an RGB color image; and the environmental parameters include temperature, humidity, light intensity, soil pH value and water content.

[0012] Preferably, the Chinese medicinal material image recognition model adopts a deep residual network ResNet structure, and its network structure includes:

[0013] Input layer: receives preprocessed image data, and the image size is unified to [H, W, C], where H is the height, W is the width, and C is the number of channels;

[0014] Convolutional layer: multi-layer convolution operation is adopted, each convolution layer is followed by ReLU activation function, the convolution kernel size is set to 3x3, and the step size is set to 1;

[0015] Residual block: Multiple residual blocks are connected in series, each residual block contains two convolutional layers and a skip connection to extract deep features;

[0016] Fully connected layer: Flatten the feature map output by the residual block into a one-dimensional vector and classify it through multiple layers of fully connected layers; the number of output nodes of the last fully connected layer is the number of Chinese medicinal materials, and the Softmax function is used to output the probability of each variety;

[0017] Output layer: Outputs the image recognition results of Chinese medicinal materials.

[0018] Preferably, the training steps of the Chinese medicinal material image recognition model include:

[0019] Initialize the parameters of the deep convolutional neural network model, including convolution kernel weights, bias terms, and learning rates;

[0020] Divide the preprocessed image feature dataset into a training set and a validation set;

[0021] The deep convolutional neural network model is iteratively trained using the training set. In each iteration, the model output is calculated by forward propagation, and the loss between the predicted value and the true value is calculated according to the loss function. The loss function uses the cross entropy loss function, and the calculation formula is:

[0022]

[0023] in, is the real variety label, is the variety probability predicted by the model, and N is the number of samples; according to the loss value, the model parameters are updated through the back propagation algorithm and the gradient descent algorithm; the calculation formula of the gradient descent algorithm is:

[0024]

[0025] in, Represents the current parameters of the model, including all weights and biases that the model needs to learn; represents the updated model parameters, Represents the learning rate, which is used to control the step size of parameter update; Represents the loss function About parameters The gradient of is a vector pointing to the direction where the loss function grows fastest; Indicates assignment operation;

[0026] Repeat the training steps until the loss converges or the preset number of iterations is reached;

[0027] The trained deep convolutional neural network model is verified using the validation set to evaluate the recognition accuracy of the model. When the model performance reaches the preset standard, the model parameters are saved to obtain a trained Chinese medicinal material image recognition model.

[0028] Preferably, the Chinese medicinal material spectral analysis model is constructed using a random forest algorithm, and its network structure includes:

[0029] Input layer: receives preprocessed spectral feature data and environmental parameters;

[0030] Decision tree layer: construct multiple decision trees, each of which independently classifies the input features;

[0031] Output layer: Through the voting mechanism, the output results of multiple decision trees are integrated to obtain the spectral analysis and identification results of Chinese medicinal materials.

[0032] Preferably, the steps of training the Chinese medicinal material spectral analysis model include:

[0033] Use the preprocessed spectral feature dataset and environmental parameters as the training set, and select Chinese herbal medicine varieties as labels;

[0034] Using the Bootstrap sampling method, multiple sub-sample sets are randomly selected from the training set to train multiple decision trees;

[0035] During the training process of each decision tree, the optimal features are selected for splitting until the stopping condition is met;

[0036] The random forest model was verified using the validation set to evaluate the recognition accuracy and generalization ability of the model. When the model performance reached the preset standard, the model parameters were saved to obtain a trained Chinese herbal medicine spectral analysis model.

[0037] Preferably, the fusion recognition module adopts a weighted average method to fuse the output results of the image recognition model and the spectral analysis model, and the specific steps include:

[0038] Define the variety probability output by the image recognition model as P_Image, and the variety probability output by the spectrum analysis model as P_Spectrum;

[0039] Assign weights W_Image and W_Spectrum to P_Image and P_Spectrum according to the confidence or accuracy of their respective models;

[0040] Calculate the weighted average probability of the species P_Fusion = W_Image * P_Image + W_Spectrum *P_Spectrum;

[0041] The variety with the highest probability in P_Fusion is selected as the final Chinese medicinal material variety identification result.

[0042] Preferably, the data denoising processing method in the data preprocessing module includes:

[0043] For spectral data, the sliding average filtering method was used to remove noise;

[0044] For image data, Gaussian filtering is used to remove noise;

[0045] For missing values ​​in environmental parameters, the average value of data at adjacent moments is used to fill them.

[0046] Preferably, the data preprocessing module uses the Pearson correlation coefficient to measure the linear correlation between each feature and the Chinese medicinal material variety, and performs feature extraction through the absolute value of the Pearson coefficient.

[0047] Preferably, the method for extracting features by the even data preprocessing module includes:

[0048] The Pearson coefficient between each pair of features is calculated to obtain a correlation matrix between the features; the calculation formula of the Pearson correlation coefficient is:

[0049]

[0050] Among them, r represents the correlation coefficient between the feature and the Chinese herbal medicine variety, n represents the number of data points, x represents the feature value, and y represents the target Chinese herbal medicine variety;

[0051] According to the size of the correlation matrix and the set threshold, the features with the strongest correlation with the Chinese medicinal materials are screened out;

[0052] Feature pairs with high correlation were eliminated, and the selected features were ranked according to the absolute value of the Pearson coefficient;

[0053] Output the filtered and sorted feature set.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] The present invention integrates computer vision and spectral analysis technologies, makes full use of the morphological and spectral characteristics of Chinese medicinal materials, and constructs a comprehensive intelligent recognition system. The system can overcome the limitations of a single technical means, effectively improve the recognition accuracy of Chinese medicinal materials, and provide reliable technical support for the planting and management of Chinese medicinal materials in the photovoltaic agricultural medicine-light complementary system. The system has real-time data acquisition and processing capabilities, can quickly collect spectral data, image data and environmental parameters in the growth environment of Chinese medicinal materials, and quickly analyze through efficient algorithm models to achieve instant recognition of Chinese medicinal materials. This greatly improves the recognition efficiency and reduces the time and labor costs required for manual recognition. The growth environment in the photovoltaic agricultural medicine-light complementary system is complex and changeable, which puts higher requirements on the recognition of Chinese medicinal materials. The present invention enhances the system's adaptability to complex environments by integrating multiple feature information, can accurately identify Chinese medicinal materials under different conditions of light, temperature, humidity, etc., and ensures the stability and reliability of the recognition results. The application of the intelligent recognition system provides precise technical support for the planting and management of Chinese medicinal materials in the photovoltaic agricultural medicine-light complementary system. Through real-time and accurate variety identification, accurate monitoring and management of the growth process of Chinese medicinal materials can be achieved, planting strategies can be optimized, planting efficiency can be improved, and the quality of medicinal materials can be ensured. The implementation of the present invention helps to promote the process of agricultural modernization. Applying computer vision and spectral analysis technology to the identification of Chinese medicinal material varieties not only improves the intelligent level of agricultural production, but also provides experience and methods that can be used for reference for the intelligent identification of other crops, injecting new vitality into scientific and technological innovation and industrial upgrading in the agricultural field. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a working principle diagram of the intelligent identification system for Chinese medicinal materials based on photovoltaic agricultural medicine-light complementarity of the present invention;

[0057] Figure 2 A flowchart for building a Chinese herbal medicine image recognition model using a deep residual network ResNet;

[0058] Figure 3 Flowchart for constructing a spectral analysis model for Chinese medicinal materials using the random forest algorithm. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] See also Figure 1-3 The present invention provides a technical solution: an intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation, the system comprising:

[0061] 1. Data acquisition module: responsible for collecting spectral data, image data and environmental parameters of the growth environment of Chinese medicinal materials. The specific implementation method is as follows:

[0062] Spectral data collection: A spectrometer is used, which is set below the photovoltaic panel to automatically collect the spectral reflectance data of the leaves or the whole of the Chinese medicinal materials at a fixed time or according to changes in lighting conditions. The spectrometer must have high resolution and a wide spectral range to capture the unique spectral characteristics of different Chinese medicinal materials.

[0063] Image data collection: Use high-definition cameras or drone-mounted cameras to capture regular or real-time images of the Chinese medicinal materials growing area. The image data should contain information such as the morphology, color, and texture of the Chinese medicinal materials for subsequent image recognition and analysis.

[0064] Environmental parameter collection: Environmental parameters such as temperature, humidity, light intensity, and soil moisture are collected through a sensor network. These parameters have a certain impact on the growth status and spectral characteristics of Chinese medicinal materials and need to be included in the recognition model as auxiliary information.

[0065] 2. Data preprocessing module: Perform format conversion, denoising, calibration and feature extraction on the collected data to form a preprocessed data set. The specific steps include:

[0066] Format conversion: Convert the raw data collected by the spectrometer and camera into a unified digital format for subsequent processing.

[0067] Denoising: Apply filtering algorithms to remove noise from spectral data and image data to improve data quality.

[0068] Calibration processing: perform baseline calibration and wavelength calibration on spectral data to ensure the accuracy of spectral data; perform color correction and geometric correction on image data to eliminate lens distortion.

[0069] Feature extraction: Extract key band features from spectral data, such as absorption peaks, reflectance ratios, etc.; extract shape features, color features, texture features, etc. from image data to form a feature vector set.

[0070] 3. Image recognition module: Build a Chinese herbal medicine image recognition model based on deep convolutional neural network (CNN). Use the preprocessed image feature dataset to train the CNN model, use the cross-validation method to evaluate the model performance, and adjust the network parameters to optimize the recognition accuracy. The trained CNN model recognizes new Chinese herbal medicine images and outputs the preliminary recognition results of Chinese herbal medicine varieties.

[0071] 4. Spectral recognition module: Build a Chinese herbal medicine spectral analysis model based on the random forest algorithm. Use the preprocessed spectral feature data and environmental parameters as input and the Chinese herbal medicine varieties as output to train the random forest model. Optimize the model performance by adjusting parameters such as the number and depth of decision trees. The trained random forest model analyzes new spectral data and identifies the spectral feature patterns of different Chinese herbal medicine varieties.

[0072] 5. Fusion recognition module: Fusion the output results of the image recognition model and the spectral analysis model to obtain the final TCM variety recognition results. Fusion the recognition results of the image recognition model and the spectral analysis model. The fusion weight can be adjusted according to the recognition accuracy and stability of each model. The fusion result is used as the final TCM variety recognition result, which is output to the user or used for subsequent planting management decisions.

[0073] The present invention will be further described below in conjunction with Examples 1 to 4:

[0074] Embodiment 1:

[0075] This embodiment is used to describe in detail the use of deep residual network ResNet to build a Chinese herbal medicine image recognition model. The following is the specific implementation method and training steps of the model:

[0076] The Chinese medicinal materials image recognition model uses a deep residual network ResNet structure, and its network structure specifically includes:

[0077] Input layer: receives preprocessed image data, and the image size is unified as [H, W, C], where H is the image height, W is the image width, and C is the number of channels (for color images, C is usually 3, i.e. RGB three channels). The input layer is responsible for inputting image data into the network to provide a basis for subsequent processing.

[0078] Convolutional layer: Multi-layer convolution operation is used, and each convolution layer is followed by a ReLU (Rectified Linear Unit) activation function to increase the nonlinear expression ability of the network. The convolution kernel size is set to 3x3 and the step size is set to 1, so that local features can be extracted while maintaining the image size. The convolutional layer is responsible for extracting low-level and mid-level features of the image, such as edges, textures, etc.

[0079] Residual block: Multiple residual blocks are connected in series, and each residual block contains two convolutional layers and a skip connection.

[0080] The skip connection adds the input directly to the output of the second convolutional layer, forming a residual structure that helps alleviate the vanishing gradient problem in deep networks. The residual block is responsible for extracting deep features that are critical for distinguishing different varieties of Chinese medicinal materials.

[0081] Fully connected layer: Flatten the feature map output by the residual block into a one-dimensional vector and classify it through multiple layers of fully connected layers. The number of output nodes of the last fully connected layer is the number of Chinese herbal medicine varieties, and the Softmax function is used to output the probability of each variety. The fully connected layer is responsible for mapping the deep features to the Chinese herbal medicine variety space to achieve the classification task.

[0082] Output layer: Outputs the image recognition results of Chinese medicinal materials, that is, the predicted variety labels or probabilities. The output layer is the final output of the model and is used to evaluate the recognition performance of the model.

[0083] The training steps of the Chinese medicinal materials image recognition model include the following key links:

[0084] Initialize model parameters: Initialize the parameters of the deep convolutional neural network model, including convolution kernel weights, bias terms, and learning rates. Parameter initialization methods can use random initialization or pre-trained model initialization.

[0085] Divide the dataset: Divide the preprocessed image feature dataset into a training set and a validation set. The training set is used to train the model, and the validation set is used to evaluate the performance of the model.

[0086] Iterative training: Use the training set to iteratively train the deep convolutional neural network model. In each iteration, the forward propagation calculates the model output, and the loss between the predicted value and the true value is calculated according to the loss function. The loss function uses the cross entropy loss function, and the calculation formula is:

[0087] in, is the real variety label, is the variety probability predicted by the model, and N is the number of samples; according to the loss value, the model parameters are updated through the back propagation algorithm and the gradient descent algorithm;

[0088] The calculation formula of the gradient descent algorithm is:

[0089]

[0090] in, Represents the current parameters of the model, including all weights and biases that the model needs to learn; represents the updated model parameters, Represents the learning rate, which is used to control the step size of parameter update; Represents the loss function About parameters The gradient of is a vector pointing to the direction where the loss function grows fastest; Represents an assignment operation.

[0091] Repeat the training steps until the loss converges or the preset number of iterations is reached. During the training process, the loss and accuracy on the validation set can be monitored to determine whether the model is overfitting or underfitting.

[0092] Model verification and saving: Use the verification set to verify the trained deep convolutional neural network model and evaluate the recognition accuracy of the model. When the model performance reaches the preset standard, save the model parameters to obtain the trained Chinese herbal medicine image recognition model. The saved model can be used for subsequent Chinese herbal medicine variety recognition tasks.

[0093] Embodiment 2:

[0094] The present invention adopts a Chinese medicinal material spectral analysis model constructed by a random forest algorithm. The following is a specific implementation method and training steps of the model:

[0095] The network structure of the Chinese medicinal material spectral analysis model includes:

[0096] Input layer: Receives pre-processed spectral feature data and environmental parameters. Spectral feature data may include but are not limited to spectral information such as reflectivity and absorptivity of Chinese medicinal materials at specific wavelengths. Environmental parameters may include external factors such as temperature, humidity, and light intensity that affect the growth and spectral characteristics of Chinese medicinal materials. The input layer is responsible for integrating and inputting these data into the model to provide a basis for subsequent processing.

[0097] Decision tree layer: build multiple decision trees, each of which independently classifies the input features. Decision tree is a classification algorithm based on tree structure, which divides data into different categories (i.e. leaf nodes) through a series of judgment conditions (i.e. nodes). In random forest, each decision tree is trained on different sub-sample sets and feature subsets to increase the diversity and robustness of the model.

[0098] Output layer: Through the voting mechanism, the output results of multiple decision trees are combined to obtain the spectral analysis and recognition results of Chinese herbal medicine varieties. Specifically, each decision tree will give a classification result for the input feature, and then the random forest will count these results and select the category with the most votes as the final recognition result.

[0099] The steps for training the Chinese medicinal material spectral analysis model include:

[0100] Prepare training set: Use the preprocessed spectral feature dataset and environmental parameters as the training set, and select Chinese herbal medicine varieties as labels. The training set should contain enough samples to cover Chinese herbal medicines of different varieties, different growth stages, and different environmental conditions.

[0101] Bootstrap sampling: Use the Bootstrap sampling method to randomly extract multiple sub-sample sets from the training set for training multiple decision trees. Bootstrap sampling is a random sampling method with replacement, which allows the same sample to appear repeatedly in multiple sub-sample sets, thereby increasing the diversity of the model.

[0102] Training decision trees: During the training process of each decision tree, the optimal features are selected for splitting until the stopping condition is met. The selection of the optimal features is usually based on criteria such as information gain and Gini index. The stopping condition may include reaching the maximum tree depth, the minimum number of samples, or the minimum information gain. By continuously splitting nodes, the decision tree can gradually refine the classification of data until each leaf node corresponds to a specific Chinese herbal medicine variety.

[0103] Model validation: Use the validation set to validate the random forest model and evaluate the recognition accuracy and generalization ability of the model. The validation set should be independent of the training set to ensure the objectivity and accuracy of the evaluation results.

[0104] By comparing the model prediction results with the true labels, we can calculate indicators such as recognition accuracy, recall rate, F1 score, etc. to evaluate the model performance.

[0105] When the model performance reaches the preset standard, the model parameters are saved to obtain the trained Chinese herbal medicine spectral analysis model. The saved model parameters include the structure and splitting conditions of each decision tree, so as to be used in subsequent recognition tasks.

[0106] Embodiment 3: The fusion recognition module adopts the weighted average method to fuse the output results of the image recognition model and the spectrum analysis model. The following are the specific implementation steps of the fusion recognition module:

[0107] Define the model output probability: The variety probability output by the image recognition model is P_Image. This is a vector, where each element represents the probability of a Chinese herbal medicine variety, and the length of the vector is equal to the total number of Chinese herbal medicine varieties. The variety probability output by the spectrum analysis model is P_Spectrum. Similarly, this is also a vector, where each element represents the probability of a Chinese herbal medicine variety.

[0108] Assign weights: Assign weights W_Image and W_Spectrum to P_Image and P_Spectrum based on the confidence or accuracy of the image recognition model and the spectral analysis model. The confidence or accuracy can be obtained by evaluating the model performance on the validation set. For example, the recognition accuracy of each model on the validation set can be calculated, and then the accuracy can be used as the basis for the weights. The more accurate the model, the greater the weight of its output. The weights W_Image and W_Spectrum should be positive numbers, and their sum can be equal to 1 (but this is not necessary, as long as the calculation of the weighted average makes sense).

[0109] Calculate the weighted average probability of the variety: Use the assigned weights to calculate the weighted average probability of the variety P_Fusion. The calculation formula is: P_Fusion = W_Image * P_Image + W_Spectrum * P_Spectrum

[0110] Here, "*" indicates element-wise multiplication of vectors. That is, each element in P_Fusion is the weighted sum of the corresponding elements in P_Image and P_Spectrum.

[0111] Select the final recognition result: After calculating P_Fusion, select the species with the highest probability as the final recognition result of the Chinese herbal medicine species. This can be achieved by finding the index of the maximum value in P_Fusion, and the species corresponding to the index is the recognition result.

[0112] Assume that there are three varieties of Chinese medicinal materials: A, B, and C. The variety probability output by the image recognition model is P_Image = [0.7, 0.2, 0.1], and the variety probability output by the spectrum analysis model is P_Spectrum = [0.6, 0.3, 0.1].

[0113] If the image recognition model has a higher accuracy, a larger weight can be assigned to it, such as W_Image = 0.7; correspondingly, the weight of the spectral analysis model is W_Spectrum = 0.3.

[0114] Calculate the weighted average probability of the variety: P_Fusion = 0.7 * [0.7, 0.2, 0.1] + 0.3 *[0.6, 0.3, 0.1] = [0.67, 0.23, 0.10]

[0115] The variety with the highest probability in P_Fusion is selected as the final recognition result, namely variety A. Example 4: The data preprocessing module uses the Pearson correlation coefficient to measure the linear correlation between each feature and the Chinese medicinal material variety, and extracts features through the absolute value of the Pearson coefficient; the specific steps include:

[0116] Calculate the Pearson correlation coefficient: For each pair of features and target Chinese medicinal materials, calculate the Pearson correlation coefficient between them. The calculation formula of the Pearson correlation coefficient is:

[0117]

[0118] Among them, r represents the correlation coefficient between the feature and the Chinese medicinal material variety, n represents the number of data points, x represents the feature value, and y represents the target Chinese medicinal material variety.

[0119] Through calculation, a correlation matrix between features is obtained, in which each element of the matrix represents the Pearson correlation coefficient between two features.

[0120] Screening the most relevant features: Based on the size of the correlation matrix and the set threshold, screen out the features with the strongest correlation with the Chinese herbal medicine varieties. The choice of threshold can be determined according to the specific application scenario and requirements. Usually, a value that can balance the number of features and recognition performance is selected. For features with a high correlation with Chinese herbal medicine varieties (i.e., the absolute value of the Pearson correlation coefficient is large), they are retained as candidate features.

[0121] Eliminate highly correlated feature pairs: Among the selected candidate features, there may be some highly correlated feature pairs. These feature pairs may provide redundant information and therefore need to be eliminated. You can check the correlation matrix to find feature pairs whose absolute value of the correlation coefficient is close to 1, and choose to eliminate one or two features based on the actual situation.

[0122] Sort selected features: Sort selected features according to the absolute value of the Pearson coefficient. Features with larger absolute values ​​indicate stronger linear correlations with Chinese medicinal material varieties, and therefore should be given higher priority in feature selection.

[0123] Output feature set: Output the filtered and sorted feature set as input for subsequent image recognition models and spectral analysis models.

[0124] Assume there are 5 features (F1, F2, F3, F4, F5) and a Chinese herbal medicine variety (Y). By calculating the Pearson correlation coefficient, the following correlation matrix is ​​obtained:

[0125]

[0126] The threshold was set to 0.6, and the features with the strongest correlation with the Chinese medicinal material variety Y were screened out: F1 (0.85), F4 (0.9).

[0127] Checking the correlation matrix, we find that the correlation coefficient between F1 and F4 is high (0.75), but since they are both strongly correlated with Y and there are no other feature pairs with higher correlations that need to be eliminated, F1 and F4 are retained.

[0128] According to the absolute value of Pearson coefficient, F4 (0.9) > F1 (0.85).

[0129] Output feature set: {F4, F1}.

[0130] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0131] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation, characterized in that: The system comprises: Data acquisition module, used to collect spectral data, image data and environmental parameters of the growth environment of Chinese medicinal materials; The data preprocessing module performs format conversion, denoising, calibration and feature extraction on the collected data to form a preprocessed data set; Image recognition module, which builds a Chinese herbal medicine image recognition model based on a deep convolutional neural network algorithm. The model is trained using a preprocessed image feature dataset to identify Chinese herbal medicine varieties; Spectral recognition module, which builds a spectrum analysis model for Chinese medicinal materials based on the random forest algorithm. The model uses preprocessed spectral feature data and environmental parameters to identify the spectral feature patterns of different Chinese medicinal materials. The fusion recognition module fuses the output results of the image recognition model and the spectral analysis model to obtain the final Chinese medicinal material variety recognition results.

2. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 1 is characterized in that: The spectral data includes a visible light spectrum and a near infrared spectrum; the image data is an RGB color image; and the environmental parameters include temperature, humidity, light intensity, soil pH value and water content.

3. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 1 is characterized in that: The Chinese medicinal material image recognition model adopts a deep residual network ResNet structure, and its network structure includes: Input layer: receives preprocessed image data, and the image size is unified to [H, W, C], where H is the height, W is the width, and C is the number of channels; Convolutional layer: multi-layer convolution operation is adopted, each convolution layer is followed by ReLU activation function, the convolution kernel size is set to 3x3, and the step size is set to 1; Residual block: Multiple residual blocks are connected in series, each residual block contains two convolutional layers and a skip connection to extract deep features; Fully connected layer: Flatten the feature map output by the residual block into a one-dimensional vector and classify it through multiple layers of fully connected layers; the number of output nodes of the last fully connected layer is the number of Chinese medicinal materials, and the Softmax function is used to output the probability of each variety; Output layer: Outputs the image recognition results of Chinese medicinal materials.

4. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementarity according to claim 3 is characterized in that: The training steps of the Chinese medicinal material image recognition model include: Initialize the parameters of the deep convolutional neural network model, including convolution kernel weights, bias terms, and learning rates; Divide the preprocessed image feature dataset into a training set and a validation set; The deep convolutional neural network model is iteratively trained using the training set. In each iteration, the model output is calculated by forward propagation, and the loss between the predicted value and the true value is calculated according to the loss function. The loss function uses the cross entropy loss function, and the calculation formula is: in, is the real variety label, is the variety probability predicted by the model, and N is the number of samples; according to the loss value, the model parameters are updated through the back propagation algorithm and the gradient descent algorithm; the calculation formula of the gradient descent algorithm is: in, Represents the current parameters of the model, including all weights and biases that the model needs to learn; represents the updated model parameters, Represents the learning rate, which is used to control the step size of parameter update; Represents the loss function About parameters The gradient of is a vector pointing to the direction where the loss function grows fastest; Indicates assignment operation; Repeat the training steps until the loss converges or the preset number of iterations is reached; The trained deep convolutional neural network model is verified using the validation set to evaluate the recognition accuracy of the model. When the model performance reaches the preset standard, the model parameters are saved to obtain a trained Chinese medicinal material image recognition model.

5. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 1 is characterized in that: The Chinese medicinal material spectrum analysis model is constructed using a random forest algorithm, and its network structure includes: Input layer: receives preprocessed spectral feature data and environmental parameters; Decision tree layer: construct multiple decision trees, each of which independently classifies the input features; Output layer: Through the voting mechanism, the output results of multiple decision trees are integrated to obtain the spectral analysis and identification results of Chinese medicinal materials.

6. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 5 is characterized in that: The steps for training the Chinese medicinal material spectral analysis model include: Use the preprocessed spectral feature dataset and environmental parameters as the training set, and select Chinese herbal medicine varieties as labels; Using the Bootstrap sampling method, multiple sub-sample sets are randomly selected from the training set to train multiple decision trees; During the training process of each decision tree, the optimal features are selected for splitting until the stopping condition is met; The random forest model was verified using the validation set to evaluate the recognition accuracy and generalization ability of the model. When the model performance reached the preset standard, the model parameters were saved to obtain a trained Chinese herbal medicine spectral analysis model.

7. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 1 is characterized in that: The fusion recognition module adopts a weighted average method to fuse the output results of the image recognition model and the spectral analysis model. The specific steps include: Define the variety probability output by the image recognition model as P_Image, and the variety probability output by the spectrum analysis model as P_Spectrum; Assign weights W_Image and W_Spectrum to P_Image and P_Spectrum according to the confidence or accuracy of their respective models; Calculate the weighted average probability of the species P_Fusion = W_Image * P_Image + W_Spectrum * P_Spectrum; The variety with the highest probability in P_Fusion is selected as the final Chinese medicinal material variety identification result.

8. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 1 is characterized in that: The data denoising processing method in the data preprocessing module includes: For spectral data, the sliding average filtering method was used to remove noise; For image data, Gaussian filtering is used to remove noise; For missing values ​​in environmental parameters, the average value of data at adjacent moments is used to fill them.

9. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 1 is characterized in that: The data preprocessing module uses the Pearson correlation coefficient to measure the linear correlation between each feature and the Chinese medicinal material variety, and extracts features through the absolute value of the Pearson coefficient.

10. The intelligent identification system for Chinese medicinal materials based on photovoltaic agriculture and medicine-light complementation according to claim 9 is characterized in that: The method for feature extraction by the even data preprocessing module includes: The Pearson coefficient between each pair of features is calculated to obtain a correlation matrix between the features; the calculation formula of the Pearson correlation coefficient is: Among them, r represents the correlation coefficient between the feature and the Chinese herbal medicine variety, n represents the number of data points, x represents the feature value, and y represents the target Chinese herbal medicine variety; According to the size of the correlation matrix and the set threshold, the features with the strongest correlation with the Chinese medicinal materials are screened out; Feature pairs with high correlation were eliminated, and the selected features were ranked according to the absolute value of the Pearson coefficient; Output the filtered and sorted feature set.

Citation Information

Patent Citations

  • Method for building chemical pattern recognition for evaluating traditional Chinese medicine quality based on medicine effect information

    CN110514611A

  • Lightweight traditional Chinese medicinal material identification method

    CN111598126A

  • Traditional Chinese medicinal material variety analysis and identification system based on big data technology and remote sensing data

    CN113673301A

  • Traditional Chinese medicinal material production place identification method based on LIBS spectrum and image fusion

    CN115131293A

  • Method for identifying types of traditional Chinese medicinal materials

    CN115527193A

Cited By

  • Bread food detection system and method

    CN120707495A

  • Method and device for identifying traditional Chinese medicine decoction pieces based on multispectrum

    CN121121229A

  • Traditional Chinese medicine extraction control system and method based on AI recognition

    CN121253457A