Safety traceability detection method based on health food

By using LDA algorithm and mutual information technology to analyze food information in food traceability technology, and build a traceability model, it solves the lack of food problems that are difficult to quickly identify in the existing technology. Essence

CN119379317AInactive Publication Date: 2025-01-28CHANGCHUN UNIV OF CHINESE MEDICINE +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411943220.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing food traceability technologies are difficult to process large amounts of data quickly, resulting in the inability to quickly identify the error links when food problems occur, resulting in problematic foods that may flow into the market, causing harm.

Method used

Adopt a safety traceability detection method based on health food, obtain and analyze food information, use the LDA algorithm to extract food name keywords, combine mutual information technology to analyze the related analysis, build a food traceability model, collect food information in real time, and conduct comparative analysis. Determine whether there is a problem with food.

Benefits of technology

The problem of fast traceability of food is realized, and the flow of food inflows in the market in time has been achieved, reducing food safety hazards, and improving supervision efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379317A_ABST
    Figure CN119379317A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of health food traceability, in particular to a safety traceability detection method based on health food, which comprises the following steps: S1, acquiring existing food information: acquiring recorded existing type health food information through a network, in the process, information of existing types of health food is acquired by logging in official websites of the State Market Supervision and Management Administration or the provincial market Supervision and Management department; s2, food information is analyzed, wherein the obtained health food information is classified and concluded; according to the designed safety traceability method, the food traceability model is firstly constructed, in the food production and circulation process, the constructed food traceability model can be compared with the produced and circulated food for analysis, in the process, food information does not need to be additionally processed, whether the food has problems or not can be rapidly obtained only through comparison, and the safety traceability method is simple and convenient to operate. The food with problems can be prevented from flowing into the market in time, and the harm of food problems is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of health food traceability, and in particular to a safety traceability detection method based on health food. Background Art

[0002] Health food refers to food that claims to have specific health functions or is intended to supplement vitamins or minerals. That is, it is suitable for consumption by specific groups of people, has the function of regulating body functions, is not intended to treat diseases, and does not cause any acute, subacute or chronic harm to the human body. In order to ensure the safety of health food, a food traceability system will be established to control health food.

[0003] For example, a food safety traceability method and device with an authorization announcement number of CN201810869301.6 and an authorization announcement date of 20210917, the method includes: obtaining ingredient identification information during food production, processing and transportation, the ingredient identification information including but not limited to production date, shelf life, storage conditions, and quality information; comparing the matching degree of the ingredient identification information with the corresponding pre-stored food safety standard data to detect whether the food is qualified; when it is detected that the food is unqualified, retrieving the ingredient identification information during the food production, processing and transportation process to determine the corresponding error link; when it is detected that the food is qualified, generating corresponding quality and safety assessment information based on the matching degree, and storing it in the blockchain; through the technical solution of the present invention, the quality and safety of food and anti-counterfeiting traceability are effectively guaranteed, which is beneficial to safeguarding the interests of consumers, and is also beneficial to standardizing industry systems and improving regulatory effects. Any food safety problems in any link can be certified on the blockchain, clarifying the responsible party and improving regulatory efficiency.

[0004] Although the food safety traceability methods mentioned above and in the prior art have achieved the purpose of traceability, with the advancement of science and technology, the types of food are becoming more and more diversified. Coupled with the development of logistics technology, the produced food will be sold all over the world, which leads to the need to process a large amount of data when tracing the food. Traditional food traceability will process all the information of the food to determine whether there is a problem with the food. However, due to the large amount of data, it is impossible to quickly determine the problematic link of the food through food traceability technology, resulting in problematic food still flowing into the market and causing greater harm. Therefore, it is necessary to design a safety traceability detection method based on health food to solve the above problems. Summary of the invention

[0005] The purpose of the present invention is to provide a safety traceability detection method based on health food to solve the above-mentioned deficiencies in the prior art.

