Aquatic product quality rapid detection system and method

By obtaining multi-region appearance images and spectral data of aquatic products, using deep learning technology to extract feature vectors, and combining with classifiers to judge the quality of aquatic products, the shortcomings of relying on a single chemical index in the existing technology are solved, and the quality of aquatic products is achieved quickly. Accurate testing reduces food safety risks.

CN119395011AInactive Publication Date: 2025-02-07JIANGXI DONGHAI FOOD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411429558.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing aquatic product quality evaluation methods rely on a single chemical indicator, making it difficult to comprehensively evaluate the quality of aquatic products, making it difficult for consumers to judge the edibleness of aquatic products, and increasing food safety risks.

Method used

By obtaining the appearance images of multi-region aquatic products and aquatic product quality detection spectrum maps, deep learning technology is used to extract the global attention feature vector of aquatic products appearance and the combined feature vector of aquatic product quality spectrum, and combining the classifier to determine whether the quality of aquatic products meets the edible standard.

Benefits of technology

It has achieved rapid and accurate testing of the quality of aquatic products, reduced food safety risks, and protected consumer health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119395011A_ABST
    Figure CN119395011A_ABST
Patent Text Reader

Abstract

The invention relates to the field of aquatic product quality detection, and particularly discloses an aquatic product quality rapid detection system and method.The method comprises the steps that firstly, a multi-area aquatic product appearance image and an aquatic product quality detection spectrogram are obtained, then feature extraction and correlation analysis are conducted on the two images through the deep learning technology, and finally a classifier is used for classifying the aquatic product quality. Therefore, the food safety risk of the aquatic products is reduced, and the health of consumers is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of aquatic product quality detection, and more specifically, to a system and method for rapid detection of aquatic product quality. Background Art

[0002] Aquatic products are widely loved by consumers for their rich nutrients (such as protein, fat, vitamins and minerals), delicate texture and delicious taste. With the continuous changes in the dietary structure of Chinese residents and the rapid growth of aquatic product consumption, aquatic products have occupied an increasingly important position in the daily diet. This trend is not only reflected in the increase in consumption, but also reflects the huge growth potential of the aquatic product market.

[0003] Considering the wide variety of aquatic products, their quality undergoes complex changes during storage. Different types of aquatic products have different quality changes and evaluation indicators during storage. However, the existing quality evaluation methods for fresh aquatic products still rely on a single chemical indicator, such as the monitoring of chemical indicators such as K value, TVB-N value and trimethylamine. Moreover, in the fresh aquatic product market, most consumers lack the life experience to judge the quality of fresh aquatic products, and it is difficult to scientifically judge the edibility of fresh aquatic products during storage after purchase. As a result, there is a risk of bacterial or viral food poisoning caused by eating spoiled fresh aquatic products.

[0004] Therefore, a system and method for rapid detection of aquatic product quality is desired. Summary of the invention

[0005] In order to solve the above technical problems, this application is proposed. The embodiment of this application provides a system and method for rapid detection of aquatic product quality, which first obtains multi-region aquatic product appearance images and aquatic product quality detection spectrograms, then uses deep learning technology to perform feature extraction and correlation analysis on the two, and finally uses a classifier to determine whether the quality of aquatic products meets the edible standards, thereby reducing the food safety risks of aquatic products and protecting the health of consumers.

[0006] According to one aspect of the present application, a system for rapid detection of aquatic product quality is provided, comprising:

[0007] Aquatic product quality data acquisition module, used to obtain multi-region aquatic product appearance images and aquatic product quality detection spectra;

[0008] An aquatic product quality data processing module, used for extracting aquatic product appearance global attention feature vector and aquatic product quality spectrum joint feature vector from the multi-region aquatic product appearance image and the aquatic product quality detection spectrum;

[0009] The aquatic product quality standard judgment module is used to judge whether the quality of the aquatic product meets the edible standard based on the global attention feature vector of the aquatic product appearance and the joint feature vector of the aquatic product quality spectrum.

[0010] According to another aspect of the present application, a method for rapid detection of aquatic product quality is provided, comprising:

[0011] Obtain multi-region aquatic product appearance images and aquatic product quality detection spectra;

[0012] Extracting aquatic product appearance global attention feature vector and aquatic product quality spectrum joint feature vector from the multi-region aquatic product appearance image and the aquatic product quality detection spectrum;

[0013] Based on the global attention feature vector of the aquatic product appearance and the joint feature vector of the aquatic product quality spectrum, it is judged whether the quality of the aquatic product meets the edible standard.

[0014] Compared with the prior art, the present application provides a rapid detection system and method for aquatic product quality, which first obtains multi-region aquatic product appearance images and aquatic product quality detection spectra, then uses deep learning technology to perform feature extraction and correlation analysis on the two, and finally uses a classifier to determine whether the quality of aquatic products meets the edible standards, thereby reducing the food safety risks of aquatic products and protecting the health of consumers. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0016] Figure 1 4 is a block diagram of a rapid detection system for aquatic product quality according to an embodiment of the present application.

[0017] Figure 2 It is a block diagram of an aquatic product quality data processing module in a rapid aquatic product quality detection system according to an embodiment of the present application.

[0018] Figure 3 It is a block diagram of a spectral feature extraction unit for aquatic product quality detection in a rapid aquatic product quality detection system according to an embodiment of the present application.

[0019] Figure 4 It is a block diagram of a water product quality standard judgment module in a water product quality rapid detection system according to an embodiment of the present application.

[0020] Figure 5Flow chart of a method for rapid detection of aquatic product quality according to an embodiment of the present application.

