A method for managing marine foods based on big data

Through the method of double-sided detection and optimization of model hyperparameters, the problem of incomplete detection in traditional marine food management is solved, the detection accuracy and management efficiency are improved, and the precise quality control of high-value food is achieved.

CN119919005BActive Publication Date: 2025-07-11XIAMEN JIUTIAN AUTOMATION EQUIP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510309843.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-11
Estimated Expiration
2045-03-17

AI Technical Summary

Technical Problem

In traditional marine food management, there are problems such as single-sided detection that cannot fully detect food surfaces, insufficient activation and loss functions, and weak global optimal solution acquisition capabilities of model optimization algorithms, resulting in low detection accuracy and untimely management.

Method used

The double-sided detection method is used to design marine food detection activation function and value hierarchical model loss function, and the model hyperparameters are optimized by calculating the search individual difference distance and collaborative exploration strategy to ensure global exploration capabilities and rapid convergence.

Benefits of technology

It improves the accuracy and efficiency of marine food testing, improves the detection accuracy and quality management level of high-value foods, and realizes the accuracy and efficiency of intelligent management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919005B_ABST
    Figure CN119919005B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for managing marine foods based on big data. The method includes obtaining original data for marine food management, refining the original data, constructing a marine food detection model, optimizing the detection model, and dual-sided detection management of marine foods. The present invention relates to the technical field of data processing for marine food quality management, and specifically refers to a method for managing marine foods based on big data. This solution innovatively introduces a dual-sided detection method, effectively capturing potential impurities on both sides and improving the accuracy of marine food detection; designing an activation function for marine food detection and a loss function for the value grading model, solving the limitations in dealing with complex features and high-value food detection, and improving the detection accuracy and intelligent management level of marine foods; improving the algorithm for obtaining detection model parameters through calculating the individual difference distance of search individuals and the collaborative exploration strategy, obtaining the optimal parameter values and adjusting the model hyperparameters, and enhancing the accuracy of the model output results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of marine food quality management data processing, and specifically refers to a marine food management method based on big data. Background Art

[0002] With the rapid development of information technology, data processing and intelligent management technologies have been widely applied in all walks of life. In the marine food industry, the instability of food quality is the main problem faced in management. Traditional marine food management methods usually rely on manual monitoring and empirical judgment, making it difficult to cope with quality fluctuations and changes in production efficiency during large-scale marine food production. This not only increases management risks but also affects the timeliness and accuracy of decision-making. Therefore, a marine food management method based on big data has emerged. This method comprehensively collects various data during the production and management of marine food and, combined with intelligent analysis technology, provides real-time and accurate decision-making support. Through this method, each link in the marine food production process can be precisely monitored and efficiently optimized, thereby significantly improving production efficiency, ensuring the stability of product quality, reducing the risk of generating unqualified products, enabling managers to make scientific quality control decisions based on real-time data, improving the transparency and controllability of the overall production process, ensuring the efficient and stable development of the marine food industry, and promoting the development of the marine food industry towards a more refined and intelligent direction.

[0003] However, traditional marine food management has technical problems such as when the marine food is large, single-sided detection may not be able to completely detect the entire surface of the food, limitations of activation functions and deficiencies of loss functions in existing detection models applicable to marine food, resulting in low accuracy of marine food detection. In existing detection models, there are situations where the built-in parameter settings are inappropriate, and the model optimization algorithm has a weak ability to obtain the global optimal solution, resulting in inaccurate final model output results. Summary of the Invention

[0004] In view of the above situation, to overcome the defects of the prior art, the present invention provides a method for managing marine foods based on big data. Aiming at the technical problem in traditional marine food management that when the marine food is large, single-sided detection may not be able to completely detect the entire surface of the food, this solution innovatively introduces a double-sided detection method. By independently detecting the front and back sides of the marine food, it ensures that each side of the food is thoroughly inspected, effectively captures different potential impurities on the front and back sides, reduces the risk of missed detection, and significantly improves the accuracy and detection efficiency of marine food detection, thereby improving the quality management level of marine foods. Aiming at the technical problems of the limitations of the activation function and the insufficiency of the loss function in the existing detection models applicable to marine foods, which lead to low accuracy in marine food detection, this solution innovatively designs an activation function for marine food detection and a loss function for the value grading model. It can more effectively handle the complex feature interactions and non-linear relationships of various impurities in marine foods, improve the sensitivity to the key features of food quality. By introducing a value grading loss function, differential processing is performed on foods of different values, improving the detection accuracy of high-value foods, ensuring the quality management of high-value foods, and solving the limitations of traditional methods in dealing with complex features and high-value food detection, thereby significantly improving the detection accuracy, quality management efficiency, and intelligent management level of marine foods. Aiming at the technical problem that in the existing detection models, the built-in parameter settings are inappropriate and the model optimization algorithm has weak ability to obtain the global optimal solution, resulting in inaccurate final model output results, this solution can adjust the search intensity at different stages by calculating the individual difference distance and collaborative exploration strategy, ensuring sufficient global exploration ability in the early stage and rapid convergence in the later stage. It solves the technical problems of local optimal traps and insufficient exploration-exploitation balance of the optimization algorithm, can obtain the optimal parameter values and adjust the model hyperparameters, significantly improves the accuracy of the model output results, and further improves the intelligent level of marine food management.