[0006] In order to achieve the above object, the present invention provides the following technical solutions: The safety traceability detection method based on health food, the safety traceability detection method based on health food provided by the embodiment of the present invention, includes the following contents: S1. Obtaining existing food information: Obtaining the information of existing types of health food on record through the Internet. This process involves logging into the official website of the State Administration for Market Regulation or provincial market supervision and management departments to obtain information on existing types of health food; S2. Analyze food information: First, classify and summarize the acquired health food information. In this process, the food information is classified by the method of seeking common ground, and the classification results are divided into two types: food production information and food circulation and sales information. Then, the classified food information is analyzed. In this analysis process, the LDA algorithm is first used to extract the food name keywords from the classified and summarized data, and the specific steps of the LDA algorithm are as follows: S1-1. Data preparation: Assume that there are N samples, each with d features. At the same time, these samples are labeled into K different categories. All samples form a matrix X, where each row represents a sample, the jth column represents the jth feature of the sample, and the corresponding category labels form a vector y; S1-2. Calculate the category mean vector: For each category k, calculate its mean vector μ_k, where the j-th element of μ_k represents the average value of the samples belonging to category k on the j-th feature; S1-3. Calculate the intra-class scatter matrix: The intra-class scatter matrix S_w can be obtained by calculating the dispersion of each sample in each category. Specifically, for the kth category, calculate its scatter matrix S_k. S_k can be obtained by centering all samples belonging to the category and then calculating the covariance matrix. Finally, add up the scatter matrices of all categories to get the total intra-class scatter matrix S_w. S1-4. Calculate the inter-class scatter matrix: The inter-class scatter matrix S_b is used to measure the distance between different categories. The formula is S_b = Σ(N_k * (μ_k - μ) * (μ_k - μ)^T), where N_k represents the number of samples belonging to the kth category, and μ is the mean vector of all samples; S1-5. Calculate eigenvectors: By solving the generalized eigenvalue problem, the projection matrix W can be obtained. Each column of the matrix corresponds to an eigenvector. These eigenvectors correspond to the linear discriminants of the data in the low-dimensional space. Specifically, the eigenvectors corresponding to the first k largest eigenvalues ​​can be selected as the projection matrix W; S1-6. Dimensionality reduction: Multiply the data matrix X by the projection matrix W to map the high-dimensional data to a low-dimensional space. The reduced-dimensional data matrix Y = X×W; During the analysis process, the food name keywords are subsequently analyzed and processed through mutual information technology, and the calculation process mainly includes the following steps: S2-1. Define random variables: First, define the two random variables X and Y whose mutual information needs to be calculated; S2-2. Calculate the joint probability distribution: Determine the joint probability distribution p(x, y) of random variables X and Y; S2-3. Calculate marginal probability distribution: Calculate the marginal probability distribution p(x) and p(y) of random variables X and Y; S2-4. Apply the mutual information formula: Calculate the mutual information I(X; Y) using the definition formula of mutual information; the formula is: I(X;Y)=∫∫p(x,y)log( p(x)p(y)p(x,y) )dxdy; For continuous random variables, the summation becomes an integration; S2-5. Result explanation: The value of mutual information indicates the degree of information sharing between two random variables. The larger the mutual information, the stronger the correlation between the two variables. A mutual information of 0 indicates that the two variables are independent, that is, there is no shared information between them. It should be noted that the method of seeking similarities is also called the method of matching. Its content is that if in several occasions when the phenomenon under study occurs, other related situations are different, and only one situation is the same, then it is concluded that there is a causal relationship between the only same situation and the phenomenon under study. LDA (Latent Dirichlet Allocation) is a topic model that allows each document in an observed text collection to be interpreted as a random mixture of a set of unobserved latent topics. In short, LDA provides a way to automatically discover topics from a document collection. The basic idea behind LDA is that documents are generated by a mixture of a set of specific topics, and each topic is generated by a mixture of a set of specific words. S3. Constructing a food traceability model: According to the above analysis of food information, a traceability model program is constructed. The traceability model is divided into a data receiving module, a data analysis module, and a data feedback module. The data receiving module is constructed by blockchain technology, the data feedback module is established by information pop-up window technology, and the data analysis module is established by data comparison technology; S4. Real-time collection of food information: monitoring the production, circulation and sale of food through monitoring technology, the monitoring technology is RFID technology, the monitoring technology can record the production, circulation and sale of food, and obtain food information in real time; S5. The traceability model analyzes the collected food information: The traceability model receives the food information collected by the monitoring technology, and compares and analyzes the food information to determine whether there is a problem with the food. The data receiving module can obtain the food information recorded by the monitoring technology through scanning technology; the data analysis module compares the known food production information and circulation and sales information stored in the traceability model with the food production information and circulation and sales information recorded by the monitoring technology through comparison technology, and the comparison formula is as follows: ; Among them, P is the ratio of food production information recorded by monitoring technology to known identical food production information stored in the traceability model, specifically the comparison of quality inspection results, nutritional ingredients results and other data comparisons that affect food safety during food processing. When P is less than 1, there are problems in food production that affect food safety. F is the ratio of the food circulation and sales information recorded by the monitoring technology to the known identical food circulation and sales information stored in the traceability model, specifically, the comparison of the storage time during the circulation and sales process, the comparison of whether there is damage during the circulation and sales process, the comparison of the storage environment, and other data that affect food safety during the food circulation and sales process. When F is less than 1, there are problems affecting food safety in the food circulation and sales process. S6. The traceability model generates a solution based on the analysis results: When the traceability model determines that there is a problem with the food information, the traceability model will send the relevant food information to the relevant personnel, and the data feedback module will send text messages to provide information feedback. When the traceability model determines that there is no problem with the food information, there is no problem with the food.

