Data processing method and system for food information traceability
By calculating the freshness of food and the loss of comprehensive nutritional ingredients, the quality score of food is obtained, which solves the problem that the existing food information traceability system cannot fully reflect the quality of food, and achieves a more intuitive food quality and safety assessment.
Patent Information
- Application Number
- CN202510678584.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-06-27
AI Technical Summary
The existing food information traceability system cannot fully reflect the overall quality of food, lacks a dynamic and comprehensive scoring mechanism, and it is difficult to intuitively understand the quality and safety of food.
By obtaining the production date, shelf life and nutritional ingredients of the food, the freshness of the food and the loss of the comprehensive nutritional ingredients are calculated, and the quality score of the food is calculated based on these indicators.
It has achieved a more intuitive understanding of the quality and safety of food through quality scores, and solved the problem that the existing system cannot fully reflect the overall quality of food.
Smart Images

Figure CN120218957A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and specifically relates to a data processing method and system for food information traceability. Background Art
[0002] The food information traceability system ensures the transparency of food safety and quality management by recording and tracking each link of food from production to consumption. It can not only timely discover and solve food safety problems, enhance consumers' trust, but also improve the efficiency of the supply chain and the accuracy of supervision. This system helps enterprises optimize production processes, prevent the circulation of counterfeit and shoddy products, and promote the standardization and sustainable development of the industry, becoming an important tool for ensuring food safety and promoting social responsibility.
[0003] The current food information traceability system mainly provides some basic information of food, such as production date, raw material source, manufacturer, etc. Although these information help to ensure the traceability of food, they cannot comprehensively reflect the overall quality of food. Summary of the Invention
[0004] In order to solve the technical problem that the existing food information traceability system cannot comprehensively reflect the overall quality of food, the purpose of the present invention is to provide a data processing method and system for food information traceability, and the specific technical solutions adopted are as follows:
[0005] In the first aspect of the present disclosure, a data processing method for food information traceability is provided, and the method includes:
[0006] Obtain the production date, shelf life, and nutritional components of each food at the current moment;
[0007] Calculate the freshness of each food at the current moment according to the production date and the shelf life;
[0008] Calculate the comprehensive nutritional component loss degree of each food at the current moment according to the nutritional components;
[0009] Calculate the quality score of each food at the current moment according to the freshness and the comprehensive nutritional component loss degree.
[0010] In one embodiment, the nutritional components include: the content of different types of vitamins and the loss rate of each vitamin. The obtaining of the nutritional components of each food at the current moment includes:
[0011] Perform the following steps on each food:
[0012] Check the content of each vitamin in the current food at preset time intervals until the shelf life of the current food is detected;
[0013] Obtain the reduced content of each vitamin at each preset time interval according to the content of each vitamin;
[0014] According to the reduced content of each vitamin corresponding to each preset time interval and the content of each vitamin, obtain the loss ratio of each vitamin corresponding to each preset time interval;
[0015] Obtain the loss rate of each vitamin of the current food according to all the loss ratios.
[0016] In one embodiment, calculating the freshness of each food at the current moment according to the production date and the shelf life includes:
[0017] Obtain the remaining shelf life of each food at the current moment according to the shelf life, the current moment and the production date;
[0018] Obtain the freshness of each food at the current moment according to the remaining shelf life and the shelf life.
[0019] In one embodiment, calculating the comprehensive nutrient loss degree of each food at the current moment according to the nutrient components includes:
[0020] Perform the following steps for each food:
[0021] Obtain the types of vitamins of the current food at the current moment;
[0022] Obtain the content of each of the vitamins of the current food at the current moment;
[0023] Obtain the total content of all the vitamins according to the content of each of the vitamins;
[0024] Obtain the nutrient loss degree of each of the vitamins of the current food at the current moment;
[0025] Obtain the comprehensive nutrient loss degree of the current food at the current moment according to the vitamin types, the content of each vitamin, the total content and the nutrient loss degree.
[0026] In one embodiment, obtaining the comprehensive nutrient loss degree of the current food at the current moment according to the vitamin types, the content of each vitamin, the total content and the nutrient loss degree includes:
[0027] Obtain the ratio of the content of each vitamin of the current food at the current moment to the total content;
[0028] Obtain the product of the ratio and the corresponding degree of loss of the nutrient component;
[0029] Obtain the comprehensive degree of loss of nutrient components of the current food at the current moment according to all the products and the types of vitamins.
[0030] In one embodiment, obtaining the degree of loss of nutrient components of each vitamin of the current food at the current moment includes:
[0031] Obtain the degree of loss of nutrient components of each vitamin of the current food at the current moment according to the loss rate of each vitamin of the current food at the current moment and the corresponding production date.
[0032] In one embodiment, obtaining the degree of loss of nutrient components of each vitamin of the current food at the current moment according to the loss rate of each vitamin of the current food at the current moment and the corresponding production date includes:
[0033] Perform the following steps for each vitamin:
[0034] Obtain the loss rate of the current type of vitamin of the current food at the current moment and the loss rate of the current type of vitamin of the current food per unit time for the preset duration;
[0035] Obtain the difference between the current moment and the production date of the current food at the current moment;
[0036] Obtain the degree of loss of the nutrient components of the current type of vitamin of the current food at the current moment according to the loss rate per unit time and the difference.
[0037] In one embodiment, calculating the quality score of each food at the current moment according to the freshness and the comprehensive degree of loss of nutrient components includes:
[0038] Perform the following steps for each food:
[0039] Obtain the ratio between the freshness of the current food at the current moment and the corresponding comprehensive degree of loss of nutrient components;
[0040] Normalize the ratio to obtain the quality score of the current food at the current moment.
[0041] In a second aspect of the present disclosure, there is provided a data processing system for food information traceability, and the system includes:
[0042] An acquisition module, configured to acquire the production date, shelf life, and nutrient components of each food at the current moment;
[0043] A freshness calculation module, configured to calculate the freshness of each food at the current moment according to the production date and the shelf life;
[0044] A comprehensive nutrient loss degree calculation module, configured to calculate the comprehensive nutrient loss degree of each food at the current moment according to the nutrients;
[0045] A quality score calculation module, configured to calculate the quality score of each food at the current moment according to the freshness and the comprehensive nutrient loss degree.
[0046] In one embodiment, the nutrients include: the content of different types of vitamins and the loss rate of each vitamin. The acquisition module is specifically configured to:
[0047] Perform the following steps for each food:
[0048] Check the content of each vitamin in the current food at preset time intervals until the shelf life of the current food is detected;
[0049] Obtain the reduced content of each vitamin at each preset time interval according to the content of each vitamin;
[0050] Obtain the loss ratio of each vitamin at each preset time interval according to the reduced content of each vitamin and the content of each vitamin at each preset time interval;
[0051] Obtain the loss rate of each vitamin of the current food according to all the loss ratios.
[0052] In one embodiment, the freshness calculation module is specifically configured to:
[0053] Obtain the remaining shelf life of each food at the current moment according to the shelf life, the current moment and the production date;
[0054] Obtain the freshness of each food at the current moment according to the remaining shelf life and the shelf life.
[0055] In one embodiment, the comprehensive nutrient loss degree calculation module is specifically configured to:
[0056] Perform the following steps for each food:
[0057] Obtain the types of vitamins of the current food at the current moment;
[0058] Obtain the content of each vitamin of the current food at the current moment;
[0059] Obtain the total content of all the vitamins according to the content of each of the vitamins.
[0060] Obtain the degree of nutrient loss of each of the vitamins in the current food at the current moment.
[0061] According to the vitamin types, the content of each of the vitamins, the total content, and the degree of nutrient loss, obtain the comprehensive degree of nutrient loss of the current food at the current moment.
[0062] In one embodiment, in terms of obtaining the comprehensive degree of nutrient loss of the current food at the current moment according to the vitamin types, the content of each of the vitamins, the total content, and the degree of nutrient loss, the comprehensive degree of nutrient loss calculation module is specifically configured to:
[0063] Obtain the ratio of the content of each vitamin in the current food at the current moment to the total content.
[0064] Obtain the product of the ratio and the corresponding degree of nutrient loss.
[0065] According to all the products and the vitamin types, obtain the comprehensive degree of nutrient loss of the current food at the current moment.
[0066] In one embodiment, in terms of obtaining the degree of nutrient loss of each of the vitamins in the current food at the current moment, the comprehensive degree of nutrient loss calculation module is specifically configured to:
[0067] According to the loss rate of each vitamin in the current food at the current moment and the corresponding production date, obtain the degree of nutrient loss of each of the vitamins in the current food at the current moment.
[0068] In one embodiment, in terms of obtaining the degree of nutrient loss of each of the vitamins in the current food at the current moment according to the loss rate of each vitamin in the current food at the current moment and the corresponding production date, the comprehensive degree of nutrient loss calculation module is specifically configured to:
[0069] Perform the following steps for each of the vitamins:
[0070] Obtain the loss rate of the current type of vitamin in the current food at the current moment and the loss rate of the current type of vitamin in the current food per unit time for the preset duration.
[0071] Obtain the difference between the current moment and the production date of the current food at the current moment.
[0072] Obtain the degree of loss of the nutrient components of the current type of vitamin in the current food at the current moment based on the loss rate within the unit time and the difference.
[0073] In one embodiment, the quality score calculation module is specifically configured to:
[0074] Perform the following steps for each food:
[0075] Obtain the ratio between the freshness of the current food at the current moment and the corresponding degree of loss of the comprehensive nutrient components;
[0076] Normalize the ratio to obtain the quality score of the current food at the current moment.
[0077] The present invention has the following beneficial effects:
[0078] The present invention calculates the freshness and the degree of loss of the comprehensive nutrient components of each food according to the production date, shelf life, and nutrient components of each food, and then calculates the quality score of each food according to the freshness and the degree of loss of the comprehensive nutrient components of each food. Through the quality score, the quality and safety of the food can be more intuitively understood, and the problem that the information provided by the current food information traceability system cannot comprehensively reflect the overall quality of the food is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0080] Figure 1 is the flowchart of a data processing method for food information traceability provided by an embodiment of the present invention Figure 1 ;
[0081] Figure 2 is the flowchart of a data processing method for food information traceability provided by an embodiment of the present invention Figure 2 ;
[0082] Figure 3 is a schematic diagram of each time corresponding to the food provided by an embodiment of the present invention;
[0083] Figure 4 is the flowchart of a data processing method for food information traceability provided by an embodiment of the present invention Figure 3 ;
[0084] Figure 5 The flowchart of a data processing method for food information traceability provided by an embodiment of the present invention Figure 4 ;
[0085] Figure 6 The flowchart of a data processing method for food information traceability provided by an embodiment of the present invention Figure 5 ;
[0086] Figure 7 The schematic diagram showing the display of quality scores provided by an embodiment of the present invention;
[0087] Figure 8 The schematic diagram of the functional modules of a data processing system for food information traceability provided by an embodiment of the present invention. Detailed implementation manners
[0088] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features and effects of a data processing method and system for food information traceability proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0089] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0090] A food information traceability system is a system that uses information technology to collect, record and manage information in the entire supply chain process of food from raw material procurement, production and processing, warehousing and logistics to the sales terminal, so as to achieve traceability of food information.
[0091] In the raw material procurement link, the system records the source of raw materials, including supplier information, origin, picking or fishing time, etc. Environmental data such as the soil and water source of the origin of vegetables may also be included. In the production and processing stage, the processing technology, production equipment, operators, additive usage, time nodes of each link, etc. are recorded in detail. For example, the mixing and stirring duration of flour, baking temperature and time in bread making. During warehousing and logistics, the storage conditions of food such as temperature and humidity, transport vehicle information, transport route, residence time at each stage, etc. are tracked. For example, the real-time temperature monitoring data during the transportation of cold chain food. The sales terminal records the product shelf time, sales destination, consumer feedback, etc.
[0092] Through the food information traceability system, consumers can obtain detailed food information by scanning the code or entering the product code, etc.
[0093] However, the current food information traceability system lacks a dynamic and comprehensive scoring mechanism and cannot fully reflect the overall quality of food. Consumers cannot intuitively understand the quality and safety of food by simply viewing this basic information. Such an information presentation method may lack sufficient basis for customers when making purchase decisions and it is difficult to judge at a glance whether the food meets their quality standards and health needs.
[0094] To solve the above technical problems, the present invention provides a data processing method and system for food information traceability. The following specifically describes the specific solutions of a data processing method and system for food information traceability provided by the present invention in conjunction with the accompanying drawings.
[0095] Please refer to Figure 1 , which shows a flowchart of a data processing method for food information traceability provided by an embodiment of the present invention. The method includes steps S101 - S104:
[0096] Step S101, obtain the production date, shelf life, and nutritional components of each food at the current moment.
[0097] The production date and shelf life of each food at the current moment can be obtained from the database storing food information by the manufacturer, and the database is consistent with the information source on the product packaging.
[0098] In one embodiment, the nutritional components include: the content of different types of vitamins and the loss rate of each vitamin. Obtaining the nutritional components of each food at the current moment includes performing the following sub - steps S1011 - S1014 on each food:
[0099] S1011, check the content of each vitamin in the current food at preset time intervals until the shelf life of the current food is reached.
[0100] When checking the content of each vitamin in the current food, it can be checked manually by inspectors, or by traditional high - performance liquid chromatography (HPLC) technology, or by near - infrared spectroscopy analysis technology. It should be noted that the analysis of nutritional components in this application is not limited to vitamins. Vitamins are only used as an embodiment of the present invention, and other nutritional components can be calculated using the same method and can be adjusted according to the specific implementation environment, and will not be further elaborated here.
[0101] Traditional high-performance liquid chromatography (HPLC) technology can accurately separate and determine various vitamins in food. When detecting vitamin C, the food sample is pretreated and then injected into the HPLC system. According to the retention time and response value of different vitamins in the chromatographic column, their contents can be accurately determined.
[0102] Near-infrared spectroscopy analysis technology measures the absorption spectrum of food in the near-infrared band and uses chemometric methods to establish a mathematical model between the spectrum and the vitamin content, thereby quickly calculating the contents of various vitamins.
[0103] S1012. Obtain the reduced content of each vitamin at each preset time interval according to the content of each vitamin.
[0104] Exemplarily, the preset time interval can be 1 week, or 3 days, or 4 days. The present disclosure does not limit the specific value of the preset time interval.
[0105] In another specific implementation manner of the embodiment of the present invention, the preset time interval is adaptively adjusted according to the shelf life of the food; when the shelf life of the food is less than or equal to seven days, the result obtained by rounding up one-third of the shelf life is used as the preset time interval; when the shelf life of the food is greater than seven days and less than or equal to ninety days, the result obtained by rounding up one-fifth of the shelf life is used as the preset time interval; when the shelf life of the food is greater than ninety days, the result obtained by rounding up one-tenth of the shelf life is used as the preset time interval.
[0106] S1013. Obtain the loss ratio of each vitamin corresponding to each preset time interval according to the reduced content of each vitamin corresponding to each preset time interval and the content of each vitamin.
[0107] S1014. Obtain the loss rate of each vitamin of the current food according to all the loss ratios.
[0108] Taking the preset time interval of one week as an example for illustration:
[0109] Check the content of each vitamin in different foods every other week, and then obtain the reduced content of each vitamin in different foods (subtract the content after detection from the content before detection). Divide the reduced content of each vitamin per week by the content of each vitamin before detection per week to obtain the loss ratio of each vitamin per week in the food until the food expires. Take the average value of the loss ratios of each vitamin in all weeks of the food as the loss rate of each vitamin of the food.
[0110] It should be noted that: through the above process, relevant data on the loss rate of each vitamin in each food are obtained. If the shelf life of the food is less than one week, the calculation is carried out on a daily basis.
[0111] Step S102: Calculate the freshness of each food at the current moment based on the production date and shelf life.
[0112] Under normal circumstances, the farther a food is from its expiration date, the higher its quality tends to be. Take fresh fruits as an example. When an apple is just picked, its skin is smooth, its color is bright, and when you take a bite, the juice is full and the fruit fragrance is overflowing. This is because when the apple has not been stored for a long time, rich nutrients such as vitamin C and cellulose inside are fully retained. As time goes by and the storage time becomes longer, vitamin C will gradually oxidize and be lost, and the cellulose structure will also change, resulting in the taste no longer being as crispy and juicy as at the beginning, and the flavor will gradually become dull. Similarly, for baked goods, when the bread is just out of the oven, its texture is soft, the wheat fragrance is strong, and the taste is excellent. But after a long time of storage, the moisture in the bread is lost, the starch ages, the taste becomes dry and hard, and the original strong wheat fragrance is also greatly weakened.
[0113] When determining the expiration date of food, manufacturers will comprehensively consider the best consumption period of the food. They will use professional food science knowledge and a large amount of experimental data to analyze the quality change rules of food under different storage conditions. For example, for milk, in a low-temperature refrigerated environment, its nutrients such as protein and calcium are relatively stable, and the growth rate of microorganisms is slow, and it can maintain good quality for a long time. In a normal temperature environment, the reproduction of microorganisms accelerates, and the milk will soon deteriorate, and the nutrients will also be damaged. Therefore, based on these research results, manufacturers set the expiration date of milk, which also means that within a reasonable period before the expiration date, such as milk within the shelf life under refrigeration conditions, its protein structure is complete, the taste is smooth, and the nutrition is rich, and it should be in a state of high quality.
[0114] Therefore, when evaluating food quality, the freshness of food is an essential key consideration factor. Whether from the perspective of consumers pursuing deliciousness and nutrition or from the aspect of the food industry ensuring product quality, the freshness of food needs to be highly emphasized. Only by incorporating freshness into the quality evaluation system can we comprehensively and accurately judge the quality of food and provide consumers with a more reliable basis for product selection.
[0115] In one embodiment, as Figure 2 shown, in step S102, calculating the freshness of each food at the current moment based on the production date and shelf life includes the following steps S1021 - S1022:
[0116] S1021: Obtain the remaining shelf life of each food at the current moment according to the shelf life, the current moment, and the production date.
[0117] S1022: Obtain the freshness of each food at the current moment according to the remaining shelf life and the shelf life.
[0118] As Figure 3 shown, taking the th food at the current moment as an example, the specific calculation formula for the freshness degree of the th food at the current moment is:
[0119] ;
[0120] Among them, represents the freshness degree of the th food at the current moment; represents the current moment; represents the production date of the th food at the current moment; The th food at the current moment's shelf life.
[0121] It should be noted that: is the remaining shelf life. The longer the remaining shelf life of the th food at the current moment, the greater the freshness degree of the th food at the current moment.
[0122] Taking fresh fruits and vegetables as an example, like strawberries that have been picked not long ago, their remaining shelf life is relatively long. At this time, the strawberry skin is bright, the fruits are plump and juicy, and they emit a strong fruity aroma. This is because the time elapsed from when the strawberries were picked to the present is short. During storage, due to limited time, the influence of environmental factors such as temperature and humidity is relatively small. The nutrients such as vitamin C and anthocyanins rich in strawberries are not greatly damaged, the taste is still sweet and sour, and the flavor also retains the natural sweetness, thus presenting a very high freshness level.
[0123] Looking at processed foods again, such as potato chips. Just-produced potato chips have a sufficient remaining shelf life. The potato chips are crispy in texture, evenly seasoned, and have a strong potato aroma. As time goes by, if the storage environment is not good, such as too high temperature, the oil contained in the potato chips may oxidize, resulting in the texture no longer being crispy and the flavor being greatly reduced. However, in the stage with a relatively long remaining shelf life, the potato chips are less affected by the external environment, and their internal quality elements are well maintained, with a relatively high freshness degree.
[0124] For dairy products, taking milk as an example, when its remaining shelf life is relatively long, the nutritional components such as protein and calcium in milk have stable structures and do not undergo denaturation or precipitation. In a low-temperature refrigerated environment, the growth of microorganisms is slow, and the milk maintains its original milky fragrance and smooth taste. This is all due to the short storage duration, which results in less negative interference from the environment and maintains a high freshness level. Considering various food situations, a long remaining shelf life means that the time elapsed from production to the current time is short, and the food is relatively less affected by environmental factors during storage. The quality factors such as internal nutritional components, taste, and flavor can be better maintained, thereby presenting a higher freshness level.
[0125] According to the method for obtaining the freshness of the th food at the current moment, the freshness of each food at the current moment is obtained.
[0126] Step S103: Calculate the comprehensive nutritional component loss degree of each food at the current moment according to the nutritional components;
[0127] Through the above process, the freshness of each food at the current moment is obtained. To further improve the accuracy of food quality assessment, the characteristics that the loss rates of different nutritional components in food are different are used to calculate the comprehensive nutritional component loss degree of each food at the current moment. Among them, the loss rates of nutritional components of different foods are different, and the nutritional loss rate of food is closely related to its own nutritional components. For example, water-soluble vitamins (such as vitamin C and B vitamins) are more easily affected by light, temperature, and oxygen, resulting in faster loss. Therefore, foods rich in water-soluble vitamins have a faster nutritional loss rate. On the contrary, foods rich in fat-soluble vitamins (such as vitamins A, D, E, and K) have relatively stable nutritional components and a longer retention time. Therefore, food quality assessment needs to consider the comprehensive nutritional component loss degree of each food at the current moment.
[0128] In one embodiment, as Figure 4 shown, in step S103, calculating the comprehensive nutritional component loss degree of each food at the current moment according to the nutritional components includes performing the following steps S1031 - S1035 on each food:
[0129] S1031: Obtain the types of vitamins of the current food at the current moment.
[0130] S1032: Obtain the content of each vitamin of the current food at the current moment.
[0131] S1033: Obtain the total content of all vitamins according to the content of each vitamin.
[0132] S1034: Obtain the nutritional component loss degree of each vitamin of the current food at the current moment.
[0133] In one embodiment, as Figure 5 shown, obtaining the degree of nutrient loss of each vitamin of the current food at the current moment includes: obtaining the degree of nutrient loss of each vitamin of the current food at the current moment according to the loss rate of each vitamin of the current food at the current moment and the corresponding production date, specifically including performing the following steps S10341 - S10343 for each vitamin:
[0134] S10341. Obtain the loss rate of the current type of vitamin of the current food at the current moment and obtain the loss rate of the current type of vitamin of the current food per unit time within a preset duration.
[0135] S10342. Obtain the difference between the current moment and the production date of the current food at the current moment.
[0136] S10343. Obtain the degree of nutrient loss of the current type of vitamin of the current food at the current moment according to the loss rate per unit time and the difference.
[0137] Taking the current type of vitamin as vitamin C as an example for illustration: Assume that the weekly loss rate of vitamin C is P%, taking the vitamin C of the th food at the current moment as an example, then the specific calculation formula for the degree of nutrient loss of vitamin C of the th food at the current moment is:
[0138] ;
[0139] where, represents the degree of nutrient loss of vitamin C of the th food at the current moment; represents the weekly loss rate of vitamin C; represents the current moment; represents the production date of the th food at the current moment.
[0140] It should be noted that: the smaller the weekly loss rate of vitamin C, and the smaller the difference between the current moment and the production date of the th food, the smaller the degree of nutrient loss of vitamin C of the th food at the current moment.
[0141] Perform the above operations on each vitamin of each food at the current moment to obtain the degree of nutrient loss of each vitamin of each food at the current moment.
[0142] S1035. Obtain the comprehensive nutrient loss degree of the current food at the current moment according to the types of vitamins, the content of each vitamin, the total content, and the degree of nutrient loss.
[0143] The nutrient loss degree of each vitamin in each food at the current moment is obtained through step S1034. However, the contents of various vitamins in different foods are different. In different processed foods, the differences in the contents of various vitamins are directly related to the raw material components used. For example, some processed foods may choose raw materials rich in specific vitamins. For instance, foods made from carrots, sweet peppers, or spinach usually contain relatively high levels of vitamin A because these ingredients are naturally rich in β-carotene. Therefore, there are significant differences in the types and contents of vitamins in different foods. Based on the above characteristics and combined with the nutrient loss degree of vitamins in each food at the current moment, calculate the comprehensive nutrient loss degree of each food at the current moment.
[0144] In one embodiment, as Figure 6 shown, in step S1035, obtaining the comprehensive nutrient loss degree of the current food at the current moment according to the types of vitamins, the content of each vitamin, the total content, and the degree of nutrient loss includes the following sub-steps S10351 - S10353:
[0145] S10351. Obtain the ratio of the content of each vitamin in the current food at the current moment to the total content.
[0146] S10352. Obtain the product of the ratio and the corresponding degree of nutrient loss.
[0147] S10353. Obtain the comprehensive nutrient loss degree of the current food at the current moment according to all the products and the types of vitamins.
[0148] Still taking the th food at the current moment as an example, then the specific calculation formula for the comprehensive nutrient loss degree of the th food at the current moment is:
[0149]
[0150] Among them, represents the comprehensive nutrient loss degree of the th food at the current moment; represents the linear normalization function; represents the type of vitamin in the th food at the current moment; represents the th food at the current moment, and represents the content of the represents the total content of all vitamins of the nth kind of food at the current moment; represents the degree of nutrient loss of the nth kind of food for the mth vitamin at the current moment.
[0151] It should be noted that: the higher the content of the mth vitamin of the nth kind of food at the current moment and the greater the degree of nutrient loss, the greater the degree of comprehensive nutrient loss of the nth kind of food at the current moment.
[0152] Perform the operation on each kind of food at the current moment according to the above process to obtain the degree of comprehensive nutrient loss of each kind of food at the current moment.
[0153] Step S104: Calculate the quality score of each kind of food at the current moment according to the freshness and the degree of comprehensive nutrient loss.
[0154] Through the above process, the degree of comprehensive nutrient loss of each kind of food at the current moment is obtained. Calculate the quality score of each kind of food at the current moment according to the above characteristics and in combination with the freshness of each kind of food.
[0155] In one embodiment, in step S104, calculating the quality score of each kind of food at the current moment according to the freshness and the degree of comprehensive nutrient loss includes performing the following steps S1041 - S1042 on each kind of food:
[0156] S1041: Obtain the ratio between the freshness of the current food at the current moment and the corresponding degree of comprehensive nutrient loss.
[0157] S1042: Normalize the ratio to obtain the quality score of the current food at the current moment.
[0158] Still taking the nth kind of food at the current moment as an example, the specific calculation formula corresponding to the quality score of the nth kind of food at the current moment is:
[0159] ;
[0160] Wherein, represents the quality score of the nth kind of food at the current moment; represents the linear normalization function; represents the degree of comprehensive nutrient loss of the nth kind of food at the current moment; represents the The freshness of a food item. It should be noted that to ensure the meaningfulness of the calculation results, in the embodiments of the present invention, when performing fractional operations and encountering a situation where the denominator is 0, a tuning factor greater than 0 needs to be added to the denominator to prevent the denominator from being 0. The value of the tuning factor is set by the implementer according to the actual situation, and no special restrictions are imposed in this application.
[0161] It should be noted that: for the th food item at the current moment, the smaller the degree of loss of the comprehensive nutritional components, the higher the quality score of the th food item at the current moment; the greater the freshness of the th food item at the current moment, the higher the quality score of the th food item at the current moment.
[0162] Based on the acquisition method of the th food item at the current moment, the acquisition method of each food item at the current moment is obtained.
[0163] In the present invention, the quality score of each food item can also be calculated every five hours until the food expires. Thus, the dynamic quality score of each food item is obtained. As Figure 7 shown, in Figure 7 , the abscissa is time and the ordinate is the quality score.
[0164] The present disclosure can also add the quality score of each food item at the current moment to the two-dimensional code corresponding to food information traceability. Customers can obtain the quality score of the food by scanning the two-dimensional code on the food. Such a traceability function can intuitively understand the quality and safety of the food, enabling customers to more quickly understand the traceability function of the food.
[0165] For example, a two-dimensional code corresponding to food information traceability can be pasted on the surface of the food. Here, the two-dimensional code can be a dynamic two-dimensional code. When the user scans the dynamic two-dimensional code, devices such as mobile phones will jump to the corresponding web page or application program page according to the link, such as a food safety management website, and read the quality score sequence of the food corresponding to the scanned two-dimensional code, display the latest quality score, and display it as the quality score of the current food. In this way, even if the two-dimensional code itself does not change, as long as the content of the page pointed to by the updated link is changed, the real-time update of the displayed information after scanning the code can be achieved. Therefore, food enterprises or traceability system developers can use dynamic two-dimensional code generation tools (such as platforms like Tapkit and Xiaguo) to create two-dimensional codes. When generating the two-dimensional code, point its link to the exclusive page of the food in the food information traceability system. This page not only contains the basic information of the food, such as the production date, raw material source, manufacturer, etc., but also reserves a display area for the quality score.
[0166] The current food information traceability system mainly provides basic data of food, such as production date, raw material source, manufacturer, etc. Although this information helps to ensure the traceability of food, it lacks a dynamic and comprehensive scoring mechanism and cannot fully reflect the overall quality of food. Therefore, consumers cannot intuitively understand the quality and safety of food just by viewing this basic information. This way of presenting information makes it lack sufficient reference basis for customers when purchasing, and it is difficult to quickly judge whether the food meets their quality standards and health needs. According to the production date, shelf life and nutritional components of each kind of food, the present invention calculates the freshness degree and the degree of comprehensive loss of nutritional components of each kind of food, and then calculates the quality score of each kind of food according to the freshness degree and the degree of comprehensive loss of nutritional components of each kind of food. Through the quality score, the quality and safety of food can be more intuitively understood, and the problem that the information provided by the current food information traceability system cannot fully reflect the overall quality of food is solved.
[0167] Based on the same inventive concept, the embodiment of the present application also provides a data processing system for food information traceability for implementing the data processing method for food information traceability involved above. The solution for solving the problem provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the data processing system for food information traceability provided below can refer to the limitations on the data processing method for food information traceability in the above text, and will not be repeated here.
[0168] In an exemplary embodiment, as Figure 8 shown, a data processing system for food information traceability is provided. The system includes:
[0169] An acquisition module 11, configured to acquire the production date, shelf life and nutritional components of each kind of food at the current moment;
[0170] A freshness degree calculation module 12, configured to calculate the freshness degree of each kind of food at the current moment according to the production date and the shelf life;
[0171] A comprehensive nutritional component loss degree calculation module 13, configured to calculate the comprehensive nutritional component loss degree of each kind of food at the current moment according to the nutritional components;
[0172] A quality score calculation module 14, configured to calculate the quality score of each kind of food at the current moment according to the freshness degree and the comprehensive nutritional component loss degree.
[0173] In an embodiment, the nutritional components include: the content of different kinds of vitamins and the loss rate of each vitamin. The acquisition module is specifically configured to:
[0174] Perform the following steps for each food item:
[0175] Check the content of each vitamin in the current food item at preset time intervals until the shelf life of the current food item is detected;
[0176] Obtain the reduced content of each vitamin at each preset time interval based on the content of each vitamin;
[0177] Obtain the loss ratio of each vitamin at each preset time interval based on the reduced content of each vitamin and the content of each vitamin at each preset time interval;
[0178] Obtain the loss rate of each vitamin in the current food item based on all the loss ratios.
[0179] In one embodiment, the freshness calculation module is specifically configured to:
[0180] Obtain the remaining shelf life of each food item at the current time based on the shelf life, the current time, and the production date;
[0181] Obtain the freshness of each food item at the current time based on the remaining shelf life and the shelf life.
[0182] In one embodiment, the comprehensive nutrient loss degree calculation module is specifically configured to:
[0183] Perform the following steps for each food item:
[0184] Obtain the types of vitamins in the current food item at the current time;
[0185] Obtain the content of each vitamin in the current food item at the current time;
[0186] Obtain the total content of all vitamins based on the content of each vitamin;
[0187] Obtain the degree of nutrient loss of each vitamin in the current food item at the current time;
[0188] Obtain the comprehensive nutrient loss degree of the current food item at the current time based on the types of vitamins, the content of each vitamin, the total content, and the degree of nutrient loss.
[0189] In one embodiment, in terms of obtaining the comprehensive nutrient loss degree of the current food item at the current time based on the types of vitamins, the content of each vitamin, the total content, and the degree of nutrient loss, the comprehensive nutrient loss degree calculation module is specifically configured to:
[0190] Obtain the ratio of the content of each vitamin in the current food at the current moment to the total content;
[0191] Obtain the product of the ratio and the corresponding degree of nutrient loss;
[0192] Obtain the comprehensive degree of nutrient loss of the current food at the current moment according to all the products and the types of vitamins.
[0193] In one embodiment, in terms of obtaining the degree of nutrient loss of each vitamin in the current food at the current moment, the comprehensive degree of nutrient loss calculation module is specifically configured to:
[0194] Obtain the degree of nutrient loss of each vitamin in the current food at the current moment according to the loss rate of each vitamin in the current food at the current moment and the corresponding production date.
[0195] In one embodiment, in terms of obtaining the degree of nutrient loss of each vitamin in the current food at the current moment according to the loss rate of each vitamin in the current food at the current moment and the corresponding production date, the comprehensive degree of nutrient loss calculation module is specifically configured to:
[0196] Perform the following steps for each vitamin:
[0197] Obtain the loss rate of the current type of vitamin in the current food at the current moment and the loss rate of the current type of vitamin in the current food at the current moment per unit time for the preset duration;
[0198] Obtain the difference between the current moment and the production date of the current food at the current moment;
[0199] Obtain the degree of nutrient loss of the current type of vitamin in the current food at the current moment according to the loss rate per unit time and the difference.
[0200] In one embodiment, the quality score calculation module is specifically configured to:
[0201] Perform the following steps for each food:
[0202] Obtain the ratio between the freshness of the current food at the current moment and the corresponding comprehensive degree of nutrient loss;
[0203] Normalize the ratio to obtain the quality score of the current food at the current moment.
[0204] It should be noted that the above order of the embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0205] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments.
Claims
1. A data processing method for food information traceability, characterized in that The method includes: Obtaining the production date, shelf life, and nutritional components of each food at the current moment; Calculating the freshness of each food at the current moment according to the production date and the shelf life; Calculating the comprehensive nutritional component loss degree of each food at the current moment according to the nutritional components; Calculating the quality score of each food at the current moment according to the freshness and the comprehensive nutritional component loss degree.
2. The data processing method for food information traceability according to claim 1, characterized in that, The nutritional components include: the content of different types of vitamins and the loss rate of each vitamin. The obtaining of the nutritional components of each food at the current moment includes: Performing the following steps on each food: Checking the content of each vitamin in the current food at preset time intervals until the shelf life of the current food is detected; Obtaining the reduced content of each vitamin at each preset time interval according to the content of each vitamin; Obtaining the loss ratio of each vitamin at each preset time interval according to the reduced content of each vitamin and the content of each vitamin corresponding to each preset time interval; Obtaining the loss rate of each vitamin of the current food according to all the loss ratios.
3. The data processing method for food information traceability according to claim 2, wherein, The calculating of the freshness of each food at the current moment according to the production date and the shelf life includes: Obtaining the remaining shelf life of each food at the current moment according to the shelf life, the current moment, and the production date; Obtaining the freshness of each food at the current moment according to the remaining shelf life and the shelf life.
4. A data processing method for food information traceability according to claim 3, characterized in that, The calculating of the comprehensive nutritional component loss degree of each food at the current moment according to the nutritional components includes: Performing the following steps on each food: Obtaining the types of vitamins of the current food at the current moment; Obtaining the content of each vitamin of the current food at the current moment; Obtaining the total content of all vitamins according to the content of each vitamin; Obtaining the nutritional component loss degree of each vitamin of the current food at the current moment; Obtaining the comprehensive nutritional component loss degree of the current food at the current moment according to the types of vitamins, the content of each vitamin, the total content, and the nutritional component loss degree.
5. The data processing method for food information traceability according to claim 4, wherein, The obtaining of the comprehensive nutritional component loss degree of the current food at the current moment according to the types of vitamins, the content of each vitamin, the total content, and the nutritional component loss degree includes: Obtaining the ratio of the content of each vitamin of the current food at the current moment to the total content; Obtaining the product of the ratio and the corresponding nutritional component loss degree; Obtaining the comprehensive nutritional component loss degree of the current food at the current moment according to all the products and the types of vitamins.
6. The data processing method for food information traceability according to claim 5, wherein The obtaining of the nutritional component loss degree of each vitamin of the current food at the current moment includes: Obtaining the nutritional component loss degree of each vitamin of the current food at the current moment according to the loss rate of each vitamin of the current food at the current moment and the corresponding production date.
7. A data processing method for food information traceability according to claim 6, characterized in that, Obtaining the loss degree of each vitamin of the current food at the current moment according to the loss rate of each vitamin of the current food at the current moment and the corresponding production date includes: Performing the following steps for each vitamin: Obtaining the loss rate of the current type of vitamin of the current food at the current moment and the loss rate of the current type of vitamin of the current food per unit time within the preset duration at the current moment; Obtaining the difference between the current moment and the production date of the current food at the current moment; Obtaining the loss degree of the current type of vitamin of the current food at the current moment according to the loss rate per unit time and the difference.
8. A data processing method for food information traceability according to claim 1, characterized in that, Calculating the quality score of each food at the current moment according to the freshness degree and the comprehensive loss degree of nutrients includes: Performing the following steps for each food: Obtaining the ratio between the freshness degree of the current food at the current moment and the corresponding comprehensive loss degree of nutrients; Normalizing the ratio to obtain the quality score of the current food at the current moment.
9. A data processing system for food information traceability, characterized in that, The system includes: An acquisition module for acquiring the production date, shelf life, and nutrient components of each food at the current moment; A freshness degree calculation module for calculating the freshness degree of each food at the current moment according to the production date and the shelf life; A comprehensive nutrient loss degree calculation module for calculating the comprehensive nutrient loss degree of each food at the current moment according to the nutrient components; A quality score calculation module for calculating the quality score of each food at the current moment according to the freshness degree and the comprehensive nutrient loss degree.
10. A data processing system for food information traceability according to claim 9, characterized in that, The nutrient components include: the content of different types of vitamins and the loss rate of each vitamin. The acquisition module is specifically used for: Performing the following steps for each food: Checking the content of each vitamin in the current food at preset time intervals until the shelf life of the current food is detected; Obtaining the reduced content of each vitamin per preset time interval according to the content of each vitamin; Obtaining the loss ratio of each vitamin corresponding to each preset time interval according to the reduced content of each vitamin corresponding to each preset time interval and the content of each vitamin; Obtaining the loss rate of each vitamin of the current food according to all the loss ratios.
Citation Information
Patent Citations
Evaluation and tracing method for nutrition quality information of leafy vegetables
CN105181914A
Food safety traceability method and device
CN109214829A
Grain quality monitoring method and system based on Internet of Things
CN116777273A
Food information tracing method and device, medium and food safety platform
CN117911044A
Food nutritional ingredient detection method
CN119296670A