[0005] The technical solution adopted by the present invention is as follows: A method for managing marine foods based on big data provided by the present invention includes the following steps:

[0006] Step S1: Obtain the original data for marine food management;

[0007] Step S2: Refine the original data;

[0008] Step S3: Build a marine food detection model;

[0009] Step S4: Optimize the detection model;

[0010] Step S5: Manage double-sided detection of marine foods.

[0011] Further, in step S1, the acquisition of the original marine food management data specifically refers to obtaining the original marine food management data by collecting from the large-scale marine food processing factory management system; the original marine food management data includes marine food information data and marine food production line detection data; the marine food production line detection data includes front-side detection data of marine food, back-side detection data of marine food, and production line environment detection data.

[0012] Further, in step S2, the refined original data is used to optimize the original marine food management data. Specifically, it performs data cleaning optimization, data standardization optimization, data augmentation optimization, and data feature selection optimization on the original marine food management data to obtain optimized marine food management data, and divides it into training data and data to be detected; the data cleaning optimization is used to eliminate invalid and inaccurate data, specifically by performing missing value processing, data outlier processing, and data duplicate value deletion processing on the data; the data standardization optimization specifically standardizes the data using the maximum-minimum normalization method; the data augmentation optimization is used to generate diverse data, specifically by generating diverse data samples through a generative adversarial network, and the data feature selection optimization specifically performs feature selection based on a tree model on the data to screen out features related to the qualification of marine food products.

[0013] Further, in step S3, the construction of the marine food detection model is used to establish a marine food detection model, analyze the quality of marine food, and obtain a trained marine food detection model; it specifically includes the following steps;

[0014] Step S31: Extract the local input feature map of marine food, which specifically includes the following steps:

[0015] Step S311: Perform a convolution operation; the formula is expressed as follows:

[0016] ;

[0017] In the formula, represents the feature map of the l-th layer, respectively represent the row and column coordinates of the position in the feature map, represents the ReLU activation function, represents the batch normalization operation, n and m represent the height and width of the convolution kernel, represents the feature map of the convolution kernel in the -th layer, represents the weight matrix of the -th convolutional layer, represents the bias term parameter of the -th convolutional layer;

[0018] Step S312: Perform a pooling operation to reduce the output dimension of the features. The formula used is as follows:

[0019] ;

[0020] In the formula, represents the position of the feature map at the l-th layer after the pooling operation , represents the area of the pooling window, represents the weight at each position in the pooling window;

[0021] Step S32: Aggregate the key impurity features to focus on the areas crucial for quality judgment. Specifically, through a spatial attention mechanism, weight the feature map. The formula used is as follows:

[0022] ;

[0023] ;

[0024] In the formula, represents the attention weight at the feature map position of, represents the Tanh activation function, represents the weighted feature map, represents element-wise multiplication, represents the coordinates of other positions in the feature map;

[0025] Step S33: Design an activation function for marine food detection to handle complex feature interactions in the double-sided detection of marine food. The formula used is as follows:

[0026] ;

[0027] In the formula, represents the activation function for marine food detection, represents the input data of the activation function, represents the scaling parameter that controls the activation function in the negative value region, represents the Sigmoid activation function, represents the exponential function;

[0028] Step S34: Obtain the output result of marine food detection. The formula used is as follows:

[0029] ;

[0030] In the formula, represents the output result of the c-th marine food detection, represents the output weight matrix, represents the bias term parameter of the output, Represents the Dropout operation;

[0031] Step S35: Design the loss function of the value grading model, which is used to design a weighted loss function according to the values of different marine foods. The formula used is as follows:

[0032] ;

[0033] ;

[0034] ;