[0007] In the above technical scheme, the safety traceability detection method based on health food provided by the present invention has the following beneficial effects: The safety traceability method designed by the present invention first constructs a food traceability model. During the food production and circulation process, the constructed food traceability model can be compared and analyzed with the produced and circulated food. Since this process does not require additional processing of food information, it only needs comparison to quickly determine whether there is a problem with the food. It can timely prevent problematic food from entering the market, thereby reducing the harm of food problems.

[0008] The safety traceability method designed by the present invention can not only quickly trace the source of food, but also can promptly send pop-up information to food-related personnel through the data feedback module during tracing, so that workers can deal with problematic food in time and avoid food from entering the market and causing greater harm. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0010] Figure 1 A schematic diagram of a method flow chart provided for an embodiment of a method for safety traceability detection of health food according to the present invention.

[0011] Figure 2 A schematic diagram of the traceability model structure provided in an embodiment of the safety traceability detection method for health food of the present invention.

[0012] Figure 3 A schematic diagram of food information classification provided in an embodiment of the method for safety traceability detection of health food according to the present invention. DETAILED DESCRIPTION

[0013] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0014] like Figure 1-3 As shown, the safety traceability detection method based on health food provided by the embodiment of the present invention includes the following contents: S1. Obtaining existing food information: Obtaining the information of existing types of health food on record through the Internet. This process involves logging into the official website of the State Administration for Market Regulation or provincial market supervision and management departments to obtain information on existing types of health food; S2. Analyze food information: First, classify and summarize the acquired health food information. In this process, the food information is classified by the method of seeking common ground, and the classification results are divided into two types: food production information and food circulation and sales information. Then, the classified food information is analyzed. In this analysis process, the LDA algorithm is first used to extract the food name keywords from the classified and summarized data, and the specific steps of the LDA algorithm are as follows: S1-1. Data preparation: Assume that there are N samples, each with d features. At the same time, these samples are labeled into K different categories. All samples form a matrix X, where each row represents a sample, the jth column represents the jth feature of the sample, and the corresponding category labels form a vector y; S1-2. Calculate the category mean vector: For each category k, calculate its mean vector μ_k, where the j-th element of μ_k represents the average value of the samples belonging to category k on the j-th feature; S1-3. Calculate the intra-class scatter matrix: The intra-class scatter matrix S_w can be obtained by calculating the dispersion of each sample in each category. Specifically, for the kth category, calculate its scatter matrix S_k. S_k can be obtained by centering all samples belonging to the category and then calculating the covariance matrix. Finally, add up the scatter matrices of all categories to get the total intra-class scatter matrix S_w. S1-4. Calculate the inter-class scatter matrix: The inter-class scatter matrix S_b is used to measure the distance between different categories. The formula is S_b = Σ(N_k * (μ_k - μ) * (μ_k - μ)^T), where N_k represents the number of samples belonging to the kth category, and μ is the mean vector of all samples; S1-5. Calculate eigenvectors: By solving the generalized eigenvalue problem, the projection matrix W can be obtained. Each column of the matrix corresponds to an eigenvector. These eigenvectors correspond to the linear discriminants of the data in the low-dimensional space. Specifically, the eigenvectors corresponding to the first k largest eigenvalues ​​can be selected as the projection matrix W; S1-6. Dimensionality reduction: Multiply the data matrix X by the projection matrix W to map the high-dimensional data to a low-dimensional space. The reduced-dimensional data matrix Y = X×W; During the analysis process, the food name keywords are subsequently analyzed and processed through mutual information technology, and the calculation process mainly includes the following steps: S2-1. Define random variables: First, define the two random variables X and Y whose mutual information needs to be calculated; S2-2. Calculate the joint probability distribution: Determine the joint probability distribution p(x, y) of random variables X and Y; S2-3. Calculate marginal probability distribution: Calculate the marginal probability distribution p(x) and p(y) of random variables X and Y; S2-4. Apply the mutual information formula: Calculate the mutual information I(X; Y) using the definition formula of mutual information; the formula is: I(X;Y)=∫∫p(x,y)log( p(x)p(y)p(x,y) )dxdy; For continuous random variables, the summation becomes an integration; S2-5. Result explanation: The value of mutual information indicates the degree of information sharing between two random variables. The larger the mutual information, the stronger the correlation between the two variables. A mutual information of 0 indicates that the two variables are independent, that is, there is no shared information between them. It should be noted that the method of seeking similarities is also called the method of matching. Its content is that if in several occasions when the phenomenon under study occurs, other related situations are different, and only one situation is the same, then it is concluded that there is a causal relationship between the only same situation and the phenomenon under study. LDA (Latent Dirichlet Allocation) is a topic model that allows each document in an observed text collection to be interpreted as a random mixture of a set of unobserved latent topics. In short, LDA provides a way to automatically discover topics from a document collection. The basic idea behind LDA is that documents are generated by a mixture of a set of specific topics, and each topic is generated by a mixture of a set of specific words. S3. Constructing a food traceability model: According to the above analysis of food information, programming is performed to construct a traceability model program. The traceability model is divided into a data receiving module, a data analysis module, and a data feedback module. The data receiving module is constructed by blockchain technology, the data feedback module is established by information pop-up window technology, and the data analysis module is established by data comparison technology; S4. Real-time collection of food information: Monitor the production, circulation and sale of food through monitoring technology. The monitoring technology is RFID technology. The monitoring technology can record the production, circulation and sale of food and obtain food information in real time; S5. The traceability model analyzes the collected food information: The traceability model receives the food information collected by the monitoring technology, and compares and analyzes the food information to determine whether there is a problem with the food. The data receiving module can obtain the food information recorded by the monitoring technology through scanning technology; the data analysis module compares the known food production information and circulation and sales information stored in the traceability model with the food production information and circulation and sales information recorded by the monitoring technology through comparison technology, and the comparison formula is as follows: ; Among them, P is the ratio of food production information recorded by monitoring technology to known identical food production information stored in the traceability model, specifically the comparison of quality inspection results, nutritional ingredients results and other data comparisons that affect food safety during food processing. When P is less than 1, there are problems in food production that affect food safety. F is the ratio of the food circulation and sales information recorded by the monitoring technology to the known identical food circulation and sales information stored in the traceability model, specifically, the comparison of the storage time during the circulation and sales process, the comparison of whether there is damage during the circulation and sales process, the comparison of the storage environment, and other data that affect food safety during the food circulation and sales process. When F is less than 1, there are problems affecting food safety in the food circulation and sales process. S6. The traceability model generates a solution based on the analysis results: When the traceability model determines that there is a problem with the food information, the traceability model will send the relevant food information to the relevant personnel, and the data feedback module will send text messages to provide information feedback. When the traceability model determines that there is no problem with the food information, there is no problem with the food.

