Method for identifying production place of Chinese wolfberry based on hyperspectral imaging

The key spectral characteristics of wolfberry samples were extracted through dynamic hyperspectral imaging technology and spatiotemporal multidimensional convolutional network, and combined with geographical correlation regional feature correlation mapping method and support vector machine classification model, the problem of low accuracy in origin identification in the existing technology is solved, achieving more efficient and stable origin identification.

CN119888357AInactive Publication Date: 2025-04-25泰州学院
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510056602.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing hyperspectral imaging technology is not accurate in the identification of wolfberry origin, and it fails to fully consider the time change factors and the deep correlation between the geographical environment and spectral characteristics.

Method used

Dynamic hyperspectral imaging technology was used to obtain the dynamic response behavior of wolfberry samples under different band spectra, key spectral features were extracted through multispectral excitation module and spatiotemporal multidimensional convolution network, and regional distribution mode feature library was established based on geographical correlation mapping method, supporting vector machine classification model was constructed, and weights were dynamically adjusted using attention mechanism.

Benefits of technology

The accuracy and stability of wolfberry's origin identification are improved, the model's adaptability to regional characteristics is enhanced, and the feature library is dynamically updated to adapt to changes in different geographical environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888357A_ABST
    Figure CN119888357A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of origin identification, in particular to a hyperspectral imaging-based Chinese wolfberry origin identification method, which comprises the following steps of: gradually exciting the surface of a sample by light sources with different wavelengths and different energies to generate a dynamic hyperspectral data cube containing time sequence characteristics; based on the dynamic hyperspectral data cube, key spectral features of the wolfberry samples are extracted in a spectral domain, a spatial domain and a time domain by adopting a feature extraction method based on a space-time multi-dimensional convolutional network; a regional feature correlation mapping method based on geographical correlation is adopted, a regional distribution mode feature library is established through correlation analysis of a geographical environment of a production place and key spectral features of a sample, a classification model is constructed, and the production place is identified by inputting real-time key spectral features of Chinese wolfberry fruits. According to the method, fusion of multi-dimensional information such as spectrum, space and time is combined, the expressive force of sample features is greatly enriched, and the limitation that a traditional method only depends on a single wave band or a single feature is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of origin identification, and in particular to a method for identifying the origin of wolfberry based on hyperspectral imaging. Background Art

[0002] Among many agricultural products, wolfberry has attracted widespread attention due to its rich nutritional ingredients and medicinal value. However, as a crop that is greatly affected by the geographical environment, wolfberries from different origins have certain differences in appearance, taste and ingredients. Therefore, accurately identifying the origin of wolfberries has become an important link in ensuring the quality of wolfberries and achieving traceability.

[0003] Traditional methods for identifying the origin of wolfberry mostly rely on chemical analysis, sensory evaluation and other methods. These methods are not only time-consuming and expensive, but also have a large number of human interference factors, making it difficult to achieve efficient and accurate origin identification. In addition, as the market's requirements for food safety and quality continue to increase, traditional detection methods have gradually exposed their limitations, especially when faced with the needs of large-scale and rapid detection, they seem to be unable to cope with it.

[0004] In recent years, hyperspectral imaging technology has gradually become a powerful tool for agricultural product quality testing and origin identification due to its ability to simultaneously obtain detailed information of samples in different spectral bands. By performing hyperspectral imaging on samples, its light reflection characteristics in multiple spectral bands can be obtained, and then the spectral characteristics related to the origin can be extracted for further analysis. However, existing hyperspectral imaging technology mainly focuses on the analysis of static images, fails to fully consider the impact of time-varying factors on spectral characteristics, and often ignores the deep-level correlation between geographical environment and spectral characteristics, resulting in certain problems in its classification accuracy and stability in practical applications. Summary of the invention

[0005] The present invention provides a method for identifying wolfberry origin based on hyperspectral imaging to solve the problem of low accuracy of origin identification in the prior art.

[0006] The method for identifying the origin of wolfberry based on hyperspectral imaging includes the following steps:

[0007] S1, dynamic response feature acquisition:

[0008] In view of the dynamic response behavior of wolfberry samples under different spectral bands, the multi-spectral excitation module is used to successively excite the sample surface with light sources of different wavelengths and energies, record the change pattern of the sample spectrum over time, and generate a dynamic hyperspectral data cube containing time series characteristics;

[0009] S2, multi-level feature fusion extraction:

[0010] Based on the dynamic hyperspectral data cube, a feature extraction method based on spatiotemporal multidimensional convolutional network is used to extract the key spectral features of wolfberry samples in the spectral domain, spatial domain and temporal domain.

[0011] S3, regional distribution pattern mapping:

[0012] Aiming at the key spectral features of wolfberry samples from different origins, the regional feature correlation mapping method based on geographical correlation was adopted. Through the correlation analysis between the geographical environment of the origin (such as soil composition and climate conditions) and the key spectral features of the samples, a regional distribution pattern feature library was established to assist classification.

[0013] S4, classification model real-time identification:

[0014] A classification model was constructed by combining the regional distribution pattern feature library. The origin of wolfberry was identified by inputting real-time key spectral features. The weight distribution of the classification model was dynamically adjusted through the attention mechanism to improve the sensitivity of the classification model to samples from specific origins.

[0015] Optionally, the S1 specifically includes:

[0016] S11, using a multi-spectral excitation module, wherein the light source module includes a tunable light source covering a range of 500-1000nm, and according to the surface reflection characteristics of the wolfberry sample, light of different wavelengths is emitted successively at a preset wavelength interval (10nm), and the energy intensity is adjusted by a light source controller to adapt to the absorption and reflection characteristics of the sample surface;

[0017] S12, for each light source excited by wavelength λ, the reflectance spectrum data of wolfberry sample in spectral space is collected in real time by hyperspectral imaging equipment. At each excitation, the time stamp of the collected data is recorded by time synchronization module to generate a spectrum collection sequence with time sequence association, which is expressed as R(x, y, λ, t S ), where (x, y) represents the spatial coordinates of the collected pixel points, λ represents the spectral wavelength, and t k represents the time point (i.e., the timestamp when the wavelength is excited), T S =T start +S·ΔT, where T start is the initial acquisition time, ΔT is the acquisition time interval corresponding to the wavelength step interval, and S is the current wavelength excitation sequence number;

[0018] S13, arranging the spectral data collected during the successive excitation processes in chronological order, and using the dynamic spectral matrix to construct a dynamic hyperspectral data cube containing wavelength (spectral dimension), spatial distribution (spatial dimension) and time change (time dimension), so as to characterize the response law of wolfberry samples to excitation by different light sources.

[0019] The spectral data R(x,y,λ,t S ) Arrange in chronological order to generate a dynamic hyperspectral data cube

[0020] Optionally, the multi-level feature fusion extraction in S2 specifically includes:

[0021] S21, for dynamic hyperspectral data cubes Preprocessing is performed by using a standardization method to normalize the spectral data of each wavelength λ so that the data value range is limited to [0,1];

[0022] S22, spatiotemporal multidimensional convolutional network construction: Construct a spatiotemporal multidimensional convolutional network with dynamic hyperspectral data cube as input The spatiotemporal multidimensional convolutional network includes the following modules:

[0023] Spectral convolution module: Use one-dimensional convolution kernel k λ Extract spectral features in the spectral dimension λ to capture the segment information of wolfberry samples;

[0024] Spatial convolution module: using a two-dimensional convolution kernel k x,y Extract sample surface texture and structural features in spatial dimension (x, y);

[0025] Temporal convolution module: using one-dimensional convolution kernel k t Capture the dynamic change pattern of the spectrum in the time dimension t and characterize the characteristics of wolfberry in the change of spectral response over time;

[0026] S23, multi-dimensional feature fusion and optimization: The extracted features in the spectral domain, spatial domain and time domain are fused to form a multi-dimensional feature vector F, i.e., the key spectral feature, expressed as: F = Concat(F λ ,F x,y ,F t ), where F λ It is the spectral band characteristics, including the band combination that has a significant role in distinguishing the origin of wolfberry, such as 430-450nm (anthocyanin absorption band), 600-620nm (chlorophyll absorption band), 700-750nm (near-infrared moisture absorption band), F x,y The spatial domain features include the particle uniformity and surface texture changes of wolfberry. t It is the dynamic characteristics in the time domain, including the delay, decay rate and waveform change pattern of the spectral response over time.