[0035] In the formula, represents the loss function value of ordinary marine foods, represents the loss function value of high-value marine foods, represents the total loss function value of the detection model, represents the actual detection result of the c-th marine food, represents whether the marine food c is a high-value marine food. If = 1, then the marine food c is a high-value marine food, represents the loss weight of conventional marine foods, represents the loss weight of high-value foods, and C represents the total number of marine foods;

[0036] Step S36: Conduct model training. Specifically, use the training data as the training data of the model, calculate the loss through the loss function of the value grading model, use the backpropagation algorithm to optimize the weights of the model, gradually reduce the error. After multiple rounds of iteration, the model continuously adjusts the weight parameters and optimizes the loss function to minimize the difference between the model prediction result and the true value. When the error reaches the preset threshold, the training process stops, and thus the trained marine food detection model is obtained.

[0037] Furthermore, in step S4, the optimization of the detection model is specifically to obtain the optimal hyperparameter combination of the trained marine food detection model through an improved optimization algorithm, and obtain the optimized marine food detection model, including the following steps:

[0038] Step S41: Initialize the search individuals. Specifically, randomly generate the initial population individuals in the solution space. The formula used is as follows:

[0039] ;

[0040] In the formula, represents the initialization position of the i-th population individual, and respectively represent the lower and upper limits of the population position, Represents a random number within the range of [0, 1];

[0041] Step S42: Calculate the individual fitness value, specifically calculate the individual fitness value f in the population i ; Take the performance of the trained marine food detection model established based on the individual position as the individual's fitness value, sort the individuals from the best to the worst according to the fitness value, and obtain the position of the individual with the highest global fitness value ;

[0042] Step S43: Calculate the search individual difference distance, specifically obtain the distance between the current individual and the individual with the worst fitness value. The formula used is as follows:

[0043] ;

[0044] In the formula, Represents the difference distance of the i-th individual, t represents the number of iterations, Represents a random number within the range of [0, 1], Represents the corresponding position of the worst fitness in the current iteration, Represents the position of the i-th individual in the t-th generation population, Represents the maximum number of iterations;

[0045] Step S44: Update the position of the population individuals, specifically including the following steps:

[0046] Step S441: Collaboratively explore and update the individual position, specifically update the position according to the collaborative exploration strategy. The formula used is as follows:

[0047] ;

[0048] In the formula, Represents the position of the i-th individual in the (t + 1)-th generation, Represents a random number within the range of [0, 1]; Represents the average value of the positions of 3 randomly selected individuals in the population, Represents the average value of the positions of 2 randomly selected individuals in the population;

[0049] Step S442: Randomly vary and update the individual position, specifically update the position according to the mutation diversification strategy. The formula used is as follows:

[0050] ;

[0051] In the formula, Represents a random number within the range of [0, 1], Represents the position of a randomly selected individual in the population;

[0052] Step S443: Update the individual position according to the iteration value, specifically update the position according to the dynamic behavior simulation strategy, and the formula used is as follows:

[0053] ;

[0054] In the formula, represents the gravitational acceleration constant, represents a random number within the range of [0, 1];

[0055] Step S45: Randomly jump the position of the worst search individual, and the formula used is as follows:

[0056] ;

[0057] In the formula, represents a random number within the range of [0, 0.45], represents a random number within the range of [0.45, 1], represents the difference between the positions of two randomly selected individuals in the population, represents a binary random variable;

[0058] Step S46: Mutate the individuals with low fitness. Specifically, recalculate the fitness value of each individual, sort the individuals from the best to the worst according to the fitness value, and select 5%N individuals with low fitness for individual mutation. The formula used is as follows:

[0059] ;

[0060] In the formula, represents the individual with low fitness, represents the optimal fitness of the current population, represents the worst fitness of the current population, and N represents the total number of search individuals;

[0061] Step S47: Obtain the optimal individual position. Specifically, when the individual fitness value f i is higher than the fitness threshold and reaches the maximum number of iterations, terminate the search and obtain the global optimal position of the individual, and obtain the optimal hyperparameter combination of the marine food detection model;

[0062] Step S48: Obtain the optimized marine food detection model. Specifically, adjust the hyperparameters of the trained marine food detection model according to the optimal hyperparameter combination of the marine food detection model to obtain the optimized marine food detection model.

[0063] Furthermore, in step S5, the double-sided detection management of marine food is used for the intelligent management of marine food. Specifically, through the results of the double-sided detection of marine food, the intelligent management of marine food is realized; it includes the following steps:

[0064] Step S51: Positive detection of marine food: Specifically, the marine food information data and the positive detection data of marine food in the data to be detected are used as the input data of the optimized marine food detection model, and the optimized marine food detection model is used to detect the positive side of the marine food to obtain the output result of the positive detection of the marine food;