[0015] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A safety traceability detection method based on health food, characterized in that: Includes the following: S1. Obtain existing food information: obtain the information of existing types of health food on record through the Internet; S2. Analyze food information: first classify and summarize the acquired health food information, and then analyze the classified food information; S3. Constructing a food traceability model: programming based on the above analysis of food information to construct a traceability model program; S4. Real-time collection of food information: Monitor the production, circulation and sale of food through monitoring technology to obtain food information in real time; S5. The traceability model analyzes the collected food information: The traceability model receives the food information collected by the monitoring technology and compares and analyzes the food information to determine whether there is any problem with the food; S6. The traceability model generates a solution based on the analysis results: When the traceability model determines that there is a problem with the food information, the traceability model will send the relevant food information to the relevant personnel. When the traceability model determines that there is no problem with the food information, there is no problem with the food.

2. The safety traceability detection method based on health food according to claim 1, characterized in that: In the step S1, the information of existing types of health food is obtained by logging into the official website of the State Administration for Market Regulation or the provincial market supervision and management department.

3. The safety traceability detection method based on health food according to claim 1, characterized in that: In the step S2, the food information is classified by the method of seeking common ground, and the classification results are divided into two types: food production information and food circulation and sales information.

4. The safety traceability detection method based on health food according to claim 1, characterized in that: In the analysis process of step S2, the classified and summarized data is firstly processed by LDA algorithm to extract food name keywords, and the LDA algorithm steps are specifically as follows: S1-1. Data preparation: Assume that there are N samples, each with d features. At the same time, these samples are labeled into K different categories. All samples form a matrix X, where each row represents a sample, the jth column represents the jth feature of the sample, and the corresponding category labels form a vector y; S1-2. Calculate the category mean vector: For each category k, calculate its mean vector μ_k, where the j-th element of μ_k represents the average value of the samples belonging to category k on the j-th feature; S1-3. Calculate the intra-class scatter matrix: The intra-class scatter matrix S_w can be obtained by calculating the dispersion of each sample in each category. Specifically, for the kth category, calculate its scatter matrix S_k. S_k can be obtained by centering all samples belonging to the category and then calculating the covariance matrix. Finally, add up the scatter matrices of all categories to get the total intra-class scatter matrix S_w. S1-4. Calculate the inter-class scatter matrix: The inter-class scatter matrix S_b is used to measure the distance between different categories. The formula is S_b = Σ(N_k * (μ_k - μ) * (μ_k - μ)^T), where N_k represents the number of samples belonging to the kth category, and μ is the mean vector of all samples; S1-5. Calculate eigenvectors: By solving the generalized eigenvalue problem, the projection matrix W can be obtained. Each column of the matrix corresponds to an eigenvector. These eigenvectors correspond to the linear discriminants of the data in the low-dimensional space. Specifically, the eigenvectors corresponding to the first k largest eigenvalues ​​can be selected as the projection matrix W; S1-6. Dimensionality reduction: Multiply the data matrix X by the projection matrix W to map the high-dimensional data to a low-dimensional space. The reduced-dimensional data matrix Y = X×W.

