Food multi-modal detection data fusion analysis method, device, equipment and medium
By using a multimodal detection data fusion analysis method, the problem of information limitations of single-modal detection methods in food quality and safety testing is solved. It realizes standardized processing and feature correlation mining of multi-source heterogeneous data, improves detection accuracy and efficiency, and ensures the reliability and dynamism of food safety assessment.
Patent Information
- Application Number
- CN202511569912.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-01-13
AI Technical Summary
In existing food quality and safety testing, single-modal detection methods are insufficient to fully reflect the complex quality characteristics of food, while multimodal data fusion methods suffer from problems such as difficulty in data standardization, insufficient feature correlation mining, and lack of robustness of the fusion model, resulting in detection accuracy and efficiency that cannot meet actual needs.
By acquiring multi-source heterogeneous datasets of food spectral signals, image data, and odor characteristics, normalization and noise filtering are performed. A preliminary feature subset is generated using a support vector machine algorithm, and feature fusion is performed using a deep neural network. Time-series analysis is conducted to calculate the overall safety score, and an extended set of detection indicators is constructed. Blockchain technology is used to generate qualification certification, and historical records are linked to optimize the evaluation report.
It achieves consistency and availability of multimodal testing data, improves the accuracy and dynamism of food safety assessment, ensures the credibility of certification and the integrity of assessment reports, and provides a systematic, efficient and reliable food quality and safety testing solution.
Smart Images