[0065] Step S52: Negative detection of marine food: Specifically, the marine food information data and the negative detection data of marine food in the data to be detected are used as the input data of the optimized marine food detection model, and the optimized marine food detection model is used to detect the negative side of the marine food to obtain the output result of the negative detection of the marine food;

[0066] Step S53: Intelligent management of marine food. Based on the combination of the output results of the positive detection of marine food and the output results of the negative detection of marine food, the safety of marine food is comprehensively monitored and managed. If both output results are qualified, this marine food is sent to the refrigeration and cold storage system. If any one of the detection results is unqualified, the unqualified marine food is removed to ensure that unqualified products do not enter the next production link, realizing efficient and accurate intelligent management of marine food.

[0067] The beneficial effects achieved by the present invention using the above solution are as follows:

[0068] (1) Aiming at the technical problem in traditional marine food management that when the marine food is large, single-sided detection may not be able to completely detect the entire surface of the food, this solution innovatively introduces a double-sided detection method. By independently detecting the positive and negative sides of the marine food, it ensures that each side of the food is thoroughly inspected, effectively captures different potential impurities on the positive and negative sides, reduces the risk of missed detection, and significantly improves the accuracy and detection efficiency of marine food detection, thereby improving the quality management level of marine food.

[0069] (2) Aiming at the limitations of the activation function and the deficiencies of the loss function in the existing marine food detection models, which lead to low accuracy in marine food detection, this solution innovatively designs the activation function for marine food detection and the loss function of the value grading model. It can more effectively handle the complex feature interactions and non-linear relationships of various impurities in marine food, improve the sensitivity to the key features of food quality, and through the introduction of the value grading loss function, differentially processes foods of different values, improves the detection accuracy of high-value foods, ensures the quality management of high-value foods, solves the limitations of traditional methods in dealing with complex features and high-value food detection, and thus significantly improves the detection accuracy, quality management efficiency and intelligent management level of marine food.

[0070] (3)In view of the technical problem that in the existing detection models, the built-in parameter settings are inappropriate, and the model optimization algorithm has weak ability to obtain the global optimal solution, resulting in inaccurate output results of the final model, this solution can adjust the search intensity at different stages by calculating the search individual difference distance and the collaborative exploration strategy, ensuring sufficient global exploration ability in the early stage and rapid convergence in the later stage. It solves the technical problems of the local optimal trap of the optimization algorithm and the insufficient balance between exploration and exploitation, can obtain the optimal parameter values and adjust the model hyperparameters, significantly improves the accuracy of the model output results, and further improves the intelligent level of marine food management. Brief Description of the Drawings

[0071] Figure 1 It is a schematic flowchart of a method for managing marine food based on big data provided by the present invention;

[0072] Figure 2 It is a schematic flowchart of step S3;

[0073] Figure 3 It is a schematic flowchart of step S4;

[0074] Figure 4 It is a schematic flowchart of step S5;

[0075] The drawings are used to provide further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. Detailed Embodiments

[0076] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0077] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the system or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present invention.

[0078] Embodiment 1, refer to Figure 1 , the technical solutions adopted by the present invention are as follows: A method for managing marine food based on big data provided by the present invention includes the following steps:

[0079] Step S1: Obtain the original data of marine food management, specifically, obtain the original data of marine food management from the management system of a large marine food processing factory through collection;

[0080] Step S2: Refine the original data for optimizing the original data of marine food management, specifically, perform data cleaning optimization, data standardization optimization, data enhancement optimization, and data feature selection optimization on the original data of marine food management to obtain the optimized data of marine food management;

[0081] Step S3: Construct a marine food detection model for establishing a marine food detection model and analyzing the quality of marine food. Specifically, extract the local input feature map of marine food and combine it with the spatial attention mechanism to obtain key impurity features, design the activation function of the marine food detection, generate the output result, and train according to the loss function of the value grading model, and finally obtain the trained marine food detection model;

[0082] Step S4: Optimize the detection model. Specifically, obtain the optimal hyperparameter combination of the trained marine food detection model through improving the optimization algorithm to obtain the optimized marine food detection model;

[0083] Step S5: Implement two-sided detection management of marine food for the intelligent management of marine food. Specifically, realize the intelligent management of marine food through the results of two-sided detection of marine food.