[0027] Optionally, the spectral convolution module includes a one-dimensional convolution operation in the spectral domain, with a convolution kernel k λIt is used to extract the response characteristics of wolfberry samples in each band. The convolution operation in the spectral domain is expressed as: Among them, F λ is the input data of the hyperspectral data in the λth band, k λ is the spectral convolution kernel, Where L λ is the length of the convolution kernel, b λ is the bias term, F λ is the output feature after convolution.

[0028] Optionally, the spatial convolution module includes using a two-dimensional convolution operation in the spatial domain to capture the texture and edge features of the image, and the spatial convolution kernel k x,y The function of is to extract the spatial structural information of the wolfberry sample surface. The spatial convolution operation is expressed as: Among them, k x,y is a two-dimensional convolution kernel, Where L x and L y are the spatial size of the convolution kernel, b x,y is the bias term of spatial convolution, F x,y It is the output feature after spatial convolution, which represents the spatial structural characteristics of the sample.

[0029] Optionally, the time convolution module includes extracting the time-varying characteristics of the wolfberry spectrum using a one-dimensional convolution operation in the time domain, and the time convolution kernel k t Used to capture the temporal variation characteristics of the spectral response of wolfberry samples, the time convolution operation is expressed as: Among them, k t is the temporal convolution kernel, Where L t is the length of the temporal convolution kernel, b t is the bias term of the temporal convolution, F t It is the output feature after time convolution, which indicates the characteristics of sample spectral response changing with time.

[0030] Optionally, the regional distribution pattern mapping in S3 specifically includes:

[0031] S31, geographical environment data collection: obtain relevant geographical environment characteristics from the origin of each wolfberry sample, including soil composition characteristics (pH value, organic matter content, mineral composition) and climate condition characteristics (annual average temperature, precipitation);

[0032] S32, correlation analysis between key spectral features and geographical environment features: statistical correlation analysis is performed between the key spectral features F of wolfberry samples from each origin and the corresponding geographical environment features to establish a mapping relationship model;

[0033] S33, regional distribution pattern modeling: Based on the results of the mapping relationship model, a regional distribution pattern feature library Q is constructed, where the regional distribution pattern Q of each origin i Including the relationship between the soil composition characteristics, climate conditions and key spectral characteristics of wolfberry samples in the production area, this model library is used to describe the differences in the relationship between geographical environment and spectral characteristics among different production areas, providing support for subsequent classification.

[0034] Optionally, the establishment of the mapping relationship model is expressed as: i =f(G i )=We·G i +be, where F i is the key spectral feature of the i-th wolfberry sample, G i is its corresponding geographical environment feature, function f represents the mapping relationship between spectral features and geographical environment features, We is a weight vector, indicating the influence of each geographical feature on spectral features, and be is a bias term.

[0035] Optionally, the classification model construction in S4 specifically includes:

[0036] S41, based on the regional distribution pattern feature library, adopts the support vector machine classification model, inputs the key spectral features F of the real-time wolfberry sample i The key spectral feature F i =(F λ ,F x,y ,F t ), where F λ is the spectral band characteristic, F x,y is the spatial domain feature, F t For the dynamic features in the time domain, the decision hyperplane h(F i )=w T F i +b, where w is the weight vector of the classification hyperplane and b is the bias term, and finally a support vector machine classification model is generated;

[0037] S42, during the classification process, combined with the input of real-time wolfberry key spectral features F i , the attention mechanism is used to dynamically adjust the weight distribution of the support vector machine model. The specific steps are:

[0038] By calculating the importance of each feature in the current sample j , that is, the attention weight of feature j, is adjusted using the following expression: F i ′=∑ j α j ·F i,j , where F i,jis the value of the i-th sample on the j-th feature, α j Score the feature importance calculated by the self-attention mechanism, satisfying ∑ j α j =1, in this way, the weight of the feature is dynamically adjusted, so that the support vector machine classification model can better focus on the key features in the classification process of different wolfberry samples;

