A food quality and safety traceability system and method
By generating a visual model and optimizing the layout based on the user's multimodal portrait, the problem of difficult to intuitively view food quality and safety traceability information in the existing technology is solved, and an efficient and targeted food quality and safety traceability experience is achieved.
Patent Information
- Application Number
- CN202411569806.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing food quality and safety traceability system is difficult for consumers to view information in the entire food production process intuitively, comprehensively and efficiently, resulting in information overload and difficulty in targeted traceability.
By generating a visual model, predicting food quality and safety concern information based on the user's multimodal portrait, generating attention feature maps, and layout optimization of the visual model, guiding users to view the optimized model for efficient traceability.
It realizes that users can view food quality and safety information intuitively, comprehensively and targetedly efficiently under the guidance of users, and improves the efficiency and user experience of food quality and safety traceability.
Smart Images

Figure CN119090520B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food quality and safety tracing technology, and in particular to a food quality and safety tracing system and method thereof. Background Art
[0002] At present, in order to facilitate consumers to trace the quality and safety of the food they purchased, food manufacturers will record information on the entire process of food production. When consumers request traceability, the relevant information will be retrieved for consumers to view.
[0003] However, the production of a food involves multiple processes such as raw material collection, processing, packaging, storage and transportation, resulting in a huge amount of information available to consumers. Consumers are unable to view information intuitively, comprehensively and efficiently in a targeted manner to trace food quality and safety.
[0004] Therefore, a solution is urgently needed. Summary of the invention
[0005] One of the purposes of the present invention is to provide a food quality and safety traceability system, which generates a visualization model based on the food quality and safety information corresponding to the traceability code, and assists users in tracing the quality and safety of food based on the visualization model. Specifically, when assisting, based on the user's multimodal portrait, food quality and safety concern information is predicted, and a concern feature map is generated. Based on the concern feature map, the layout of the visualization model is optimized, and the user is guided to view the visualization model after the layout optimization. Under the guidance, the user can view the information intuitively, comprehensively, and purposefully and efficiently to trace the food quality and safety.
[0006] A food quality and safety traceability system provided by an embodiment of the present invention includes:
[0007] A visualization module, which is used to generate a visualization model based on the food quality and safety information corresponding to the traceability code when the user scans the traceability code on the food;
[0008] The traceability module is used to assist users in tracing food quality and safety based on a visual model;
[0009] The traceability module is based on a visual model to assist users in tracing food quality and safety, including:
[0010] Predict food quality and safety concerns based on users’ multimodal portraits;
[0011] Generate a concern feature map based on food quality and safety concern information;
[0012] Based on the attention feature map, the layout of the visualization model is optimized;
[0013] Guide users to view the visualization model after layout optimization.
[0014] Optionally, the traceability module generates a concern feature graph based on the food quality and safety concern information, including:
[0015] The food quality and safety information is represented by feature clouds to obtain multiple feature clouds;
[0016] Perform feature description on the correlation between the indexes of each feature cloud and each pair of feature clouds to obtain a feature description vector;
[0017] Based on the anchor point activation rule corresponding to the feature description vector, the corresponding multiple anchor points are activated on the feature template graph;
[0018] Based on the feature cloud mapping rule corresponding to the feature description vector, each feature cloud is mapped to each anchor point accordingly;
[0019] The feature template map after mapping each feature cloud to each anchor point is used as the focus feature map.
[0020] Optionally, the tracing module optimizes the layout of the visualization model based on the attention feature graph, including:
[0021] Sort the anchor points on the feature map of interest from large to small according to the total number of mapped feature clouds to obtain an anchor point sequence;
[0022] Determine multiple local subsequences from the anchor point sequence; wherein the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed a difference threshold or belongs to associated anchor points on the feature map of interest;
[0023] Traverse each local subsequence in turn, and generate a model layout based on the feature cloud mapped to each anchor point in the traversed local subsequence each time, and associate it with the traversed local subsequence;
[0024] After traversing each local subsequence, the model layout generated during each traversal is sorted according to the order of the associated local subsequences in the anchor point sequence to obtain a layout sequence;
[0025] Generate a layout optimization strategy; wherein the layout optimization strategy includes: the visualization model sequentially presents the model layouts in the layout sequence in sequence order, and the retention time of each presentation is the time value corresponding to the order of the presented model layout in the layout sequence;
[0026] Based on the layout optimization strategy, the layout of the visualization model is optimized.
[0027] Optionally, after the traceability module assists the user in tracing the quality and safety of food based on the visualization model, it also includes:
[0028] Deep tracing module for:
[0029] When the target content corresponding to the traceability request input by the user is blank in the visualization model, the traceability request is decomposed into elements to obtain a plurality of request elements;
[0030] Combine the request elements to obtain multiple element combinations; wherein the type distribution of the request elements in the same element combination matches the standard type distribution, and the minimum amount of knowledge of the request elements in the same element combination in the knowledge graph exceeds the knowledge amount threshold;
[0031] Traverse each element combination in turn. During each traversal, generate rules based on the conditions corresponding to the type distribution of each request element in the traversed element combination, generate knowledge search conditions according to each request element in the traversed element combination, and search for target knowledge from the knowledge base based on the knowledge search conditions;
[0032] After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge;
[0033] Respond to traceability requests based on spliced knowledge.
[0034] Optionally, the deep tracing module performs knowledge splicing on the target knowledge searched out during each traversal, including:
[0035] Based on the spatiotemporal relationship between the target knowledge items searched out during each traversal, a traceability combination model and traceability guidance rules are created;
[0036] The target knowledge searched out during each traversal is mapped into the traceability combination model; wherein, based on the traceability guidance rules, when the user is guided to perform quality and safety traceability according to the traceability combination model mapped with all the target knowledge, the user can perceive all the time and space relationships;
[0037] Map all target knowledge into the traceability combination model and traceability guidance rules as target knowledge.
[0038] A food quality and safety tracing method provided by an embodiment of the present invention includes:
[0039] When the user scans the traceability code on the food, a visualization model is generated based on the food quality and safety information corresponding to the traceability code;
[0040] Based on the visualization model, it helps users to trace the quality and safety of food;
[0041] The visualization model is used to assist users in tracing the quality and safety of food, including:
[0042] Predict food quality and safety concerns based on users’ multimodal portraits;
[0043] Generate a concern feature map based on food quality and safety concern information;
[0044] Based on the attention feature map, the layout of the visualization model is optimized;
[0045] Guide users to view the visualization model after layout optimization.
[0046] Optionally, generating a concern feature graph based on the food quality and safety concern information includes:
[0047] The food quality and safety information is represented by feature clouds to obtain multiple feature clouds;
[0048] Perform feature description on the correlation between the indexes of each feature cloud and each pair of feature clouds to obtain a feature description vector;
[0049] Based on the anchor point activation rule corresponding to the feature description vector, the corresponding multiple anchor points are activated on the feature template graph;
[0050] Based on the feature cloud mapping rule corresponding to the feature description vector, each feature cloud is mapped to each anchor point accordingly;
[0051] The feature template map after mapping each feature cloud to each anchor point is used as the focus feature map.
[0052] Optionally, the optimizing the layout of the visualization model based on the attention feature graph includes:
[0053] Sort the anchor points on the feature map of interest from large to small according to the total number of mapped feature clouds to obtain an anchor point sequence;
[0054] Determine multiple local subsequences from the anchor point sequence; wherein the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed a difference threshold or belongs to associated anchor points on the feature map of interest;
[0055] Traverse each local subsequence in turn, and generate a model layout based on the feature cloud mapped to each anchor point in the traversed local subsequence each time, and associate it with the traversed local subsequence;
[0056] After traversing each local subsequence, the model layout generated during each traversal is sorted according to the order of the associated local subsequences in the anchor point sequence to obtain a layout sequence;
[0057] Generate a layout optimization strategy; wherein the layout optimization strategy includes: the visualization model sequentially presents the model layouts in the layout sequence in sequence order, and the retention time of each presentation is the time value corresponding to the order of the presented model layout in the layout sequence;
[0058] Based on the layout optimization strategy, the layout of the visualization model is optimized.
[0059] Optionally, after assisting the user in tracing the quality and safety of food based on the visualization model, the method further includes:
[0060] When the target content corresponding to the traceability request input by the user is blank in the visualization model, the traceability request is decomposed into elements to obtain a plurality of request elements;
[0061] Combine the request elements to obtain multiple element combinations; wherein the type distribution of the request elements in the same element combination matches the standard type distribution, and the minimum amount of knowledge of the request elements in the same element combination in the knowledge graph exceeds the knowledge amount threshold;
[0062] Traverse each element combination in turn. During each traversal, generate rules based on the conditions corresponding to the type distribution of each request element in the traversed element combination, generate knowledge search conditions according to each request element in the traversed element combination, and search for target knowledge from the knowledge base based on the knowledge search conditions;
[0063] After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge;
[0064] Respond to traceability requests based on spliced knowledge.
[0065] Optionally, the step of performing knowledge splicing on the target knowledge searched out during each traversal includes:
[0066] Based on the spatiotemporal relationship between the target knowledge items searched out during each traversal, a traceability combination model and traceability guidance rules are created;
[0067] The target knowledge searched out during each traversal is mapped into the traceability combination model; wherein, based on the traceability guidance rules, when the user is guided to perform quality and safety traceability according to the traceability combination model mapped with all the target knowledge, the user can perceive all the time and space relationships;
[0068] Map all target knowledge into the traceability combination model and traceability guidance rules as target knowledge.
[0069] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0070] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0072] Figure 1 A schematic diagram of a food quality and safety traceability system in an embodiment of the present invention;
[0073] Figure 2 Schematic diagram of a food quality and safety traceability method in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0075] The embodiment of the present invention provides a food quality and safety traceability system. Figure 1 As shown, including:
[0076] Visualization module 1, used for generating a visualization model based on the food quality and safety information corresponding to the traceability code when the user scans the traceability code on the food;
[0077] Traceability module 2 is used to assist users in tracing food quality and safety based on a visual model;
[0078] The traceability module is based on a visual model to assist users in tracing food quality and safety, including:
[0079] Predict food quality and safety concerns based on users’ multimodal portraits;
[0080] Generate a concern feature map based on food quality and safety concern information;
[0081] Based on the attention feature map, the layout of the visualization model is optimized;
[0082] Guide users to view the visualization model after layout optimization.
[0083] In the above technical solution, the user is a consumer who purchases food; each food is given a traceability code when it is packaged, and the traceability code corresponds to food quality and safety information. The food quality and safety information includes at least: the growing location, the site conditions of the growing location, the growing log, the inspection record, the responsible person information, the packaging date, the delivery time, etc.
[0084] The visualization model visually displays food quality and safety information to users; therefore, based on the visualization model, users can be assisted in tracing the quality and safety of food.
[0085] The multimodal portrait of the user includes at least: the user's age, food quality and safety traceability history, etc.; the food quality and safety concern information includes at least: the production stage and production conditions that may affect food quality and safety that the user may be concerned about; the multimodal portrait will reflect the food quality and safety concern information, and therefore, the latter can be predicted based on the former, for example: the food quality and safety traceability history reflects that the user has historically often analyzed relevant information based on the raw material collection stage of food, then the predicted food quality and safety concern information is that the production stage that may affect food quality and safety that the user may be concerned about is the raw material collection stage.
[0086] Based on the food quality and safety concern information, a concern feature map is generated, and the concern feature map is a feature representation of the food quality and safety concern information.
[0087] The attention feature graph reflects the user's attention to food quality and safety information. Therefore, the layout of the visualization model can be optimized based on the attention feature graph. For example, the attention feature graph reflects that the production stages that users may be concerned about affecting food quality and safety are the raw material collection stages. In this case, the layout of the visualization model is optimized to first visualize the relevant information of the food in the raw material collection stage so that users can view it first.
[0088] After the layout optimization of the visualization model is completed, the user is guided to view the visualization model after the layout optimization.
[0089] This application generates a visualization model based on the food quality and safety information corresponding to the traceability code, and assists users in tracing the quality and safety of food based on the visualization model. Specifically, when assisting, based on the user's multimodal portrait, food quality and safety concern information is predicted, and a concern feature map is generated. Based on the concern feature map, the layout of the visualization model is optimized, and the user is guided to view the visualization model after the layout optimization. Under the guidance, the user can efficiently view the information in an intuitive, comprehensive, targeted and efficient manner to trace the quality and safety of food.
[0090] In one embodiment, the traceability module generates a concern feature graph based on food quality and safety concern information, including:
[0091] The food quality and safety information is represented by feature clouds to obtain multiple feature clouds;
[0092] Perform feature description on the correlation between the indexes of each feature cloud and each pair of feature clouds to obtain a feature description vector;
[0093] Based on the anchor point activation rule corresponding to the feature description vector, the corresponding multiple anchor points are activated on the feature template graph;
[0094] Based on the feature cloud mapping rule corresponding to the feature description vector, each feature cloud is mapped to each anchor point accordingly;
[0095] The feature template map after mapping each feature cloud to each anchor point is used as the focus feature map.
[0096] In the above technical scheme, when performing feature cloud representation, multiple information features of food quality and safety information of concern are extracted, and each information feature is classified into feature sets of multiple classification categories, and each feature set is represented by a cloud to obtain a feature cloud; wherein the classification categories include at least: the same time features, the same location features, the same features related to the raw material collection stage, etc.
[0097] The feature cloud has an index, and the index is the classification category of the feature set represented by the cloud as the feature cloud; the association relationship between the indexes of two feature clouds at least includes: the same focus type that can be reflected together (for example, if the classification categories are the same focus on raw material manufacturer information and the same focus on raw material processing information, then the association relationship reflects the same focus type as raw materials), similar occurrence time, and production stage connection relationship; when describing the feature cloud and the association relationship, the index of the feature cloud, the number of features in the feature cloud, and the association relationship are represented in vector form to obtain a feature description vector.
[0098] There are multiple anchor points on the feature template graph, and each anchor point represents a focus point; the feature description vector corresponds to a pre-set anchor point activation rule, and the anchor point activation rule is to activate the anchor point corresponding to the user's focus point reflected by the feature description vector, so that it waits for information mapping. For example: the information constructed into the feature description vector is that the index of the feature cloud belongs to the same raw material manufacturer, the association relationship reflects the same focus type as raw materials, etc., which reflects that the user's focus point is the raw material manufacturer of food, and the anchor point activation rule is to activate the anchor point with the raw material manufacturer.
[0099] The feature description vector also corresponds to a pre-set feature cloud mapping rule, which indicates how to map the feature cloud to an anchor point, including: mapping the feature cloud to the anchor point of the user's focus point represented by the features in the feature cloud. For example, if the information used to construct the feature description vector is that the index of a feature cloud belongs to the same raw material manufacturer of concern, then the feature cloud mapping rule is to map the feature cloud to the anchor point of the raw material manufacturer.
[0100] After each feature cloud is mapped to each anchor point accordingly, the feature template map after mapping each feature cloud to each anchor point is used as the focus feature map; in this way, the more feature clouds are mapped on the same anchor point, the higher the user's focus point represented by the anchor point is.
[0101] When generating an attention feature map, the embodiment of the present invention introduces a feature cloud and a feature template map, activates the corresponding anchor points in the feature template map based on the anchor point activation rules and feature cloud mapping rules corresponding to the feature description vector, and maps the corresponding feature clouds. The feature template map after each feature cloud is mapped to each anchor point is used as the attention feature map, so that the attention feature map can fully reflect the user's attention to food quality and safety information, greatly improves the suitability and accuracy of the attention feature map generation, and improves the applicability of the system.
[0102] In one embodiment, the tracing module optimizes the layout of the visualization model based on the attention feature graph, including:
[0103] Sort the anchor points on the feature map of interest from large to small according to the total number of mapped feature clouds to obtain an anchor point sequence;
[0104] Determine multiple local subsequences from the anchor point sequence; wherein the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed a difference threshold or belongs to associated anchor points on the feature map of interest;
[0105] Traverse each local subsequence in turn, and generate a model layout based on the feature cloud mapped to each anchor point in the traversed local subsequence each time, and associate it with the traversed local subsequence;
[0106] After traversing each local subsequence, the model layout generated during each traversal is sorted according to the order of the associated local subsequences in the anchor point sequence to obtain a layout sequence;
[0107] Generate a layout optimization strategy; wherein the layout optimization strategy includes: the visualization model sequentially presents the model layouts in the layout sequence in sequence order, and the retention time of each presentation is the time value corresponding to the order of the presented model layout in the layout sequence;
[0108] Based on the layout optimization strategy, the layout of the visualization model is optimized.
[0109] In the above technical solution, the difference threshold can be 3; the more feature clouds mapped on the same anchor point, the higher the user's attention level of the focus point represented by the anchor point; therefore, ensuring that the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed the difference threshold can make the user's attention level of the focus points represented by adjacent anchor points in the same local subsequence close, and the feature clouds on them are necessary for generating the same model layout; associated anchor points are pre-set on the attention feature graph, and when the anchor points are associated anchor points, it means that the focus points represented by the anchor points belong to the same focus type, etc. For example: the focus points represented by two anchor points are respectively focusing on raw material manufacturers and focusing on raw material transportation information, etc., and they both belong to focusing on raw materials; therefore, ensuring that adjacent anchor points in the same local subsequence are associated anchor points can also make the feature clouds on adjacent anchor points in the same local subsequence necessary for generating the same model layout.
[0110] When generating the model layout, it is ensured that all features in the feature cloud mapped to each anchor point in the traversed local subsequence can be displayed within the same model layout; after the model layout is generated, it is associated with the traversed local subsequence.
[0111] When sorting the model layout, for example, if the order of its associated local subsequence in the anchor sequence is 2, then the order of the model layout in the layout sequence is also 2.
[0112] The duration value is negatively correlated with the order of the model layout in the layout sequence. The smaller the order, the closer the local subsequence is to the front of the layout sequence, and the higher the overall degree of user attention to it, and the longer the layout is maintained. In the layout optimization strategy, the visualization model presents the model layouts in the layout sequence in sequence order, and the retention duration of each presentation is the duration value corresponding to the order of the presented model layout in the layout sequence.
[0113] Based on the layout optimization strategy, the layout of the visualization model is optimized. The optimized visualization model is adapted to the user's attention to food quality and safety information as reflected by the attention feature graph.
[0114] When performing layout optimization on a visualization model, an embodiment of the present invention introduces an anchor point sequence, determines multiple local subsequences from the anchor point sequence, traverses each local subsequence in turn, generates a model layout based on a feature cloud mapped to each anchor point in the traversed local subsequence during each traversal, determines a layout sequence, generates a layout optimization strategy based on the layout sequence, and optimizes the layout of the visualization model based on the layout optimization strategy, thereby greatly improving the rationality of performing layout optimization on the visualization model.
[0115] In one embodiment, the traceability module assists the user in tracing the quality and safety of food based on the visualization model, and further includes:
[0116] Deep tracing module for:
[0117] When the target content corresponding to the traceability request input by the user is blank in the visualization model, the traceability request is decomposed into elements to obtain a plurality of request elements;
[0118] Combine the request elements to obtain multiple element combinations; wherein the type distribution of the request elements in the same element combination matches the standard type distribution, and the minimum amount of knowledge of the request elements in the same element combination in the knowledge graph exceeds the knowledge amount threshold;
[0119] Traverse each element combination in turn. During each traversal, generate rules based on the conditions corresponding to the type distribution of each request element in the traversed element combination, generate knowledge search conditions according to each request element in the traversed element combination, and search for target knowledge from the knowledge base based on the knowledge search conditions;
[0120] After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge;
[0121] Respond to traceability requests based on spliced knowledge.
[0122] In the above technical solution, the user can also input a tracing request to request the corresponding target content in the visualization model; if the target content is blank, it means that the tracing fails, and deep tracing is required at this time; first, the tracing request is decomposed into multiple request elements, and the request elements at least include: request type, request content range, etc.
[0123] The type distribution of each request element in the element combination indicates what types of each request element in the element combination are; the pre-set standard type distribution indicates the element types that can be used as the basis for knowledge search conditions at the same time, for example: the standard types are the time when the requested content occurs, the place where the requested content occurs, etc.; a knowledge graph is pre-set, and a large number of information nodes recorded by food manufacturers when producing food are recorded in the knowledge graph, and each information node represents a production event; the minimum amount of knowledge of each request element in the knowledge graph is the minimum value of the knowledge amount of the request element in the knowledge graph, and the knowledge amount of the request element in the knowledge graph is the number of information nodes related to the request element in the knowledge graph, for example: if the request element is the raw material storage room, then the production event represented by the information node related to it is the production video in the raw material storage room, etc.; ensuring that the minimum amount of knowledge of each request element in the same element combination in the knowledge graph exceeds the knowledge amount threshold can enable the knowledge search conditions generated according to each request element in the element combination to be used to search for the target knowledge.
[0124] The type distribution of each request element in the element combination corresponds to a conditional generation rule, which indicates how to generate knowledge search conditions for the search target knowledge based on each request element in the element combination. For example, if the type distribution of each request element is the time when the requested content occurs and the place where the requested content occurs, then the knowledge search condition is to search for specific information about production events whose occurrence time is the same or close to the time when the requested content occurs, and whose occurrence place is the same or close to the place where the requested content occurs. The knowledge base corresponds to the knowledge graph, which records the specific information of production events represented by different information nodes in the knowledge graph.
[0125] After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge.
[0126] Finally, based on the splicing knowledge, in response to the tracing request, the splicing knowledge can be displayed to the user in the visualization model to realize the response of the user's tracing request.
[0127] When the visualization model cannot meet the user's tracing request, this application performs deep tracing, introduces factor combinations, generates knowledge search conditions based on the factor combinations, and searches for target knowledge from the knowledge base based on the knowledge search conditions. After traversing each factor combination, the target knowledge searched during each traversal is spliced, and based on the spliced knowledge, the tracing request is responded to, which greatly improves the user experience and further improves the applicability of the system.
[0128] In one embodiment, the deep tracing module performs knowledge splicing on the target knowledge searched out during each traversal, including:
[0129] Based on the spatiotemporal relationship between the target knowledge items searched out during each traversal, a traceability combination model and traceability guidance rules are created;
[0130] The target knowledge searched out during each traversal is mapped into the traceability combination model; wherein, based on the traceability guidance rules, when the user is guided to perform quality and safety traceability according to the traceability combination model mapped with all the target knowledge, the user can perceive all the time and space relationships;
[0131] Map all target knowledge into the traceability combination model and traceability guidance rules as target knowledge.
[0132] In the above technical solution, the spatiotemporal relationship at least includes: the occurrence time relationship and the occurrence location relationship of the production events in the target knowledge; based on the spatiotemporal relationship, a traceability combination model and a traceability guidance rule are created; the traceability combination model is a template model that can visually display the target knowledge, for example: if the target knowledge is a video image in a raw material storage room, then the template model has a mapping area for mapping the video image in the raw material storage room, and the mapping area can be a three-dimensional model of the raw material storage room; the traceability guidance rule is a rule for guiding the user to view the traceability combination model, which constrains the order in which the user views different contents in the traceability combination model during guidance; the target knowledge searched out during each traversal is mapped into the traceability combination model, and when mapping, the corresponding mapping area is found in the traceability combination model according to the occurrence time and location of the target knowledge, and mapping is performed; when the user is guided to perform quality and safety traceability according to the traceability combination model after all the target knowledge is mapped based on the traceability guidance rule, the user can perceive all the spatiotemporal relationships; finally, the traceability combination model and the traceability guidance rule after all the target knowledge is mapped are used as the target knowledge; when using the target knowledge, the user is guided to view the traceability combination model after all the target knowledge is mapped based on the traceability guidance rule.
[0133] The embodiment of the present invention provides a food quality and safety traceability method, such as Figure 2 As shown, including:
[0134] S1. When a user scans the traceability code on a food, a visualization model is generated based on the food quality and safety information corresponding to the traceability code;
[0135] S2. Based on the visualization model, it assists users in tracing the quality and safety of food;
[0136] The visualization model is used to assist users in tracing the quality and safety of food, including:
[0137] Predict food quality and safety concerns based on users’ multimodal portraits;
[0138] Generate a concern feature map based on food quality and safety concern information;
[0139] Based on the attention feature map, the layout of the visualization model is optimized;
[0140] Guide users to view the visualization model after layout optimization.
[0141] The generating of the concern feature graph based on the food quality and safety concern information includes:
[0142] The food quality and safety information is represented by feature clouds to obtain multiple feature clouds;
[0143] Perform feature description on the correlation between the indexes of each feature cloud and each pair of feature clouds to obtain a feature description vector;
[0144] Based on the anchor point activation rule corresponding to the feature description vector, the corresponding multiple anchor points are activated on the feature template graph;
[0145] Based on the feature cloud mapping rule corresponding to the feature description vector, each feature cloud is mapped to each anchor point accordingly;
[0146] The feature template map after mapping each feature cloud to each anchor point is used as the focus feature map.
[0147] The layout optimization of the visualization model based on the attention feature graph includes:
[0148] Sort the anchor points on the feature map of interest from large to small according to the total number of mapped feature clouds to obtain an anchor point sequence;
[0149] Determine multiple local subsequences from the anchor point sequence; wherein the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed a difference threshold or belongs to associated anchor points on the feature map of interest;
[0150] Traverse each local subsequence in turn, and generate a model layout based on the feature cloud mapped to each anchor point in the traversed local subsequence each time, and associate it with the traversed local subsequence;
[0151] After traversing each local subsequence, the model layout generated during each traversal is sorted according to the order of the associated local subsequences in the anchor point sequence to obtain a layout sequence;
[0152] Generate a layout optimization strategy; wherein the layout optimization strategy includes: the visualization model sequentially presents the model layouts in the layout sequence in sequence order, and the retention time of each presentation is the time value corresponding to the order of the presented model layout in the layout sequence;
[0153] Based on the layout optimization strategy, the layout of the visualization model is optimized.
[0154] After assisting users in tracing food quality and safety based on the visualization model, the following is also included:
[0155] When the target content corresponding to the traceability request input by the user is blank in the visualization model, the traceability request is decomposed into elements to obtain a plurality of request elements;
[0156] Combine the request elements to obtain multiple element combinations; wherein the type distribution of the request elements in the same element combination matches the standard type distribution, and the minimum amount of knowledge of the request elements in the same element combination in the knowledge graph exceeds the knowledge amount threshold;
[0157] Traverse each element combination in turn. During each traversal, generate rules based on the conditions corresponding to the type distribution of each request element in the traversed element combination, generate knowledge search conditions according to each request element in the traversed element combination, and search for target knowledge from the knowledge base based on the knowledge search conditions;
[0158] After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge;
[0159] Respond to traceability requests based on spliced knowledge.
[0160] The knowledge splicing of the target knowledge searched out during each traversal includes:
[0161] Based on the spatiotemporal relationship between the target knowledge items searched out during each traversal, a traceability combination model and traceability guidance rules are created;
[0162] The target knowledge searched out during each traversal is mapped into the traceability combination model; wherein, based on the traceability guidance rules, when the user is guided to perform quality and safety traceability according to the traceability combination model mapped with all the target knowledge, the user can perceive all the time and space relationships;
[0163] Map all target knowledge into the traceability combination model and traceability guidance rules as target knowledge.
[0164] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A food quality and safety traceability system, characterized in that: include: A visualization module, which is used to generate a visualization model based on the food quality and safety information corresponding to the traceability code when the user scans the traceability code on the food; The traceability module is used to assist users in tracing food quality and safety based on a visual model; The traceability module is based on a visual model to assist users in tracing food quality and safety, including: Predict food quality and safety concerns based on users’ multimodal portraits; Generate a concern feature map based on food quality and safety concern information; Based on the attention feature map, the layout of the visualization model is optimized; Guide users to view the visualization model after layout optimization; The traceability module generates a concern feature graph based on food quality and safety concern information, including: The food quality and safety information is represented by feature clouds to obtain multiple feature clouds; Perform feature description on the correlation between the indexes of each feature cloud and each pair of feature clouds to obtain a feature description vector; Based on the anchor point activation rule corresponding to the feature description vector, the corresponding multiple anchor points are activated on the feature template graph; Based on the feature cloud mapping rule corresponding to the feature description vector, each feature cloud is mapped to each anchor point accordingly; The feature template map after mapping each feature cloud to each anchor point is used as the focus feature map; The traceability module optimizes the layout of the visualization model based on the attention feature graph, including: Sort the anchor points on the feature map of interest from large to small according to the total number of mapped feature clouds to obtain an anchor point sequence; Determine multiple local subsequences from the anchor point sequence; wherein the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed a difference threshold or belongs to associated anchor points on the feature map of interest; Traverse each local subsequence in turn, and generate a model layout based on the feature cloud mapped to each anchor point in the traversed local subsequence each time, and associate it with the traversed local subsequence; After traversing each local subsequence, the model layout generated during each traversal is sorted according to the order of the associated local subsequences in the anchor point sequence to obtain a layout sequence; Generate a layout optimization strategy; wherein the layout optimization strategy includes: the visualization model sequentially presents the model layouts in the layout sequence in sequence order, and the retention time of each presentation is the time value corresponding to the order of the presented model layout in the layout sequence; Based on the layout optimization strategy, the layout of the visualization model is optimized.
2. The food quality and safety traceability system according to claim 1, characterized in that: The traceability module is based on a visual model to assist users in tracing food quality and safety, and also includes: Deep tracing module for: When the target content corresponding to the traceability request input by the user is blank in the visualization model, the traceability request is decomposed into elements to obtain a plurality of request elements; Combine the request elements to obtain multiple element combinations; wherein the type distribution of the request elements in the same element combination matches the standard type distribution, and the minimum amount of knowledge of the request elements in the same element combination in the knowledge graph exceeds the knowledge amount threshold; Traverse each element combination in turn. During each traversal, generate rules based on the conditions corresponding to the type distribution of each request element in the traversed element combination, generate knowledge search conditions according to each request element in the traversed element combination, and search for target knowledge from the knowledge base based on the knowledge search conditions; After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge; Respond to traceability requests based on spliced knowledge.
3. The food quality and safety traceability system according to claim 2, characterized in that: The deep tracing module performs knowledge splicing on the target knowledge searched out during each traversal, including: Based on the spatiotemporal relationship between the target knowledge items searched out during each traversal, a traceability combination model and traceability guidance rules are created; The target knowledge searched out during each traversal is mapped into the traceability combination model; wherein, based on the traceability guidance rules, when the user is guided to perform quality and safety traceability according to the traceability combination model mapped with all the target knowledge, the user can perceive all the time and space relationships; Map all target knowledge into the traceability combination model and traceability guidance rules as target knowledge.
4. A food quality and safety traceability method, characterized in that: include: When the user scans the traceability code on the food, a visualization model is generated based on the food quality and safety information corresponding to the traceability code; Based on the visualization model, it helps users to trace the quality and safety of food; The visualization model is used to assist users in tracing the quality and safety of food, including: Predict food quality and safety concerns based on users’ multimodal portraits; Generate a concern feature map based on food quality and safety concern information; Based on the attention feature map, the layout of the visualization model is optimized; Guide users to view the visualization model after layout optimization; The generating of the concern feature graph based on the food quality and safety concern information includes: The food quality and safety information is represented by feature clouds to obtain multiple feature clouds; Perform feature description on the correlation between the indexes of each feature cloud and each pair of feature clouds to obtain a feature description vector; Based on the anchor point activation rule corresponding to the feature description vector, the corresponding multiple anchor points are activated on the feature template graph; Based on the feature cloud mapping rule corresponding to the feature description vector, each feature cloud is mapped to each anchor point accordingly; The feature template map after mapping each feature cloud to each anchor point is used as the focus feature map; The layout optimization of the visualization model based on the attention feature graph includes: Sort the anchor points on the feature map of interest from large to small according to the total number of mapped feature clouds to obtain an anchor point sequence; Determine multiple local subsequences from the anchor point sequence; wherein the difference in the total number of feature clouds mapped to adjacent anchor points in the same local subsequence does not exceed a difference threshold or belongs to associated anchor points on the feature map of interest; Traverse each local subsequence in turn, and generate a model layout based on the feature cloud mapped to each anchor point in the traversed local subsequence each time, and associate it with the traversed local subsequence; After traversing each local subsequence, the model layout generated during each traversal is sorted according to the order of the associated local subsequences in the anchor point sequence to obtain a layout sequence; Generate a layout optimization strategy; wherein the layout optimization strategy includes: the visualization model sequentially presents the model layouts in the layout sequence in sequence order, and the retention time of each presentation is the time value corresponding to the order of the presented model layout in the layout sequence; Based on the layout optimization strategy, the layout of the visualization model is optimized.
5. The food quality and safety traceability method according to claim 4, characterized in that: After assisting users in tracing food quality and safety based on the visualization model, the following is also included: When the target content corresponding to the traceability request input by the user is blank in the visualization model, the traceability request is decomposed into elements to obtain a plurality of request elements; Combine the request elements to obtain multiple element combinations; wherein the type distribution of the request elements in the same element combination matches the standard type distribution, and the minimum amount of knowledge of the request elements in the same element combination in the knowledge graph exceeds the knowledge amount threshold; Traverse each element combination in turn. During each traversal, generate rules based on the conditions corresponding to the type distribution of each request element in the traversed element combination, generate knowledge search conditions according to each request element in the traversed element combination, and search for target knowledge from the knowledge base based on the knowledge search conditions; After traversing all combinations of elements, the target knowledge searched out during each traversal is spliced to obtain spliced knowledge; Respond to traceability requests based on spliced knowledge.
6. The food quality and safety traceability method according to claim 5, characterized in that: The knowledge splicing of the target knowledge searched out during each traversal includes: Based on the spatiotemporal relationship between the target knowledge items searched out during each traversal, a traceability combination model and traceability guidance rules are created; The target knowledge searched out during each traversal is mapped into the traceability combination model; wherein, based on the traceability guidance rules, when the user is guided to perform quality and safety traceability according to the traceability combination model mapped with all the target knowledge, the user can perceive all the time and space relationships; Map all target knowledge into the traceability combination model and traceability guidance rules as target knowledge.
Citation Information
Patent Citations
Quality tracing system and method
CN110910151A
Assembly-oriented intelligent quality tracing method
CN111461746A