[0084] Example 2, refer to Figure 1 , this example is based on the above example. In step S1, the obtaining of the original data of marine food management is specifically to obtain the original data of marine food management from the management system of a large marine food processing factory through collection; the original data of marine food management includes marine food information data and marine food production line detection data; the marine food information data includes marine food product type, marine food size, marine food weight, and marine food fishing ground information; the marine food production line detection data includes marine food front detection data, marine food back detection data, and production line environment detection data; both the marine food front detection data and the marine food front detection data include impurity type, impurity position, impurity size, impurity volume, and impurity density; the production line environment detection data includes production line temperature data and production line humidity data.

[0085] Example 3, refer to Figure 1, this embodiment is based on the above embodiment. In step S2, the refined original data is used to optimize the original data of marine food management. Specifically, it performs data cleaning optimization, data standardization optimization, data augmentation optimization, and data feature selection optimization on the original data of marine food management to obtain optimized data for marine food management, and divides the training data and the data to be detected. The data cleaning optimization is used to eliminate invalid and inaccurate data, specifically by performing missing value processing, data outlier processing, and data duplicate value deletion processing on the data. The data standardization optimization specifically standardizes the data using the maximum-minimum normalization method. The data augmentation optimization is used to generate diverse data, specifically by generating diverse data samples through a generative adversarial network. The data feature selection optimization specifically performs feature selection based on a tree model on the data to screen out features related to the qualification of marine food products.

[0086] Embodiment 4, refer to Figure 1 and Figure 2 , this embodiment is based on the above embodiment. In step S3, the construction of the marine food detection model is used to establish a marine food detection model, analyze the quality of marine food, and obtain a trained marine food detection model. It specifically includes the following steps;

[0087] Step S31: Extract the local input feature map of marine food, which specifically includes the following steps:

[0088] Step S311: Perform a convolution operation. The formula used is as follows:

[0089] ;

[0090] In the formula, represents the feature map of the l-th layer, respectively represent the row and column coordinates of the position in the feature map, represents the ReLU activation function, represents the batch normalization operation, n and m represent the height and width of the convolution kernel, represents the feature map of the convolution kernel in the -th layer, represents the convolution layer's weight matrix, represents the convolution layer's bias term parameter;

[0091] Step S312: Perform a pooling operation to reduce the output dimension of the features. The formula used is as follows:

[0092] ;

[0093] In the formula, represents the position of the feature map of the l-th layer after the pooling operation , represents the area of the pooling window, and represents the weight at each position in the pooling window;

[0094] Step S32: Aggregate key impurity features for focusing on areas crucial for quality judgment. Specifically, through a spatial attention mechanism, the feature map is weighted. The formula used is as follows:

[0095] ;

[0096] ;

[0097] In the formula, represents the attention weight at the position of the feature map , represents the Tanh activation function, represents the weighted feature map, represents element-wise multiplication, represents the coordinates of other positions of the feature map;

[0098] Step S33: Design an activation function for marine food detection to handle complex feature interactions in the double-sided detection of marine food. The formula used is as follows:

[0099] ;

[0100] In the formula, represents the activation function for marine food detection, represents the input data of the activation function, represents the scaling parameter that controls the activation function in the negative value region, represents the Sigmoid activation function, represents the exponential function;

[0101] Step S34: Obtain the output result of marine food detection. The formula used is as follows:

[0102] ;

[0103] In the formula, represents the output result of the c-th marine food detection, represents the output weight matrix, represents the bias term parameter of the output, represents the Dropout operation;

[0104] Step S35: Design a loss function for the value grading model to design a weighted loss function based on the value of different marine foods. The formula used is as follows:

[0105] ;

[0106] ;

[0107] ;

[0108] In the formula, represents the loss function value of ordinary marine foods, represents the loss function value of high-value marine foods, represents the total loss function value of the detection model, represents the actual result of the c-th marine food detection, represents whether the marine food c is a high-value marine food. If = 1, then the marine food c is a high-value marine food, represents the loss weight of conventional marine foods, represents the loss weight of high-value foods, and C represents the total number of marine foods;

[0109] Step S36: Perform model training. Specifically, use the training data as the training data of the model, calculate the loss through the loss function of the value grading model, use the backpropagation algorithm to optimize the weights of the model, gradually reduce the error. After multiple rounds of iteration, the model continuously adjusts the weight parameters and optimizes the loss function to minimize the difference between the model prediction result and the true value. When the error reaches the preset threshold, the training process stops, thereby obtaining the trained marine food detection model.