[0039] By adjusting the feature F i ′ Input to the support vector machine classification model and output the prediction result of the origin of wolfberry samples Based on the comparison between the classification results and the true labels, the classification model is iteratively optimized using the feedback mechanism, and the model parameters of the support vector machine are continuously updated to ensure the improvement of classification accuracy and improve the performance stability in long-term applications.

[0040] Beneficial effects of the present invention:

[0041] The present invention introduces dynamic hyperspectral imaging technology to comprehensively collect the dynamic response behaviors of wolfberry samples in different bands and generate a dynamic hyperspectral data cube containing time series features. This method can effectively capture the slight changes of wolfberry samples in the time dimension, thereby improving the accuracy of origin identification. Through the multi-level spatiotemporal convolution feature extraction method, combined with the fusion of multi-dimensional information such as spectrum, space, and time, the expressiveness of sample characteristics is greatly enriched, avoiding the limitations of traditional methods that only rely on a single band or a single feature.

[0042] The present invention introduces regional feature modeling based on geographical correlation, conducts in-depth correlation analysis between the geographical environment of the origin (such as soil composition, climatic conditions, etc.) and the key spectral characteristics of the samples, and constructs a regional distribution pattern feature library. This can not only enhance the adaptability of the origin identification model to regional characteristics, but also dynamically update the feature library and flexibly adjust to the feature changes of different geographical environments, thereby significantly improving the long-term stability and adaptability of the model.

[0043] The present invention, combined with the support vector machine model and the attention mechanism, can dynamically adjust the weight distribution of each feature according to the influence of key spectral features during the model training process, effectively improving the model's recognition sensitivity to samples from specific origins, and ensuring that the classifier can more accurately identify the origin of wolfberry samples from different origins. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram of the identification method flow in an embodiment of the present invention;

[0046] Figure 2 Schematic diagram of a spatiotemporal multidimensional convolutional network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. At the same time, it is explained here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and those skilled in the art may also adopt other alternatives to implement some known technologies; and the accompanying drawings are only for more specific description of the embodiments, and are not intended to specifically limit the present invention.

[0048] It should be noted that the references to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments" and the like in the specification indicate that the embodiments described may include specific features, structures or characteristics, but not every embodiment may include the specific features, structures or characteristics. In addition, when a specific feature, structure or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the art to implement such feature, structure or characteristic in conjunction with other embodiments (whether or not explicitly described).

[0049] In general, a term can be understood, at least in part, from its use in context. For example, depending, at least in part, on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in the singular sense, or can be used to describe a combination of features, structures, or characteristics in the plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but can instead, depending, at least in part, on the context, allow for the presence of other factors that are not necessarily explicitly described.

[0050] like Figure 1-Figure 2 As shown, the method for identifying the origin of wolfberry based on hyperspectral imaging includes the following steps:

[0051] S1, dynamic response feature acquisition:

[0052] In view of the dynamic response behavior of wolfberry samples under different spectral bands, the multi-spectral excitation module is used to successively excite the sample surface with light sources of different wavelengths and energies, record the change pattern of the sample spectrum over time, and generate a dynamic hyperspectral data cube containing time series characteristics;

[0053] S2, multi-level feature fusion extraction:

[0054] Based on the dynamic hyperspectral data cube, a feature extraction method based on spatiotemporal multidimensional convolutional network is used to extract the key spectral features of wolfberry samples in the spectral domain, spatial domain and temporal domain.

[0055] S3, regional distribution pattern mapping:

[0056] Aiming at the key spectral features of wolfberry samples from different origins, the regional feature correlation mapping method based on geographical correlation was adopted. Through the correlation analysis between the geographical environment of the origin (such as soil composition and climate conditions) and the key spectral features of the samples, a regional distribution pattern feature library was established to assist classification.

[0057] S4, classification model real-time identification:

[0058] A classification model was constructed by combining the regional distribution pattern feature library. The origin of wolfberry was identified by inputting real-time key spectral features. The weight distribution of the classification model was dynamically adjusted through the attention mechanism to improve the sensitivity of the classification model to samples from specific origins.

[0059] S1 specifically includes:

[0060] S11, using a multi-spectral excitation module, wherein the light source module includes a tunable light source covering a range of 500-1000nm, and according to the surface reflection characteristics of the wolfberry sample, light of different wavelengths is emitted successively at a preset wavelength interval (10nm), and the energy intensity is adjusted by a light source controller to adapt to the absorption and reflection characteristics of the sample surface;

[0061] S12, for each light source excited by wavelength λ, the reflectance spectrum data of wolfberry sample in spectral space is collected in real time by hyperspectral imaging equipment. At each excitation, the time stamp of the collected data is recorded by time synchronization module to generate a spectrum collection sequence with time sequence association, which is expressed as R(x, y, λ, t S ), where (x, y) represents the spatial coordinates of the collected pixel points, λ represents the spectral wavelength, and t k represents the time point (i.e., the timestamp when the wavelength is excited), T S =T start +S·ΔT, where T start is the initial acquisition time, ΔT is the acquisition time interval corresponding to the wavelength step interval, and S is the current wavelength excitation sequence number;

[0062] S13, arranging the spectral data collected during the successive excitation processes in chronological order, and using the dynamic spectral matrix to construct a dynamic hyperspectral data cube containing wavelength (spectral dimension), spatial distribution (spatial dimension) and time change (time dimension), so as to characterize the response law of wolfberry samples to excitation by different light sources.

[0063] The spectral data R(x,y,λ,t S ) Arrange in chronological order to generate a dynamic hyperspectral data cube Defined as:

[0064] Among them, [x min ,x max ] and [y min ,y max ] is the sampling space range, [T start ,T end ] is the sampling time range, Contains spectral, spatial and temporal multi-dimensional information.

[0065] The multi-level feature fusion extraction in S2 specifically includes:

[0066] S21, for dynamic hyperspectral data cubes Preprocessing is performed by using a standardization method to normalize the spectral data of each wavelength λ so that the data value range is limited to [0,1];

[0067] S22, spatiotemporal multidimensional convolutional network construction: Construct a spatiotemporal multidimensional convolutional network with dynamic hyperspectral data cube as input The spatiotemporal multidimensional convolutional network includes the following modules:

[0068] Spectral convolution module: Use one-dimensional convolution kernel k λ Extract spectral features in the spectral dimension λ to capture the segment information of wolfberry samples;

[0069] Spatial convolution module: using a two-dimensional convolution kernel k x,y Extract sample surface texture and structural features in spatial dimension (x, y);

[0070] Temporal convolution module: using one-dimensional convolution kernel k t Capture the dynamic change pattern of the spectrum in the time dimension t and characterize the characteristics of wolfberry in the change of spectral response over time;

[0071] S23, multi-dimensional feature fusion and optimization: The extracted features in the spectral domain, spatial domain and time domain are fused to form a multi-dimensional feature vector F, i.e., the key spectral feature, expressed as: F = Concat(F λ,F x,y ,F t ), where F λ It is the spectral band characteristics, including the band combination that has a significant role in distinguishing the origin of wolfberry, such as 430-450nm (anthocyanin absorption band), 600-620nm (chlorophyll absorption band), 700-750nm (near-infrared moisture absorption band), F x,y The spatial domain features include the particle uniformity and surface texture changes of wolfberry. t It is the dynamic characteristics in the time domain, including the delay, decay rate and waveform change pattern of the spectral response over time.

[0072] The spectral convolution module includes a one-dimensional convolution operation in the spectral domain, with a convolution kernel k λ It is used to extract the response characteristics of wolfberry samples in each band. The convolution operation in the spectral domain is expressed as: Among them, F λ is the input data of the hyperspectral data in the λth band, k λ is the spectral convolution kernel, Where L λ is the length of the convolution kernel, b λ is the bias term, F λ is the output feature after convolution.

[0073] The spatial convolution module includes using a two-dimensional convolution operation in the spatial domain to capture the texture and edge features of the image. The spatial convolution kernel k x,y The function of is to extract the spatial structural information of the wolfberry sample surface. The spatial convolution operation is expressed as: Among them, k x,y is a two-dimensional convolution kernel, Where L x and L y are the spatial size of the convolution kernel, b x,y is the bias term of spatial convolution, F x,y It is the output feature after spatial convolution, which represents the spatial structural characteristics of the sample.