[0021] Figure 6 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0023] Figure 1 Schematic diagram of the rapid detection system of aquatic product quality according to the embodiment of the present application. Figure 1 As shown, according to the embodiment of the present application, the rapid detection system 100 of aquatic product quality includes: an aquatic product quality data acquisition module 110, which is used to obtain multi-region aquatic product appearance images and aquatic product quality detection spectra; an aquatic product quality data processing module 120, which is used to extract the aquatic product appearance global attention feature vector and the aquatic product quality spectrum joint feature vector from the multi-region aquatic product appearance images and the aquatic product quality detection spectrum; an aquatic product quality standard judgment module 130, which is used to judge whether the aquatic product quality meets the edible standard based on the aquatic product appearance global attention feature vector and the aquatic product quality spectrum joint feature vector.

[0024] In the above-mentioned aquatic product quality rapid detection system 100, the aquatic product quality data acquisition module 110 is used to obtain multi-region aquatic product appearance images and aquatic product quality detection spectra. It should be understood that aquatic products are widely welcomed for their rich nutrition (such as protein, fat, vitamins and minerals) and delicious taste. With the changes in my country's dietary structure and the rapid growth of aquatic product consumption, aquatic products are becoming increasingly important in the diet and have huge market potential. There are many types of aquatic products, and their quality changes during storage are also different. Despite this, the current evaluation method for the quality of fresh aquatic products mainly relies on single chemical indicators such as K value, TVB-N value and trimethylamine. In addition, many consumers lack experience in how to judge the quality of fresh aquatic products, and it is difficult to scientifically evaluate their edibility during the storage process after purchase, so they may face the risk of bacterial or viral food poisoning caused by eating spoiled aquatic products. Therefore, in the technical solution of the present application, by obtaining multi-region aquatic product appearance images and aquatic product quality detection spectra, and combining deep learning technology, it is possible to evaluate whether aquatic products meet the edible standards, thereby reducing food safety risks and protecting the health of consumers.

[0025] Specifically, due to their complex biological composition and perishability, the quality of aquatic products undergoes significant changes during storage and transportation. In order to accurately evaluate the quality of aquatic products, it is necessary to consider both appearance and internal characteristics. Among them, the acquisition of multi-region aquatic product appearance images helps to capture the visual characteristics of different parts of aquatic products. The appearance of aquatic products, including color, texture and surface state, can reflect their freshness and quality. The spectrogram of aquatic product quality detection provides information about the internal chemical composition of aquatic products. The spectrogram can reveal the quality changes of aquatic products by analyzing the chemical composition of aquatic products, such as protein, fat and amino acids. Spectroscopic technology can detect small changes in chemical changes, which may be caused by poor storage conditions or the passage of time. By combining appearance images and spectrograms, the overall quality of aquatic products can be judged more accurately, possible quality problems can be identified and corresponding measures can be taken to reduce the risk of food poisoning caused by quality problems.

[0026] In the above-mentioned aquatic product quality rapid detection system 100, the aquatic product quality data processing module 120 is used to extract the aquatic product appearance global attention feature vector and the aquatic product quality spectrum joint feature vector from the multi-region aquatic product appearance image and the aquatic product quality detection spectrum. It should be understood that this multi-dimensional feature fusion not only improves the accuracy of quality detection, but also helps to timely discover potential quality problems, reduce food safety risks, and improve consumers' trust in aquatic products.

[0027] Figure 2 FIG. 1 is a block diagram of an aquatic product quality data processing module in a rapid aquatic product quality detection system according to an embodiment of the present application. Figure 2 As shown, in a specific embodiment of the present application, the aquatic product quality data processing module 120 includes: an aquatic product appearance feature extraction unit 121, used to perform feature extraction on the multi-region aquatic product appearance image to obtain the aquatic product appearance global attention feature vector; an aquatic product quality detection spectral feature extraction unit 122, used to perform feature extraction on the aquatic product quality detection spectrum to obtain the aquatic product quality spectrum joint feature vector.

[0028] It should be understood that the appearance of aquatic products, including their color, texture, surface state, etc., directly affects consumers' purchasing decisions and judgments on quality. Appearance features play an important role in quality assessment. Therefore, by accurately extracting features from images, these appearance information can be effectively captured, thereby improving the reliability of detection. The feature extraction process first involves decomposing a multi-region image into multiple parts in order to analyze the specific features of each region. Each region may exhibit different quality characteristics, such as color changes in fish scales or the elasticity of fish meat. This comprehensive feature extraction method makes the evaluation results more comprehensive and representative, and helps to identify quality issues that may be overlooked in local images.

[0029] Furthermore, the quality of aquatic products is affected by their chemical composition, and changes in these components are usually reflected in the spectra. By extracting spectral features, we can gain insight into the internal quality of aquatic products, providing a more comprehensive quality analysis than a single appearance evaluation. Spectra contain absorption or scattering information of various chemical components in aquatic products, which is essential for identifying the true state of aquatic products. For example, spectra can reveal changes in protein, fat, and other components in aquatic products, which are often related to the freshness, corruption, and deterioration of aquatic products. By extracting features from spectra, we can quantify the changes in these chemical components and provide accurate quality assessment. During the feature extraction process, spectral data are converted into feature vectors that integrate all key information in the spectra. The spectral joint feature vector not only considers a single chemical indicator, but also integrates multiple related spectral features to form a comprehensive quality assessment indicator. This joint feature vector can more accurately reflect the overall quality of aquatic products, especially when the spectral data involves multiple chemical components, and can comprehensively consider their mutual influence.