[0110] By performing the above operations, for the technical problems of the limitations of the activation function and the insufficiency of the loss function in the existing marine food detection model, which lead to low accuracy in marine food detection, this solution innovatively designs the activation function for marine food detection and the loss function of the value grading model, which can more effectively handle the complex feature interactions and non-linear relationships of various impurities in marine foods, improve the sensitivity to the key features of food quality. By introducing the value grading loss function, differential processing is performed on foods of different values, the detection accuracy of high-value foods is improved, the quality management of high-value foods is ensured, and the limitations of traditional methods in dealing with complex features and high-value food detection are solved, thereby significantly improving the detection accuracy, quality management efficiency, and intelligent management level of marine foods.

[0111] Example Five. Refer to Figure 1 and Figure 3 , this example is based on the above example. In step S4, the optimization of the detection model is specifically to obtain the optimal hyperparameter combination of the trained marine food detection model by improving the optimization algorithm, and obtain the optimized marine food detection model, including the following steps:

[0112] Step S41: Initialize the search individuals, specifically, randomly generate the initial population individuals in the solution space. The formula used is as follows:

[0113] ;

[0114] In the formula, represents the initialization position of the i-th population individual, and represent the lower and upper limits of the population position respectively, represents a random number within the range of [0, 1];

[0115] Step S42: Calculate the individual fitness value, specifically, calculate the individual fitness value f i ; Take the performance of the trained marine food detection model established based on the individual position as the individual fitness value, sort the individuals from the best to the worst according to the fitness value, and obtain the position of the individual with the highest global fitness value ;

[0116] Step S43: Calculate the search individual difference distance, specifically, obtain the distance between the current individual and the individual with the worst fitness value. The formula used is as follows:

[0117] ;

[0118] In the formula, represents the difference distance of the i-th individual, t represents the iteration number, represents a random number within the range of [0, 1], represents the corresponding position of the worst fitness in the current iteration, represents the position of the i-th individual in the t-th generation population, represents the maximum iteration number;

[0119] Step S44: Update the population individual position, which specifically includes the following steps:

[0120] Step S441: Collaboratively explore and update the individual position, specifically, update the position according to the collaborative exploration strategy. The formula used is as follows:

[0121] ;

[0122] In the formula, represents the position of the i-th individual in the (t + 1)-th generation, represents a random number within the range of [0, 1]; represents the average value of the positions of 3 randomly selected individuals in the population, represents the average value of the positions of 2 randomly selected individuals in the population;

[0123] Step S442: Update the individual position randomly with differences. Specifically, update the position according to the mutation diversification strategy, and the formula used is as follows:

[0124] ;

[0125] In the formula, represents a random number between [0, 1], represents the position of an individual randomly selected from the population;

[0126] Step S443: Update the individual position according to the iteration value. Specifically, update the position according to the dynamic behavior simulation strategy, and the formula used is as follows:

[0127] ;

[0128] In the formula, represents the gravitational acceleration constant, represents a random number between [0, 1];

[0129] Step S45: Randomly jump the position of the worst-searching individual, and the formula used is as follows:

[0130] ;

[0131] In the formula, represents a random number between [0, 0.45], represents a random number between [0.45, 1], represents the difference between the positions of two randomly selected individuals in the population, represents a binary random variable;

[0132] Step S46: Mutate the individuals with low fitness. Specifically, recalculate the fitness value of each individual, sort the individuals from the best to the worst according to the fitness value, and select 5%N individuals with low fitness for individual mutation. The formula used is as follows:

[0133] ;

[0134] In the formula, represents the individual with low fitness, represents the optimal fitness of the current population, represents the worst fitness of the current population, and N represents the total number of searching individuals;

[0135] Step S47: Obtain the optimal individual position. Specifically, when the individual fitness value f i is higher than the fitness threshold and reaches the maximum number of iterations, terminate the search and obtain the global optimal position of the individual, and obtain the optimal hyperparameter combination of the marine food detection model;

[0136] Step S48: Obtain the optimized marine food detection model. Specifically, adjust the hyperparameters of the trained marine food detection model according to the optimal hyperparameter combination of the marine food detection model to obtain the optimized marine food detection model.

[0137] By performing the above operations, for the existing detection models, there are situations where the built-in parameter settings are inappropriate, and the model optimization algorithm has a weak ability to obtain the global optimal solution, resulting in inaccurate output results of the final model. Through calculating the search individual difference distance and the collaborative exploration strategy, this solution can adjust the search intensity at different stages, ensure sufficient global exploration ability in the early stage, and quickly converge in the later stage, solving the technical problems of the local optimal trap and insufficient exploration-exploitation balance of the optimization algorithm, being able to obtain the optimal parameter values and adjust the model hyperparameters, significantly improving the accuracy of the model output results, and further enhancing the intelligent level of marine food management.