[0074] The temporal convolution module includes a one-dimensional convolution operation in the time domain to extract the time-varying characteristics of the wolfberry spectrum. The temporal convolution kernel k t Used to capture the temporal variation characteristics of the spectral response of wolfberry samples, the time convolution operation is expressed as: Among them, k t is the temporal convolution kernel, Where L t is the length of the temporal convolution kernel, b t is the bias term of the temporal convolution, F tIt is the output feature after time convolution, which indicates the characteristics of sample spectral response changing with time.

[0075] The regional distribution pattern mapping in S3 specifically includes:

[0076] S31, geographical environment data collection: obtain relevant geographical environment characteristics from the origin of each wolfberry sample, including soil composition characteristics (pH value, organic matter content, mineral composition) and climate condition characteristics (annual average temperature, precipitation);

[0077] S32, correlation analysis between key spectral features and geographical environment features: statistical correlation analysis is performed between the key spectral features F of wolfberry samples from each origin and the corresponding geographical environment features to establish a mapping relationship model;

[0078] S33, regional distribution pattern modeling: Based on the results of the mapping relationship model, a regional distribution pattern feature library Q is constructed, where the regional distribution pattern Q of each origin i Including the relationship between the soil composition characteristics, climate conditions and key spectral characteristics of wolfberry samples in the production area, this model library is used to describe the differences in the relationship between geographical environment and spectral characteristics among different production areas, providing support for subsequent classification.

[0079] In the subsequent classification model construction, the key spectral features F of wolfberry samples obtained in real time and the corresponding geographical environment data G are input as training data.

[0080] The mapping relationship model is expressed as: F i =f(G i )=We·G i +be, where F i is the key spectral feature of the i-th wolfberry sample, G i is its corresponding geographical environment feature, function f represents the mapping relationship between spectral features and geographical environment features, We is a weight vector, indicating the influence of each geographical feature on spectral features, and be is a bias term.

[0081] The classification model construction in S4 specifically includes:

[0082] S41, based on the regional distribution pattern feature library, adopts the support vector machine classification model, inputs the key spectral features F of the real-time wolfberry sample i To identify its origin, the key spectral feature F i =(F λ ,F x,y ,F t ), where F λ is the spectral band characteristic, F x,y is the spatial domain feature, F tFor the dynamic features in the time domain, the decision hyperplane h(F i )=w T F i +b, where w is the weight vector of the classification hyperplane and b is the bias term, and finally a support vector machine classification model is generated;

[0083] S42, during the classification process, combined with the input of real-time wolfberry key spectral features F i , the attention mechanism is used to dynamically adjust the weight distribution of the support vector machine model. The specific steps are:

[0084] By calculating the importance of each feature in the current sample j , that is, the attention weight of feature j, is adjusted using the following expression: F i ′=∑ j α j ·F i,j , where F i,j is the value of the i-th sample on the j-th feature, α j Score the feature importance calculated by the self-attention mechanism, satisfying ∑ j α j =1, in this way, the weight of the feature is dynamically adjusted, so that the support vector machine classification model can better focus on the key features in the classification process of different wolfberry samples;

[0085] By adjusting the feature F i ′ Input to the support vector machine classification model and output the prediction result of the origin of wolfberry samples Based on the comparison between the classification results and the true labels, the classification model is iteratively optimized using the feedback mechanism, and the model parameters of the support vector machine are continuously updated to ensure the improvement of classification accuracy and improve the performance stability in long-term applications.

[0086] When training the support vector machine classification model, it specifically includes constructing the SVM objective function:

[0087] Using training data {(F i ,y i )} to construct the objective function of the support vector machine, y i is the sample label. Based on the regional distribution pattern feature library, the corresponding origin category is marked for each key spectral feature sample to obtain the sample label y i ∈{y1,y2,…,y u}, where u is the number of categories (i.e. the number of different origins), the goal is to find an optimal hyperplane w T F i +b=0, maximize the classification interval and minimize the classification error. The objective function is: Among them, w is the weight vector of the hyperplane, b is the bias term, ξ is the slack variable, which represents the allowed classification error, and C is the regularization parameter, which controls the trade-off between error and margin. The gradient descent optimization algorithm of the support vector machine is used to solve the optimal hyperplane w and the bias term b. The goal of the optimization process is to minimize the objective function while ensuring that the classification error is as small as possible.