[0030] In a specific embodiment of the present application, the aquatic product appearance feature extraction unit 121 includes: arranging the multi-region aquatic product appearance images into a global input tensor of aquatic product appearance; passing the global input tensor of aquatic product appearance through a spatial attention-based aquatic product appearance global feature encoder to obtain the aquatic product appearance global attention feature vector.

[0031] It should be understood that the appearance of aquatic products usually presents different characteristics in different areas, such as color changes, surface texture or defects. Arranging these multi-region image data into a global input tensor can integrate the information of all regions into a unified data structure. In this way, the deep learning model can process features from different regions at the same time and capture the overall information in the image, not just the local information. This integration helps to comprehensively evaluate the appearance status of aquatic products and identify potential quality issues.

[0032] Furthermore, different regions of the aquatic product appearance image may contain different quality information, such as surface spots, color changes or other visual defects. However, traditional feature extraction methods may not be able to effectively distinguish which regions are most critical to quality assessment. By using the spatial attention mechanism, the encoder can automatically learn and adjust the degree of attention to different regions. It highlights the areas that have the greatest impact on the quality of aquatic products by assigning different weights to different regions of the image. This method can improve the accuracy of feature extraction and ensure that the model pays more attention to key areas that may indicate quality problems. Specifically, the convolutional encoding part of the aquatic product appearance global feature encoder based on spatial attention is used to perform deep convolution encoding on the aquatic product appearance global input tensor to obtain an initial convolutional feature map; the initial convolutional feature map is input into the spatial attention part of the aquatic product appearance global feature encoder based on spatial attention to obtain a spatial attention map; the spatial attention map is passed through the Softmax activation function to obtain a spatial attention feature map; the spatial attention feature map and the initial convolutional feature map are multiplied by the position point to obtain the aquatic product appearance global attention feature vector. More specifically, the initial convolutional feature map is input into the spatial attention part of the spatial attention-based global feature encoder for aquatic product appearance to obtain a spatial attention map, including: performing average pooling and maximum pooling on the initial convolutional feature map along the channel dimension to obtain an average feature matrix and a maximum feature matrix; cascading and channel-adjusting the average feature matrix and the maximum feature matrix to obtain a channel feature matrix; and convolutionally encoding the channel feature matrix using the convolution layer of the spatial attention feature map to obtain the spatial attention map.

[0033] Figure 3 FIG. 1 is a block diagram of a spectral feature extraction unit for aquatic product quality detection in a rapid aquatic product quality detection system according to an embodiment of the present application. Figure 3 As shown, in a specific embodiment of the present application, the aquatic product quality detection spectral feature extraction unit 122 includes: a quality detection spectrum sequence feature encoding subunit 1221, used to perform sequence feature encoding on the aquatic product quality detection spectrum to obtain an aquatic product quality detection spectrum sequence feature vector; a quality detection spectrum convolution feature encoding subunit 1222, used to perform convolution feature encoding on the aquatic product quality detection spectrum to obtain an aquatic product quality detection spectrum feature vector; a quality detection spectrum feature combination subunit 1223, used to combine the aquatic product quality detection spectrum sequence feature vector and the aquatic product quality detection spectrum feature vector to obtain the aquatic product quality spectrum combination feature vector.

[0034] It should be understood that sequence feature encoding can process the temporal information in the spectrogram. Spectral data usually presents different absorption or reflection characteristics in different wavelength ranges, which are directly related to the chemical composition of the aquatic product. Sequence feature encoding can capture the relationship and changes between different wavelengths by treating each wavelength point of the spectrogram as an element of the sequence. This method can reveal the dynamic changes of chemical composition at different wavelengths, thereby providing more comprehensive quality information. Secondly, sequence feature encoding can improve the recognition of complex patterns. Spectral data may contain multiple overlapping features, which may be difficult to accurately distinguish by traditional feature extraction methods. Sequence feature encoding can automatically recognize and learn complex patterns and features in spectral data through deep learning models, such as recurrent neural networks (RNN) or long short-term memory networks (LSTM). This automated feature learning process can reveal subtle changes that may affect the quality of aquatic products, thereby improving the accuracy of detection.

[0035] Furthermore, convolution feature encoding is performed on the spectrogram of aquatic product quality detection to obtain the spectral feature vector of aquatic product quality detection, in order to make full use of the advantages of convolutional neural network (CNN) in extracting local features and capturing spatial relationships, so as to achieve efficient feature extraction and accurate quality assessment of spectral data. Convolution feature encoding can provide more representative feature vectors by extracting and integrating key information in the spectrogram, helping to improve the accuracy of aquatic product quality detection. First, convolution feature encoding can effectively capture local features in the spectrogram. Spectral data reflects the chemical composition of aquatic products in different wavelength ranges, and these components are usually manifested as specific absorption peaks or fluctuation patterns in the spectrogram. Through convolution operations, convolutional neural networks can extract these key features in local areas. For example, some specific spectral bands may correspond to the absorption peaks of specific chemical components, and convolution operations can effectively identify these features, thereby helping to identify the quality status of aquatic products.

[0036] Furthermore, the spectral sequence feature vector and spectral feature vector of aquatic product quality detection are combined to obtain the spectral joint feature vector of aquatic product quality, in order to comprehensively utilize the information extracted by different feature encoding methods, so as to achieve a more comprehensive and accurate aquatic product quality assessment. Among them, the spectral sequence feature encoding and the convolution feature encoding each capture different aspects of the spectral data. By combining these features, the quality status of aquatic products can be better understood and analyzed. Specifically, the sequence feature encoding focuses on the temporal and structural information in the spectral data, and can capture the variation pattern of the spectrum at different wavelengths, while the convolution feature encoding focuses on the extraction of local features and can identify the key absorption peaks and patterns in the spectrum. These two encoding methods extract the features of spectral data from different angles. By combining the feature vectors of the two, the important information in the spectral data can be fully covered, and the analysis ability of spectral data can be improved.