[0138] Example 6, refer to Figure 1 and Figure 4 Based on the above example, in step S5, the double-sided detection management of marine food is used for the intelligent management of marine food. Specifically, through the strategy of double-sided detection of marine food, the intelligent management of marine food is realized; it includes the following steps:

[0139] Step S51: Front-side detection of marine food: Specifically, take the marine food information data and the front-side detection data of marine food in the to-be-detected data as the input data of the optimized marine food detection model, and use the optimized marine food detection model to detect the front side of marine food to obtain the output result of the front-side detection of marine food.

[0140] Step S52: Back-side detection of marine food: Specifically, take the marine food information data and the back-side detection data of marine food in the to-be-detected data as the input data of the optimized marine food detection model, and use the optimized marine food detection model to detect the back side of marine food to obtain the output result of the back-side detection of marine food.

[0141] Step S53: Intelligent management of marine food. Based on the combination of the output results of the front-side detection of marine food and the output results of the back-side detection of marine food, comprehensively monitor and manage the safety of marine food. If both output results are qualified, this marine food is sent to the refrigeration and cold storage system. If any one of the detection results is unqualified, the unqualified marine food is eliminated to ensure that unqualified products do not enter the next production link, realizing the efficient and precise intelligent management of marine food.

[0142] By performing the above operations, in view of the technical problem existing in the management of traditional marine foods that when the marine food is relatively large, single-sided detection may not be able to completely detect the entire surface of the food, this solution innovatively introduces a double-sided detection method. Through the independent detection of the front and back sides of the marine food, it ensures that each side of the food is thoroughly inspected, effectively captures different potential impurities on the front and back sides, reduces the risk of missed detection, and significantly improves the accuracy and detection efficiency of marine food detection, thereby improving the quality management level of marine foods.

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

[0144] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention.

[0145] The above describes the present invention and its embodiments. Such description is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. All in all, if those of ordinary skill in the art are inspired by it and design, without creative efforts, structural ways and embodiments similar to this technical solution without departing from the purpose of the present invention, they shall fall within the protection scope of the present invention.

Claims

1. A method for managing marine foods based on big data, characterized in that: The method includes the following steps: Step S1: Obtain the original data of marine food management through collection; Step S2: Refine the original data of marine food management to obtain the optimized data of marine food management, and divide the training data and the data to be detected; Step S3: Extract the local input feature map of marine food and combine it with the spatial attention mechanism to obtain the key impurity features, design the activation function for marine food detection, generate the output result, and train according to the loss function of the value grading model. Finally, obtain the trained marine food detection model, which specifically includes the following steps; Step S31: Perform convolution operation and pooling operation to obtain the feature map; Step S32: Through the spatial attention mechanism, perform weighted processing on the feature map; the formula used is as follows: ; ; In the formula, represents the position of the feature map as the attention weight, represents the Tanh activation function, represents the weighted feature map, represents element-wise multiplication, represents the coordinates of other positions of the feature map, and R represents the region of the pooling window, represents the position of the feature map at the l-th layer after the pooling operation ; Step S33: Design the activation function for marine food detection, the formula used is as follows: ; In the formula, represents the activation function for marine food detection, represents the input data of the activation function, represents the scaling parameter for controlling the activation function in the negative value region, represents the Sigmoid activation function, represents the exponential function; Step S34: Obtain the output result of marine food detection, the formula used is as follows: ; In the formula, represents the detection output result of the c-th marine food, represents the output weight matrix, represents the bias term parameter of the output, represents the Dropout operation; Step S35: Design the loss function of the value grading model, the formula used is as follows: ; ; ; In the formula, represents the loss function value of ordinary marine foods, represents the loss function value of high-value marine foods, represents the total loss function value of the detection model, represents the actual result of the c-th marine food detection, represents whether the marine food c is a high-value marine food. If = 1, then the marine food c is a high-value marine food, represents the loss weight of ordinary marine foods, represents the loss weight of high-value marine foods, and C represents the total number of marine foods; Step S36: Use the training data as the training data of the model, calculate the loss through the loss function of the value grading model, use the backpropagation algorithm to optimize the weights of the model, gradually reduce the error, and after multiple rounds of iteration, the model continuously adjusts the weight parameters and optimizes the loss function, so that the difference between the model prediction result and the true value is minimized. When the error reaches the preset threshold, the training process stops, and thus the trained marine food detection model is obtained; Step S4: Optimize the detection model, obtain the optimal parameter combination of the marine food detection model by calculating the search individual difference distance and the collaborative exploration strategy to improve the optimization algorithm, and obtain the optimized marine food detection model; Step S5: Based on the results of the double-sided detection of marine food, realize the intelligent management of marine food.