[0088] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.

[0089] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for identifying the origin of wolfberry based on hyperspectral imaging, characterized in that: The following steps are involved: S1, dynamic response feature acquisition: In view of the dynamic response behavior of wolfberry samples under different spectral bands, the multi-spectral excitation module is used to successively excite the sample surface with light sources of different wavelengths and energies, record the change pattern of the sample spectrum over time, and generate a dynamic hyperspectral data cube containing time series characteristics; S2, multi-level feature fusion extraction: Based on the dynamic hyperspectral data cube, a feature extraction method based on spatiotemporal multidimensional convolutional network is used to extract the key spectral features of wolfberry samples in the spectral domain, spatial domain and temporal domain. S3, regional distribution pattern mapping: Aiming at the key spectral characteristics of wolfberry samples from different origins, the regional characteristic correlation mapping method based on geographical correlation was adopted. Through the correlation analysis between the geographical environment of the origin and the key spectral characteristics of the samples, a regional distribution pattern feature library was established to assist classification. S4, classification model real-time identification: A classification model is constructed by combining the regional distribution pattern feature library. The origin of wolfberry is identified by inputting real-time key spectral features, and the weight distribution of the classification model is dynamically adjusted through the attention mechanism.

2. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 1, characterized in that: The S1 specifically includes: S11, using a multi-spectral excitation module, wherein the light source module includes a tunable light source covering a range of 500-1000nm, and according to the surface reflection characteristics of the wolfberry sample, light of different wavelengths is emitted successively at preset wavelength intervals, and the energy intensity is adjusted by a light source controller to adapt to the absorption and reflection characteristics of the sample surface; S12, for each light source excited by wavelength λ, the reflectance spectrum data of wolfberry sample in spectral space is collected in real time by hyperspectral imaging equipment. At each excitation, the time stamp of the collected data is recorded by time synchronization module to generate a spectrum collection sequence with time sequence association, which is expressed as R(x, y, λ, t S ), where (x, y) represents the spatial coordinates of the collected pixel points, λ represents the spectral wavelength, and t k Indicates the time point, T S =T staet +S·ΔT, where T start is the initial acquisition time, ΔT is the acquisition time interval corresponding to the wavelength step interval, and S is the current wavelength excitation sequence number; S13, arranging the spectral data collected during the successive excitation processes in chronological order, and constructing a dynamic hyperspectral data cube including wavelength, spatial distribution, and time variation using a dynamic spectral matrix, so as to characterize the response law of the wolfberry sample to excitation by different light sources; The spectral data R(x,y,λ,t S ) Arrange in chronological order to generate a dynamic hyperspectral data cube 3. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 2, characterized in that: The multi-level feature fusion extraction in S2 specifically includes: S21, for dynamic hyperspectral data cubes Preprocessing is performed by using a standardization method to normalize the spectral data of each wavelength λ so that the data value range is limited to [0,1]; S22, spatiotemporal multidimensional convolutional network construction: Construct a spatiotemporal multidimensional convolutional network with dynamic hyperspectral data cube as input The spatiotemporal multidimensional convolutional network includes the following modules: Spectral convolution module: Use one-dimensional convolution kernel k λ Extract spectral features in the spectral dimension λ to capture the segment information of wolfberry samples; Spatial convolution module: using a two-dimensional convolution kernel k x,y Extract sample surface texture and structural features in spatial dimension (x, y); Temporal convolution module: using one-dimensional convolution kernel k t Capture the dynamic change pattern of the spectrum in the time dimension t and characterize the characteristics of wolfberry in the change of spectral response over time; S23, multi-dimensional feature fusion and optimization: The extracted features in the spectral domain, spatial domain and time domain are fused to form a multi-dimensional feature vector F, which is expressed as: F = Concat(F λ ,F x,y ,F t ), where F λ is the spectral domain band feature, F x,y is the spatial domain feature, F t It is the dynamic feature in time domain.

4. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 3, characterized in that: The spectral convolution module includes a one-dimensional convolution operation in the spectral domain, and the convolution kernel k λ It is used to extract the response characteristics of wolfberry samples in each band. The convolution operation in the spectral domain is expressed as: Among them, F λ is the input data of the hyperspectral data in the λth band, k λ is the spectral convolution kernel, Where L λ is the length of the convolution kernel, b λ is the bias term, F λ is the output feature after convolution.

5. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 3, characterized in that: The spatial convolution module includes using a two-dimensional convolution operation in the spatial domain to capture the texture and edge features of the image. The spatial convolution kernel k x,y The function of is to extract the spatial structural information of the wolfberry sample surface. The spatial convolution operation is expressed as: Among them, k x,u is a two-dimensional convolution kernel, Where L x and L y are the spatial size of the convolution kernel, b x,y is the bias term of spatial convolution, F x,y It is the output feature after spatial convolution, which represents the spatial structural characteristics of the sample.

6. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 3, characterized in that: The temporal convolution module includes extracting the time-varying characteristics of wolfberry spectrum by using one-dimensional convolution operation in the time domain, and the temporal convolution kernel k t Used to capture the temporal variation characteristics of the spectral response of wolfberry samples, the time convolution operation is expressed as: Among them, k t is the temporal convolution kernel, Where L t is the length of the temporal convolution kernel, b t is the bias term of the temporal convolution, F t It is the output feature after time convolution, which indicates the characteristics of sample spectral response changing with time.

7. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 3, characterized in that: The regional distribution pattern mapping in S3 specifically includes: S31, geographical environment data collection: obtain relevant geographical environment characteristics from the origin of each wolfberry sample, including soil composition characteristics and climate condition characteristics; S32, correlation analysis between key spectral features and geographical environment features: statistical correlation analysis is performed between the key spectral features F of wolfberry samples from each origin and the corresponding geographical environment features to establish a mapping relationship model; S33, regional distribution pattern modeling: Based on the results of the mapping relationship model, a regional distribution pattern feature library Q is constructed, where the regional distribution pattern Q of each origin i Including the relationship between the soil composition characteristics, climatic conditions characteristics of the origin and the key spectral characteristics of wolfberry samples.

8. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 7, characterized in that: The mapping relationship model is expressed as: i =f(G i )=We·G i +be, where F i is the key spectral feature of the i-th wolfberry sample, G i is its corresponding geographical environment feature, function f represents the mapping relationship between spectral features and geographical environment features, We is a weight vector, indicating the influence of each geographical feature on spectral features, and be is a bias term.

9. The method for identifying the origin of wolfberry based on hyperspectral imaging according to claim 1, characterized in that: The classification model construction in S4 specifically includes: S41, based on the regional distribution pattern feature library, adopts the support vector machine classification model, inputs the key spectral features F of the real-time wolfberry sample i The key spectral feature F i =(F λ ,F x,y ,F t ), where F λ is the spectral band characteristic, F x,y is the spatial domain feature, F t For the dynamic features in the time domain, the decision hyperplane h(F i )=w T F i +b, where w is the weight vector of the classification hyperplane and b is the bias term, and finally a support vector machine classification model is generated; S42, during the classification process, combined with the input of real-time wolfberry key spectral features F i , the attention mechanism is used to dynamically adjust the weight distribution of the support vector machine model. The specific steps are: By calculating the importance of each feature in the current sample j , that is, the attention weight of feature j, is adjusted using the following expression: F i ′=∑ j α j ·F i,j , where F i,j is the value of the i-th sample on the j-th feature, α j Score the feature importance calculated by the self-attention mechanism, satisfying ∑ j α j =1, dynamically adjust the weight of the feature; By adjusting the feature F i ′ Input to the support vector machine classification model and output the prediction result of the origin of wolfberry samples

Citation Information

Cited By

  • Blueberry variety identification and quality nondestructive testing method based on hyperspectral imaging

    CN120314300A

  • Method and system for identifying production places of genuine traditional Chinese medicinal materials

    CN120451801A

  • Method and system for identifying origin of authentic Chinese medicinal materials

    CN120451801B