[0037] In a specific embodiment of the present application, the quality detection spectrum sequence feature encoding subunit 1221 includes: extracting multiple aquatic product quality detection spectrum features from the aquatic product quality detection spectrum diagram; passing the multiple aquatic product quality detection spectrum features through an aquatic product quality detection spectrum sequence feature encoder to obtain the aquatic product quality detection spectrum sequence feature vector.

[0038] It should be understood that spectra usually contain information from multiple bands, and the features of different bands may correspond to different chemical compositions or quality indicators of aquatic products. For example, certain wavelength regions may reflect the fat content of aquatic products, while other wavelength regions may be related to water or protein content. By extracting multiple spectral features, comprehensive quality information can be obtained from different bands, thereby providing a more comprehensive assessment of aquatic product quality.

[0039] Furthermore, multiple feature points in spectral data often need to be combined for analysis in order to fully understand the quality of aquatic products. For example, a single feature may not be able to fully describe the complex pattern in the spectrogram, but processing multiple features through a sequence feature encoder can comprehensively consider the temporal relationship and structure of these features in the spectrogram. In this way, the encoder can automatically learn and integrate the information of these features to generate a feature vector containing temporal and structural information, thereby improving the ability to evaluate the quality of aquatic products. Specifically, the multiple aquatic product quality detection spectral features are arranged as a quality spectrum input vector; the quality spectrum input vector is fully connected encoded using the fully connected layer of the aquatic product quality detection spectrum sequence feature encoder to extract high-dimensional implicit features of the feature values ​​at each position in the quality spectrum input vector; and the quality spectrum input vector is one-dimensionally encoded using the one-dimensional convolutional layer of the aquatic product quality detection spectrum sequence feature encoder to extract high-dimensional implicit correlation features of the correlation between the feature values ​​at each position in the quality spectrum input vector.

[0040] In a specific embodiment of the present application, the quality detection spectrum convolution feature encoding subunit 1222 includes: passing the aquatic product quality detection spectrum image through an aquatic product quality detection spectrum denoising encoding model to obtain an aquatic product quality detection spectrum enhanced image; passing the aquatic product quality detection spectrum enhanced image through an aquatic product quality detection spectrum convolution neural network as a feature encoder to obtain the aquatic product quality detection spectrum feature vector.

[0041] It should be understood that the interference of noise on spectral data may mask the actual spectral features, thereby affecting the accurate assessment of the quality of aquatic products. The denoising coding model removes or reduces noise by learning the noise patterns in the spectral data and distinguishing them from the real signal. This processing method can significantly improve the clarity of the signal, making the actual features in the spectral image more prominent, thereby providing a more reliable basis for analysis. Specifically, the aquatic product quality detection spectrum is input into the encoder of the aquatic product quality detection spectrum denoising coding model, wherein the encoder uses a convolutional layer to perform explicit spatial encoding on the aquatic product quality detection spectrum to obtain image features; and the image features are input into the decoder of the aquatic product quality detection spectrum denoising coding model, wherein the decoder uses a deconvolution layer to perform deconvolution processing on the image features to obtain the aquatic product quality detection spectrum enhanced image.

[0042] Furthermore, after the spectral enhancement image is subjected to noise reduction processing, it has clearer and more stable features, which enables CNN to play a better role. CNN can extract local features in spectral images through its convolutional layer, such as absorption peaks and absorption patterns within a specific wavelength range. These local features are important indicators of the quality of aquatic products. The convolutional layer can automatically learn and identify these features without manually designing feature extraction algorithms, thereby improving the efficiency and accuracy of feature extraction. Specifically, each layer of the aquatic product quality detection spectral convolutional neural network used as a feature encoder performs convolution processing, mean pooling processing based on the local feature matrix, and nonlinear activation processing on the input data in the forward pass of the layer to output the aquatic product quality detection spectral feature vector from the last layer of the aquatic product quality detection spectral convolutional neural network used as a feature encoder, wherein the input of the aquatic product quality detection spectral convolutional neural network used as a feature encoder is the aquatic product quality detection spectral enhanced image.

[0043] In a specific embodiment of the present application, the quality detection spectrum feature combination subunit 1223 includes: creating a SpectrumFeatureProject project based on Spring MVC dependency; creating a model class SpectrumFeature, which is used to represent the spectrum sequence feature vector of aquatic product quality detection and the spectrum feature vector of aquatic product quality detection; creating a service interface SpectrumService, which is used to combine the spectrum sequence feature vector of aquatic product quality detection and the spectrum feature vector of aquatic product quality detection; creating a service implementation class SpectrumServiceImpl, writing business logic, combining the spectrum sequence feature vector of aquatic product quality detection and the spectrum feature vector of aquatic product quality detection, and returning the aquatic product quality spectrum combination feature vector; creating a controller class SpectrumController, which is used to receive the spectrum sequence feature vector of aquatic product quality detection and the spectrum feature vector of aquatic product quality detection as a request body, calling the method of the service layer for combination, and returning the aquatic product quality spectrum combination feature vector; using Postman to test the API, and packaging the project into a WAR file, and deploying it on the server.

