Visual comparison method and system for multi-layer structure with inheritance attribute
The method and system enable efficient, intuitive comparison of MRL standards across multiple regions by constructing a UniMRLtree with embedded diagrams and heat maps, addressing inefficiencies in existing methods and enhancing user interaction.
Patent Information
- Application Number
- CN202411231001.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-04
AI Technical Summary
Existing methods for comparing Maximum Residue Limit (MRL) standards in multiple regions are inefficient and lack the ability to visually analyze inherited attribute values, particularly when comparing more than two regions, leading to difficulties in food safety supervision and international trade.
A method for visually comparing multiple hierarchical structures with inherited attribute values using a 'node link tree embedded in rose diagram or petal diagram' and a 'multi-regional MRL value matrix heat map' to construct a UniMRLtree, which supports the comparison of MRL standards across multiple regions, and a system called MRLVis for comprehensive analysis.
Enhances comparison efficiency and intuitiveness by allowing simultaneous comparison of multiple regions, improving user experience through interactive visualization and multi-view linkage, supporting macro and micro visualization of hierarchical data.
Smart Images

Figure CN119179739A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of information visualization and relates to a visualization comparison method of a hierarchical structure with inheritance attributes. The invention takes the comparison of maximum limit standards of pesticide residues in multiple regions in food safety as an example, and therefore also relates to the field of food safety. Background Art
[0002] The comparison of multiple hierarchical structures with inheritance attributes is very complicated. When comparing such data, we need to compare both their hierarchical structures and the attribute values of the nodes in the structure, and the attribute values of some nodes are inherited. The Maximum Residue Limit (MRL) standard data in the field of food safety is a typical data of this type. The MRL standard stipulates the maximum limit of pesticides legally allowed in food. The food classification is organized in a hierarchical structure and can be expressed as a node-link tree. Each node in the tree represents a certain type or category of food, and the attribute value of the node represents the limit standard value of a certain pesticide in this type or category of food. The food classification system, the types of pesticides involved, and the MRL values of each pesticide in various foods in the MRL standards of different countries or regions may vary greatly. Moreover, the pesticide MRL value is inherited in the food classification tree. When the limit value of a certain pesticide is applied to a certain food category, all foods under this food category should comply with this limit value, unless there are special regulations (i.e., there are special limit regulations for some foods). The MRL standard reflects to a certain extent the management level of pesticide residues in food in a country or region (hereinafter referred to as regions). There may be large differences in the pesticide residue limit standards in different regions, which leads to difficulties in food safety supervision and international trade. Comparing the differences in MRL standards in different regions is conducive to promoting the improvement of their own standards and the import and export trade of food. Therefore, it is very necessary to compare the MRL standards in different regions. The existing methods mainly use manual comparison and visual analysis comparison. Manual comparison uses traditional table comparison, which is poor in intuitiveness and inefficiency, and cannot directly compare the inherited attribute values. The visual analysis comparison method is intuitive and efficient, and can directly compare the inherited attribute values, but the existing method can only compare the MRL standards of two regions, lacking a method for comparing the MRL standards of multiple (more than three) regions at the same time, and using visual analysis technology to compare the MRL standards of multiple regions is an urgent need of current experts in the field. To this end, the present invention proposes a method that can not only use visual analysis technology to directly compare the inherited attribute values, but also can simultaneously compare the MRL standards of multiple regions. Summary of the invention
[0003] Taking the task of comparative analysis of MRL standards in multiple regions as an example, the present invention proposes a method for visually comparing multiple hierarchical structures with inherited attribute values, abstracting the comparative analysis problem of MRL standards in different regions into the comparison problem of multiple pesticide limit trees (MRLtree) after inheriting limit values. The present invention also proposes two new visualization design schemes: "node link tree embedded in rose diagram or petal diagram" for expressing UniMRLtree; and "multi-regional MRL value matrix heat map" for expressing the distribution of limit values of a certain pesticide in multiple foods in multiple regions. These two new visualization schemes can help users analyze the structural differences of multiple hierarchical structures and the differences in inherited attribute values. Based on the above method and two visualization schemes, the present invention designs and implements a multi-regional MRL standard visual comparison and analysis system called MRLVis, which supports comparative analysis of MRL standard differences in multiple regions from multiple levels. Specifically, first, the present invention proposes a method for constructing a pesticide limit merged tree (UniMRLtree). First, according to the MRL standard, an MRLtree is constructed for each pesticide in each MRL standard system through recursive assignment; then, multiple MRLtrees of the same pesticide in multiple regions are hierarchically merged and MRL values are integrated to generate a UniMRLtree containing food classifications and inherited MRL values in multiple regions, which lays the foundation for the comparison of inherited attribute values in multiple hierarchical structures. Second, the present invention proposes two new visualization design schemes, "node link tree embedded in rose diagram or petal diagram" and "multi-region MRL value matrix heat map". Among them, the "node link tree embedded in rose diagram or petal diagram" is embedded in the node of UniMRLtree with Nightingale rose diagram or petal diagram to show the differences in food classification and pesticide limit values in multiple regions. The "multi-region MRL value matrix heat map" shows the distribution of pesticide limit values of a certain type of food classification in multiple regions, and improves space utilization by using a node filtering algorithm based on depth first. Third, the present invention designs and implements a multi-region MRL standard visual comparison and analysis system MRLVis, which supports the comparison and analysis of the differences in MRL standards in multiple regions at multiple levels, such as food classification structure to each MRL value.
[0004] The technical solution provided by the present invention is as follows:
[0005] A. Construct the MRLtree for each pesticide. The steps include:
[0006] A1. According to the MRL standard, construct an MRLtree for each pesticide in each MRL standard system;
[0007] The nodes of MRLtree are foods or food categories of the corresponding regions, and the links between nodes represent the parent-child relationship in the food category. The attribute value of the leaf node is the MRL limit value of the food for the selected pesticide. If the leaf node does not define the MRL limit value, it is necessary to query the ancestor node and perform recursive assignment.
[0008] A2. Assign values to each node in the MRLtree of each pesticide using a recursive assignment algorithm.
[0009] The recursive assignment algorithm is as follows:
[0010]
[0011] The set of food classification nodes and food nodes in a region is defined as node set N, and the hierarchical structure of N, that is, the food classification system architecture of the region, is defined as T. For each node n∈N, let v(n) represent its attribute value, that is, the MRL value of the food (or food classification) for a specific pesticide, and p(n) represents the parent node of node n. l(n) represents the level of the node in the tree, and the level of the root node is 0. The attribute value of any node n is Q(n,l).
[0012] B. Multiple MRLtrees of the same pesticide in multiple regions are hierarchically merged and MRL values are integrated to generate a UniMRLtree containing food classifications and inherited MRL values of multiple regions.
[0013] B1. First, a set of multiple hierarchical structures with node attribute value inheritance, namely MRLtree, is defined as {T1, T2, …, T k}, where k is the total number of trees. Each tree T i (i=1,2,…,k) contains nodes n1,n2,…,n j (where j represents the tree T i The node set N consists of the total number of foods with node attribute values in i Assuming that China’s MRLtree T a is the benchmark tree, and the goal is to transform other trees {T1,T2,…,T k} and T a Merge and form a merged tree T m The merging method realizes the integration of different MRLtrees through the following steps:
[0014] B2. Process the parts with the same structure. Identify the tree T i and T a The parts with the same structure, namely T i and T a The set of nodes with the same path (path from the root node to the current node) Oa , and lists the attribute value lists of each node in the current collection in the corresponding trees one by one.
[0015] B3. Processing parts with different structures. Identification tree T i and T a The parts with different structures, namely T i and T a The set of nodes E whose paths (from the root node to the current node) are different i , and place the nodes one by one in T i Add the path heterogeneity part to T a In T a Add a new branch to the tree structure, keeping its structure and node attribute values.
[0016] B4. Merge the tree structures and attribute values of all the same parts and different parts to construct a merged tree T m . Merge tree T m From N1, N2, ..., N k The merged node set N m Composition, N m Node n in m The tree structure and attribute value set is P(n m ). P(n m ) is determined by the tree structures and attribute value sets of the corresponding nodes in all parts with the same structure and the tree structures and attribute value sets of the corresponding nodes in all parts with different structures. m Middle Node n m The structure and attribute value P(n m ) is calculated as in Formula 2:
[0017]
[0018] Among them, k is the total number of trees to be merged, k1 represents the number of trees in the same part, k2 represents the number of trees in different parts, and k1+k2=k.
[0019] B5. Based on the above proposed merging method, a pesticide limit value merging tree for multiple regions is constructed. The pesticide limit value merging tree will reflect the relationship between food classifications in multiple regions and the inherited pesticide limit values.
[0020] C. Visualization of pesticide limit value merged tree map UniMRLtree.
[0021] C1. In order to visually depict the hierarchical relationship, the node-link method is used to display the hierarchical structure of the multi-regional pesticide limit value merged tree. The node represents a food or a food category in the pesticide limit value merged tree, and the link between nodes represents the parent-child relationship between nodes in the pesticide limit value merged tree, that is, the inclusion relationship between food categories at all levels. The attribute value of the node is the MRL value of the node food or food category in multiple regions in the pesticide limit value merged tree.
[0022] C2. The default shape of the node of the pesticide limit and merge tree is a circle. If the node food or category has no MRL value, that is, it is not specified in unlimited quantities in the MRL standards of multiple regions being compared and has not inherited the limit value of its ancestor node, then the node is displayed as a hollow circle with a black border. If the node has an MRL value, that is, it is specified in limited quantities in the MRL standards of one or more regions or has inherited the limit value of its ancestor node, a petal diagram or rose diagram is drawn on the node according to the regional information with values and the size of its MRL value.
[0023] C3. Use the force-directed method to realize the layout of the pesticide limit value merged tree graph UniMRLtree to improve space utilization.
[0024] D. Draw a petal diagram to compare the pesticide limit values defined for the same pesticide in different foods in multiple regions.
[0025] D1. According to the number of regions to be compared, N, a circular area is evenly divided into N sector areas. Each sector area represents a region, and different color codes are used to map different regions. The sector areas are arranged clockwise according to the custom region order, so as to ensure that the same sector area in multiple petal maps maps the same region information.
[0026] D2. Use different color codes to map different regions. The radius of the petals is fixed, and the angle of the petal center angle maps the pesticide limit value of each region. The larger the center angle, the larger the MRL value. In each sector area, the petals are drawn according to the MRL value of the food or food category represented by the node in the region represented by the sector area.
[0027] D3. Calculate the starting position of each petal. The starting angle S of the petals i The calculation method is as follows:
[0028]
[0029] Where N is the number of regions to be compared, and i is the sorting number of each region in the custom region order.
[0030] D4. Calculate the end position of each petal. The end angle E of the petal numbered i i The calculation method is as follows:
[0031]
[0032] Where N is the number of regions to be compared, i is the sorting number of each region in the custom region order, and v is the i represents the MRL value of the pesticide selected by the food represented by the current node in the region represented by the ith region, v max Represents the maximum value of the MRL value of the pesticide selected in all regions of all nodes of the pesticide limit merge tree.
[0033] E. Draw a rose diagram to compare the relative size of pesticide limits for the same food in multiple regions for the selected pesticide.
[0034] E1. Use different color codes to map different regions. The area of the sector in the Nightingale Rose diagram maps the pesticide limit values in each region. The larger the area, the larger the MRL value.
[0035] E2. Angle A of each area i The calculation method is as shown in formula 5:
[0036]
[0037] Where N is the number of regions to be compared, i is the sorting number of each region in the custom region order, and v is the i Indicates the MRL value of the selected pesticide for the food represented by the current node in the region represented by the i-th region.
[0038] E3. However, the values of some nodes vary greatly. In order to more clearly display data with different value ranges in visualization, the present invention adjusts the radius of the sectors of each area of the Nightingale rose diagram so that larger values are reduced and smaller values are enlarged. The radius R i The calculation method is as follows:
[0039] R i =ln(v i ×50)×15(i=0,1,2,....,N-1) (Formula 6)
[0040] Where N is the number of regions to be compared, i is the sorting number of each region in the custom region order, and v is the i Indicates the MRL value of the selected pesticide for the food represented by the current node in the region represented by the i-th region.
[0041] F. The rose diagram and petal diagram are embedded in the nodes of UniMRLtree respectively to show the differences in food classification and pesticide limits in multiple regions.
[0042] G. Draw a heat map of the MRL value matrix to show the distribution of pesticide limit values for a certain type of food in multiple regions.
[0043] G1. Each row of the matrix represents a region, each column represents a food, and each cell represents the MRL value of the food for the selected pesticide in the region.
[0044] G2. All foods are expanded along the horizontal axis in a depth-first traversal order, starting from the root node of the pesticide limit merge tree, visiting the child nodes of the root node in turn, and then recursively visiting the child nodes of the child nodes until all nodes of the complete pesticide limit merge tree are traversed.
[0045] G3. Use colors to map the strictness of pesticide limit values, with colors grading from pink to blue. Pink maps to smaller MRL values, representing stricter pesticide limits. Blue maps to larger MRL values, representing looser pesticide limits.
[0046] G4. When the mouse hovers over a cell in the MRL value matrix heat map, the pesticide MRL value information of the corresponding food in the area can be obtained.
[0047] The present invention also designs and implements a multi-regional MRL standard visual comparison analysis system MRLVis. The system mainly consists of a multi-regional pesticide limit merge tree view, a MRL value food (or food classification) quantity view, a multi-regional all food MRL value matrix heat map view, a food MRL value comparison result view and a food MRL value difference list view. Specifically:
[0048] 1. Multi-regional pesticide limit merged tree view. This view is an overall overview of the pesticide limit merged tree of six regions, showing the differences between the food classifications of the six regions and the MRL limits of the selected pesticides in various foods. This view uses different color codes to map regional information, red represents China, blue represents the United States, orange represents the European Union, green represents Japan, blue-green represents Australia, and light green represents CAC. The brown square node maps the root node of the pesticide limit merged tree of the six regions, and the blue square node represents the first-level food classification nodes such as fruits and vegetables in the six regions. The black hollow circle node, petal map node, and improved Nightingale rose node are all used to display a certain food or a certain food classification in the six regions. The links between nodes show the parent-child relationship of the nodes in the pesticide limit merged tree of the six regions, that is, the inclusion relationship between food classifications at all levels. Users can select pesticides by fuzzy searching the name of the pesticide, and click the search button. The view will display the pesticide limit merged tree for the selected pesticide in the six regions. The black hollow circle indicates that there is no MRL value for the selected pesticide in the node in the six regions. The petal diagram node and the improved Nightingale rose diagram node represent the MRL values of the selected pesticides in the six regions, among which there are several fan-shaped areas, that is, several regions with MRL limits. Users can use the button to choose to use the petal diagram or the improved Nightingale rose to show the differences in the MRL limits of various foods in the six regions. When the mouse hovers over the node, the floating box displays the name of the food represented by the node, as well as the limit value and food classification of the food in each region. The classification paths of each region that are different from the current merged tree node path are marked in red font. Click a node with the mouse to highlight the selected node and subnodes and the connections between nodes.
[0049] 2. View of the number of foods (or food categories) with MRL values. This view shows the number of foods or food categories with MRL values for selected pesticides in multiple regions. The name of this view will be automatically generated and updated based on the name of the pesticide selected by the user in the multi-regional pesticide limit merge tree view. When the user selects other pesticides, the data in this view will be dynamically updated so that the user can conduct a macro analysis of the scale of MRL values in various types of food in multiple regions.
[0050] 3. Heat map view of the MRL value matrix of all foods in multiple regions. This view shows the differences in MRL values among all foods in different regions. The vertical axis represents the region, and the horizontal axis represents the various foods under the selected food category. The size of the MRL value is mapped with a gradient from pink to blue. The pinker the color of the square, the smaller the MRL value, and the bluer the color of the square, the larger the MRL value. When the user selects a new pesticide, the data in this view will be dynamically updated. When the user hovers the mouse over a cell, the MRL value and food name of the food in the region mapped by the vertical coordinate of the rectangle will be displayed in the floating box.
[0051] 4. MRL value comparison result view in food. This view uses a stacked bar chart to show the number of stricter, same, looser and unique MRL values in the selected food or food category in each region compared with China. Use color to map the four situations of stricter, same, looser and unique, and the rectangular length of the bar chart maps the number of MRL values in various situations. The name of this view will be automatically generated and updated according to the name of the food or food category selected by the user in the multi-regional pesticide limit merger tree view. When the user selects a new food or food category, the data in this view will be dynamically updated. When the user hovers the mouse over a rectangle, the floating box will display the statistical number of the region represented by the rectangle and the corresponding MRL value comparison results (unique to the region, stricter than China, the same as China, and looser than China).
[0052] 5. List view of MRL value differences in food. This view provides users with a complete MRL value comparison list, showing in detail the MRL value comparison details for the selected food in each region and China. When the user clicks on a rectangle in the MRL value comparison result view in food, the view will display the name of the pesticide in all the comparison results contained in the selected rectangle, that is, the MRL value information of the pesticide in the region represented by the rectangle and in China. The name of this view will be automatically generated and updated based on the name of the region represented by the rectangle selected by the user in the MRL value comparison result view in food and the name of the comparison result. When the user selects a new rectangle, the data in this view will be dynamically updated. Users can drag the slider on the right side of the view to turn pages and view the details of these MRL value comparisons one by one.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The present invention proposes a method for comparing multiple hierarchical structures with inherited attribute values, and designs and implements a multi-regional MRL standard visual comparison analysis system MRLVis based on the above method and MRL standard data, which supports the comparison and analysis of the differences in MRL standards in multiple regions from multiple levels such as food classification structure to each MRL value. In terms of comparison efficiency, the existing technology is difficult to directly compare the inherited attribute values, while the present invention uses visual analysis technology to directly compare the inherited attribute values, greatly improving the comparison efficiency; in terms of comparison quantity, most of the existing technologies can only compare two hierarchical structure data with inherited attribute values at the same time, while the present invention can compare six or more hierarchical structure data at the same time; in terms of comparison method, the existing method mainly uses traditional manual methods or table methods for comparison, while the present invention designs a merged tree diagram, which greatly improves the intuitiveness and space utilization of the comparison. In terms of comparison experience, the existing system has a low degree of visualization and poor interactivity, while the present invention uses beautiful color mapping, humanized view layout methods, and convenient interaction methods, which can help users compare multiple regional MRL standards in an all-round and multi-level manner, greatly improving the user's work efficiency and comparison depth. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is an overall block diagram of a visual comparison method and system of a hierarchical structure with inheritance attributes in an embodiment of the present invention;
[0056] Figure 2 It is a schematic diagram of the pesticide limit value tree (MRLtree) of China's pesticide carbendazim in a specific embodiment of the present invention.
[0057] Figure 3 This is a schematic diagram of merging the MRLtrees of China, Region 1, and Region 2 to construct a merged pesticide limit value tree for the three regions in an embodiment of the present invention;
[0058] The red words in MRLtree represent the limit value of the node defined in the MRL standard, and the blue words represent the limit value of the node obtained after inheritance.
[0059] Figure 4 In the embodiment of the present invention, the user selects the pesticide "Permethrin", and the food node "kiwifruit" in the pesticide limit merge tree is visualized with a petal image embedded.
[0060] Figure 5 In the embodiment of the present invention, the user selects the pesticide "Methomyl", and the food node "peach" in the pesticide limit merge tree is visualized by embedding a rose diagram.
[0061] Figure 6MRLVis is a multi-regional MRL standard visual comparison and analysis system developed using MRL standard data in an embodiment of the present invention.
[0062] Among them, (a) is the switch button for embedding the node in the pesticide limit value merge tree diagram; it can switch the display of rose diagram or petal diagram. (b) is the pesticide selection box, which supports fuzzy search of pesticide names; (c) is the food search box, where you can select the node of interest, and the pesticide limit value merge tree diagram will automatically locate to the node; DETAILED DESCRIPTION
[0063] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings, but the scope of the present invention is not limited in any way.
[0064] The present invention provides a visual comparison method and system for hierarchical structures with inheritance attributes. Through visualization technology, macro and micro visualization comparative analysis of multiple hierarchical structures with inheritance attributes is supported, and combined with interactive technology, multi-view linkage is supported to help users explore and pay attention to information and improve user experience. The method and system provided by the present invention can be used to perform multi-dimensional hierarchical data comparative visual analysis on pesticide residue limit MRL standard data, library book catalog data, corporate organizational structure data, etc. in the field of food safety. This implementation uses the MRL standards in fruit and vegetable foods in six regions, namely China, the United States, the European Union, Japan, Australia, and the International Codex Alimentarius Commission (CAC) as the main data set. Among them, the number of fruit and vegetable foods, the number of pesticides, and the number of pesticide residue MRL values in the MRL standards of these six regions are shown in Table 1.
[0065] Table 1 Statistics of fruit and vegetable foods in the MRL standard datasets of six regions
[0066] area China USA European Union Japan Australia CAC Quantity of fruit and vegetable foods 222 136 492 297 226 26 Pesticide quantity 333 260 420 504 314 11 MRL value quantity 2658 906 75341 19089 2479 122
[0067] The specific steps for this implementation are as follows:
[0068] A. Based on the food classification system of each region, an MRLtree is constructed for each pesticide. The nodes of the MRLtree are the food or food classification of the corresponding region, and the links between the nodes represent the parent-child relationship in the food classification. The attribute value of the leaf node is the MRL limit value of the food for the selected pesticide. If the leaf node does not define the MRL limit value, it is necessary to query the ancestor node and run the recursive assignment algorithm for recursive assignment.
[0069] like Figure 2As shown in the figure, the MRLtree of carbendazim in China is constructed. The light green nodes represent food categories, and the orange nodes represent specific foods. The carbendazim limit value of "lemon" is 0.5mg / kg, and the carbendazim limit value of "pear" is 3mg / kg. When querying "hawthorn", it is found that the carbendazim pesticide limit value of "hawthorn" is not specified in the Chinese MRL standard. The carbendazim limit value of the parent node of "hawthorn", "pome fruit", is 3mg / kg, so the carbendazim limit value of "hawthorn" is inherited and is 3mg / kg.
[0070] B. Construct the pesticide limit value tree (UniMRLtree) for the six regions. The UniMRLtree construction process is as follows: Figure 3 As shown. First, the hierarchical structure of MRLtree in other regions is integrated based on China's food classification tree. For example, F1 in Region1 is exactly the same as China's F1 classification, but F4 and F10 do not exist in China, so new branches need to be added to the UniMRLtree. Secondly, traverse all nodes on the UniMRLtree and merge node attributes. For example, for the F7 node in the UniMRLtree, query the MRLtree after recursive assignment of China, Region 1, and Region 2, and find that the node has a limit value of Carbendazim in all three regions. Then use the names of the three regions and the limit values of each region as the attributes of the F7 node in the UniMRLtree.
[0071] C. Visualization of the combined pesticide limit tree (UniMRLtree) for the six regions.
[0072] D. Take the MRL limit of the pesticide “Permethrin” for the food “kiwifruit” in each region as an example and draw a petal diagram.
[0073] D1. Divide a circular area into 6 sectors equally. 0-59 degrees is China, 60-119 degrees is the European Union, 120-179 degrees is Japan, 180-239 degrees is the United States, 240-299 degrees is Australia, and 300-359 degrees is CAC.
[0074] D2. Use different color codes to map different regions. Red represents China, orange represents the EU, green represents Japan, blue represents the United States, blue-green represents Australia, and light green represents CAC.
[0075] D3. Calculate the angle of each petal. max=60mg / kg, after applying formula 3 and formula 4 and calculating, it is found that the red petals are 40 degrees, the orange petals are 1 degree, the green petals are 40 degrees, the blue petals are 40 degrees, and the blue-green petals are 40 degrees. Figure 4 shown.
[0076] E. Take the MRL limit of the food "peach" for the pesticide "methomyl" in various regions as an example and draw a rose diagram.
[0077] E1. Use different color codes to map different regions. Red represents China, orange represents the EU, green represents Japan, blue represents the United States, blue-green represents Australia, and light green represents CAC.
[0078] E2. Calculate the angle of each area. After applying formula 5 and calculating, the blue area is 214.28 degrees, the green area is 85.71 degrees, the blue-green area is 42.85 degrees, the light green area is 8.57 degrees, and the red area is 8.57 degrees.
[0079] F. Embed the rose graph and petal graph on the nodes of UniMRLtree respectively.
[0080] G. Draw a heat map of the MRL value matrix of the pesticide "Methomyl". Each row of the matrix heat map represents a region, from top to bottom, they are China, the United States, the European Union, Japan, Australia and CAC, and each column represents a food. Use color to map the size of the MRL limit. Pink maps smaller MRL values, which means that the pesticide limit is more stringent. Blue maps larger MRL values, which means that the pesticide limit is more relaxed. When the mouse hovers over a cell in the MRL value matrix heat map, you can get the pesticide MRL value information for the corresponding food in the region.
[0081] The present invention also designs and implements a multi-regional MRL standard visual comparison and analysis system MRLVis, such as Figure 6 As shown, it includes a tree view of pesticide limits in multiple regions, a view of the number of foods (or food categories) with MRL values, a heat map view of the matrix of MRL values of all foods in multiple regions, a view of the comparison results of MRL values in foods, and a list view of the differences in MRL values in foods. The use process of the system is as follows:
[0082] 1. In Figure 6 Select the pesticide "Methomyl" in the pesticide selection box in (b), and the system will generate a pesticide limit merge tree for this pesticide.
[0083] 2. Select the food node of interest, e.g. Figure 6 In (c), enter the food name "peach", and the system automatically locates the node. Figure 5 shown.
[0084] 3. Move the mouse to the "peach" node, and all the information of the node will be displayed in the floating box for users to compare and analyze.
[0085] 4. Such as Figure 6 As shown in (d), the number of foods (or food categories) with MRL values for the pesticide "Methomyl" can be observed.
[0086] 5. As Figure 6 As shown in (e), you can view the heat map of the MRL value matrix of all foods. When the mouse hovers over a cell, the specific value can be displayed.
[0087] 6. Such as Figure 6 (f) shows the comparison of MRL values of food “peach” in China and other regions.
[0088] 7. Click Figure 6 (f) The EU’s “strict” color block, Figure 6 (g) A complete MRL comparison list was generated, showing in detail the MRL comparison details for the selected food “peach” between the EU and China.
[0089] It should be noted that the purpose of publishing the embodiments is to help further understand the present invention, but those skilled in the art can understand that various substitutions and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the contents disclosed in the embodiments, and the scope of protection claimed by the present invention shall be subject to the scope defined in the claims.
Claims
1. A comparative visual analysis method for the maximum limit (MRL) standards of pesticide residues in multiple regions, comprising the following steps: A. Build the MRLtree for each pesticide by performing the following operations: B. Hierarchically merge multiple MRLtrees of the same pesticide in multiple regions and integrate their MRL values to generate a UniMRLtree containing food classifications and inherited MRL values from multiple regions; C. Design pesticide limit value merged tree map UniMRLtree; C1. The node-link method is used to display the hierarchical structure of the multi-regional pesticide limit value merged tree. The node represents a food or a food category in the pesticide limit value merged tree. The links between nodes represent the parent-child relationship between nodes in the pesticide limit value merged tree, that is, the inclusion relationship between food categories at all levels. The attribute value of the node is the MRL value of each node in the pesticide limit value merged tree in multiple regions. C2. The node shape of the pesticide limit and merge tree is a circle by default. If the node has no MRL value, that is, it is not limited in the MRL standards of multiple regions being compared and has not inherited the limit value of its ancestor node, then the node is displayed as a hollow circle with a black border. If the node has an MRL value, that is, it is limited in one or more regional MRL standards or has inherited the limit value of its ancestor node, a petal diagram or a rose diagram is drawn on the node according to the regional information with values and its MRL value size; C3. Use force-oriented layout to display the pesticide limit value merged tree map UniMRLtree to improve space utilization; D. Draw a petal diagram to compare the pesticide limit values of the same pesticide in different foods in multiple regions; E. Draw a Nightingale Rose diagram to compare the relative size of pesticide limits for the same food in multiple regions for the selected pesticide; F. The Nightingale rose diagram and petal diagram are embedded in the nodes of UniMRLtree to show the differences in food classification and pesticide limits in multiple regions; G. Draw a heat map of the MRL value matrix to show the distribution of pesticide limits for all foods in multiple regions; G1. Each row represents a region, each column represents a food, and each cell represents the MRL value of the food for the selected pesticide in the region; G2. All foods in multiple regions are expanded along the horizontal axis in a depth-first traversal order, starting from the root node of the pesticide limit value merged tree, visiting the child nodes of the root node in turn, and then recursively visiting the child nodes of the child nodes until all nodes of the complete pesticide limit value merged tree are traversed; G3. Use colors to map the strictness of pesticide limit values. The colors gradually change from pink to blue. Pink maps to smaller MRL values, which means that the pesticide limit is more stringent, and blue maps to larger MRL values, which means that the pesticide limit is more relaxed. G4. When the mouse hovers over a cell in the MRL value matrix heat map, the pesticide MRL value information of the corresponding food in the area can be obtained.
2. The method according to claim 1, characterized in that: Step A is specifically as follows: A1. According to the MRL standard, construct an MRLtree for each pesticide in each MRL standard system; A2. Assign values to each node in the MRLtree of each pesticide using a recursive assignment algorithm; The recursive assignment algorithm is as follows: Among them, the set of food classification nodes and food nodes in a region is defined as node set N, and the hierarchical structure of N, that is, the food classification system architecture of the region is defined as T. For each node n∈N, let v(n) represent its attribute value, that is, the MRL value of the food (or food classification) for a specific pesticide, p(n) represents the parent node of node n, l(n) represents the level of the node in the tree, the level of the root node is 0, and the attribute value of any node n is Q(n,l).
3. The method according to claim 1, characterized in that: Step B is specifically as follows: B1. First, a set of multiple hierarchical structures with node attribute value inheritance, namely MRLtree, is defined as {T1, T2, …, T k }, where k is the total number of trees, and each tree T i (i=1,2,…,k) contains nodes n1,n2,…,n j (where j represents the tree T i The node set N consists of the total number of foods with node attribute values in i , assuming that China's MRLtree T a is the benchmark tree, and the goal is to transform other trees {T1,T2,…,T k } and T a Merge and form a merged tree T m ; B2. Process the parts with the same structure and identify the tree T i and T a The parts with the same structure, namely T i and T a The set of nodes with the same path (path from the root node to the current node) O a , and list the attribute value lists of each node in the current collection in the corresponding trees one by one; B3. Processing parts with different structures and identifying tree T i and T a The parts with different structures, namely T i and T a The set of nodes E whose paths (from the root node to the current node) are different i , and place the nodes one by one in T i Add the path heterogeneity part to T a In T a Add a new branch to the tree structure, keeping its structure and node attribute values; B4. Merge the tree structures and attribute values of all the same parts and different parts to construct a merged tree T m , merge tree T m From N1, N2, ..., N k The merged node set N m Composition, N m Node n in m The tree structure and attribute value set is P(n m ), P(n m ) is determined by the tree structures and attribute value sets of the corresponding nodes in all parts with the same structure and the tree structures and attribute value sets of the corresponding nodes in all parts with different structures; B5. Based on the above-mentioned merging method, a pesticide limit merge tree for multiple regions is constructed. The pesticide limit merge tree will reflect the relationship between the food classifications of multiple regions and the inherited pesticide limits.
4. The method according to claim 2, characterized in that: Step B4: The merged tree T m Middle Node n m The structure and attribute value P(n m ) is calculated as in Formula 2: Among them, k is the total number of trees to be merged, k1 represents the number of trees in the same part, k2 represents the number of trees in different parts, and k1+k2=k.
5. The method according to claim 1, characterized in that: Step D is specifically as follows: D1. According to the number of regions N to be compared, a circular area is evenly divided into N sector areas, each sector area represents a region, and different color codes are used to map different regions. The sector areas are arranged clockwise according to the custom region order, so as to ensure that the same sector area in multiple petal maps maps the same region information; D2. Use different color codes to map different regions. The radius of the petals is fixed, and the angle of the petal center angle maps the pesticide limit value of each region. The larger the center angle, the larger the MRL value. In each sector area, the petals are drawn according to the MRL value of the food or food category represented by the node in the region represented by the sector area; D3. Calculate the starting position of each petal and the starting angle S of the petal i The calculation method is as follows: Where N is the number of regions to be compared, and i is the sorting number of each region in the custom region order; D4. Calculate the end position of each petal. The end angle E of the petal numbered i i The calculation method is as follows: Where N is the number of regions to be compared, i is the sorting number of each region in the custom region order, and v is the i represents the MRL value of the pesticide selected by the food represented by the current node in the region represented by the ith region, v max Represents the maximum value of the MRL value of the pesticide selected in all regions of all nodes of the pesticide limit merge tree.
6. The method according to claim 1, characterized in that: Step E is specifically as follows: E1. Use different color codes to map different regions. The area of the sector in the Nightingale Rose diagram maps the pesticide limit values of each region. The larger the area, the larger the limit value (relaxed). E2. Angle A of each area i The calculation method is as shown in formula 5: Where N is the number of regions to be compared, i is the sorting number of each region in the custom region order, and v is the i Indicates the MRL value of the selected pesticide for the food represented by the current node in the region represented by the i-th region; E3. However, the values of some nodes vary greatly. In order to more clearly display data with different value ranges in visualization, the present invention adjusts the radius of the sectors of each area of the Nightingale rose diagram so that larger values are reduced and smaller values are enlarged. The radius R i The calculation method is as follows: R i = ln(v i × 50) × 15 (i = 0, 1, 2,...., N - 1) (Equation 6) Where N is the number of regions to be compared, i is the sorting number of each region in the custom region order, and v is the i Indicates the MRL value of the selected pesticide for the food represented by the current node in the region represented by the i-th region.
7. A visual comparison and analysis system for MRL standards in multiple regions, including a merged tree view of pesticide limits in multiple regions, a view of the number of foods (or food categories) with MRL values, a heat map view of the MRL value matrix of all foods in multiple regions, a comparison result view of MRL values in foods, and a list view of differences in MRL values in foods.
8. The comparative visual analysis system according to claim 7, characterized in that: The system includes node embedded graphic switching function, pesticide search function, node positioning function, node link tree highlighting function, node link tree magnification function, and node link tree dragging function.
9. The comparative visual analysis system according to claim 8, characterized in that: The node embedded graph switching function is specifically to switch between petal graphs or rose graphs.
Citation Information
Patent Citations
Steam-generator
US240299A
Joi-tx gowdey
US300359A
Visual comparison analysis method and system for multi-region MRL standards
CN108280191A
Geographic space region data multi-scale visualization method based on variable coefficient
CN113792100A
Agricultural product pesticide MRL standard classification estimation method based on deep learning
CN115510284A