2. The method for managing marine foods based on big data according to claim 1, wherein: In step S4, the optimization of the detection model specifically includes the following steps: Step S41: Randomly generate initial population individuals in the solution space; Step S42: Calculate the fitness value f of individuals in the population i ; Take the performance of the trained marine food detection model established based on the individual's position as the fitness value of the individual, sort the individuals from the best to the worst according to the fitness value, and obtain the position of the individual with the highest global fitness value ; Step S43: Obtain the distance between the current individual and the individual with the worst fitness value, the formula used is as follows: ; In the formula, represents the difference distance of the i-th individual, t represents the number of iterations, represents a random number within the range of [0, 1], represents the corresponding position of the worst fitness in the current iteration, represents the position of the i-th individual in the t-th generation population, represents the maximum number of iterations; Step S44: Update the positions of the population individuals, which specifically includes the following steps: Step S441: Update the position according to the collaborative exploration strategy, the formula used is as follows: ; In the formula, represents the position of the i-th individual in the (t + 1)-th generation, represents a random number within the range [0, 1]; represents the average value of the positions of three randomly selected individuals in the population, represents the average value of the positions of two randomly selected individuals in the population; Step S442: Update the position according to the mutation diversification strategy, the formula used is as follows: ; In the formula, represents a random number within the range of [0, 1], represents the position of an individual randomly selected from the population; Step S443: Update the position according to the dynamic behavior simulation strategy, the formula used is as follows: ; In the formula, represents the gravitational acceleration constant, represents a random number within the range of [0, 1]; Step S45: Randomly jump the position of the worst search individual, the formula used is as follows: ; In the formula, represents a random number within the range of [0, 0.45], represents a random number within the range of [0.45, 1], represents the difference in the positions of two randomly selected individuals in the population, represents a binary random variable; Step S46: Recalculate the fitness value of each individual, sort the individuals from the best to the worst according to the fitness value, and select 5%N individuals with low fitness for individual mutation, the formula used is as follows: ; wherein, represents an individual with low fitness, represents the optimal fitness of the current population, represents the worst fitness of the current population, and N represents the total number of searched individuals, represents the fitness value of the current individual; Step S47: When the individual fitness value f i is higher than the fitness threshold and reaches the maximum number of iterations, terminate the search and obtain the global optimal position of the individual, and obtain the optimal hyperparameter combination of the marine food detection model; Step S48: Adjust the hyperparameters of the trained marine food detection model according to the optimal hyperparameter combination of the marine food detection model to obtain the optimized marine food detection model.

3. A method for managing marine foods based on big data according to claim 1, characterized in that: In step S5, the realization of the intelligent management of marine food based on the results of the double-sided detection of marine food specifically includes the following steps: Step S51: Positive detection of marine food: Specifically, the marine food information data and the positive detection data of marine food in the data to be detected are used as the input data of the optimized marine food detection model, and the optimized marine food detection model is used to detect the positive side of marine food to obtain the output result of the positive detection of marine food; Step S52: Negative detection of marine food: Specifically, the marine food information data and the negative detection data of marine food in the data to be detected are used as the input data of the optimized marine food detection model, and the optimized marine food detection model is used to detect the negative side of marine food to obtain the output result of the negative detection of marine food; Step S53: Intelligent management of marine food. Based on the combination of the output results of the positive detection of marine food and the output results of the negative detection of marine food, the safety of marine food is comprehensively monitored and managed. If both output results are qualified, this marine food is sent to the refrigeration and cold storage system. If any one of the detection results is unqualified, the unqualified marine food is removed to ensure that unqualified products do not enter the next production link.

4. The method for managing marine foods based on big data according to claim 1, characterized in that: In step S1, the original marine food management data obtained through collection is specifically the original marine food management data obtained through collection from the marine food processing factory management system; the original marine food management data includes marine food information data and marine food production line detection data; the marine food production line detection data includes positive detection data of marine food, negative detection data of marine food, and production line environment detection data.

5. The method for managing marine foods based on big data according to claim 1, wherein: In step S2, the refinement of the original marine food management data is specifically to perform data cleaning optimization, data standardization optimization, data enhancement optimization, and data feature selection optimization on the original marine food management data to obtain optimized marine food management data, and divide the training data and the data to be detected; the data enhancement optimization is used to generate diverse data, specifically by generating diverse data samples through a generative adversarial network.

Citation Information

Patent Citations

  • Loess landslide detection method and system based on grade differentiation learning grey wolf optimization

    CN119131573A