[0044] It should be understood that Spring MVC (Model-View-Controller) is a module in the Spring framework, which provides a way to develop Web applications based on the model-view-controller design pattern. Spring MVC separates the different parts of the application (model, view, controller), allowing developers to organize the code more clearly and improve the maintainability and scalability of the code. The controller is responsible for processing user requests, the model is responsible for business logic and data processing, and the view is responsible for displaying data. Spring MVC also provides powerful annotation support, which simplifies the configuration and development process, allowing developers to focus more on the implementation of business logic.

[0045] Some sample codes are shown below.

[0046] The model class deployment code is as follows.

[0047]

[0048] Among them, the service interface code is as follows.

[0049]

[0050] Among them, the service implementation class code is as follows.

[0051]

[0052]

[0053] The controller class code is as follows.

[0054]

[0055]

[0056] In this way, we can use the powerful functions of the Spring Boot framework, combined with the flexibility and scalability of Spring MVC, to build a stable and reliable Web service, which can efficiently and accurately combine the spectral sequence feature vector of aquatic product quality detection and the spectral feature vector of aquatic product quality detection, so as to generate the spectral joint feature vector of aquatic product quality detection. Among them, the project initialization phase ensures the construction of the basic environment, including the creation of the Spring Boot project and the necessary configuration file settings. Secondly, the creation of the model class SpectrumFeature defines the data structure of the spectral sequence feature vector of aquatic product quality detection and the spectral feature vector of aquatic product quality detection, including the fields of sequence features and spectral features. This provides a clear structure for data storage and processing, ensuring the consistency and integrity of the data. In the service layer, the definition of the interface SpectrumService and the service implementation class SpectrumServiceImpl implements the joint logic of the spectral sequence feature vector of aquatic product quality detection and the spectral feature vector of aquatic product quality detection. By calling the method of the service layer, the spectral sequence feature vector of aquatic product quality detection and the spectral feature vector of aquatic product quality detection can be efficiently combined to generate the spectral joint feature vector of aquatic product quality detection. This step reflects the business logic processing capability of the system and ensures the accuracy and efficiency of the cascade. The creation of the controller layer SpectrumController defines the HTTP POST request method, receives the data of the spectral sequence feature vector and the spectral feature vector of the aquatic product quality detection sent by the client, and calls the method of the service layer for processing. This step implements the API interface of the system, allowing the client to interact with the system through HTTP requests and obtain the joint feature vector of the aquatic product quality spectrum. Finally, the API test is performed through the Postman tool to ensure that the system functions normally. After the test passes, the project is packaged as a WAR file and deployed to the server so that the system can provide services. In this way, the development efficiency and data processing accuracy are improved, and the maintainability, scalability and security of the system are enhanced, providing strong technical support for aquatic product quality detection.

[0057] In the above-mentioned aquatic product quality rapid detection system 100, the aquatic product quality standard judgment module 130 is used to judge whether the quality of aquatic products meets the edible standard based on the global attention feature vector of the aquatic product appearance and the joint feature vector of the aquatic product quality spectrum. It should be understood that the global attention feature vector of the aquatic product appearance provides key information about the visual appearance of aquatic products. Through the global attention mechanism, important quality-related features such as color, shape, texture, etc. can be extracted from the appearance image of aquatic products. These appearance features play an important role in evaluating freshness, appearance damage, etc. The joint feature vector of the aquatic product quality spectrum provides spectral information of aquatic products, which directly reflects their chemical composition and quality status. Spectral data can reveal the material composition inside aquatic products, such as fat, protein and water content. Changes in these components may affect the edible safety and taste of aquatic products. Through joint analysis, the overall quality of aquatic products can be more comprehensively evaluated to ensure the accuracy of the judgment results.

[0058] Figure 4 FIG. 1 is a block diagram of a module for determining the quality standard of aquatic products in a system for rapid detection of the quality of aquatic products according to an embodiment of the present application. Figure 4 As shown, in a specific embodiment of the present application, the aquatic product quality standard judgment module 130 includes: an aquatic product quality feature fusion unit 131, which is used to fuse the aquatic product appearance global attention feature vector and the aquatic product quality spectrum joint feature vector to obtain an aquatic product quality standard classification feature vector; an aquatic product quality feature optimization unit 132, which is used to adjust the aquatic product quality standard classification feature vector based on the maximization of entropy degradation between categories to obtain an optimized aquatic product quality standard classification feature vector; an aquatic product quality edible standard judgment unit 133, which is used to pass the optimized aquatic product quality standard classification feature vector through a classifier to obtain a classification result, and the classification result is used to judge whether the aquatic product quality meets the edible standard.

[0059] It should be understood that in practical applications, the appearance and spectral information of aquatic products may be affected by many factors, and a single feature may lead to misjudgment. Comprehensive consideration of appearance and spectral data can reduce the risk of misjudgment caused by a single feature, thereby improving the performance of the model under different conditions. The fusion of the global attention feature vector of aquatic product appearance and the joint feature vector of aquatic product quality spectrum to obtain the classification feature vector of aquatic product quality compliance is to combine visual and chemical information to achieve a more comprehensive and accurate quality assessment. This method can make up for the shortcomings of a single data source and improve the reliability of aquatic product quality judgment.

