Microbial data visualization chart generation method and system based on diffusion model
Through the diffusion model-based method, the problems of human error, low efficiency and high maintenance costs in the generation of microbial data visualization charts are solved, and efficient, accurate and customized strong microbial data visualization is achieved, which is suitable for fine adjustment of complex data sets.
Patent Information
- Application Number
- CN202411267845.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-09-11
AI Technical Summary
The existing microbial data visual chart generation methods have problems such as human error, low efficiency, high maintenance costs, limited customization capabilities and economic pressure. In particular, automation tools are difficult to achieve fine adjustment and accuracy when generating complex charts and updating data integration.
Using the visual graph generation method of microbial data based on diffusion model, by collecting data characteristic information, extracting characteristic data, calculating diffusion morphology index, adapting to simulated diffusion models, performing model training and fitting evaluation, obtaining the optimal diffusion model, and generating microbial data Visualize the chart.
Improves the accuracy and efficiency of data processing, reduces maintenance costs, enhances customization capabilities, is suitable for fine adjustments of complex data sets, reduces economic pressure, and realizes high-quality visualization of microbial data.
Smart Images

Figure CN118781223B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of microbial data visualization chart generation, and in particular, to a method and system for generating microbial data visualization charts based on a diffusion model. Background Art
[0002] Data visualization and chart analysis are an indispensable and important tool for modern scientific research. Especially in the field of microbial research, through data visualization, researchers can present complex experimental data in an intuitive and easy-to-understand form, thereby quickly identifying key trends and patterns in the data.
[0003] The current methods of generating visualization charts for microbial data are generally divided into three types: manual drawing, programmatic drawing, and drawing using automated drawing tools.
[0004] Manual drawing has significant defects. First, manual input and processing of data can easily introduce human errors, affecting the accuracy of the results. Second, manual drawing is inefficient, especially when dealing with large-scale and complex data sets, it is time-consuming and laborious. In addition, manual drawing lacks flexibility and repeatability, making it difficult to perform complex customization and advanced analysis, which is not conducive to the standardization and verification of results; programming drawing usually requires researchers to have programming skills and data processing knowledge, and the learning curve is steep for users who do not have these skills. Second, the maintenance cost of programming drawing is high. As data and requirements change, the code needs to be continuously updated and optimized, which increases the complexity and time cost of maintenance work; automated drawing tool drawing usually has fixed templates and preset options, which are limited in the generation of highly customized and complex charts. When users face specific or non-standard data visualization needs, it is difficult to achieve the required fine-tuning. Second, automated tools often require paid subscriptions or license purchases, which may cause economic pressure for laboratories or research institutions with limited budgets. In addition, the data integration and update process may involve data conversion or format compatibility issues, which may affect the accuracy of the data and the reliability of the visualization results.
[0005] In view of the above problems, effective technical solutions are urgently needed. Summary of the invention
[0006] The purpose of this application is to provide a method and system for generating visualization charts of microbial data based on a diffusion model. The optimal diffusion model can be obtained through diffusion model training and model diffusion and fitting effect evaluation, and the microbial data can be processed through the optimal diffusion model to generate visualization charts of microbial data, thereby realizing the technology of generating visualization charts of microbial data based on a diffusion model.
[0007] The present application also provides a method for generating a visualization chart of microbial data based on a diffusion model, comprising the following steps:
[0008] Collect characteristic information of microbial data, extract characteristic data, and obtain diffusion morphology index after processing;
[0009] According to the diffusion morphology index, the corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models are adapted to obtain three candidate models that best meet the threshold adaptation requirements as preferred diffusion models;
[0010] Process the microbial data to obtain a visual chart data set of the microbial data;
[0011] Processing the microbial data visualization chart data set, and performing stratified sampling and partitioning through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set;
[0012] Obtaining model environment configuration parameters and training configuration parameters, and performing model training on three optimal diffusion models respectively in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models;
[0013] Simulating diffusion according to the three trained optimal diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data;
[0014] Processing the fitting evaluation data to obtain a corresponding fitting effect index, and comparing the index with a preset standard effect threshold, and obtaining a target diffusion model according to the comparison result;
[0015] The microbial data is processed through the target diffusion model to obtain a visualization chart of the microbial data.
[0016] Optionally, in the method for generating a visualization chart of microbial data based on a diffusion model described in the present application, the step of collecting characteristic information of microbial data, extracting characteristic data, and obtaining a diffusion morphology index after processing includes:
[0017] Collect characteristic information of microbial data, including species classification information, morphological information, physiological and biochemical characteristics information, genetic information and ecological distribution information;
[0018] Acquiring characteristic data, including distribution morphology characteristic data, time series characteristic data, and correlation characteristic data, through a preset microbial characteristic recognition model according to the characteristic information;
[0019] Processing is performed according to the distribution morphology characteristic data, the time series characteristic data and the correlation characteristic data to obtain a diffusion morphology index;
[0020] The calculation formula for obtaining the diffusion morphology index is:
[0021] ;
[0022] in, is the diffusion morphology index, , , They are distribution morphology feature data, time series feature data, and correlation feature data. , , , is the preset characteristic coefficient.
[0023] Optionally, in the method for generating a visualization chart of microbial data based on a diffusion model described in the present application, the processing according to the microbial data to obtain a visualization chart data set of microbial data includes:
[0024] Obtain different visualization chart style information based on data enhancement technology, and obtain microbial data visualization chart style information in combination with microbial data;
[0025] Normalization and aggregation processing are performed according to the microbial data visualization chart style information to obtain a microbial data visualization chart data set.
[0026] Optionally, in the method for generating a microbial data visualization chart based on a diffusion model described in the present application, the data processing of the microbial data visualization chart data set, and stratified sampling and partitioning through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set includes:
[0027] Perform data processing on the microbial data visualization chart dataset based on text length, data category, and chart style;
[0028] The microbial data visualization chart dataset is stratified sampled and divided into a training set, a test set, and a validation set through a preset stratified sampling partitioning model, so as to obtain an optimized microbial data visualization chart dataset.
[0029] Optionally, in the method for generating a visualization chart of microbial data based on a diffusion model described in the present application, the obtaining of model environment configuration parameters and training configuration parameters, and performing model training on three preferred diffusion models respectively in combination with the optimized visualization chart data set of microbial data to obtain the trained preferred diffusion model, include:
[0030] Perform model training according to the preset model training database and preset training environment information to obtain environment configuration parameters;
[0031] Set the training configuration parameters according to the preset model training database, including optimizer parameters, learning rate, image resolution, data repetition rate, data batch, and number of training steps;
[0032] Perform vector mapping on the microbial data visualization chart image according to the preset autoencoder model to generate latent vectors;
[0033] The microbial data visualization chart style information is encoded through a preset text encoding model to generate a text embedding vector;
[0034] Performing noise addition and diffusion processing on the latent vector to obtain a noisy image;
[0035] Adding noise to the latent vector and the text embedding vector of the noisy image through a preset U-Net model to perform error evaluation, and obtaining the error between the diffusion model output noise and the real noise;
[0036] Iteratively update the training parameters of the U-Net model through the back propagation algorithm according to the error to obtain the adjusted training parameters;
[0037] The three optimal diffusion models are trained again according to the adjusted training parameters in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models.
[0038] Optionally, in the method for generating a visualization chart of microbial data based on a diffusion model described in the present application, simulating diffusion according to the three trained preferred diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data, includes:
[0039] Simulating the diffusion of the microbial data according to the three trained optimal diffusion models, and performing preliminary fitting evaluations respectively;
[0040] obtaining fitting assessment data based on the preliminary fitting assessment;
[0041] The fitting evaluation data includes residual distribution coefficient, determination coefficient and mean square error coefficient.
[0042] Optionally, in the method for generating a visualization chart of microbial data based on a diffusion model described in the present application, the processing is performed according to the fitting evaluation data to obtain a corresponding fitting effect index, and the index is compared with a preset standard effect threshold value, and a target diffusion model is obtained according to the comparison result; including:
[0043] Processing is performed according to the residual distribution coefficient, determination coefficient and mean square error coefficient to obtain a corresponding fitting effect index;
[0044] Perform threshold comparisons on the fitting effect indexes corresponding to the three trained optimal diffusion models respectively with preset standard effect thresholds to obtain three corresponding fitting comparison values;
[0045] Comparing the three fitting comparison values, and taking the optimal diffusion model with the best comparison as the target diffusion model;
[0046] The calculation formula of the fitting effect index is:
[0047] ;
[0048] in, is the fitting effect index corresponding to the i-th optimal diffusion model, , , are the residual distribution coefficient, determination coefficient, and mean square error coefficient corresponding to the i-th optimal diffusion model among the three trained optimal diffusion models, , is the preset characteristic coefficient.
[0049] In a second aspect, the present application provides a system for generating a visualization chart of microbial data based on a diffusion model, the system comprising: a memory and a processor, the memory comprising a program of a method for generating a visualization chart of microbial data based on a diffusion model, and the program of the method for generating a visualization chart of microbial data based on a diffusion model, when executed by the processor, implements the following steps:
[0050] Collect characteristic information of microbial data, extract characteristic data, and obtain diffusion morphology index after processing;
[0051] According to the diffusion morphology index, the corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models are adapted to obtain three candidate models that best meet the threshold adaptation requirements as preferred diffusion models;
[0052] Process the microbial data to obtain a visual chart data set of the microbial data;
[0053] Processing the microbial data visualization chart data set, and performing stratified sampling and partitioning through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set;
[0054] Obtaining model environment configuration parameters and training configuration parameters, and performing model training on three optimal diffusion models respectively in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models;
[0055] Simulating diffusion according to the three trained optimal diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data;
[0056] Processing the fitting evaluation data to obtain a corresponding fitting effect index, and comparing the index with a preset standard effect threshold, and obtaining a target diffusion model according to the comparison result;
[0057] The microbial data is processed through the target diffusion model to obtain a visualization chart of the microbial data.
[0058] Optionally, in the microbial data visualization chart generation system based on the diffusion model described in the present application, the step of collecting characteristic information of the microbial data, extracting characteristic data, and obtaining the diffusion morphology index after processing includes:
[0059] Collect characteristic information of microbial data, including species classification information, morphological information, physiological and biochemical characteristics information, genetic information and ecological distribution information;
[0060] Acquiring characteristic data, including distribution morphology characteristic data, time series characteristic data, and correlation characteristic data, through a preset microbial characteristic recognition model according to the characteristic information;
[0061] Processing is performed according to the distribution morphology characteristic data, the time series characteristic data and the correlation characteristic data to obtain a diffusion morphology index;
[0062] The calculation formula for obtaining the diffusion morphology index is:
[0063] ;
[0064] in, is the diffusion morphology index, , , They are distribution morphology feature data, time series feature data, and correlation feature data. , , , is the preset characteristic coefficient.
[0065] Optionally, in the system for generating a visualization chart of microbial data based on a diffusion model described in the present application, the processing according to the microbial data to obtain a visualization chart data set of microbial data includes:
[0066] Obtain different visualization chart style information based on data enhancement technology, and obtain microbial data visualization chart style information in combination with microbial data;
[0067] Normalization and aggregation processing are performed according to the microbial data visualization chart style information to obtain a microbial data visualization chart data set.
[0068] As can be seen from the above, the method and system for generating a visualization chart of microbial data based on a diffusion model provided by the present application collects characteristic information of microbial data and extracts characteristic data, obtains a diffusion morphology index after processing, and adapts it to the corresponding diffusion morphology thresholds of multiple alternative simulated diffusion models, obtains three alternative models that best meet the threshold adaptation requirements as preferred diffusion models, processes the microbial data, obtains a microbial data visualization chart data set, further processes the data, and performs stratified sampling and division through a preset stratified sampling and division model to obtain an optimized microbial data visualization chart data set, obtains model environment configuration parameters and training configuration parameters, and performs model training on the three preferred diffusion models in combination with the optimized microbial data visualization chart data set to obtain three trained preferred diffusion models, and performs simulated diffusion and preliminary fitting evaluation to obtain fitting evaluation data, processes the fitting evaluation data to obtain the corresponding fitting effect index, and compares it with the preset standard effect threshold, obtains the target diffusion model according to the comparison result, and processes the microbial data through the target diffusion model to obtain a microbial data visualization chart, thereby realizing the technology of generating a visualization chart of microbial data based on a diffusion model.
[0069] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0071] Figure 1 A flowchart of a method for generating a visualization chart of microbial data based on a diffusion model provided in an embodiment of the present application;
[0072] Figure 2 A flow chart of obtaining a diffusion morphology index in a method for generating a visualization chart of microbial data based on a diffusion model provided in an embodiment of the present application;
[0073] Figure 3 A flowchart of obtaining a microbial data visualization chart data set in a method for generating a microbial data visualization chart based on a diffusion model provided in an embodiment of the present application;
[0074] Figure 4A flowchart of obtaining an optimized microbial data visualization chart data set according to a method for generating a microbial data visualization chart based on a diffusion model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0076] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0077] Please refer to Figure 1 , Figure 1 The flowchart of the method for generating a visualization chart of microbial data based on a diffusion model in some embodiments of the present application. The method for generating a visualization chart of microbial data based on a diffusion model is used in a terminal device, such as a computer, a mobile phone terminal, etc. The method for generating a visualization chart of microbial data based on a diffusion model comprises the following steps:
[0078] S11, collecting characteristic information of microbial data, extracting characteristic data, and obtaining diffusion morphology index after processing;
[0079] S12, adapting the diffusion morphology index to corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models, and obtaining three candidate models that best meet the threshold adaptation requirements as preferred diffusion models;
[0080] S13, processing the microbial data to obtain a microbial data visualization chart data set;
[0081] S14, processing the microbial data visualization chart data set, and performing stratified sampling and division through a preset stratified sampling and division model to obtain an optimized microbial data visualization chart data set;
[0082] S15, obtaining model environment configuration parameters and training configuration parameters, and performing model training on three optimal diffusion models respectively in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models;
[0083] S16, simulating diffusion according to the three trained optimal diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data;
[0084] S17, processing the fitting evaluation data to obtain a corresponding fitting effect index, and comparing the index with a preset standard effect threshold, and obtaining a target diffusion model according to the comparison result;
[0085] S18. Process the microbial data using the target diffusion model to obtain a visualization chart of the microbial data.
[0086] It should be noted that in order to realize the generation of microbial data visualization charts based on the diffusion model, the diffusion model Vincent graph technology can be used to mine the key features of microbial data, visualization chart style text information, and visualization chart images, and the technology of directly generating corresponding microbial data visualization charts from microbial data visualization chart style information is realized. First, the characteristic information of the microbial data is collected and the characteristic data is extracted. After processing, the diffusion morphology index is obtained, and it is adapted to the corresponding diffusion morphology thresholds of multiple alternative simulation diffusion models. The three alternative models that best meet the threshold adaptation requirements are obtained as the preferred diffusion models, which are processed according to the microbial data to obtain the microbial data visualization chart data set, and further data processing is performed. A preset stratified sampling and division model is used for stratified sampling and division, an optimized microbial data visualization chart data set is obtained, model environment configuration parameters and training configuration parameters are obtained, and three preferred diffusion models are trained respectively in combination with the optimized microbial data visualization chart data set to obtain three trained preferred diffusion models, and simulated diffusion and preliminary fitting evaluation are performed to obtain fitting evaluation data, which are processed according to the fitting evaluation data to obtain corresponding fitting effect indexes, and compared with preset standard effect thresholds respectively, and a target diffusion model is obtained according to the comparison results, and the microbial data is processed through the target diffusion model to obtain a microbial data visualization chart, thereby realizing the technology of generating microbial data visualization charts based on diffusion models.
[0087] Please refer to Figure 2 , Figure 2 The flowchart of obtaining the diffusion morphology index of the method for generating a visualization chart of microbial data based on a diffusion model in some embodiments of the present application. According to an embodiment of the present invention, the method of collecting characteristic information of microbial data, extracting characteristic data, and obtaining the diffusion morphology index after processing includes:
[0088] S21. Collect characteristic information of microbial data, including species classification information, morphological information, physiological and biochemical characteristic information, genetic information and ecological distribution information;
[0089] S22, acquiring characteristic data including distribution morphology characteristic data, time series characteristic data and correlation characteristic data through a preset microbial characteristic recognition model according to the characteristic information;
[0090] S23, processing the distribution morphology characteristic data, the time series characteristic data and the correlation characteristic data to obtain a diffusion morphology index;
[0091] The calculation formula for obtaining the diffusion morphology index is:
[0092] ;
[0093] in, is the diffusion morphology index, , , They are distribution morphology feature data, time series feature data, and correlation feature data. , , , is the preset characteristic coefficient (the characteristic coefficient is obtained by querying the preset microbial diffusion monitoring platform database).
[0094] It should be noted that before training the diffusion model, it is necessary to select three diffusion models that best suit the characteristics of the microbial data and the visualization requirements. Therefore, it is necessary to first obtain the diffusion morphological index of the microbial data. First, the characteristic information of the microbial data is collected, including species classification information, morphological information, physiological and biochemical characteristic information, genetic information, and ecological distribution information. According to the above characteristic information, characteristic data is obtained through a preset microbial characteristic recognition model, including distribution morphological characteristic data, time series characteristic data, and correlation characteristic data. Among them, the microbial characteristic recognition model belongs to a neural network model. The initialized microbial characteristic recognition model is trained according to the characteristic information of a large amount of historical microbial data to obtain a trained microbial characteristic recognition model, and then the above data is processed to obtain the diffusion morphological index.
[0095] Please refer to Figure 3 , Figure 3 The flowchart of the method for generating a microbial data visualization chart based on a diffusion model in some embodiments of the present application is to obtain a microbial data visualization chart data set. According to an embodiment of the present invention, the processing according to the microbial data to obtain the microbial data visualization chart data set includes:
[0096] S31. Obtain different visualization chart style information based on data enhancement technology, and obtain microbial data visualization chart style information in combination with microbial data;
[0097] S32, performing normalization and aggregation processing according to the microbial data visualization chart style information to obtain a microbial data visualization chart data set.
[0098] It should be noted that in order to train the model, a data set must be created first. First, different visualization chart style information is generated from multiple dimensions such as chart type, legend, unit, data tag, coordinate, and table header using data enhancement technology. The microbial data and chart style information are merged into microbial data visualization chart style information. The microbial data chart style information is imported, and programming technology and professional drawing libraries are used to batch draw microbial data visualization charts to construct a microbial data visualization chart dataset with a one-to-one correspondence between microbial data visualization chart style information text and visualization chart images.
[0099] Please refer to Figure 4 , Figure 4 The flowchart of the method for generating a microbial data visualization chart based on a diffusion model in some embodiments of the present application is to obtain an optimized microbial data visualization chart data set. According to an embodiment of the present invention, the microbial data visualization chart data set is processed, and stratified sampling and partitioning are performed through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set, including:
[0100] S41, performing data processing on the microbial data visualization chart data set according to text length, data category, and chart style;
[0101] S42. Perform stratified sampling and partitioning on the microbial data visualization chart dataset through a preset stratified sampling partitioning model, and divide it into a training set, a test set, and a validation set, so as to obtain an optimized microbial data visualization chart dataset.
[0102] It should be noted that the prepared data set needs to be further cut, and data analysis and statistics need to be performed on the microbial data visualization chart data set. From multiple dimensions such as text length, data category, and chart style, the data set needs to be stratified and sampled and divided into a training set (80%), a test set (10%), and a validation set (10%), so as to obtain the optimized microbial data visualization chart data set.
[0103] According to an embodiment of the present invention, the acquisition of model environment configuration parameters and training configuration parameters, and the combination of the optimized microbial data visualization chart data set to perform model training on three preferred diffusion models respectively to obtain the trained preferred diffusion model include:
[0104] Perform model training according to the preset model training database and preset training environment information to obtain environment configuration parameters;
[0105] Set the training configuration parameters according to the preset model training database, including optimizer parameters, learning rate, image resolution, data repetition rate, data batch, and number of training steps;
[0106] Perform vector mapping on the microbial data visualization chart image according to the preset autoencoder model to generate latent vectors;
[0107] The microbial data visualization chart style information is encoded through a preset text encoding model to generate a text embedding vector;
[0108] Performing noise addition and diffusion processing on the latent vector to obtain a noisy image;
[0109] Adding noise to the latent vector and the text embedding vector of the noisy image through a preset U-Net model to perform error evaluation, and obtaining the error between the diffusion model output noise and the real noise;
[0110] Iteratively update the training parameters of the U-Net model through the back propagation algorithm according to the error to obtain the adjusted training parameters;
[0111] The three optimal diffusion models are trained again according to the adjusted training parameters in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models.
[0112] It should be noted that in order to obtain a trained model, Python, Pytorch, CUDA and model training related dependency libraries must be installed first, and the accelerate library must be used to configure the training environment such as multi-GPU and FP16 precision. Eight A100 cards must be used for model training to obtain environmental parameters. At the same time, the training configuration parameters are set according to the preset model training database. Further, the model training begins. During the training process, the VAE variational autoencoder maps the real microbial data visualization chart image from the pixel space to the latent space, generates a latent vector, and learns the latent expression of the image. The super-long CLIP text encoder encodes the microbial data visualization chart style information and generates a text embedding vector; then Gaussian noise is continuously added to the image latent expression for forward diffusion, and then the U-Net model is called on the noisy image to evaluate the added noise. In this process, U-Net simultaneously receives the latent vector of the image and the text embedding vector generated by the microbial data visualization chart style information. Based on the microbial data visualization chart style information and the microbial data visualization chart image, the matching relationship between the microbial data visualization chart style information and the microbial data visualization chart image is learned according to the attention mechanism. The error between the diffusion model output noise and the real noise is calculated. The U-Net model parameters are continuously updated iteratively through the back-propagation algorithm.
[0113] According to an embodiment of the present invention, simulating diffusion according to the three trained optimal diffusion models and performing preliminary fitting evaluation respectively to obtain fitting evaluation data include:
[0114] Simulating the diffusion of the microbial data according to the three trained optimal diffusion models, and performing preliminary fitting evaluations respectively;
[0115] obtaining fitting assessment data based on the preliminary fitting assessment;
[0116] The fitting evaluation data includes residual distribution coefficient, determination coefficient and mean square error coefficient.
[0117] It should be noted that after the training of the three preferred diffusion models was completed, the microbial data were simulated for diffusion and preliminary fitting evaluation was performed based on the three models to obtain fitting evaluation data including residual distribution coefficient, determination coefficient and mean square error coefficient.
[0118] According to an embodiment of the present invention, the processing is performed according to the fitting evaluation data to obtain a corresponding fitting effect index, and the index is compared with a preset standard effect threshold value, and a target diffusion model is obtained according to the comparison result; including:
[0119] Processing is performed according to the residual distribution coefficient, determination coefficient and mean square error coefficient to obtain a corresponding fitting effect index;
[0120] Perform threshold comparisons on the fitting effect indexes corresponding to the three trained optimal diffusion models respectively with preset standard effect thresholds to obtain three corresponding fitting comparison values;
[0121] Comparing the three fitting comparison values, and taking the optimal diffusion model with the best comparison as the target diffusion model;
[0122] The calculation formula of the fitting effect index is:
[0123] ;
[0124] in, is the fitting effect index corresponding to the i-th optimal diffusion model, , , are the residual distribution coefficient, determination coefficient, and mean square error coefficient corresponding to the i-th optimal diffusion model among the three trained optimal diffusion models, , is the preset characteristic coefficient (the characteristic coefficient is obtained by querying the preset microbial diffusion monitoring platform database).
[0125] It should be noted that, further, the residual distribution coefficient, the determination coefficient and the mean square error coefficient are processed to obtain the corresponding fitting effect index, and then the fitting effect indexes corresponding to the three trained preferred diffusion models are compared with the preset standard effect thresholds to obtain the corresponding three fitting comparison values, and then the three fitting comparison values are compared, and the preferred diffusion model with the best comparison is used as the target diffusion model.
[0126] In a second aspect, the present invention further discloses a system for generating a visualization chart of microbial data based on a diffusion model, comprising a memory and a processor, wherein the memory comprises a method program for generating a visualization chart of microbial data based on a diffusion model, and when the method program for generating a visualization chart of microbial data based on a diffusion model is executed by the processor, the following steps are implemented:
[0127] Collect characteristic information of microbial data, extract characteristic data, and obtain diffusion morphology index after processing;
[0128] According to the diffusion morphology index, the corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models are adapted to obtain three candidate models that best meet the threshold adaptation requirements as preferred diffusion models;
[0129] Process the microbial data to obtain a visual chart data set of the microbial data;
[0130] Processing the microbial data visualization chart data set, and performing stratified sampling and partitioning through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set;
[0131] Obtaining model environment configuration parameters and training configuration parameters, and performing model training on three optimal diffusion models respectively in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models;
[0132] Simulating diffusion according to the three trained optimal diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data;
[0133] Processing the fitting evaluation data to obtain a corresponding fitting effect index, and comparing the index with a preset standard effect threshold, and obtaining a target diffusion model according to the comparison result;
[0134] The microbial data is processed through the target diffusion model to obtain a visualization chart of the microbial data.
[0135] It should be noted that in order to realize the generation of microbial data visualization charts based on the diffusion model, the diffusion model Vincent graph technology can be used to mine the key features of microbial data, visualization chart style text information, and visualization chart images, and the technology of directly generating corresponding microbial data visualization charts from microbial data visualization chart style information is realized. First, the characteristic information of the microbial data is collected and the characteristic data is extracted. After processing, the diffusion morphology index is obtained, and it is adapted to the corresponding diffusion morphology thresholds of multiple alternative simulation diffusion models. The three alternative models that best meet the threshold adaptation requirements are obtained as the preferred diffusion models, which are processed according to the microbial data to obtain the microbial data visualization chart data set, and further data processing is performed. A preset stratified sampling and division model is used for stratified sampling and division, an optimized microbial data visualization chart data set is obtained, model environment configuration parameters and training configuration parameters are obtained, and three preferred diffusion models are trained respectively in combination with the optimized microbial data visualization chart data set to obtain three trained preferred diffusion models, and simulated diffusion and preliminary fitting evaluation are performed to obtain fitting evaluation data, which are processed according to the fitting evaluation data to obtain corresponding fitting effect indexes, and compared with preset standard effect thresholds respectively, and a target diffusion model is obtained according to the comparison results, and the microbial data is processed through the target diffusion model to obtain a microbial data visualization chart, thereby realizing the technology of generating microbial data visualization charts based on diffusion models.
[0136] According to an embodiment of the present invention, the step of collecting characteristic information of microbial data, extracting characteristic data, and obtaining a diffusion morphology index after processing includes:
[0137] Collect characteristic information of microbial data, including species classification information, morphological information, physiological and biochemical characteristics information, genetic information and ecological distribution information;
[0138] Acquiring characteristic data, including distribution morphology characteristic data, time series characteristic data, and correlation characteristic data, through a preset microbial characteristic recognition model according to the characteristic information;
[0139] Processing is performed according to the distribution morphology characteristic data, the time series characteristic data and the correlation characteristic data to obtain a diffusion morphology index;
[0140] The calculation formula for obtaining the diffusion morphology index is:
[0141] ;
[0142] in, is the diffusion morphology index, , , They are distribution morphology feature data, time series feature data, and correlation feature data. , , , is the preset characteristic coefficient (the characteristic coefficient is obtained by querying the preset microbial diffusion monitoring platform database).
[0143] It should be noted that before training the diffusion model, it is necessary to select three diffusion models that best suit the characteristics of the microbial data and the visualization requirements. Therefore, it is necessary to first obtain the diffusion morphological index of the microbial data. First, the characteristic information of the microbial data is collected, including species classification information, morphological information, physiological and biochemical characteristic information, genetic information, and ecological distribution information. According to the above characteristic information, characteristic data is obtained through a preset microbial characteristic recognition model, including distribution morphological characteristic data, time series characteristic data, and correlation characteristic data. Among them, the microbial characteristic recognition model belongs to a neural network model. The initialized microbial characteristic recognition model is trained according to the characteristic information of a large amount of historical microbial data to obtain a trained microbial characteristic recognition model, and then the above data is processed to obtain the diffusion morphological index.
[0144] According to an embodiment of the present invention, the processing based on the microbial data to obtain a microbial data visualization chart dataset includes:
[0145] Obtain different visualization chart style information based on data enhancement technology, and obtain microbial data visualization chart style information in combination with microbial data;
[0146] Normalization and aggregation processing are performed according to the microbial data visualization chart style information to obtain a microbial data visualization chart data set.
[0147] It should be noted that in order to train the model, a data set must be created first. First, different visualization chart style information is generated from multiple dimensions such as chart type, legend, unit, data tag, coordinate, and table header using data enhancement technology. The microbial data and chart style information are merged into microbial data visualization chart style information. The microbial data chart style information is imported, and programming technology and professional drawing libraries are used to batch draw microbial data visualization charts to construct a microbial data visualization chart dataset with a one-to-one correspondence between microbial data visualization chart style information text and visualization chart images.
[0148] According to an embodiment of the present invention, the data processing of the microbial data visualization chart data set, and stratified sampling and partitioning by a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set includes:
[0149] Perform data processing on the microbial data visualization chart dataset based on text length, data category, and chart style;
[0150] The microbial data visualization chart dataset is stratified sampled and divided into a training set, a test set, and a validation set through a preset stratified sampling partitioning model, so as to obtain an optimized microbial data visualization chart dataset.
[0151] It should be noted that the prepared data set needs to be further cut, and data analysis and statistics need to be performed on the microbial data visualization chart data set. From multiple dimensions such as text length, data category, and chart style, the data set needs to be stratified and sampled and divided into a training set (80%), a test set (10%), and a validation set (10%), so as to obtain the optimized microbial data visualization chart data set.
[0152] According to an embodiment of the present invention, the acquisition of model environment configuration parameters and training configuration parameters, and the combination of the optimized microbial data visualization chart data set to perform model training on three preferred diffusion models respectively to obtain the trained preferred diffusion model include:
[0153] Perform model training according to the preset model training database and preset training environment information to obtain environment configuration parameters;
[0154] Set the training configuration parameters according to the preset model training database, including optimizer parameters, learning rate, image resolution, data repetition rate, data batch, and number of training steps;
[0155] Perform vector mapping on the microbial data visualization chart image according to the preset autoencoder model to generate latent vectors;
[0156] The microbial data visualization chart style information is encoded through a preset text encoding model to generate a text embedding vector;
[0157] Performing noise addition and diffusion processing on the latent vector to obtain a noisy image;
[0158] Adding noise to the latent vector and the text embedding vector of the noisy image through a preset U-Net model to perform error evaluation, and obtaining the error between the diffusion model output noise and the real noise;
[0159] Iteratively update the training parameters of the U-Net model through the back propagation algorithm according to the error to obtain the adjusted training parameters;
[0160] The three optimal diffusion models are trained again according to the adjusted training parameters in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models.
[0161] It should be noted that in order to obtain a trained model, Python, Pytorch, CUDA and model training related dependency libraries must be installed first, and the accelerate library must be used to configure the training environment such as multi-GPU and FP16 precision. Eight A100 cards must be used for model training to obtain environmental parameters. At the same time, the training configuration parameters are set according to the preset model training database. Further, the model training begins. During the training process, the VAE variational autoencoder maps the real microbial data visualization chart image from the pixel space to the latent space, generates a latent vector, and learns the latent expression of the image. The super-long CLIP text encoder encodes the microbial data visualization chart style information and generates a text embedding vector; then Gaussian noise is continuously added to the image latent expression for forward diffusion, and then the U-Net model is called on the noisy image to evaluate the added noise. In this process, U-Net simultaneously receives the latent vector of the image and the text embedding vector generated by the microbial data visualization chart style information. Based on the microbial data visualization chart style information and the microbial data visualization chart image, the matching relationship between the microbial data visualization chart style information and the microbial data visualization chart image is learned according to the attention mechanism. The error between the diffusion model output noise and the real noise is calculated. The U-Net model parameters are continuously updated iteratively through the back-propagation algorithm.
[0162] According to an embodiment of the present invention, simulating diffusion according to the three trained optimal diffusion models and performing preliminary fitting evaluation respectively to obtain fitting evaluation data include:
[0163] Simulating the diffusion of the microbial data according to the three trained optimal diffusion models, and performing preliminary fitting evaluations respectively;
[0164] obtaining fitting assessment data based on the preliminary fitting assessment;
[0165] The fitting evaluation data includes residual distribution coefficient, determination coefficient and mean square error coefficient.
[0166] It should be noted that after the training of the three preferred diffusion models was completed, the microbial data were simulated for diffusion and preliminary fitting evaluation was performed based on the three models to obtain fitting evaluation data including residual distribution coefficient, determination coefficient and mean square error coefficient.
[0167] According to an embodiment of the present invention, the processing is performed according to the fitting evaluation data to obtain a corresponding fitting effect index, and the index is compared with a preset standard effect threshold value, and a target diffusion model is obtained according to the comparison result; including:
[0168] Processing is performed according to the residual distribution coefficient, determination coefficient and mean square error coefficient to obtain a corresponding fitting effect index;
[0169] Perform threshold comparisons on the fitting effect indexes corresponding to the three trained optimal diffusion models respectively with preset standard effect thresholds to obtain three corresponding fitting comparison values;
[0170] Comparing the three fitting comparison values, and taking the optimal diffusion model with the best comparison as the target diffusion model;
[0171] The calculation formula of the fitting effect index is:
[0172] ;
[0173] in, is the fitting effect index corresponding to the i-th optimal diffusion model, , , are the residual distribution coefficient, determination coefficient, and mean square error coefficient corresponding to the i-th optimal diffusion model among the three trained optimal diffusion models, , is the preset characteristic coefficient (the characteristic coefficient is obtained by querying the preset microbial diffusion monitoring platform database).
[0174] It should be noted that, further, the residual distribution coefficient, the determination coefficient and the mean square error coefficient are processed to obtain the corresponding fitting effect index, and then the fitting effect indexes corresponding to the three trained preferred diffusion models are compared with the preset standard effect thresholds to obtain the corresponding three fitting comparison values, and then the three fitting comparison values are compared, and the preferred diffusion model with the best comparison is used as the target diffusion model.
[0175] The present invention discloses a method and system for generating a visualization chart of microbial data based on a diffusion model. The method and system collect characteristic information of microbial data and extract characteristic data. After processing, a diffusion morphology index is obtained, and the index is matched with corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models. Three candidate models that best meet the threshold adaptation requirements are obtained as preferred diffusion models. The data are processed according to the microbial data to obtain a visualization chart data set of microbial data. The data are further processed, and stratified sampling and division are performed through a preset stratified sampling and division model to obtain an optimized visualization chart data set of microbial data. The model environment configuration parameters and training configuration parameters are obtained. The three preferred diffusion models are trained respectively in combination with the optimized visualization chart data set of microbial data to obtain three trained preferred diffusion models. Simulated diffusion and preliminary fitting evaluation are performed to obtain fitting evaluation data. The fitting evaluation data are processed to obtain corresponding fitting effect indexes, and the indexes are compared with preset standard effect thresholds respectively. The target diffusion model is obtained according to the comparison results. The microbial data is processed through the target diffusion model to obtain a visualization chart of microbial data, thereby realizing the technology of generating visualization charts of microbial data based on the diffusion model.
[0176] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0177] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0178] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0179] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, the aforementioned program can be stored in a readable storage medium, and when the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0180] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A method for generating visualization charts of microbial data based on a diffusion model, characterized in that: The following steps are involved: Collect characteristic information of microbial data, extract characteristic data, and obtain diffusion morphology index after processing; According to the diffusion morphology index, the corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models are adapted to obtain three candidate models that best meet the threshold adaptation requirements as preferred diffusion models; Process the microbial data to obtain a visual chart data set of the microbial data; Processing the microbial data visualization chart data set, and performing stratified sampling and partitioning through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set; Obtaining model environment configuration parameters and training configuration parameters, and performing model training on three optimal diffusion models respectively in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models; Simulating diffusion according to the three trained optimal diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data; Processing the fitting evaluation data to obtain a corresponding fitting effect index, and comparing the index with a preset standard effect threshold, and obtaining a target diffusion model according to the comparison result; Processing the microbial data through the target diffusion model to obtain a visualization chart of the microbial data; The characteristic information of the microbial data is collected, and the characteristic data is extracted and processed to obtain the diffusion morphology index, including: Collect characteristic information of microbial data, including species classification information, morphological information, physiological and biochemical characteristics information, genetic information and ecological distribution information; Acquiring characteristic data, including distribution morphology characteristic data, time series characteristic data, and correlation characteristic data, through a preset microbial characteristic recognition model according to the characteristic information; Processing is performed according to the distribution morphology characteristic data, the time series characteristic data and the correlation characteristic data to obtain a diffusion morphology index; The calculation formula for obtaining the diffusion morphology index is: ; in, is the diffusion morphology index, , , They are distribution morphology feature data, time series feature data, and correlation feature data. , , , is the preset characteristic coefficient.
2. The method for generating a visualization chart of microbial data based on a diffusion model according to claim 1, characterized in that: The processing according to the microbial data to obtain a microbial data visualization chart data set includes: Obtain different visualization chart style information based on data enhancement technology, and obtain microbial data visualization chart style information in combination with microbial data; Normalization and aggregation processing are performed according to the microbial data visualization chart style information to obtain a microbial data visualization chart data set.
3. The method for generating a visualization chart of microbial data based on a diffusion model according to claim 2, characterized in that: The data processing of the microbial data visualization chart data set and stratified sampling and division by a preset stratified sampling and division model to obtain an optimized microbial data visualization chart data set includes: Perform data processing on the microbial data visualization chart dataset based on text length, data category, and chart style; The microbial data visualization chart dataset is stratified sampled and divided into a training set, a test set, and a validation set through a preset stratified sampling partitioning model, so as to obtain an optimized microbial data visualization chart dataset.
4. The method for generating a visualization chart of microbial data based on a diffusion model according to claim 3, characterized in that: The obtaining of model environment configuration parameters and training configuration parameters, and combining the optimized microbial data visualization chart data set to respectively perform model training on three preferred diffusion models to obtain the trained preferred diffusion model, include: Perform model training according to the preset model training database and preset training environment information to obtain environment configuration parameters; Set the training configuration parameters according to the preset model training database, including optimizer parameters, learning rate, image resolution, data repetition rate, data batch, and number of training steps; Perform vector mapping on the microbial data visualization chart image according to the preset autoencoder model to generate latent vectors; The microbial data visualization chart style information is encoded through a preset text encoding model to generate a text embedding vector; Performing noise addition and diffusion processing on the latent vector to obtain a noisy image; Adding noise to the latent vector and the text embedding vector of the noisy image through a preset U-Net model to perform error evaluation, and obtaining the error between the diffusion model output noise and the real noise; Iteratively update the training parameters of the U-Net model through the back propagation algorithm according to the error to obtain the adjusted training parameters; The three optimal diffusion models are trained again according to the adjusted training parameters in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models.
5. The method for generating a visualization chart of microbial data based on a diffusion model according to claim 4, characterized in that: The simulating diffusion according to the three trained optimal diffusion models and performing preliminary fitting evaluation respectively to obtain fitting evaluation data include: Simulating the diffusion of the microbial data according to the three trained optimal diffusion models, and performing preliminary fitting evaluations respectively; obtaining fitting assessment data based on the preliminary fitting assessment; The fitting evaluation data includes residual distribution coefficient, determination coefficient and mean square error coefficient.
6. The method for generating a visualization chart of microbial data based on a diffusion model according to claim 5, characterized in that: The processing according to the fitting evaluation data to obtain the corresponding fitting effect index, and comparing with the preset standard effect threshold respectively, and obtaining the target diffusion model according to the comparison result; including: Processing is performed according to the residual distribution coefficient, determination coefficient and mean square error coefficient to obtain a corresponding fitting effect index; Perform threshold comparisons on the fitting effect indexes corresponding to the three trained optimal diffusion models respectively with preset standard effect thresholds to obtain three corresponding fitting comparison values; Comparing the three fitting comparison values, and taking the optimal diffusion model with the best comparison as the target diffusion model; The calculation formula of the fitting effect index is: ; in, is the fitting effect index corresponding to the i-th optimal diffusion model, , , are the residual distribution coefficient, determination coefficient, and mean square error coefficient corresponding to the i-th optimal diffusion model among the three trained optimal diffusion models, , is the preset characteristic coefficient.
7. A microbial data visualization chart generation system based on a diffusion model, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of a method for generating a visualization chart of microbial data based on a diffusion model, and when the program of the method for generating a visualization chart of microbial data based on a diffusion model is executed by the processor, the following steps are implemented: Collect characteristic information of microbial data, extract characteristic data, and obtain diffusion morphology index after processing; According to the diffusion morphology index, the corresponding diffusion morphology thresholds of multiple candidate simulation diffusion models are adapted to obtain three candidate models that best meet the threshold adaptation requirements as preferred diffusion models; Process the microbial data to obtain a visual chart data set of the microbial data; Processing the microbial data visualization chart data set, and performing stratified sampling and partitioning through a preset stratified sampling partitioning model to obtain an optimized microbial data visualization chart data set; Obtaining model environment configuration parameters and training configuration parameters, and performing model training on three optimal diffusion models respectively in combination with the optimized microbial data visualization chart data set to obtain three trained optimal diffusion models; Simulating diffusion according to the three trained optimal diffusion models, and performing preliminary fitting evaluation respectively to obtain fitting evaluation data; Processing the fitting evaluation data to obtain a corresponding fitting effect index, and comparing the index with a preset standard effect threshold, and obtaining a target diffusion model according to the comparison result; Processing the microbial data through the target diffusion model to obtain a visualization chart of the microbial data; The characteristic information of the microbial data is collected, and the characteristic data is extracted and processed to obtain the diffusion morphology index, including: Collect characteristic information of microbial data, including species classification information, morphological information, physiological and biochemical characteristics information, genetic information and ecological distribution information; Acquiring characteristic data, including distribution morphology characteristic data, time series characteristic data, and correlation characteristic data, through a preset microbial characteristic recognition model according to the characteristic information; Processing is performed according to the distribution morphology characteristic data, the time series characteristic data and the correlation characteristic data to obtain a diffusion morphology index; The calculation formula for obtaining the diffusion morphology index is: ; in, is the diffusion morphology index, , , They are distribution morphology feature data, time series feature data, and correlation feature data. , , , is the preset characteristic coefficient.
8. The microbial data visualization chart generation system based on diffusion model according to claim 7 is characterized in that: The processing according to the microbial data to obtain a microbial data visualization chart data set includes: Obtain different visualization chart style information based on data enhancement technology, and obtain microbial data visualization chart style information in combination with microbial data; Normalization and aggregation processing are performed according to the microbial data visualization chart style information to obtain a microbial data visualization chart data set.
