Dynamic mulberry-based graph data processing method and system for small-scale shortage of mineral resources
Through the dynamic Sankey diagram data processing method and system, the problems of database coverage and update frequency, operational complexity, lack of professionalism, and lack of collaboration capabilities in niche mineral resource analysis are solved, and efficient data collection, processing, and visualization are achieved. , improving analysis efficiency and decision support capabilities.
Patent Information
- Application Number
- CN202410879110.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-18
AI Technical Summary
Existing databases and analysis methods cannot effectively meet the needs of niche mineral resource analysis. The operations are complex, lack pertinence, lack of professionalism and applicability, and have limited collaboration and interaction capabilities, resulting in low efficiency and low popularity of niche mineral resource analysis.
Provide a dynamic Sankey diagram data processing method and system for niche mineral resources that are in short supply. Resource flow and quantity data are entered through Excel templates, uploaded to the system backend, data calculation and integration are performed, and Sankey diagrams are drawn using ECharts and SVG technology, and Add interactive features and create control panels to dynamically adjust display parameters and optimize chart performance and compatibility.
A comprehensive and flexible comprehensive assessment and decision support service system for niche scarce mineral resources has been constructed, which achieves efficient collaboration of data collection, storage, processing and visualization, improves the scalability and maintainability of the system, and provides data support and deep relationship discovery, improving the efficiency of data collection and analysis.
Smart Images