[0060] In particular, in the technical solution of the present application, when extracting the appearance features of aquatic products and the spectral features of quality detection, multiple feature encoders may capture similar or overlapping information. That is, the appearance features of aquatic products are correlated with the spectral features of quality in some aspects, which leads to information redundancy. This redundancy causes repeated information to be included in the classification feature vector of aquatic product quality standards, thereby adding unnecessary complexity to the classifier input. When feature redundancy exists, the classifier will face the problem of cross-category runs when learning. Specifically, redundant features may make it difficult for the classifier to effectively distinguish different class labels, because multiple features of the same category may provide similar information, thereby reducing the model's sensitivity to category boundaries. At this point, the classifier may misjudge, causing some categories that should be clearly distinguished to be blurred, thereby affecting the accuracy and stability of the classification. Too many redundant features will cause the model to rely on noise or unimportant features during training, which will lead to a decrease in the generalization ability of the model on unseen data. This not only affects the learning effect of the classifier, but also challenges the reliability of the classification results in practical applications. Therefore, in the technical solution of the present application, the optimized aquatic product quality standard classification feature vector is obtained by performing entropy degradation maximization adjustment based on inter-category runs on the aquatic product quality standard classification feature vector.

[0061] Among them, the entropy degradation maximization adjustment based on inter-category running on the aquatic product quality standard classification feature vector is performed to obtain an optimized aquatic product quality standard classification feature vector, including: extracting each row vector in the prediction parameter space of the classifier to obtain a set of aquatic product quality standard prediction parameter row vectors; calculating the aquatic product quality standard class probability entropy degradation simulation value between the aquatic product quality standard classification feature vector and each aquatic product quality standard prediction parameter row vector in the set of aquatic product quality standard prediction parameter row vectors to obtain a set of aquatic product quality standard class probability entropy degradation simulation values; calculating the square root of the sum of squares of the aquatic product quality standard class probability entropy degradation simulation values ​​to obtain an aquatic product quality standard entropy degradation modulation value; based on the aquatic product quality standard entropy degradation modulation value, the aquatic product quality standard classification feature vector is subjected to feature distribution modulation to obtain the optimized aquatic product quality standard classification feature vector.

[0062] The optimization formula is:

[0063] D j =Softmax(M m v c +H m p j +b m )

[0064]

[0065] Among them, P represents the set of row vectors of prediction parameters for aquatic product quality compliance, p 1 、p 2 、p j 、p n represents the first, second, jth and nth row vectors of the prediction parameters of aquatic product quality compliance in the set of row vectors of the prediction parameters of aquatic product quality compliance, v c represents the classification feature vector of the aquatic product quality standard, Softmax represents the normalized exponential function, M m represents the first weight matrix, H m represents the second weight matrix, b m represents the bias vector, D j represents the jth probability entropy degradation simulation value of the aquatic product quality standard class in the set of probability entropy degradation simulation values ​​of the aquatic product quality standard class, t represents the entropy degradation modulation value of the aquatic product quality standard class, v c ⊙t represents the calculation of the classification feature vector v of aquatic product quality standards c Each eigenvalue of the t-th power, represents the i-th eigenvalue of the aquatic product quality standard classification feature vector, α represents a predetermined hyperparameter, ⊕ represents addition by position, and V' represents the optimized aquatic product quality standard classification feature vector.

[0066] Specifically, in the technical solution of the present application, the aquatic product quality standard classification feature vector has feature redundancy, which leads to inter-category squeeze relative to the class label of the classifier when the classifier is used for classification judgment, thus affecting the classification iteration effect.

[0067] Based on this, in the technical solution of the present application, the entropy degradation of the aquatic product quality compliance classification feature vector based on the prediction parameter space of the classifier is maximized. First, each row vector is extracted from the prediction parameter space of the classifier to form a row vector set. Then, the probability entropy degradation simulation value of the aquatic product quality compliance class between the aquatic product quality compliance classification feature vector and each row vector in the above row vector set is calculated to measure the uncertainty or information entropy change of the aquatic product quality compliance classification feature vector under given parameters. Furthermore, all the probability entropy degradation simulation values ​​of the aquatic product quality compliance class are squared and summed, and then the square root is taken to obtain a comprehensive aquatic product quality compliance entropy degradation modulation value, which reflects the degree of entropy change of the entire system when processing feature vectors. Finally, the aquatic product quality standard classification feature vector is adjusted according to the aquatic product quality standard entropy degradation modulation value obtained above. Specifically, the attribute set of the aquatic product quality standard classification feature vector is represented by a power series based on the aquatic product quality standard entropy degradation modulation value, and a set aggregate bounded deviation represented by an aggregation radius based on each attribute value of the aquatic product quality standard classification feature vector is added, so as to perform attribute selection and sparse optimization on the aquatic product quality standard classification feature vector under a unified aquatic product quality standard entropy degradation modulation value restriction standard, so as to ensure that the aquatic product quality standard classification feature vector contains sufficient data but is not too cumbersome to introduce unnecessary interference or redundancy.

[0068] Furthermore, the core role of the classifier is to map the high-dimensional optimized aquatic product quality classification feature vector to a specific category label. In aquatic product quality testing, the optimized aquatic product quality classification feature vector contains comprehensive information from appearance and spectral data, providing a detailed description of the quality of aquatic products. These feature vectors are usually high-dimensional and complex in structure, and the classifier is able to map these complex features to predefined categories, such as "qualified" or "unqualified" through its internal algorithm. The classifier learns how to correspond the optimized aquatic product quality classification feature vector to the classification label through training data, so as to accurately classify new samples in practical applications. This automated processing not only improves the detection speed, but also reduces the risk of human error, making the detection process more efficient and consistent.