5. The method for safety traceability detection of health food according to claim 1, characterized in that: In the analysis process in step S2, the food name keywords are subsequently subjected to correlation analysis by mutual information technology, and the calculation process mainly includes the following steps: S2-1. Define random variables: First, define the two random variables X and Y whose mutual information needs to be calculated; S2-2. Calculate the joint probability distribution: Determine the joint probability distribution p(x, y) of random variables X and Y; S2-3. Calculate marginal probability distribution: Calculate the marginal probability distribution p(x) and p(y) of random variables X and Y; S2-4. Apply the mutual information formula: Calculate the mutual information I(X; Y) using the definition formula of mutual information; the formula is: I(X;Y)=∫∫p(x,y)log( p(x)p(y)p(x,y) )dxdy; For continuous random variables, the summation becomes an integration; S2-5. Result explanation: The value of mutual information indicates the degree of information sharing between two random variables. The larger the mutual information, the stronger the correlation between the two variables. A mutual information of 0 indicates that the two variables are independent, that is, there is no shared information between them.

6. The method for tracing the safety of health food according to claim 1, characterized in that: In step S3, the traceability model is divided into a data receiving module, a data analysis module, and a data feedback module. The data receiving module is constructed by blockchain technology, the data feedback module is established by information pop-up window technology, and the data analysis module is established by data comparison technology.

7. The method for safety traceability detection of health food according to claim 6, characterized in that: The monitoring technology in step S4 is RFID technology, which can record the production, circulation and sales of food.

8. The method for safety traceability detection of health food according to claim 7, characterized in that: During step S5, the data receiving module can obtain the food information recorded by the monitoring technology through scanning technology.

9. The method for safety traceability detection of health food according to claim 6, characterized in that: In step S5, the data analysis module compares the known food production information and circulation and sales information stored in the traceability model with the food production information and circulation and sales information recorded by the monitoring technology through comparison technology, and the comparison formula is as follows: ; Among them, P is the ratio of food production information recorded by monitoring technology to known identical food production information stored in the traceability model, specifically the comparison of quality inspection results, nutritional ingredients results and other data comparisons that affect food safety during food processing. When P is less than 1, there are problems in food production that affect food safety. F is the ratio of the food circulation and sales information recorded by the monitoring technology to the known identical food circulation and sales information stored in the traceability model. Specifically, it includes comparison of the storage time during the circulation and sales process, comparison of whether there is damage during the circulation and sales process, comparison of the storage environment, and other data that affect food safety during the food circulation process. When F is less than 1, there are problems in the food circulation that affect food safety.

10. The method for safety traceability detection of health food according to claim 6, characterized in that: When there is a problem with the food in step S6, the data feedback module will send a text message to provide information feedback.

Citation Information

Patent Citations

  • Food safety traceability methods and devices

    CN109214829B

  • Food safety traceability method and device

    CN109214829A

  • Beef food safety traceability management system

    CN118521326A

  • Food quality safety traceability system and method

    CN118569886A