Figure CN118796928A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of resources and minerals, and in particular, to a method and system for processing dynamic Sankey diagram data of rare and scarce mineral resources. Background Art
[0002] The limitations of current databases and analysis methods include: the database coverage and update frequency may not meet the needs of niche mineral resource analysis; the analysis methods may lack specificity and fail to fully explore the characteristics of niche mineral resources.
[0003] Current operational complexities include: the operating interface and learning curve of some software are relatively steep; this may affect the efficiency and popularity of niche mineral resource analysis work;
[0004] The current lack of professionalism and applicability includes: some software may lack professional functions and models for niche mineral resource analysis; it cannot fully meet the special needs of niche mineral resource analysis
[0005] The current limited collaboration and interaction capabilities include: there may be a lack of good data interaction and collaboration functions between software; this may limit group collaboration and cross-disciplinary communication Summary of the invention
[0006] In view of the defects in the prior art, the purpose of the present invention is to provide a dynamic Sankey diagram data processing method and system for niche and scarce mineral resources.
[0007] A method for processing dynamic Sankey diagram data of a minority scarce mineral resource provided by the present invention comprises:
[0008] Step S1: Enter the flow direction and quantity data of resources at different stages according to the Excel template provided by the system;
[0009] Step S2: Upload the completed Excel file to the system through the system's backend management interface;
[0010] Step S3: Calculate and integrate the stored resource MFA data to form a data structure that meets the requirements for drawing the Sankey diagram;
[0011] Step S4: The drawn Sankey diagram is presented through the front-end module of the system, which can manage historical data.
[0012] Preferably, in step S3:
[0013] Prepare data for drawing the Sankey diagram. The data includes the name, inventory, and starting point, end point, and flow rate of each material flow stage. The data is stored in JSON or CSV format.
[0014] Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage according to the prepared data. The specific steps are as follows:
[0015] Initialize the ECharts instance and set the size and position of the chart;
[0016] Configure ECharts series and data sets, specify the location, size, and style properties of nodes;
[0017] Set the interactive functions of the node, including displaying detailed information when the mouse hovers and clicking to jump;
[0018] Call the rendering function of ECharts to generate a rectangular node.
[0019] Preferably, the arrow coordinates are calculated, and the start and end coordinates of the SVG arrow are calculated according to the position and size of the rectangular node generated by ECharts:
[0020] Traverse the material flow data and obtain the starting and ending nodes of each flow;
[0021] Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes;
[0022] Calculate the thickness of the SVG arrow based on the flow data;
[0023] Draw SVG arrows. Using SVG technology, draw arrows representing material flow according to the calculated coordinates and thickness:
[0024] Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts;
[0025] Use SVG's path element to draw the body of the arrow based on the start and end coordinates;
[0026] Use SVG's polygon element to draw the arrowhead;
[0027] Set the style of the arrow, including color and transparency.
[0028] Preferably, integration and interaction are used to seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram, and to add interactive functions:
[0029] Add the SVG element to the container where the ECharts chart is located;
[0030] Add mouse hover events to SVG arrows to display detailed traffic information;
[0031] Add click events to ECharts rectangle nodes to jump to the detailed report of the corresponding stage;
[0032] Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram;
[0033] Optimize and debug, optimize and debug the generated Sankey diagram:
[0034] Check the display effect of the Sankey diagram on different browsers and devices and perform compatibility processing;
[0035] Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of charts;
[0036] Adjust the layout and style of the Sankey diagram;
[0037] System Boundary:
[0038] The life cycle of niche mineral resources includes mining, refining, production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into products. Trade import and export flows and inventory changes occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. The treatment of scrapped products occurs in the waste management stage, and some niche mineral resources are recycled at this stage. The trade of niche mineral resources is concentrated in the production and manufacturing stages.
[0039] Stock and flow calculation:
[0040] Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage consists of the following seven components, which can be calculated by formula (1):
[0041]
[0042] In the formula, j represents the jth life cycle stage, and t represents the year; is the import flow of niche mineral resources in the jth life cycle stage of the product containing niche mineral resources in year t; is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t, and is subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage; is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t; is the recycling flow of the niche mineral resources that flows into the jth life stage in year t. Whether there is a recycling flow depends on the specific production process; is the loss flow of niche mineral resources in the jth life cycle stage in year t.
[0043] Preferably, the accounting methods for each life cycle stage are as follows:
[0044] Domestic production and processing transfer flow:
[0045] The conversion process refers to the inflow and outflow of products containing niche mineral resources during the life cycle, calculated as follows:
[0046] f i,t =m i,t ×c i,t (2)
[0047] F i,j =∑ j f i,j (3)
[0048] Among them, f i,t represents the flow of product i containing niche mineral resources in year t, m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j, F i,j Represents the total flow of niche mineral resources at different stages;
[0049] Trade Flows:
[0050] The amount of Niche Mineral Resources in each product is quantified by multiplying the quantity of each traded product by its specific Niche Mineral Resource content, calculated as follows:
[0051]
[0052] in, and represents the total import and export volume in the jth period of the tth year, and Respectively represent the import and export volumes of products containing niche mineral resources; c i,t is the content of niche mineral resources of product i;
[0053] Loss Flow:
[0054] The loss rate of niche minerals at each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources depends on the loss rate and the recovery rate of each niche mineral resource product, which is calculated as follows:
[0055]
[0056] in represents the loss in the jth stage in the tth year, represents the usage in the jth period in the tth year, is the loss rate of stage j in year t;
[0057] Stock
[0058] In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories, as calculated in Equation 7. Changes in in-use stocks are derived from the balance between input and output flows, and the outflow stock is calculated using a delay model using Equation 8:
[0059]
[0060] Where l is the life of the product containing niche mineral resources, f i,t is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in year tl;
[0061] Recycling Flow:
[0062] Recycling activities include open-loop recycling and closed-loop recycling; recycled niche mineral resources refer to the amount of waste niche mineral resources recycled to the processing or manufacturing stage. Recycled niche mineral resource waste is not included in the final cycle. The data is calculated using Formula 9:
[0063]
[0064] In the formula, represents the recovery of minority mineral resources in stage j in year t, is the recovery rate of the minority mineral resources in the jth stage in the tth year, It represents the usage in the jth period in the tth year.
[0065] A dynamic Sankey diagram data processing system for minority scarce mineral resources provided by the present invention comprises:
[0066] Module M1: Enter the flow direction and quantity data of resources at different stages according to the Excel template provided by the system;
[0067] Module M2: Upload the completed Excel file to the system through the system's backend management interface;
[0068] Module M3: Calculates and integrates the stored resource MFA data to form a data structure that meets the requirements for drawing the Sankey diagram;
[0069] Module M4: The completed Sankey diagram is presented through the front-end module of the system, which can manage historical data.
[0070] Preferably, in the module M3:
[0071] Prepare data for drawing the Sankey diagram. The data includes the name, inventory, and starting point, end point, and flow rate of each material flow stage. The data is stored in JSON or CSV format.
[0072] Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage according to the prepared data. The specific steps are as follows:
[0073] Initialize the ECharts instance and set the size and position of the chart;
[0074] Configure ECharts series and data sets, specify the location, size, and style properties of nodes;
[0075] Set the interactive functions of the node, including displaying detailed information when the mouse hovers and clicking to jump;
[0076] Call the rendering function of ECharts to generate a rectangular node.
[0077] Preferably, the arrow coordinates are calculated, and the start and end coordinates of the SVG arrow are calculated according to the position and size of the rectangular node generated by ECharts:
[0078] Traverse the material flow data and obtain the starting and ending nodes of each flow;
[0079] Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes;
[0080] Calculate the thickness of the SVG arrow based on the flow data;
[0081] Draw SVG arrows. Using SVG technology, draw arrows representing material flow according to the calculated coordinates and thickness:
[0082] Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts;
[0083] Use SVG's path element to draw the body of the arrow based on the start and end coordinates;
[0084] Use SVG's polygon element to draw the arrowhead;
[0085] Set the style of the arrow, including color and transparency.
[0086] Preferably, integration and interaction are used to seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram, and to add interactive functions:
[0087] Add the SVG element to the container where the ECharts chart is located;
[0088] Add mouse hover events to SVG arrows to display detailed traffic information;
[0089] Add click events to ECharts rectangle nodes to jump to the detailed report of the corresponding stage;
[0090] Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram;
[0091] Optimize and debug, optimize and debug the generated Sankey diagram:
[0092] Check the display effect of the Sankey diagram on different browsers and devices and perform compatibility processing;
[0093] Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of charts;
[0094] Adjust the layout and style of the Sankey diagram;
[0095] System Boundary:
[0096] The life cycle of niche mineral resources includes mining and refining, production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into products. Trade import and export flows and inventory changes occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. The treatment of scrapped products occurs in the waste management stage, and some niche mineral resources are recycled at this stage. The trade of niche mineral resources is concentrated in the production and manufacturing stages.
[0097] Stock and flow calculation:
[0098] Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage consists of the following seven components, which can be calculated by formula (1):
[0099]
[0100] In the formula, j represents the jth life cycle stage, and t represents the year; is the import flow of niche mineral resources in the jth life cycle stage of the product containing niche mineral resources in year t; is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t, and is subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage; is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t; is the recycling flow of the niche mineral resources that flows into the jth life stage in year t. Whether there is a recycling flow depends on the specific production process; is the loss flow of niche mineral resources in the jth life cycle stage in year t.
[0101] Preferably, the accounting methods for each life cycle stage are as follows:
[0102] Domestic production and processing transfer flow:
[0103] The conversion process refers to the inflow and outflow of products containing niche mineral resources during the life cycle, calculated as follows:
[0104] f i,t =m i,t ×c i,t (2)
[0105] F i,j =∑ j f i,j (3)
[0106] Among them, f i,t represents the flow of product i containing niche mineral resources in year t, m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j, F i,j Represents the total flow of niche mineral resources at different stages;
[0107] Trade Flows:
[0108] The amount of Niche Mineral Resources in each product is quantified by multiplying the quantity of each traded product by its specific Niche Mineral Resource content, calculated as follows:
[0109]
[0110] in, and represents the total import and export volume in the jth period of the tth year, and Respectively represent the import and export volumes of products containing niche mineral resources; c i,t is the content of niche mineral resources of product i;
[0111] Loss Flow:
[0112] The loss rate of niche minerals at each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources depends on the loss rate and the recovery rate of each niche mineral resource product, which is calculated as follows:
[0113]
[0114] in represents the loss in the jth stage in the tth year, represents the usage in the jth period in the tth year, is the loss rate of stage j in year t;
[0115] Stock
[0116] In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories, as calculated in Equation 7. Changes in in-use stocks are derived from the balance between input and output flows, and the outflow stock is calculated using a delay model using Equation 8:
[0117]
[0118] Where l is the life of the product containing niche mineral resources, f i,i is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in year tl;
[0119] Recycling Flow:
[0120] Recycling activities include open-loop recycling and closed-loop recycling; recycled niche mineral resources refer to the amount of waste niche mineral resources recycled to the processing or manufacturing stage. Recycled niche mineral resource waste is not included in the final cycle. The data is calculated using Formula 9:
[0121]
[0122] In the formula, represents the recovery of minority mineral resources in stage j in year t, is the recovery rate of the minority mineral resources in the jth stage in the tth year, It represents the usage in the jth period in the tth year.
[0123] Compared with the prior art, the present invention has the following beneficial effects:
[0124] 1. In terms of the overall architecture of the system of the present invention, the "1+1+N" model is adopted, namely 1 big data center + 1 data visualization management and service platform + N application services, to build a comprehensive and flexible comprehensive evaluation and decision support service system for niche scarce mineral resources; using a four-layer architecture (acquisition layer, data layer, application layer and display layer), it realizes efficient collaboration of data acquisition, storage, processing and visualization, and improves the scalability and maintainability of the system.
[0125] 2. The present invention uses a digitized digital twin model to model, observe and study the spatiotemporal evolution laws and dynamic index evaluation system of minority scarce mineral resources, realizing a digital mirror of the metabolic evolution of material flows throughout the life cycle of mineral resources, and providing data support for comprehensive evaluation and decision-making;
[0126] 2. The present invention comprehensively uses software and hardware technologies such as digitized digital twins, cloud computing, the Internet of Things, big data, and terminal intelligent sensors to comprehensively perceive the characteristic data of minerals at different stages, and build models to connect the physical space of industrial factories with the digital space, discover deep-seated relationships, and realize the digital mirroring of the real world, thereby improving the efficiency of data collection and analysis.
[0127] 3. The data acquisition and processing module of the present invention supports various forms of data acquisition, including local upload, third-party acquisition, and AI camera and IoT sensor acquisition, providing a flexible and highly compatible data source and ensuring the reliability and security of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0128] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0129] Figure 1 This is the implementation method of dynamic Sankey diagram;
[0130] Figure 2 is the system boundary diagram;
[0131] Figure 3 It is the flow chart of system data processing;
[0132] Figure 4 Shows a process flow diagram for the system. DETAILED DESCRIPTION
[0133] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0134] Embodiment 1:
[0135] According to a method for processing dynamic Sankey diagram data of a minority scarce mineral resource provided by the present invention, Figure 1-Figure 4 As shown, including:
[0136] Step S1: Enter the flow direction and quantity data of resources at different stages according to the Excel template provided by the system;
[0137] Step S2: Upload the completed Excel file to the system through the system's backend management interface;
[0138] Step S3: Calculate and integrate the stored resource MFA data to form a data structure that meets the requirements for drawing the Sankey diagram;
[0139] Step S4: The drawn Sankey diagram is presented through the front-end module of the system, which can manage historical data.
[0140] Specifically, in step S3:
[0141] Prepare data for drawing the Sankey diagram. The data includes the name, inventory, and starting point, end point, and flow rate of each material flow stage. The data is stored in JSON or CSV format.
[0142] Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage according to the prepared data. The specific steps are as follows:
[0143] Initialize the ECharts instance and set the size and position of the chart;
[0144] Configure ECharts series and data sets, specify the location, size, and style properties of nodes;
[0145] Set the interactive functions of the node, including displaying detailed information when the mouse hovers and clicking to jump;
[0146] Call the rendering function of ECharts to generate a rectangular node.
[0147] Specifically, calculate the arrow coordinates, and calculate the start and end coordinates of the SVG arrow based on the position and size of the rectangular node generated by ECharts:
[0148] Traverse the material flow data and obtain the starting and ending nodes of each flow;
[0149] Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes;
[0150] Calculate the thickness of the SVG arrow based on the flow data;
[0151] Draw SVG arrows. Using SVG technology, draw arrows representing material flow according to the calculated coordinates and thickness:
[0152] Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts;
[0153] Use SVG's path element to draw the body of the arrow based on the start and end coordinates;
[0154] Use SVG's polygon element to draw the arrowhead;
[0155] Set the style of the arrow, including color and transparency.
[0156] Specifically, integration and interaction seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram, and add interactive functions:
[0157] Add the SVG element to the container where the ECharts chart is located;
[0158] Add mouse hover events to SVG arrows to display detailed traffic information;
[0159] Add click events to ECharts rectangle nodes to jump to the detailed report of the corresponding stage;
[0160] Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram;
[0161] Optimize and debug, optimize and debug the generated Sankey diagram:
[0162] Check the display effect of the Sankey diagram on different browsers and devices and perform compatibility processing;
[0163] Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of charts;
[0164] Adjust the layout and style of the Sankey diagram;
[0165] System Boundary:
[0166] The life cycle of niche mineral resources includes mining, refining, production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into products. Trade import and export flows and inventory changes occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. The treatment of scrapped products occurs in the waste management stage, and some niche mineral resources are recycled at this stage. The trade of niche mineral resources is concentrated in the production and manufacturing stages.
[0167] Stock and flow calculation:
[0168] Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage consists of the following seven components, which can be calculated by formula (1):
[0169]
[0170] In the formula, j represents the jth life cycle stage, and t represents the year; is the import flow of niche mineral resources in the jth life cycle stage of the product containing niche mineral resources in year t; is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t, and is subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage; is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t; is the recycling flow of the niche mineral resources that flows into the jth life stage in year t. Whether there is a recycling flow depends on the specific production process; is the loss flow of niche mineral resources in the jth life cycle stage in year t.
[0171] Specifically, the accounting methods for each life cycle stage are as follows:
[0172] Domestic production and processing transfer flow:
[0173] The conversion process refers to the inflow and outflow of products containing niche mineral resources during the life cycle, calculated as follows:
[0174] f i,t =m i,t ×c i,t (2)
[0175] F i,j =∑ j f i,j (3)
[0176] Among them, f i,t represents the flow of product i containing niche mineral resources in year t, m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j, F i,j Represents the total flow of niche mineral resources at different stages;
[0177] Trade Flows:
[0178] The amount of Niche Mineral Resources in each product is quantified by multiplying the quantity of each traded product by its specific Niche Mineral Resource content, calculated as follows:
[0179]
[0180] in, and represents the total import and export volume in the jth period of the tth year, and Respectively represent the import and export volumes of products containing niche mineral resources; ci,t is the content of niche mineral resources of product i;
[0181] Loss Flow:
[0182] The loss rate of niche minerals at each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources depends on the loss rate and the recovery rate of each niche mineral resource product, which is calculated as follows:
[0183]
[0184] in represents the loss in the jth stage in the tth year, represents the usage in the jth period in the tth year, is the loss rate of stage j in year t;
[0185] Stock
[0186] In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories, as calculated in Equation 7. Changes in in-use stocks are derived from the balance between input and output flows, and the outflow stock is calculated using a delay model using Equation 8:
[0187]
[0188] Where l is the life of the product containing niche mineral resources, f i,t is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in year tl;
[0189] Recycling Flow:
[0190] Recycling activities include open-loop recycling and closed-loop recycling; recycled niche mineral resources refer to the amount of waste niche mineral resources recycled to the processing or manufacturing stage. Recycled niche mineral resource waste is not included in the final cycle. The data is calculated using Formula 9:
[0191]
[0192] In the formula, represents the recovery of minority mineral resources in stage j in year t, is the recovery rate of the minority mineral resources in the jth stage in the tth year, It represents the usage in the jth period in the tth year.
[0193] Embodiment 2:
[0194] Embodiment 2 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.
[0195] The present invention also provides a dynamic Sankey diagram data processing system for niche and scarce mineral resources. The dynamic Sankey diagram data processing system for niche and scarce mineral resources can be realized by executing the process steps of the dynamic Sankey diagram data processing method for niche and scarce mineral resources, that is, those skilled in the art can understand the dynamic Sankey diagram data processing method for niche and scarce mineral resources as a preferred implementation mode of the dynamic Sankey diagram data processing system for niche and scarce mineral resources.
[0196] A dynamic Sankey diagram data processing system for minority scarce mineral resources provided by the present invention comprises:
[0197] Module M1: Enter the flow direction and quantity data of resources at different stages according to the Excel template provided by the system;
[0198] Module M2: Upload the completed Excel file to the system through the system's backend management interface;
[0199] Module M3: Calculates and integrates the stored resource MFA data to form a data structure that meets the requirements for drawing the Sankey diagram;
[0200] Module M4: The completed Sankey diagram is presented through the front-end module of the system, which can manage historical data.
[0201] Specifically, in the module M3:
[0202] Prepare data for drawing the Sankey diagram. The data includes the name, inventory, and starting point, end point, and flow rate of each material flow stage. The data is stored in JSON or CSV format.
[0203] Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage according to the prepared data. The specific steps are as follows:
[0204] Initialize the ECharts instance and set the size and position of the chart;
[0205] Configure ECharts series and data sets, specify the location, size, and style properties of nodes;
[0206] Set the interactive functions of the node, including displaying detailed information when the mouse hovers and clicking to jump;
[0207] Call the rendering function of ECharts to generate a rectangular node.
[0208] Specifically, calculate the arrow coordinates, and calculate the start and end coordinates of the SVG arrow based on the position and size of the rectangular node generated by ECharts:
[0209] Traverse the material flow data and obtain the starting and ending nodes of each flow;
[0210] Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes;
[0211] Calculate the thickness of the SVG arrow based on the flow data;
[0212] Draw SVG arrows. Using SVG technology, draw arrows representing material flow according to the calculated coordinates and thickness:
[0213] Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts;
[0214] Use SVG's path element to draw the body of the arrow based on the start and end coordinates;
[0215] Use SVG's polygon element to draw the arrowhead;
[0216] Set the style of the arrow, including color and transparency.
[0217] Specifically, integration and interaction seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram, and add interactive functions:
[0218] Add the SVG element to the container where the ECharts chart is located;
[0219] Add mouse hover events to SVG arrows to display detailed traffic information;
[0220] Add click events to ECharts rectangle nodes to jump to the detailed report of the corresponding stage;
[0221] Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram;
[0222] Optimize and debug, optimize and debug the generated Sankey diagram:
[0223] Check the display effect of the Sankey diagram on different browsers and devices and perform compatibility processing;
[0224] Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of charts;
[0225] Adjust the layout and style of the Sankey diagram;
[0226] System Boundary:
[0227] The life cycle of niche mineral resources includes mining and refining, production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into products. Trade import and export flows and inventory changes occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. The treatment of scrapped products occurs in the waste management stage, and some niche mineral resources are recycled at this stage. The trade of niche mineral resources is concentrated in the production and manufacturing stages.
[0228] Stock and flow calculation:
[0229] Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage consists of the following seven components, which can be calculated by formula (1):
[0230]
[0231] In the formula, j represents the jth life cycle stage, and t represents the year; is the import flow of niche mineral resources in the jth life cycle stage of the product containing niche mineral resources in year t; is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t, and is subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage; is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t; is the recycling flow of the niche mineral resources that flows into the jth life stage in year t. Whether there is a recycling flow depends on the specific production process; is the loss flow of niche mineral resources in the jth life cycle stage in year t.
[0232] Specifically, the accounting methods for each life cycle stage are as follows:
[0233] Domestic production and processing transfer flow:
[0234] The conversion process refers to the inflow and outflow of products containing niche mineral resources during the life cycle, calculated as follows:
[0235] f i,t =m i,t ×c i,t (2)
[0236] F i,j =∑ j f i,j (3)
[0237] Among them, f i,t represents the flow of product i containing niche mineral resources in year t, m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j, F i,j Represents the total flow of niche mineral resources at different stages;
[0238] Trade Flows:
[0239] The amount of Niche Mineral Resources in each product is quantified by multiplying the quantity of each traded product by its specific Niche Mineral Resource content, calculated as follows:
[0240]
[0241] in, and represents the total import and export volume in the jth period of the tth year, and Respectively represent the import and export volumes of products containing niche mineral resources; c i,t is the content of niche mineral resources of product i;
[0242] Loss Flow:
[0243] The loss rate of niche minerals at each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources depends on the loss rate and the recovery rate of each niche mineral resource product, which is calculated as follows:
[0244]
[0245] in represents the loss in the jth stage in the tth year, represents the usage in the jth period in the tth year, is the loss rate of stage j in year t;
[0246] Stock
[0247] In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories, as calculated in Equation 7. Changes in in-use stocks are derived from the balance between input and output flows, and the outflow stock is calculated using a delay model using Equation 8:
[0248]
[0249] Where l is the life of the product containing niche mineral resources, f i,t is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in year tl;
[0250] Recycling Flow:
[0251] Recycling activities include open-loop recycling and closed-loop recycling; recycled niche mineral resources refer to the amount of waste niche mineral resources recycled to the processing or manufacturing stage. Recycled niche mineral resource waste is not included in the final cycle. The data is calculated using Formula 9:
[0252]
[0253] In the formula, represents the recovery of minority mineral resources in stage j in year t, is the recovery rate of the minority mineral resources in the jth stage in the tth year, It represents the usage in the jth period in the tth year.
[0254] Embodiment 3:
[0255] Embodiment 3 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.
[0256] As an open source and free software, OpenLCA is highly flexible in use. It integrates multiple life cycle databases and analysis methods and provides rich visualization and reporting functions.
[0257] SimaPro is widely used in industry and academia, with a comprehensive database, professional analysis methods, excellent visualization effects, and a user-friendly interface.
[0258] GaBi was developed by Thinkstep and has a great influence in the industry. Its database and models cover a wide range of industries and have powerful data management and modeling capabilities.
[0259] 1. System overall architecture
[0260] This system adopts the "1+1+N" model, that is, 1 data processing center + 1 dynamic Sankey diagram visualization platform + N data analysis services, aiming to build a dynamic evaluation and decision support system for niche scarce mineral resources. The system includes the following main components: dynamic Sankey diagram generation system, resource evaluation and analysis system, data processing and model library system, user authority management system. The system adopts a four-layer architecture design: data acquisition layer, data processing layer, analysis application layer, and visualization display layer.
[0261] 2. Key technologies
[0262] 1. Dynamic Sankey diagram technology: Dynamic Sankey diagram technology is used to intuitively display the material flow of small and scarce mineral resources throughout their entire life cycle from mining, processing to consumption. By dynamically displaying the changes in material flow, it helps users understand the temporal and spatial characteristics of resource flow.
[0263] 2. Technology integration: Comprehensively apply technologies such as the Internet of Things, cloud computing, big data analysis, and smart sensors to achieve real-time data collection and analysis of the entire chain of mineral resources. Digitize the physical information of the real world, build a digital twin model of niche and scarce mineral resources, and provide in-depth data insights.
[0264] 3. System Function Module
[0265] 1. Data collection and processing: Supports multiple data collection methods, including field sensor data, third-party data interfaces, and user-uploaded data. The collected data is preprocessed and standardized to provide basic data for the generation of dynamic Sankey diagrams and resource assessment and analysis.
[0266] 2. Dynamic Sankey diagram generation system: Generate dynamic Sankey diagrams reflecting the flow of scarce mineral resources based on the collected data. Through visualization, it displays the flow path, quantity changes and other information of resources, and provides an intuitive view of material flow.
[0267] 3. Real-time data monitoring system: Using Internet of Things technology and smart sensors, the mining, processing, transportation and other links of niche scarce mineral resources are monitored in real time to ensure the real-time and accuracy of data.
[0268] 4. Resource assessment and analysis system: Based on dynamic data and digital twin models, it conducts a comprehensive assessment of the sustainability, market demand, and mining costs of niche and scarce mineral resources to support decision-making.
[0269] 5. Data processing and model library system: Build professional data processing processes and model function libraries to support complex data analysis and simulation calculations, and provide the system with powerful data processing capabilities.
[0270] 6. User rights management system: realize functions such as user registration, login, and rights allocation to ensure the security of system data and the privacy protection of user data.
[0271] The data processing method of the dynamic Sankey diagram of the minority scarce mineral resources of the present invention is as follows:
[0272] 1. Data preparation: Users enter the flow and quantity data of my country's strategic mineral resources at different stages according to the Excel template provided by the system. The design of the Excel template fully considers the data needs of MFA, such as the types of mineral resources, mining volume, processing volume, usage volume, waste volume, recycling volume, etc., to ensure the integrity and consistency of the data.
[0273] 2. Data upload and storage: Users upload completed Excel files to the system through the system's backend management interface. The system adopts a strict user authority management mechanism to ensure the security of data upload. The uploaded Excel file is processed by the system's parsing module, and key data is extracted and stored in the database. At the same time, the original Excel file is also saved for subsequent viewing and downloading.
[0274] 3. Data processing and Sankey diagram drawing: The system's data processing module calculates and integrates the stored strategic mineral resources MFA data to form a data structure that meets the requirements of Sankey diagram drawing. When drawing the Sankey diagram, the system fully considers the characteristics of MFA, such as the material flow direction and quantity balance relationship at different stages, to ensure that the generated Sankey diagram can accurately and intuitively reflect the material flow of my country's strategic mineral resources.
[0275] 4. Front-end display and interaction: The completed Sankey diagram is presented to the user through the front-end module of the system. Users can intuitively see the complete flow process of my country's strategic mineral resources from mining to abandonment, and understand the quantity changes and destinations at different stages. At the same time, the system provides a wealth of interactive functions. Users can use mouse operations to obtain detailed data on specific stages or flows, such as mining volume, processing loss, recycling volume, etc., to facilitate in-depth analysis by users.
[0276] 5. Historical data management: The system provides a complete historical data management function. Users can easily view and download historically uploaded Excel files to review and modify the data. When users upload new data files, the system will automatically update the Sankey diagram to ensure that the displayed material flow data is always up to date.
[0277] The specific steps are as follows:
[0278] 1. Data preparation. First, you need to prepare the data for drawing the Sankey diagram. The data should include the name, inventory, and starting point, end point, and flow rate of each material flow stage. Usually, this data is stored in JSON or CSV format.
[0279] 2. Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage based on the prepared data. The specific steps are as follows:
[0280] a) Initialize the ECharts instance and set the size and position of the chart.
[0281] b) Configure ECharts series and datasets, and specify the node's location, size, style and other properties.
[0282] c) Set the interactive functions of the node, such as displaying detailed information when the mouse hovers, clicking to jump, etc.
[0283] d) Call ECharts' rendering function to generate a rectangular node.
[0284] 3. Calculate the arrow coordinates. According to the position and size of the rectangular node generated by ECharts, calculate the starting and ending coordinates of the SVG arrow.
[0285] a) Traverse the material flow data and obtain the starting and ending nodes of each flow.
[0286] b) Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes.
[0287] c) Calculate the thickness of the SVG arrow based on the flow data.
[0288] 4. Draw SVG arrows. Use SVG technology to draw arrows representing material flow based on the calculated coordinates and thickness.
[0289] a) Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts.
[0290] b) Use SVG's path element to draw the body of the arrow based on the start and end coordinates.
[0291] c) Use the SVG polygon element to draw the arrowhead.
[0292] d) Set the arrow style, such as color, transparency, etc.
[0293] 5. Integration and interaction: seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram and add interactive functions.
[0294] a) Add the SVG element to the container where the ECharts chart is located.
[0295] b) Add mouse hover events to the SVG arrows to display detailed traffic information.
[0296] c) Add a click event to the ECharts rectangle node to jump to the detailed report of the corresponding stage.
[0297] d) Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram.
[0298] 6. Optimization and debugging: Optimize and debug the generated Sankey diagram to ensure its performance and compatibility.
[0299] a) Check the display effect of the Sankey diagram on different browsers and devices, and perform necessary compatibility processing.
[0300] b) Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of the chart.
[0301] c) Adjust the layout and style of the Sankey diagram to improve its readability and aesthetics.
[0302] 7. System Boundary
[0303] The system boundary of this method is as follows Figure 1 As shown. The entire life cycle of niche mineral resources includes the following five stages: mining and refining, production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into various products containing this niche mineral resource. Trade import and export flows and inventory changes mainly occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. In addition, the treatment of scrapped products occurs in the waste management stage, where some niche mineral resources are recycled. The trade of niche mineral resources is mainly concentrated in the production and manufacturing stages, and lacks a rich recycling network. The application areas of niche mineral resources are wide and unique, and most of them are irreplaceable.
[0304] 8. Stock and flow calculation
[0305] Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage is composed of the following seven components, which can be calculated by formula 1:
[0306]
[0307] Where j represents the jth life cycle stage, and t represents the tth year from 2001 to 2020. It is the import flow of niche mineral resources in the jth life cycle stage of products containing niche mineral resources in year t. is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t. and will be subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage. It is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t. It is the recovery flow of niche mineral resources that flows into the jth life stage in year t, but whether there is a recovery flow depends on the specific production process. is the loss flow of niche mineral resources in the jth life cycle stage in year t.
[0308] The accounting methods for each life cycle stage are as follows:
[0309] (1) Domestic production and processing transfer flow
[0310] The transformation process refers to the inflow and outflow of major products containing minority mineral resources during the life cycle (including production, manufacturing and use). These data can be calculated using formula 2-3:
[0311] f i,t =m i,t ×c i,t (Eq.2)
[0312] F i,j =∑ j f i,j (Eq.3)
[0313] Among them, f i,t Represents the flow of product i containing niche mineral resources in year t. m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j. i,j Represents the total flow of niche mineral resources at different stages.
[0314] (2) Trade flows
[0315] In this methodology, the amount of niche mineral resources in each product is quantified by multiplying the quantity of each traded product by its specific niche mineral resource content. These data can be calculated using Formula 4-5:
[0316]
[0317]
[0318] in and It represents the total import and export volume in the jth period of the tth year. and Respectively represent the import and export volumes of products containing niche mineral resources; c i,t is the content of niche mineral resources of product i.
[0319] (3) Loss flow
[0320] The loss rate of niche mineral resources in each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources mainly depends on the loss rate given in relevant literature and the recovery rate of each niche mineral resource product. These data can be calculated using formula 26:
[0321]
[0322] in represents the loss in the jth stage in the tth year, It represents the usage in the jth period in the tth year. is the loss rate in stage j in year t.
[0323] (4) Inventory
[0324] In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories. The calculation method is shown in Equation 7. The change in stocks in use is derived from the balance between input and output flows. Considering the limited data and short life of different niche products, a delay model is used to calculate such outflows. These stocks can be calculated using Equation 8:
[0325]
[0326] Where l is the life of the product containing niche mineral resources, f i,t is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in (tl) year.
[0327] (5) Recycling flow
[0328] There are generally two types of recycling activities, open-loop and closed-loop. Open-loop recycling refers to a system in which the raw materials of one product are broken down and used in a second, usually unrelated, product system. Generally, the second product is not recycled but disposed of at the end of its life cycle. Closed-loop recycling refers to a recycling method in which the recycled material is the same as the one produced. This means that the product enters the production chain of the same product again after use. Both circular activities exist in niche mineral resource flows. Recycling niche mineral resources mainly refers to the amount of spent niche mineral resources that are recycled back to the processing or manufacturing stage, such as Figure 1 As shown by the arrow in the middle. It is worth noting that the niche mineral resource recovery process in this method only considers the recovery of niche mineral resource waste from these scrap products. In addition, at the end of ore smelting and niche mineral resource production, the newly generated waste is usually left in the production line cycle, so these recovered niche mineral resource wastes are not included in the final cycle. These data can be calculated using Formula 9:
[0329]
[0330] In the formula, It represents the recovery of the minority mineral resources in period j in year t. is the recovery rate of the minority mineral resources in the jth period in the tth year.
[0331] 9. Data Source
[0332] The data used in this method are mainly from the National Bureau of Statistics of China, the United States Geological Survey, the United Nations Commodity Trade Database, the Titanium, Zirconium and Hafnium Branch of the China Nonferrous Metals Association, the China Zirconium Industry Annual Review, the China Titanium Industry Progress Report and Titanium Hand, the CBC Metal Database, the General Administration of Customs of the People's Republic of China and related research papers.
[0333] The implementation method of dynamic Sankey diagram of small and scarce mineral resources is as follows Figure 1 , Figure 2 As shown below, Figure 1 and Figure 2 For detailed explanation:
[0334] like Figure 1 As shown, the specific operation process of uploading Excel in the background management system is described in detail as follows:
[0335] 1. Users access the backend management system through a browser, enter their username and password to authenticate their user identity, which includes system administrator, administrator, and account of a small number of scarce mineral resources elements. Once the authentication is passed, the user can access the backend management system for subsequent operations.
[0336] 2. Data preparation:
[0337] According to the Excel template provided by the system, enter the data of lithium elements in the mining, refining, processing, use, and recycling stages.
[0338] The data includes the inventory, inflow, outflow, loss, etc. at each stage to ensure the integrity and consistency of the data.
[0339] Convert data into JSON or CSV format for later processing.
[0340] 3. Draw a rectangular node:
[0341] Using the ECharts library, rectangular nodes are drawn based on the lithium material flow data to represent the stock of lithium at each stage.
[0342] Initialize the ECharts instance and set the size and position of the chart.
[0343] Configure ECharts series and datasets, and specify node properties such as location, size, and style.
[0344] Set the interactive functions of the node, such as displaying detailed information when hovering the mouse, and jumping to the detailed report of the corresponding stage by clicking.
[0345] Call the rendering function of ECharts to generate a rectangular node.
[0346] 4. Calculate the arrow coordinates:
[0347] According to the position and size of the rectangular nodes generated by ECharts, the starting and ending coordinates of the SVG arrows representing the flow of lithium elements are calculated.
[0348] Traverse the lithium material flow data and obtain the starting and ending stages of each flow.
[0349] The starting and ending coordinates of the SVG arrow are calculated based on the corresponding rectangular node positions at the starting and ending stages.
[0350] According to the flow data, the thickness of the SVG arrow is calculated to indicate the size of the flow.
[0351] 5. Draw SVG arrows:
[0352] Using SVG technology, arrows representing the flow of lithium elements are drawn according to the calculated coordinates and thickness.
[0353] Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts.
[0354] Use the SVG path element to draw the body of the arrow, based on the start and end coordinates.
[0355] Use the SVG polygon element to draw the arrowhead.
[0356] Set the style of the arrows, such as color, transparency, etc., to distinguish different types of flows (such as inflow, outflow, loss, etc.).
[0357] 6. Integration and interaction:
[0358] Seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram of lithium material flow.
[0359] Add the SVG element to the container where the ECharts chart is located, making sure their positions and sizes match.
[0360] Add mouse hover events to SVG arrows to display detailed traffic information, such as flow volume, proportion, etc.
[0361] Add a click event to the ECharts rectangle node to jump to the detailed report of the corresponding stage, showing the stock, inflow, outflow, loss and other data of that stage.
[0362] Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram, such as data filtering, color scheme, etc.
[0363] 7. Optimization and debugging:
[0364] The generated Sankey diagram of lithium material flow is optimized and debugged to ensure its performance and compatibility.
[0365] Check the display effects of the Sankey diagram on different browsers and devices, and perform necessary compatibility processing.
[0366] Optimize the rendering performance of SVG arrows and ECharts nodes to ensure smoothness of charts and good responsiveness even when processing large amounts of data.
[0367] Adjust the layout and style of the Sankey diagram to improve its readability and aesthetics, such as adjusting the node spacing, font size, color scheme, etc.
[0368] The material flow visualization system realizes the visualization of the material flow of mineral resources by constructing a digital mirror, intuitively presenting information such as the temporal and spatial distribution, flow path, and transformation process of mineral resources, thereby improving the intuitiveness and comprehensibility of mineral resource management.
[0369] The dynamic monitoring system of material flow in the entire industrial chain uses technologies such as the Internet of Things and sensors to monitor the material flow in all links of the entire mineral resource industry chain in real time, providing comprehensive and real-time data support for mineral resource management.
[0370] The comprehensive resource assessment system is based on a digitized digital twin model, and has built a dynamic indicator evaluation system to comprehensively assess various factors of mineral resources, providing scientific decision-making support for development and utilization.
[0371] The database and model function calling system has established a basic database, a thematic database and a model function library, which provides data support and model algorithm support for each functional module of the system, improving the system's operational efficiency and accuracy.
[0372] The user management and authority control system ensures the safe operation of the system and improves the reliability of the system.
[0373] Application and display:
[0374] The system provides multiple sets of data visualization interfaces, supports cross-terminal access, and displays resource distribution diagrams, resource import and export diagrams, mineral resource spatiotemporal evolution diagrams, etc., improving the intuitiveness and comprehensibility of data display.
[0375] The system has insights into every stage, scenario and change in the mineral resource development business, providing comprehensive and intuitive data support for mineral resource management and decision-making.
[0376] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0377] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A dynamic Sankey diagram data processing method for small and scarce mineral resources, characterized in that: include: Step S1: Enter the flow direction and quantity data of resources at different stages according to the Excel template provided by the system; Step S2: Upload the completed Excel file to the system through the system's backend management interface; Step S3: Calculate and integrate the stored resource MFA data to form a data structure that meets the requirements for drawing the Sankey diagram; Step S4: The drawn Sankey diagram is presented through the front-end module of the system, which can manage historical data.
2. The dynamic Sankey diagram data processing method for minority scarce mineral resources according to claim 1 is characterized in that: In step S3: Prepare data for drawing the Sankey diagram. The data includes the name, inventory, and starting point, end point, and flow rate of each material flow stage. The data is stored in JSON or CSV format. Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage according to the prepared data. The specific steps are as follows: Initialize the ECharts instance and set the size and position of the chart; Configure ECharts series and data sets, specify the location, size, and style properties of nodes; Set the interactive functions of the node, including displaying detailed information when the mouse hovers and clicking to jump; Call the rendering function of ECharts to generate a rectangular node.
3. The method for processing dynamic Sankey diagram data of minority scarce mineral resources according to claim 2 is characterized by: Calculate the arrow coordinates. According to the position and size of the rectangular node generated by ECharts, calculate the starting and ending coordinates of the SVG arrow: Traverse the material flow data and obtain the starting and ending nodes of each flow; Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes; Calculate the thickness of the SVG arrow based on the flow data; Draw SVG arrows. Using SVG technology, draw arrows representing material flow according to the calculated coordinates and thickness: Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts; Use SVG's path element to draw the body of the arrow based on the start and end coordinates; Use SVG's polygon element to draw the arrowhead; Set the style of the arrow, including color and transparency.
4. The method for processing dynamic Sankey diagram data of minority scarce mineral resources according to claim 3 is characterized by: Integration and interaction: seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram, and add interactive functions: Add the SVG element to the container where the ECharts chart is located; Add mouse hover events to SVG arrows to display detailed traffic information; Add click events to ECharts rectangle nodes to jump to the detailed report of the corresponding stage; Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram; Optimize and debug, optimize and debug the generated Sankey diagram: Check the display effect of the Sankey diagram on different browsers and devices and perform compatibility processing; Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of charts; Adjust the layout and style of the Sankey diagram; System Boundary: The life cycle of niche mineral resources includes production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into products. Trade import and export flows and inventory changes occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. The treatment of scrapped products occurs in the waste management stage, where some niche mineral resources are recycled. The trade of niche mineral resources is concentrated in the production and manufacturing stages. Stock and flow calculation: Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage consists of the following seven components, which can be calculated by formula (1): In the formula, j represents the jth life cycle stage, and t represents the year; is the import flow of niche mineral resources in the jth life cycle stage of the product containing niche mineral resources in year t; is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t, and is subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage; is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t; is the recycling flow of the niche mineral resources that flows into the jth life stage in year t. Whether there is a recycling flow depends on the specific production process; is the loss flow of niche mineral resources in the jth life cycle stage in year t.
5. The method for processing dynamic Sankey diagram data of minority scarce mineral resources according to claim 4 is characterized by: The accounting methods for each life cycle stage are as follows: Domestic production and processing transfer flow: The conversion process refers to the inflow and outflow of products containing niche mineral resources during the life cycle, calculated as follows: f i,t =m i,t ×c i,t (2) F i,j =∑ j f i,j (3) Among them, f i,t represents the flow of product i containing niche mineral resources in year t, m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j; F i,j Represents the total flow of niche mineral resources at different stages; Trade Flows: The amount of Niche Mineral Resources in each product is quantified by multiplying the quantity of each traded product by its specific Niche Mineral Resource content, calculated as follows: in, and represents the total import and export volume in the jth period of the tth year, and Respectively represent the import and export volumes of products containing niche mineral resources; c i ,t is the content of niche mineral resources of product i; Loss Flow: The loss rate of niche minerals at each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources depends on the loss rate and the recovery rate of each niche mineral resource product, which is calculated as follows: in represents the loss in the jth stage in the tth year, represents the usage in the jth period in the tth year, is the loss rate of stage j in year t; Stock In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories, as calculated in Equation 7. Changes in in-use stocks are derived from the balance between input and output flows, and the outflow stock is calculated using a delay model using Equation 8: Where l is the life of the product containing niche mineral resources, f i,t is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in year tl; Recycling Flow: Recycling activities include open-loop recycling and closed-loop recycling; recycled niche mineral resources refer to the amount of waste niche mineral resources recycled to the processing or manufacturing stage. Recycled niche mineral resource waste is not included in the final cycle. The data is calculated using Formula 9: In the formula, represents the recovery of minority mineral resources in stage j in year t, is the recovery rate of minority mineral resources in the jth stage in the tth year, It represents the usage in the jth period in the tth year.
6. A dynamic Sankey diagram data processing system for minority scarce mineral resources, characterized in that: include: Module M1: Enter the flow direction and quantity data of resources at different stages according to the Excel template provided by the system; Module M2: Upload the completed Excel file to the system through the system's backend management interface; Module M3: Calculates and integrates the stored resource MFA data to form a data structure that meets the requirements for drawing the Sankey diagram; Module M4: The completed Sankey diagram is presented through the front-end module of the system, which can manage historical data.
7. The dynamic Sankey diagram data processing system for minority scarce mineral resources according to claim 6 is characterized in that: In the module M3: Prepare data for drawing the Sankey diagram. The data includes the name, inventory, and starting point, end point, and flow rate of each material flow stage. The data is stored in JSON or CSV format. Draw rectangular nodes. Use the ECharts library to draw rectangular nodes representing each material flow stage according to the prepared data. The specific steps are as follows: Initialize the ECharts instance and set the size and position of the chart; Configure ECharts series and data sets, specify the location, size, and style properties of nodes; Set the interactive functions of the node, including displaying detailed information when the mouse hovers and clicking to jump; Call the rendering function of ECharts to generate a rectangular node.
8. The dynamic Sankey diagram data processing system for minority scarce mineral resources according to claim 7 is characterized by: Calculate the arrow coordinates. According to the position and size of the rectangular node generated by ECharts, calculate the starting and ending coordinates of the SVG arrow: Traverse the material flow data and obtain the starting and ending nodes of each flow; Calculate the start and end coordinates of the SVG arrow based on the positions of the start and end nodes; Calculate the thickness of the SVG arrow based on the flow data; Draw SVG arrows. Using SVG technology, draw arrows representing material flow according to the calculated coordinates and thickness: Create an SVG element, set the size and position of the SVG, and align it with the chart generated by ECharts; Use SVG's path element to draw the body of the arrow based on the start and end coordinates; Use SVG's polygon element to draw the arrowhead; Set the style of the arrow, including color and transparency.
9. The dynamic Sankey diagram data processing system for minority scarce mineral resources according to claim 8 is characterized by: Integration and interaction: seamlessly integrate the drawn SVG arrows and ECharts rectangle nodes to form a complete Sankey diagram, and add interactive functions: Add the SVG element to the container where the ECharts chart is located; Add mouse hover events to SVG arrows to display detailed traffic information; Add click events to ECharts rectangle nodes to jump to the detailed report of the corresponding stage; Create a control panel that allows users to dynamically adjust the display parameters of the Sankey diagram; Optimize and debug, optimize and debug the generated Sankey diagram: Check the display effect of the Sankey diagram on different browsers and devices and perform compatibility processing; Optimize the rendering performance of SVG arrows and ECharts nodes to ensure the smoothness of charts; Adjust the layout and style of the Sankey diagram; System Boundary: The life cycle of niche mineral resources includes production, manufacturing, use and waste management. After mining and refining, niche mineral resources are smelted, processed and manufactured into products. Trade import and export flows and inventory changes occur in the production and manufacturing stages. Niche mineral resources are lost and released into the environment at different stages of their life cycle. The treatment of scrapped products occurs in the waste management stage, where some niche mineral resources are recycled. The trade of niche mineral resources is concentrated in the production and manufacturing stages. Stock and flow calculation: Mass balance is the principle of material flow analysis throughout the life cycle. The mass flow of niche mineral resources at each life stage consists of the following seven components, which can be calculated by formula (1): In the formula, j represents the jth life cycle stage, and t represents the year; is the import flow of niche mineral resources in the jth life cycle stage of the product containing niche mineral resources in year t; is the export flow of niche mineral resources in the jth life cycle stage of the niche mineral resource product in year t, and is subtracted and expressed as net imports or net exports; is the precious inflow from the last life cycle stage before the tth year to the jth life cycle stage; is the outflow of niche mineral resources from the jth life cycle stage to the next stage in year t; is the recycling flow of the niche mineral resources that flows into the jth life stage in year t. Whether there is a recycling flow depends on the specific production process; is the loss flow of niche mineral resources in the jth life cycle stage in year t.
10. The dynamic Sankey diagram data processing system for minority scarce mineral resources according to claim 9 is characterized by: The accounting methods for each life cycle stage are as follows: Domestic production and processing transfer flow: The conversion process refers to the inflow and outflow of products containing niche mineral resources during the life cycle, calculated as follows: f i,t =m i,t ×c i,t (2) F i,j =∑ j f i,j (3) Among them, f i,t represents the flow of product i containing niche mineral resources in year t, m i,t represents the production quantity, c i,t represents the concentration of niche mineral resources in these products at the end of year j, F i,j Represents the total flow of niche mineral resources at different stages; Trade Flows: The amount of Niche Mineral Resources in each product is quantified by multiplying the quantity of each traded product by its specific Niche Mineral Resource content, calculated as follows: in, and represents the total import and export volume in the jth period of the tth year, and Respectively represent the import and export volumes of products containing niche mineral resources; c i,t is the content of niche mineral resources of product i; Loss Flow: The loss rate of niche minerals at each life cycle stage is calculated based on actual usage. The amount of loss of niche mineral resources depends on the loss rate and the recovery rate of each niche mineral resource product, which is calculated as follows: in represents the loss in the jth stage in the tth year, represents the usage in the jth period in the tth year, is the loss rate of stage j in year t; Stock: In the use phase, flows are calculated by the proportion of the niche mineral resources used in the consumption and end-use categories, as calculated in Equation 7. Changes in in-use stocks are derived from the balance between input and output flows, and the outflow stock is calculated using a delay model using Equation 8: Where l is the life of the product containing niche mineral resources, f i,t is the inflow and outflow of mineral resources in product i containing niche mineral resources in year t, F i,t is the inflow and outflow of product i containing niche mineral resources in year t, is the proportion of use of niche mineral resources in the end-use category in year t, is the outflow at the end of year t; represents the inflow in year tl; Recycling Flow: Recycling activities include open-loop recycling and closed-loop recycling; recycled niche mineral resources refer to the amount of waste niche mineral resources recycled to the processing or manufacturing stage. Recycled niche mineral resource waste is not included in the final cycle. The data is calculated using Formula 9: In the formula, represents the recovery of minority mineral resources in stage j in year t, is the recovery rate of minority mineral resources in the jth stage in the tth year, It represents the usage in the jth period in the tth year.
Citation Information
Patent Citations
Chromium element metabolism accounting and evaluation method and system for regional economic system
CN117540943A
Cited By
Trade index visualization system and method based on domestic trade commodity data
CN120494871A