[0069] In summary, the embodiment of the present application first obtains multi-region aquatic product appearance images and aquatic product quality detection spectra, and then uses deep learning technology to perform feature extraction and correlation analysis on the two, and finally uses a classifier to determine whether the quality of aquatic products meets the edible standards, thereby reducing the food safety risks of aquatic products and protecting the health of consumers.

[0070] As described above, the aquatic product quality rapid detection system 100 according to the embodiment of the present application can be implemented in various terminal devices. In one example, the aquatic product quality rapid detection system 100 can be integrated into the terminal device as a software module and / or a hardware module. For example, the aquatic product quality rapid detection system 100 can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the aquatic product quality rapid detection system 100 can also be one of the many hardware modules of the terminal device.

[0071] Alternatively, in another example, the rapid aquatic product quality detection system 100 and the terminal device may also be separate devices, and the rapid aquatic product quality detection system 100 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.

[0072] Figure 5 Flow chart of the method for rapid detection of aquatic product quality according to an embodiment of the present application. Figure 5 As shown, according to the rapid detection method of aquatic product quality according to the embodiment of the present application, it includes: S110, obtaining a multi-region aquatic product appearance image and a aquatic product quality detection spectrum; S120, extracting a global attention feature vector of aquatic product appearance and a joint feature vector of aquatic product quality spectrum from the multi-region aquatic product appearance image and the aquatic product quality detection spectrum; S130, judging whether the quality of aquatic products meets the edible standards based on the global attention feature vector of aquatic product appearance and the joint feature vector of aquatic product quality spectrum.

[0073] Here, those skilled in the art will appreciate that the specific operations of each step in the above-mentioned rapid detection method for aquatic product quality have been described in the above reference. Figures 1 to 4 The invention has been introduced in detail in the description of the rapid detection system for aquatic product quality, and therefore, its repeated description will be omitted.

[0074] Below, reference Figure 6 To describe an electronic device according to an embodiment of the present application.

[0075] Figure 6 is a block diagram of an electronic device according to an embodiment of the present application. Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing a terminal device or a server in an embodiment of the present application.

[0076] like Figure 6As shown, the electronic device includes one or more processors, a communication unit, etc. The one or more processors are, for example: one or more central processing units (CPUs), and / or one or more graphics processing units (GPUs), etc. The processor can perform various appropriate actions and processes according to executable instructions stored in a read-only memory (ROM) or executable instructions loaded from a storage part to a random access memory (RAM). The communication unit may include but is not limited to a network card, and the network card may include but is not limited to an IB (Infiniband) network card. The processor may communicate with a read-only memory and / or a random access memory to execute executable instructions, and is connected to the communication unit through a bus and communicates with other target devices through the communication unit, thereby completing the operation corresponding to any method provided in the embodiments of the present application, for example, the primary shard manager shards the features in the feature queue; for any shard, the primary shard manager stores the any shard in the corresponding shard feature library, and records the mapping relationship between the any shard and the corresponding shard feature library in a mapping table; in response to a failure of the primary shard manager, a shard manager is reselected from at least one slave shard manager as the new primary shard manager; the new primary shard manager obtains shard information of the shard currently being written from all shard feature libraries, and recreates the mapping relationship of the shard currently being written based on the shard information of the shard currently being written in all shard feature libraries.

[0077] In addition, various programs and data required for the operation of the device can also be stored in the RAM. The CPU, ROM and RAM are connected to each other via a bus. In the case of RAM, the ROM is an optional module. The RAM stores executable instructions, or writes executable instructions into the ROM at runtime, and the executable instructions enable the processor to perform operations corresponding to any of the above methods of the present invention. The input / output (I / O) interface is also connected to the bus. The communication unit can be integrated or can be configured to have multiple submodules (e.g., multiple IB network cards) and be linked on the bus.

[0078] The following components are connected to the I / O interface: an input section including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a LAN card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that a computer program read therefrom is installed into the storage section as needed.

[0079] If necessary, Figure 6The architecture shown is only an optional implementation method. In the specific practice, the above can be modified according to actual needs. Figure 6 The number and type of components can be selected, deleted, added or replaced; different functional components can be set up by separate settings or integrated settings, for example, the GPU and CPU can be set up separately or the GPU can be integrated on the CPU, the communication unit can be set up separately or integrated on the CPU or GPU, etc. These replaceable implementations all fall within the protection scope disclosed in the present invention.

[0080] In addition, an embodiment of the present invention further provides a computer program, including computer-readable code. When the computer-readable code runs on a device, a processor in the device executes instructions for implementing each step in the data processing method of any of the above embodiments of the present invention.

[0081] In addition, an embodiment of the present invention further provides a computer-readable storage medium for storing computer-readable instructions, which, when executed, implement the operations of each step in the data processing method of any of the above embodiments of the present invention.

[0082] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0083] The method and apparatus of the present invention may be implemented in many ways. For example, the method and apparatus of the present invention may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.

[0084] The description of the present invention is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the invention to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for particular uses.

Claims

1. A rapid detection system for aquatic product quality, characterized in that: include: Aquatic product quality data acquisition module, used to obtain multi-region aquatic product appearance images and aquatic product quality detection spectra; An aquatic product quality data processing module, used for extracting aquatic product appearance global attention feature vector and aquatic product quality spectrum joint feature vector from the multi-region aquatic product appearance image and the aquatic product quality detection spectrum; The aquatic product quality standard judgment module is used to judge whether the quality of the aquatic product meets the edible standard based on the global attention feature vector of the aquatic product appearance and the joint feature vector of the aquatic product quality spectrum.