Figure CN121329232A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence, and in particular relates to methods, devices, equipment and media for the fusion and analysis of multimodal food detection data. Background Technology
[0002] In the field of food quality and safety testing, traditional single-modal detection methods (such as relying solely on spectral analysis or image recognition) have limitations in information dimensions, making it difficult to comprehensively reflect the complex quality characteristics of food. For example, while spectral detection can reflect component information, its ability to identify abnormal appearance is insufficient; image recognition can capture surface features but cannot penetrate to detect changes in internal components; odor feature analysis is greatly affected by environmental interference, and its use alone can easily lead to misjudgments. With consumers' increasing demands for food quality and the strengthening of industry supervision, there is an urgent need for detection technologies that integrate multi-source heterogeneous data (spectral, image, odor, etc.) to overcome the bottleneck of single-modal methods. However, existing multimodal data fusion methods generally face problems such as difficulty in data standardization, insufficient feature correlation mining, and lack of robustness in fusion models, resulting in detection accuracy and efficiency that cannot meet the needs of practical applications. Summary of the Invention
[0003] Therefore, it is necessary to provide a method, device, equipment, and medium for the fusion analysis of multimodal food detection data that can improve the consistency and usability of multimodal detection data and ensure the accuracy and dynamism of food safety assessment, in response to the above-mentioned technical problems.
[0004] Firstly, this application provides a method for fusion and analysis of multimodal food detection data, including:
[0005] The original multi-source heterogeneous dataset, including food spectral signals, image data, and odor features, was obtained. After normalization and noise filtering preprocessing, a standardized multimodal feature set was obtained.
[0006] The multimodal feature set is classified using the support vector machine algorithm to generate a preliminary feature subset, and the target features are extracted from the preliminary feature subset to generate a structured feature description.
[0007] Perform time-series analysis on the structured feature description and calculate the overall security score. If the overall security score meets the preset threshold, output a qualified certification mark.
[0008] An extended set of detection indicators is constructed based on the overall security score. This extended set of detection indicators is then input into a dynamic calculation model, and combined with blockchain time, a new version of qualification certification is obtained.
[0009] The new version of the qualification certification is linked with historical certification records to generate an initial assessment report. The initial assessment report is then verified for compatibility and deviations are corrected to obtain an optimized assessment report.
[0010] In one embodiment, a support vector machine algorithm is used to classify the multimodal feature set to generate a preliminary feature subset. Target features are then extracted from the preliminary feature subset to generate a structured feature description, including:
[0011] The support vector machine algorithm is used to classify the multimodal feature set to obtain a preliminary feature subset.
[0012] Based on the preliminary feature subset, the correlation coefficients between each feature are calculated, and features with correlation coefficients higher than a preset threshold are selected to obtain a highly correlated feature subset.
[0013] Principal component analysis was used to reduce the dimensionality of the highly correlated feature subsets to obtain the dimensionality reduction results.
[0014] A deep neural network is used to perform feature fusion on the dimensionality reduction results to generate a comprehensive feature vector.
[0015] By adjusting the structural parameters of the deep neural network output layer based on the vector dimension of the comprehensive feature vector, an optimized feature representation can be obtained.
[0016] Extract a subset of target features from the optimized feature representation and generate a structured feature description containing feature correlation and dimensionality information according to a preset format.
[0017] In one embodiment, the correlation coefficient between the features is calculated using the following formula:
[0018]
[0019] Where, ρ i,j f represents the correlation coefficient between feature i and feature j. i f j This represents the i-th and j-th eigenvectors within the feature subset. <f i ,f j > represents the vector dot product, ||·|| represents the vector L2 norm, and σ represents the adaptive scaling parameter. N represents the total number of features in the initial feature subset, k represents the preset number of nearest neighbors, and f represents the first k nearest neighbors of each feature. i,m Let represent the m-th nearest neighbor feature vector of the i-th feature, and α represent the adjustment coefficient, with a value range of [0.5, 2].
[0020] In one embodiment, a time-series analysis is performed on the structured feature description and an overall security score is calculated. If the overall security score meets a preset threshold, a qualified certification identifier is output, including:
[0021] Extract dynamic parameters containing temperature gradient, humidity fluctuation, and color shift values from the structured feature description.
[0022] A time-series analysis algorithm is used to process the dynamically changing parameters to obtain a quality status trend vector.
[0023] The weighting coefficients of the quality assessment indicators are determined based on the quality status trend vector; the quality assessment indicators include temperature stability, humidity uniformity, and color retention.
[0024] The overall safety score is obtained by calculating the quality assessment indicators using a weighted average method.
[0025] The overall safety score is judged based on the preset safety standard value. If the safety standard value is met, a qualified certification mark is output.
[0026] In one embodiment, an extended detection index set is constructed based on the overall security score. This extended detection index set is input into a dynamic calculation model, and combined with blockchain time, a new version of qualification certification is obtained, including:
[0027] An assessment level is generated based on the overall security score. The assessment level and assessment time are then combined to generate an initial assessment result with a time-series dimension.
[0028] The initial assessment results were decomposed into time-series features to extract trend, periodic and abrupt features. Combined with food quality correlation factors, parameters strongly correlated with safety status were selected as an extended detection index set.
[0029] Based on the weighted adaptive adjustment algorithm, the extended detection index set is dynamically weighted and feature fused to construct a dynamic calculation model for optimizing food safety scores.
[0030] The extended set of detection metrics is input into the dynamic calculation model, and a real-time update link for the authentication status is constructed based on the output results.
[0031] By combining the real-time updated authentication status of the link with the authentication time stored on the blockchain, a new version of qualified authentication with an immutable identifier is generated.
[0032] In one embodiment, the new version of the qualification certification is associated with historical certification records to generate an initial evaluation report. The initial evaluation report is then subjected to compatibility verification and deviation correction to obtain an optimized evaluation report, including:
[0033] Link the new version of the qualification certification with historical certification records to generate an extended report dataset containing traceability information.
[0034] The extended report dataset is used to filter highly correlated feature parameters and traceability records. An initial evaluation report is generated by multi-dimensional data aggregation, which includes indicator fluctuation trend charts, anomaly annotations, and traceability links.
[0035] Based on the dynamic evaluation criteria, the initial evaluation report is validated for rule adaptability, the deviation of indicator weights is corrected, and the missing evaluation dimensions are supplemented to obtain an optimized evaluation report.
[0036] In one embodiment, the method further includes:
[0037] We acquire raw, multi-source heterogeneous datasets of food spectral signals, image data, and odor characteristics, and classify and label the heterogeneous datasets according to the data source identifiers.
[0038] If the data source identifier matches the preset spectral type, the normalization algorithm is used to process the spectral signal to generate standardized spectral features. Wavelet transform and median filtering are then used to reduce noise in the standardized spectral features to obtain a purified spectral feature vector.
[0039] If the data source identifier matches the preset image type, Gaussian filtering is used to denoise the image data, combined with size normalization, to obtain a standard image feature vector.
[0040] If the data source identifier matches the preset odor type, the odor features are processed by feature discretization and mean-standard deviation normalization to obtain a standard odor feature vector.
[0041] A multimodal feature fusion matrix is constructed based on the purified spectral feature vector, the standard image feature vector, and the standard odor feature vector; the multimodal feature fusion matrix includes feature weights for the spectral dimension, the image dimension, and the odor dimension.
[0042] A feature alignment algorithm is used to unify the dimensions of the multimodal feature fusion matrix, forming a standardized multimodal feature set.
[0043] Secondly, this application also provides a food multimodal detection data fusion and analysis device, the device comprising:
[0044] The feature preprocessing module is used to acquire the original multi-source heterogeneous dataset, which includes food spectral signals, image data and odor features. After normalization and noise filtering preprocessing, a standardized multimodal feature set is obtained.
[0045] The feature selection and extraction module is used to classify the multimodal feature set using the support vector machine algorithm to generate a preliminary feature subset, extract target features from the preliminary feature subset to generate a structured feature description; it is also used to perform time series analysis on the structured feature description and calculate the overall security score. If the overall security score meets the preset threshold, a qualified certification mark is output.
[0046] The security scoring and certification module is used to build an extended set of detection indicators based on the overall security score. The extended set of detection indicators is then input into a dynamic calculation model, and combined with blockchain time, a new version of qualification certification is obtained.
[0047] The assessment report generation module is used to associate the new version of the qualification certification with historical certification records to generate an initial assessment report, perform adaptability verification on the initial assessment report and correct deviations to obtain an optimized assessment report.
[0048] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0049] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0050] The aforementioned food multimodal detection data fusion analysis method, device, computer equipment, and storage medium first acquire a raw multi-source heterogeneous dataset containing food spectral signals, image data, and odor features. This dataset is then transformed into a standardized multimodal feature set through normalization and noise filtering preprocessing. Subsequently, a support vector machine algorithm is used to classify this feature set, selecting highly correlated features to form a highly correlated feature subset. Target features are extracted from this subset, and a structured feature description is generated. Next, dynamic parameters are extracted from the structured feature description, and a quality trend vector is generated through time-series analysis. Based on this vector, an overall safety score is calculated. If the score meets the standard, a qualified certification identifier is output. An extended detection index set is constructed based on the overall safety score and input into a dynamic calculation model to generate a certification status update link. Combined with blockchain storage time, a new version of the qualified certification is obtained. Finally, the new version of the qualified certification is associated with historical certification records to generate an initial evaluation report. After correcting deviations through adaptability verification, an optimized evaluation report is generated. This method overcomes the information limitations of single-modality detection by integrating multi-source heterogeneous data and performing standardized preprocessing, thereby improving data consistency and usability. Through feature selection, dynamic analysis, and model calculation, it achieves a closed-loop logic throughout the entire process, from feature extraction to safety scoring and certification updates, ensuring the accuracy and dynamism of safety assessments. Furthermore, by combining blockchain technology with historical data verification, it enhances the credibility of certification and the completeness of assessment reports, providing a systematic, efficient, and reliable solution for food quality and safety testing. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1A flowchart of a food multimodal detection data fusion and analysis method provided in an embodiment of the present invention;
[0053] Figure 2 This is a structural block diagram of the food multimodal detection data fusion and analysis device provided in an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] In one embodiment, such as Figure 1 As shown, this application provides a method for fusion analysis of multimodal food detection data, which may include the following steps:
[0056] Step S101: Obtain the original multi-source heterogeneous dataset including food spectral signals, image data and odor features. After normalization and noise filtering preprocessing, a standardized multimodal feature set is obtained.
[0057] Specifically, for food testing scenarios, a raw, multi-source, heterogeneous dataset containing spectral signals, image data, and odor features is first collected. The spectral signals reflect the internal composition of the food, the image data records the food's appearance and morphological features, and the odor features correspond to the volatile substance properties of the food. Due to differences in the acquisition methods, dimensions, and distributions of different data types, baseline correction and intensity normalization are performed on the spectral signals, size standardization and noise filtering are performed on the image data, and numerical scaling and outlier processing are performed on the odor features. Through unified normalization rules and noise filtering algorithms, the raw data is transformed into a standardized multimodal feature set with consistent format and interference removed.
[0058] Step S102: The multimodal feature set is classified using the support vector machine algorithm to generate a preliminary feature subset, and the target features are extracted from the preliminary feature subset to generate a structured feature description.
[0059] Furthermore, based on the obtained standardized multimodal feature set, a support vector machine (SVM) algorithm is used for classification. Leveraging SVM's ability to construct a classification hyperplane in high-dimensional space, effective and redundant information in the feature set is initially separated, resulting in a preliminary feature subset. Building upon this, by calculating the correlation coefficients between features (such as Pearson's coefficient or cosine similarity), features with correlations higher than a preset threshold are selected to form a highly correlated feature subset, reducing feature redundancy and retaining key information. Subsequently, target features directly related to food quality and safety (such as peak positions in spectral features, texture parameters in image features, and concentrations of characteristic compounds in odor features) are extracted from the highly correlated feature subset. Following preset data structure specifications (such as fields including feature name, numerical range, and correlation dimension), structured feature descriptions are generated.
[0060] Step S103: Perform time-series analysis on the structured feature description and calculate the overall security score. If the overall security score meets the preset threshold, output the qualified certification mark.
[0061] Specifically, parameters reflecting dynamic changes in food quality are extracted from the generated structured feature descriptions, including but not limited to temperature gradient changes, humidity fluctuations, and color parameter offsets during storage. Time-series analysis algorithms (such as sliding window analysis or trend fitting) are used to process these dynamic parameters, capturing their patterns of change over time and generating a quality trend vector containing the direction, rate, and stability of quality changes. Based on this vector, and combined with a pre-defined quality assessment index system (such as weights for temperature stability, humidity uniformity, and color retention), a weighted calculation is performed to obtain an overall safety score. This score is compared with a pre-defined safety standard value; if the standard is met, a qualification certification mark is output.
[0062] Step S104: Construct an extended detection index set based on the overall security score, input the constructed extended detection index set into the dynamic calculation model, and obtain the new version of qualification certification by combining the blockchain time.
[0063] Based on the overall safety score, and combined with factors influencing food quality (such as raw material source, processing technology, and storage conditions), parameters strongly correlated with safety status (such as microbial content, additive residue, and packaging integrity indicators) are selected to construct an extended set of testing indicators, enriching the dimensions of safety assessment. This indicator set is input into a pre-built dynamic calculation model (which uses a weight adaptive adjustment algorithm to update indicator weights in real time). The model outputs real-time safety assessment results, and a real-time update chain for certification status is constructed based on changes in the results, recording the nodes and reasons for changes in certification status. Simultaneously, key certification statuses in the update chain are linked to timestamps stored on the blockchain. Leveraging the immutability of the blockchain, a new version of the qualified certification, containing both time stamps and status records, is generated.
[0064] Step S105: Associate the new version of the qualification certification with the historical certification records to generate an initial assessment report. Perform adaptability verification on the initial assessment report and correct any deviations to obtain an optimized assessment report.
[0065] The newly generated qualification certification is linked and integrated with historical certification records (including historical safety scores, assessment reports, and anomaly handling records). Data matching technology (such as association based on unique food identifiers) is used to merge the new and old data, generating an initial assessment report containing complete traceability information (such as production batch, testing time, and quality change trajectory). For this initial assessment report, rule compatibility verification is performed based on dynamic assessment criteria (such as the latest food safety standards and industry regulations), checking whether the indicator weights in the report conform to current standards and whether any assessment dimensions are missing. Weight deviations discovered during verification are corrected, and missing assessment dimensions (such as newly added contaminant detection indicators) are supplemented, ultimately forming an optimized assessment report that is complete, logically rigorous, and conforms to current standards.
[0066] The aforementioned food multimodal detection data fusion and analysis method first acquires a raw multi-source heterogeneous dataset containing food spectral signals, image data, and odor features. This dataset is then transformed into a standardized multimodal feature set through normalization and noise filtering preprocessing. Subsequently, a support vector machine algorithm is used to classify this feature set, selecting highly correlated features to form a highly correlated feature subset. Target features are extracted from this subset, and a structured feature description is generated. Next, dynamic parameters are extracted from the structured feature description, and a quality trend vector is generated through time-series analysis. Based on this, an overall safety score is calculated. If the score meets the standard, a qualified certification identifier is output. An extended detection index set is constructed based on the overall safety score and input into a dynamic calculation model to generate a certification status update chain. Combined with blockchain storage time, a new version of the qualified certification is obtained. Finally, the new version of the qualified certification is associated with historical certification records to generate an initial evaluation report. After correcting deviations through adaptability verification, an optimized evaluation report is generated. This method overcomes the information limitations of single-modality detection by integrating multi-source heterogeneous data and performing standardized preprocessing, thereby improving data consistency and usability. Through feature selection, dynamic analysis, and model calculation, it achieves a closed-loop logic throughout the entire process, from feature extraction to safety scoring and certification updates, ensuring the accuracy and dynamism of safety assessments. Furthermore, by combining blockchain technology with historical data verification, it enhances the credibility of certification and the completeness of assessment reports, providing a systematic, efficient, and reliable solution for food quality and safety testing.
[0067] In one embodiment, the multimodal feature set is classified using a support vector machine algorithm to generate a preliminary feature subset. Extracting target features from the preliminary feature subset to generate a structured feature description may include the following steps:
[0068] Step S201: The support vector machine algorithm is used to classify the multimodal feature set to obtain a preliminary feature subset.
[0069] Step S202: Calculate the correlation coefficient between each feature based on the preliminary feature subset, and select features with correlation coefficients higher than a preset threshold to obtain a highly correlated feature subset.
[0070] Step S203: Principal component analysis is used to reduce the dimensionality of the highly correlated feature subsets to obtain the dimensionality reduction results.
[0071] Step S204: Perform feature fusion operation on the dimensionality reduction result through a deep neural network to generate a comprehensive feature vector.
[0072] Step S205: Adjust the structural parameters of the deep neural network output layer according to the vector dimension of the comprehensive feature vector to obtain the optimized feature representation.
[0073] Step S206: Extract the target feature subset from the optimized feature representation and generate a structured feature description containing feature correlation and dimensional information according to a preset format.
[0074] Specifically, for the standardized multimodal feature set, a support vector machine (SVM) algorithm is used for classification. Leveraging the SVM's ability to construct the optimal classification hyperplane in high-dimensional space, redundant features with low correlation to food quality and safety are initially removed, retaining features with potential discriminative value to form a preliminary feature subset. Based on this, the correlation coefficients between features in the preliminary feature subset are calculated (e.g., by quantifying the linear or nonlinear correlation between features through vector dot product and norm operations). After setting a correlation threshold, features with coefficients higher than this threshold are selected to form a highly correlated feature subset, strengthening the intrinsic correlation between features. Subsequently, principal component analysis (PCA) is applied to the highly correlated feature subset. Through orthogonal transformation, multiple correlated features are converted into a few uncorrelated principal components, reducing data dimensionality while retaining core information, resulting in a dimensionality-reduced result. The dimensionality-reduced result is input into a deep neural network. Through nonlinear transformations and weight learning at each layer of the network, features from different sources are deeply fused to generate a comprehensive feature vector integrating multidimensional information. Based on the specific dimensions of the comprehensive feature vector, the structural parameters such as the number of neurons and connection weights in the output layer of the deep neural network are dynamically adjusted to make the feature representation output by the network more closely match the actual analysis needs, thus obtaining an optimized feature representation. Finally, a subset of target features directly related to food quality and safety is extracted from the optimized feature representation, and a structured feature description is generated according to a preset data format (including feature name, numerical range, correlation strength with other features, and dimensional attributes).
[0075] This embodiment uses support vector machine classification to initially screen features, reducing interference from invalid information; screening based on correlation coefficients further focuses on highly correlated features, improving the relevance of the feature set; principal component analysis effectively reduces data complexity and improves subsequent processing efficiency; the fusion of deep neural networks and adjustment of output layer parameters enhance the comprehensive expressive power of features, making the optimized features better reflect the essential attributes of food quality; the finally generated structured feature description integrates feature correlation and dimensionality information in a standardized form, providing accurate and orderly data support for subsequent dynamic parameter extraction, safety score calculation, and other steps, thus improving the systematicness and effectiveness of feature processing as a whole.
[0076] In one embodiment, the correlation coefficient between the features can be calculated using the following formula:
[0077]
[0078] Where, ρ i,j f represents the correlation coefficient between feature i and feature j. i f j This represents the i-th and j-th eigenvectors within the feature subset. <f i ,f j > represents the vector dot product, ||·|| represents the vector L2 norm, and σ represents the adaptive scaling parameter. N represents the total number of features in the initial feature subset, k represents the preset number of nearest neighbors, and f represents the first k nearest neighbors of each feature. i,m Let represent the m-th nearest neighbor feature vector of the i-th feature, and α represent the adjustment coefficient, with a value range of [0.5, 2].
[0079] This embodiment introduces an adaptive scaling parameter and an adjustment coefficient, combined with weighted calculation of feature nearest neighbor vectors, to dynamically adapt to different feature distribution scenarios and effectively capture nonlinear correlations between features. Specifically, the adaptive scaling parameter dynamically adjusts the kernel function's range of action based on the total number of features, avoiding the correlation calculation bias caused by fixed parameters; the introduction of a preset number of nearest neighbors focuses on the local correlation characteristics of features, enhancing adaptability to complex data structures; and the adjustment coefficient optimizes the contribution of nearest neighbor features through weight allocation, making the correlation calculation more closely aligned with the complex correlation patterns of multimodal features. Compared to traditional linear correlation calculation, this method can more accurately characterize the implicit correlations between multi-source heterogeneous features, providing a more reliable quantitative basis for selecting highly correlated feature subsets and improving the efficiency and accuracy of subsequent feature dimensionality reduction and fusion.
[0080] In one embodiment, performing time-series analysis on the structured feature description and calculating the overall security score, and outputting a qualified certification identifier if the overall security score meets a preset threshold, may include the following steps:
[0081] Step S301: Extract dynamic change parameters containing temperature gradient, humidity fluctuation and color shift value from the structured feature description.
[0082] Step S302: The dynamic parameters are processed using a time series analysis algorithm to obtain the quality status trend vector.
[0083] Step S303: Determine the weight coefficients of the quality assessment indicators based on the quality status trend vector; the quality assessment indicators include temperature stability, humidity uniformity, and color retention.
[0084] Step S304: The quality assessment indicators are calculated using a weighted average method to obtain the overall safety score.
[0085] Step S305: Judge the overall safety score based on the preset safety standard value. If it meets the safety standard value, output a qualified certification mark.
[0086] First, dynamic parameters such as temperature gradient, humidity fluctuation, and color shift are accurately extracted from the structured feature description. The temperature gradient parameter is obtained by analyzing time-series data from temperature sensors at different locations in the food storage environment, reflecting the spatial distribution and temporal changes of the temperature field. The humidity fluctuation parameter, based on real-time sampling values from humidity sensors, is denoised and smoothed to characterize the stability of environmental humidity. The color shift value is calculated using RGB or HSV color space parameters from image features, quantifying the degree of change in the food's appearance color.
[0087] Subsequently, time-series analysis algorithms are used to perform in-depth processing on the aforementioned dynamic parameters. For temperature gradient data, a sliding window trend analysis method is used to capture outliers with sudden temperature rises and falls; for humidity fluctuation data, a seasonal decomposition model (such as STL) is used to separate trend, seasonal, and random terms, extracting the periodic patterns of humidity changes; for color shift values, exponential smoothing is used to predict color change trends. Finally, these are integrated to generate a quality state trend vector containing dimensions such as time series characteristics, fluctuation amplitude, and rate of change. This vector can intuitively reflect the evolution trajectory of food quality over time.
[0088] Based on the quality status trend vector, the weight coefficients of each quality assessment indicator are determined through correlation analysis and training with historical data. Specifically, the correlation between temperature stability indicators and quality anomaly events (such as the Pearson correlation coefficient) is calculated, and the weight of temperature stability is set in combination with expert experience. Using a similar method, the corresponding weight coefficients are determined according to the degree of influence of humidity uniformity on microbial reproduction and the correlation strength between color retention and oxidation reaction, forming a dynamically adjustable weight system.
[0089] Subsequently, a weighted average method was used to quantify the quality assessment indicators. The temperature stability score (converted by the ratio of the actual temperature fluctuation range to the standard threshold), humidity uniformity score (based on the percentage of time the humidity deviates from the standard range), and color retention score (based on the comparison of the rate of change of color parameters to the threshold) were linearly combined according to their corresponding weight coefficients to obtain an overall safety score on a scale of 0-100. This score comprehensively reflects the quality and safety status of food during storage or processing.
[0090] Finally, the overall safety score is compared with preset safety standard values (such as thresholds set by industry regulations or corporate internal control standards). If the score reaches or exceeds the standard value, the food quality and safety are deemed to meet the requirements, and a qualified certification mark containing the testing time and parameter details is automatically generated; if the score does not meet the standard, an early warning process is triggered.
[0091] This embodiment achieves comprehensive monitoring of food quality changes through precise extraction of multi-dimensional dynamic parameters; the introduction of time-series analysis algorithms transforms static data into predictable trend features, enhancing the forward-looking nature of the detection; the dynamic weight allocation mechanism based on trend vectors avoids the problem of insufficient adaptability of fixed weights to different food categories and storage conditions; and the closed-loop design of weighted scoring and standard comparison ensures the objectivity and operability of the safety assessment results. It provides technical support for real-time monitoring and accurate certification of food quality and safety, effectively solving the problem of the one-sidedness of traditional single-indicator detection.
[0092] In one embodiment, an extended detection index set is constructed based on the overall security score. The constructed extended detection index set is input into a dynamic calculation model, and a new version of qualification certification is obtained by combining blockchain time. This may include the following steps:
[0093] Step S401: Generate an assessment level based on the overall security score, integrate the assessment level with the assessment time, and generate an initial assessment result with a time-series dimension.
[0094] Step S402: Decompose the initial assessment results into time-series features to extract trend, periodic and abrupt features, and combine them with food quality correlation factors to screen out parameters that are strongly correlated with safety status as an extended detection index set.
[0095] Step S403: Based on the weight adaptive adjustment algorithm, the extended detection index set is dynamically weighted and feature fused to construct a dynamic calculation model for optimizing food safety scores.
[0096] Step S404: Input the extended detection index set into the dynamic calculation model, and construct a real-time update link for the authentication status based on the output results.
[0097] Step S405: Combine the authentication status of the real-time updated link with the authentication time of the blockchain evidence to generate a new version of qualified authentication with an immutable identifier.
[0098] Specifically, assessment levels are determined based on the overall safety score (e.g., 90 points or above is classified as Level A, 80-89 points as Level B, etc.). The assessment levels are then integrated with specific assessment timestamps to generate initial assessment results containing a "level-time" correspondence, providing foundational data with a time-series dimension for subsequent analysis. The initial assessment results are then subjected to time-series feature decomposition. Frequency domain analysis (e.g., Fourier transform) is used to extract trend features (long-term change direction), periodic features (e.g., seasonal quality fluctuations) are identified using periodogram methods, and mutation detection algorithms (e.g., PELT) are used to capture mutation features (e.g., sudden contamination events). Simultaneously, by combining relevant factors such as food raw material characteristics and processing technology, parameters with high correlation to safety status (e.g., microbial growth rate, antioxidant decay value) are selected to construct an extended detection index set, achieving dynamic expansion of the assessment dimensions.
[0099] Next, a weighted adaptive adjustment algorithm is used to process the extended detection index set. This algorithm dynamically adjusts the weights of each index based on historical detection data and real-time feedback using gradient descent (e.g., automatically increasing the weight when an abnormal temperature intensifies its impact on the safety score). It also integrates multi-source index information using a feature fusion network (e.g., a self-attention mechanism) to construct a dynamic calculation model. The extended detection index set is input into the model, and based on the real-time changes in the output safety score, a real-time update chain is constructed, encompassing "index change - score fluctuation - authentication status," clearly defining the triggering conditions and state transition logic for each stage. Finally, the authentication status in the update chain is hash-associated with the timestamp stored on the blockchain. Utilizing the immutability of the blockchain, a new version of the qualified authentication is generated with a unique timestamp and encrypted signature, ensuring the credibility and traceability of the authentication information.
[0100] This embodiment integrates assessment levels with time, injecting a temporal dimension into the safety status and resolving the lag issue of static assessments. The combination of temporal feature decomposition and correlation factor screening enables dynamic adjustment of detection indicators as food quality evolves, enhancing the relevance of the assessment. The adaptive weight adjustment and dynamic calculation model construction achieve real-time optimization of safety scores, adapting to the quality change patterns of different food categories. The introduction of blockchain technology fundamentally guarantees the immutability and traceability of certification results. This approach not only meets the timeliness requirements of food quality and safety testing but also enhances the authority and credibility of the test results through technological integration, providing scientific and reliable technical support for the full lifecycle supervision of food.
[0101] In one embodiment, the process of associating the new version of the qualification certification with historical certification records to generate an initial evaluation report, performing adaptability verification and correcting deviations on the initial evaluation report to obtain an optimized evaluation report may include the following steps:
[0102] Step S501: Associate the new version of the qualification certification with the historical certification records to generate an extended report dataset containing traceability information.
[0103] Step S502: Filter highly correlated feature parameters and traceability records from the extended report dataset, and generate an initial evaluation report that includes indicator fluctuation trend charts, anomaly annotations, and traceability links through multi-dimensional data aggregation.
[0104] Step S503: Based on the dynamic evaluation criteria, the initial evaluation report is checked for rule adaptability, the deviation of indicator weights is corrected and the missing evaluation dimensions are supplemented to obtain an optimized evaluation report.
[0105] First, the new certification and historical certification records (including historical safety scores, testing times, and anomaly handling records) are linked and integrated using unique food identifiers (such as batch numbers and traceability codes). Certification status change records and testing parameter evolution data are extracted to generate an extended report dataset containing complete traceability information. Next, feature filtering is performed on this dataset. By calculating Pearson correlation coefficients or mutual information values, characteristic parameters highly correlated with the current safety status (such as recently fluctuating temperature data and multiple abnormal color indicators) and corresponding traceability records (such as raw material batches and processing equipment numbers) are identified. Data aggregation technology is used to integrate multi-dimensional information (time series, parameter values, and traceability nodes) to generate an initial assessment report that includes indicator fluctuation trend graphs (such as temperature changes over time), anomaly annotations (such as the time points and causes of exceeding standards), and the traceability chain (all nodes from raw materials to finished products), presenting the food quality evolution process in a visual format.
[0106] Next, the initial assessment report undergoes rule-adaptability verification based on dynamic assessment criteria (such as the latest food safety standards and updated industry regulations). Verification includes: whether the indicator weights comply with current standards (e.g., weight settings for newly added contaminant indicators) and whether the assessment dimensions are complete (e.g., whether they cover the latest microbial testing items). Weight deviations discovered during verification are corrected through historical data regression analysis or expert experience; for missing assessment dimensions, corresponding testing indicators and calculation methods are added, ultimately resulting in a complete and reasonably weighted optimized assessment report. This report includes data-supported trend analysis, a clear path for tracing anomalies, and assessment conclusions that comply with the latest regulations.
[0107] This embodiment utilizes multi-dimensional data aggregation and visualization to transform the complex quality evolution process into intuitive and easy-to-understand charts and flowcharts, enhancing the report's readability and decision-making value. Dynamic rule verification and deviation correction mechanisms ensure that the assessment report always meets the latest standard requirements, avoiding assessment lags caused by standard updates. Overall, this method achieves a deep transformation from certification data to decision-making information, guaranteeing both the historical continuity and traceability integrity of the assessment report, while enhancing its timeliness and authority through a dynamic adaptation mechanism. This provides food regulatory authorities, manufacturers, and consumers with quality assessment results that are both accurate and valuable for reference.
[0108] In one embodiment, the method may further include the following steps:
[0109] Step S601: Obtain the original multi-source heterogeneous dataset of food spectral signals, image data and odor features, and classify and label the heterogeneous dataset according to the data source identifier.
[0110] In step S602, if the data source identifier matches the preset spectral type, the normalization algorithm is used to process the spectral signal to generate standardized spectral features, and wavelet transform and median filtering are used to denoise the standardized spectral features to obtain the purified spectral feature vector.
[0111] Step S603: If the data source identifier matches the preset image type, Gaussian filtering is used to denoise the image data, combined with size normalization, to obtain the standard image feature vector.
[0112] Step S604: If the data source identifier matches the preset odor type, the odor features are processed by feature discretization and mean-standard deviation normalization to obtain a standard odor feature vector.
[0113] Step S605: Construct a multimodal feature fusion matrix based on the purification spectral feature vector, standard image feature vector, and standard odor feature vector; the multimodal feature fusion matrix includes feature weights for the spectral dimension, image dimension, and odor dimension.
[0114] Step S606: Use a feature alignment algorithm to unify the dimensions of the multimodal feature fusion matrix to form a standardized multimodal feature set.
[0115] Specifically, a raw, multi-source, heterogeneous dataset containing food spectral signals, image data, and odor features is collected and classified based on data source identifiers. When the identifier matches a preset spectral type, a normalization algorithm is applied to the spectral signal to eliminate the effects of light intensity differences and baseline drift, generating standardized spectral features. Then, a combination of wavelet transform and median filtering is used for noise reduction. The multi-resolution analysis characteristics of wavelet transform are used to decompose the spectral signal, and median filtering is combined to suppress impulse noise, resulting in a purified spectral feature vector. If the identifier matches an image type, Gaussian filtering is applied to the image data to remove Gaussian noise, followed by size normalization to unify the image resolution to a preset size, generating a standard image feature vector. When the identifier matches an odor type, continuous odor feature values are divided into discrete intervals through feature discretization. A mean-standard deviation normalization method is then used to map the feature values to a standard range, obtaining a standard odor feature vector.
[0116] Subsequently, a multimodal feature fusion matrix is constructed based on the purified spectral feature vector, standard image feature vector, and standard odor feature vector. This matrix uses the spectral, image, and odor dimensions as row indices and the feature parameters of each dimension as column elements. The weights of corresponding features are determined by calculating the mutual information or contribution rate between features, achieving quantitative fusion of multi-source features. Finally, feature alignment algorithms (such as maximum mean difference or dynamic time warping) are used to unify the dimensions of the fusion matrix. Through interpolation, dimensionality reduction, or mapping operations, differences in dimension and scale between different modal features are eliminated, forming a standardized multimodal feature set.
[0117] This embodiment achieves accurate classification and targeted processing of multi-source heterogeneous data through data source identifier classification and labeling, avoiding data chaos caused by mixed processing. Dedicated preprocessing methods designed for different modal data characteristics (such as wavelet-median filtering for spectral noise reduction, Gaussian filtering and size normalization for images) maximize the preservation of effective features of each modality, improving data quality. The construction of the multimodal feature fusion matrix, through feature weight quantization, achieves the organic integration of cross-modal information, overcoming the information limitations of a single modality. The application of feature alignment algorithms solves the technical challenge of inconsistent feature dimensions across different modalities, ensuring that the fused feature set has good compatibility and analytical value. This provides a systematic data processing solution for multimodal food detection, effectively improving the accuracy and reliability of subsequent safety assessments.
[0118] In one embodiment, such as Figure 2 As shown, this application also provides a food multimodal detection data fusion and analysis device, which may include:
[0119] The feature preprocessing module 701 is used to acquire the original multi-source heterogeneous dataset including food spectral signals, image data and odor features. After normalization and noise filtering preprocessing, a standardized multimodal feature set is obtained.
[0120] The feature selection and extraction module 702 is used to classify the multimodal feature set using the support vector machine algorithm to generate a preliminary feature subset, extract target features from the preliminary feature subset to generate a structured feature description; it is also used to perform time series analysis on the structured feature description and calculate the overall security score, and output a qualified certification mark if the overall security score meets the preset threshold.
[0121] The security scoring and certification module 703 is used to construct an extended detection index set based on the overall security score. The constructed extended detection index set is input into the dynamic calculation model, and combined with blockchain time, a new version of qualified certification is obtained.
[0122] The assessment report generation module 704 is used to associate the new version of the qualification certification with historical certification records to generate an initial assessment report, perform adaptability verification on the initial assessment report and correct deviations to obtain an optimized assessment report.
[0123] The aforementioned food multimodal detection data fusion and analysis device comprises four modules: feature preprocessing, feature selection and extraction, safety scoring and certification, and evaluation report generation. The feature preprocessing module first acquires the original multi-source heterogeneous dataset of food spectral signals, image data, and odor characteristics. Through normalization and noise filtering preprocessing, it eliminates differences in data dimensions and interference noise, forming a standardized multimodal feature set. The feature selection and extraction module uses a support vector machine algorithm to classify the standardized feature set, selecting highly correlated features to form a subset. From this subset, target features are extracted to generate a structured description. Dynamic parameters such as temperature gradient and humidity fluctuations are then extracted from the description, and a quality trend vector is generated through time-series analysis. The overall safety score is calculated, and a qualified certification identifier is output. The safety scoring and certification module constructs an extended detection index set based on the safety score, inputs it into a dynamic calculation model to generate a certification status update link, and combines it with a blockchain timestamp to generate an immutable new version of the qualified certification. The evaluation report generation module links the new certification with historical records to generate an initial evaluation report containing traceability information. After rule-based adaptation verification and deviation correction, an optimized evaluation report is obtained.
[0124] This embodiment achieves end-to-end data processing through multi-module collaboration: feature preprocessing ensures standardization of multi-source data, laying the foundation for subsequent analysis; feature selection and extraction, combined with machine learning and time-series analysis, achieves precise quantification from feature dimensionality reduction to safety scoring; the safety scoring certification module, through dynamic modeling and blockchain technology, ensures the real-time nature and credibility of certification results; and the evaluation report generation module integrates historical data and the latest standards to form a traceable basis for decision-making. This effectively improves the accuracy, timeliness, and authority of food quality and safety testing, providing technical support for end-to-end supervision.
[0125] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0126] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the food multimodal detection data fusion analysis method, apparatus, device, and medium as described above.
[0127] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0128] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0129] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A method for fusion and analysis of multimodal food detection data, characterized in that, The method includes: The original multi-source heterogeneous dataset, including food spectral signals, image data, and odor features, was obtained. After normalization and noise filtering preprocessing, a standardized multimodal feature set was obtained. The multimodal feature set is classified using a support vector machine algorithm to generate a preliminary feature subset, and target features are extracted from the preliminary feature subset to generate a structured feature description; Perform time-series analysis on the structured feature description and calculate the overall security score. If the overall security score meets the preset threshold, output a qualified certification mark. Based on the overall security score, an extended detection index set is constructed. The constructed extended detection index set is input into a dynamic calculation model, and a new version of qualified certification is obtained by combining blockchain time. The new version of the qualification certification is associated with historical certification records to generate an initial evaluation report. The initial evaluation report is then subjected to adaptability verification and deviation correction to obtain an optimized evaluation report.
2. The method according to claim 1, characterized in that, The step of classifying the multimodal feature set using a support vector machine algorithm to generate a preliminary feature subset, and extracting target features from the preliminary feature subset to generate a structured feature description, includes: The multimodal feature set is classified using the support vector machine algorithm to obtain a preliminary feature subset; Based on the preliminary feature subset, the correlation coefficient between each feature is calculated, and features with correlation coefficients higher than a preset threshold are selected to obtain a highly correlated feature subset. Principal component analysis was used to reduce the dimensionality of the highly correlated feature subset to obtain the dimensionality reduction result. The dimensionality reduction result is subjected to feature fusion operation using a deep neural network to generate a comprehensive feature vector. The structural parameters of the deep neural network output layer are adjusted according to the vector dimension of the comprehensive feature vector to obtain the optimized feature representation; Extract a subset of target features from the optimized feature representation and generate a structured feature description containing feature correlation and dimensional information according to a preset format.
3. The method according to claim 2, characterized in that, The correlation coefficients among the features are calculated using the following formula: Where, ρ i,j f represents the correlation coefficient between feature i and feature j. i f j This represents the i-th and j-th eigenvectors within the feature subset. <f i ,f j > represents the vector dot product, ||·|| represents the vector L2 norm, and σ represents the adaptive scaling parameter. N represents the total number of features in the initial feature subset, k represents the preset number of nearest neighbors, and f represents the first k nearest neighbors of each feature. i,m Let represent the m-th nearest neighbor feature vector of the i-th feature, and α represent the adjustment coefficient, with a value range of [0.5, 2].
4. The method according to claim 1, characterized in that, The step of performing time-series analysis on the structured feature description and calculating the overall security score, and outputting a qualified certification identifier if the overall security score meets a preset threshold, includes: Extract dynamic change parameters, including temperature gradient, humidity fluctuation, and color shift values, from the structured feature description; The dynamic parameters are processed using a time-series analysis algorithm to obtain a quality status trend vector; The weighting coefficients of the quality assessment indicators are determined based on the quality status trend vector; the quality assessment indicators include temperature stability, humidity uniformity, and color retention. The overall safety score is obtained by calculating the quality assessment indicators using a weighted average method. The overall safety score is judged based on the preset safety standard value. If it meets the safety standard value, a qualified certification mark is output.
5. The method according to claim 1, characterized in that, The process involves constructing an extended detection index set based on the overall security score, inputting this extended detection index set into a dynamic calculation model, and combining it with blockchain time to obtain a new version of the qualification certification, including: An assessment level is generated based on the overall security score, and the assessment level is combined with the assessment time to generate an initial assessment result with a time-series dimension. The initial assessment results are decomposed into time-series features to extract trend, periodic and abrupt features. Combined with food quality correlation factors, parameters strongly correlated with safety status are selected as an extended detection index set. The extended detection index set is dynamically weighted and its features are fused based on a weight adaptive adjustment algorithm to construct a dynamic calculation model for optimizing food safety scores. The extended detection index set is input into the dynamic calculation model, and a real-time update link for the authentication status is constructed based on the output results; By combining the authentication status of the real-time update link with the authentication time of the blockchain evidence, a new version of qualified authentication with an immutable identifier is generated.
6. The method according to claim 1, characterized in that, The process of associating the new version of the qualification certification with historical certification records to generate an initial evaluation report, performing adaptability verification and correcting deviations on the initial evaluation report to obtain an optimized evaluation report includes: By associating the new version of the qualification certification with historical certification records, an extended report dataset containing traceability information is generated; The extended report dataset is used to filter highly correlated feature parameters and traceability records, and an initial evaluation report is generated by multi-dimensional data aggregation, which includes indicator fluctuation trend charts, anomaly annotations, and traceability links. Based on the dynamic evaluation criteria, the initial evaluation report is validated for rule adaptability, the deviation of indicator weights is corrected, and the missing evaluation dimensions are supplemented to obtain an optimized evaluation report.
7. The method according to claim 1, characterized in that, The method further includes: The raw multi-source heterogeneous dataset of food spectral signals, image data and odor features is acquired, and the heterogeneous dataset is classified and labeled according to the data source identifier; If the data source identifier matches the preset spectral type, the spectral signal is processed by a normalization algorithm to generate standardized spectral features, and the standardized spectral features are denoised by wavelet transform and median filtering to obtain a purified spectral feature vector. If the data source identifier matches the preset image type, the image data is processed by Gaussian filtering for noise reduction combined with size normalization to obtain a standard image feature vector. If the data source identifier matches a preset odor type, the odor features are processed by feature discretization and mean-standard deviation normalization to obtain a standard odor feature vector; A multimodal feature fusion matrix is constructed based on the purified spectral feature vector, the standard image feature vector, and the standard odor feature vector; the multimodal feature fusion matrix includes feature weights for the spectral dimension, the image dimension, and the odor dimension; The multimodal feature fusion matrix is dimension-unified using a feature alignment algorithm to form a standardized multimodal feature set.
8. A food multimodal detection data fusion and analysis device, characterized in that, The device includes: The feature preprocessing module is used to acquire the original multi-source heterogeneous dataset including food spectral signals, image data and odor features. After normalization and noise filtering preprocessing, a standardized multimodal feature set is obtained. The feature filtering and extraction module is used to classify the multimodal feature set using a support vector machine algorithm to generate a preliminary feature subset, extract target features from the preliminary feature subset to generate a structured feature description; it is also used to perform time series analysis on the structured feature description and calculate the overall security score, and output a qualified authentication identifier if the overall security score meets a preset threshold. The security scoring and certification module is used to construct an extended detection index set based on the overall security score, input the constructed extended detection index set into a dynamic calculation model, and combine it with blockchain time to obtain a new version of qualified certification. The evaluation report generation module is used to associate the new version of the qualification certification with historical certification records to generate an initial evaluation report, perform adaptability verification on the initial evaluation report and correct deviations to obtain an optimized evaluation report.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
A method and system for processing data of detection of fatty acids in food
CN122430502A