2. The aquatic product quality rapid detection system according to claim 1, characterized in that: The aquatic product quality data processing module includes: An aquatic product appearance feature extraction unit, used for extracting features from the multi-region aquatic product appearance images to obtain a global attention feature vector of the aquatic product appearance; The aquatic product quality detection spectrum feature extraction unit is used to extract features from the aquatic product quality detection spectrum to obtain the aquatic product quality spectrum joint feature vector.

3. The aquatic product quality rapid detection system according to claim 2, characterized in that: The aquatic product appearance feature extraction unit comprises: Arranging the multi-region aquatic product appearance images into a global input tensor of aquatic product appearance; The global input tensor of the aquatic product appearance is passed through a global feature encoder of the aquatic product appearance based on spatial attention to obtain the global attention feature vector of the aquatic product appearance.

4. The aquatic product quality rapid detection system according to claim 3, characterized in that: The aquatic product quality detection spectral feature extraction unit comprises: A quality detection spectrum sequence feature encoding subunit, used for performing sequence feature encoding on the aquatic product quality detection spectrum graph to obtain an aquatic product quality detection spectrum sequence feature vector; The quality detection spectrum convolution feature encoding subunit is used to perform convolution feature encoding on the aquatic product quality detection spectrum to obtain an aquatic product quality detection spectrum feature vector; The quality detection spectrum feature combining subunit is used to combine the aquatic product quality detection spectrum sequence feature vector and the aquatic product quality detection spectrum feature vector to obtain the aquatic product quality spectrum combined feature vector.

5. The aquatic product quality rapid detection system according to claim 4, characterized in that: The quality detection spectrum sequence feature encoding subunit includes: Extracting a plurality of aquatic product quality detection spectral features from the aquatic product quality detection spectral graph; The plurality of aquatic product quality detection spectral features are passed through an aquatic product quality detection spectral sequence feature encoder to obtain the aquatic product quality detection spectral sequence feature vector.

6. The aquatic product quality rapid detection system according to claim 5, characterized in that: The quality detection spectrum convolution feature encoding subunit includes: The aquatic product quality detection spectrum image is passed through an aquatic product quality detection spectrum denoising coding model to obtain an aquatic product quality detection spectrum enhanced image; The aquatic product quality detection spectrum enhanced image is passed through a aquatic product quality detection spectrum convolutional neural network as a feature encoder to obtain the aquatic product quality detection spectrum feature vector.

7. The aquatic product quality rapid detection system according to claim 6, characterized in that: The quality detection spectrum feature combination subunit includes: Create the SpectrumFeatureProject project based on Spring MVC dependencies; Create a model class SpectrumFeature to represent the spectral sequence feature vector and spectral feature vector of aquatic product quality detection; Create a service interface SpectrumService to combine the spectral sequence feature vector of aquatic product quality detection with the spectral feature vector of aquatic product quality detection; Create a service implementation class SpectrumServiceImpl, write business logic, combine the aquatic product quality detection spectrum sequence feature vector and the aquatic product quality detection spectrum feature vector, and return the aquatic product quality spectrum joint feature vector; Create a controller class SpectrumController to receive the aquatic product quality detection spectrum sequence feature vector and the aquatic product quality detection spectrum feature vector as the request body, call the service layer method to combine them, and return the aquatic product quality spectrum joint feature vector; Use Postman to test the API, package the project into a WAR file, and deploy it to the server.

8. The aquatic product quality rapid detection system according to claim 7, characterized in that: The aquatic product quality standard judgment module includes: An aquatic product quality feature fusion unit, used for fusing the aquatic product appearance global attention feature vector and the aquatic product quality spectrum joint feature vector to obtain an aquatic product quality standard classification feature vector; An aquatic product quality feature optimization unit, used for performing entropy degradation maximization adjustment based on inter-category squeeze on the aquatic product quality standard classification feature vector to obtain an optimized aquatic product quality standard classification feature vector; The aquatic product quality edible standard judgment unit is used to pass the optimized aquatic product quality standard classification feature vector through a classifier to obtain a classification result, and the classification result is used to judge whether the aquatic product quality meets the edible standard.

9. The aquatic product quality rapid detection system according to claim 8, characterized in that: The aquatic product quality characteristics optimization unit comprises: Extracting each row vector in the prediction parameter space of the classifier to obtain a set of row vectors of prediction parameters for reaching the quality standard of aquatic products; Calculating the probability entropy degradation simulation value of the aquatic product quality compliance class between the aquatic product quality compliance classification feature vector and each aquatic product quality compliance prediction parameter row vector in the set of the aquatic product quality compliance prediction parameter row vector to obtain a set of probability entropy degradation simulation values ​​of the aquatic product quality compliance class; Calculating the square root of the sum of squares of the probability entropy degradation simulation values ​​of the aquatic product quality compliance class to obtain the aquatic product quality compliance entropy degradation modulation value; Based on the entropy degradation modulation value of the aquatic product quality standard, the feature distribution of the aquatic product quality standard classification feature vector is modulated to obtain the optimized aquatic product quality standard classification feature vector.

10. A method for rapid detection of aquatic product quality, characterized in that: include: Obtain multi-region aquatic product appearance images and aquatic product quality detection spectra; Extracting aquatic product appearance global attention feature vector and aquatic product quality spectrum joint feature vector from the multi-region aquatic product appearance image and the aquatic product quality detection spectrum; Based on the global attention feature vector of the aquatic product appearance and the joint feature vector of the aquatic product quality spectrum, it is judged whether the quality of the aquatic product meets the edible standard.

Citation Information

Cited By

  • System and method for identifying safety state of pin shaft of tower crane

    CN119495069A