A virus host prediction method, system and medium based on fuzzy control optimization
Patent Information
- Application Number
- CN202410016094.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2044-01-04
AI Technical Summary
Existing virus host prediction methods are inefficient and have low accuracy when dealing with eukaryotes due to the large amount of information they process. In particular, deep learning methods have limited prediction range and are difficult to accurately predict multiple eukaryotic hosts.
By acquiring the virus's whole genome data, counting the frequency of codon occurrences, constructing a codon dictionary, replacing the large language model, training the virus host prediction model, and combining it with a fuzzy control system to determine the reliability of potential hosts, the optimal host is output.
It has achieved accurate prediction of a wide range of eukaryotic hosts, improved prediction accuracy, and enabled the exploration of the relationship between viruses and hosts, thus expanding the prediction range and improving accuracy.
Smart Images

Figure CN118173164B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of macrovirus group data processing, and in particular to a virus host prediction method, system and medium based on fuzzy control optimization. Background Technology
[0002] Viruses are the most abundant and diverse entities on Earth. Among them, eukaryotic viruses, especially eukaryotic RNA viruses, infect almost all taxa of eukaryotic organisms, and not only have a significant impact on human health and social production, but also profoundly affect global biogeochemical cycles.
[0003] With the development of next-generation sequencing (NGS) technology, research has shown that almost all viral sequences have been sequenced, but crucial host information is lacking, significantly hindering the further utilization of metaviromic data. Current viral host prediction methods primarily target prokaryotes, employing contrast-based approaches that require simultaneous reference to both viral and prokaryotic host sequence information, resulting in a large data volume and low efficiency. For eukaryotes, due to their massive and complex sequences, introns introduce significant noise into training. Therefore, current eukaryotic virus host prediction mainly employs contrast-free methods based on deep learning, but these methods have a very limited prediction range and low accuracy. Summary of the Invention
[0004] To address the aforementioned technical problems, the present invention aims to provide a virus host prediction method, system, and medium based on fuzzy control optimization that offers a wide prediction range and high accuracy.
[0005] To achieve the above objectives, one aspect of this application proposes a virus host prediction method based on fuzzy control optimization, comprising the following steps:
[0006] Obtain the whole genome data of the virus, count the frequency of each codon in the whole genome data of the virus, and obtain a codon dictionary based on the frequency of occurrence;
[0007] The text file in the preset large language model is replaced with the codon dictionary, and the replaced large language model is trained based on the virus whole genome data to obtain the virus host prediction model.
[0008] Obtain the virus sequence of the virus to be predicted, input the virus sequence into the virus host prediction model, and obtain the optimal potential host;
[0009] The optimal potential host is input into a pre-set fuzzy control system to obtain the reliability level corresponding to the optimal potential host, and then the host of the virus to be predicted is determined based on the reliability level and output.
[0010] The virus to be predicted is a eukaryotic RNA virus.
[0011] In some embodiments, the step of acquiring viral whole genome data, calculating the frequency of occurrence of each codon in the viral whole genome data, and obtaining a codon dictionary based on the frequency of occurrence specifically includes:
[0012] Download the complete genome data of the virus using NCBI;
[0013] Based on the data recording time, the viral whole genome data is divided into first viral whole genome data and second viral whole genome data, and then the frequency of occurrence of each codon in the first viral whole genome data is statistically analyzed.
[0014] Each codon is numbered according to its frequency of occurrence, and then the codons are sorted according to their numbers to obtain the codon dictionary.
[0015] In some embodiments, the step of replacing the text file in the preset large language model with the codon dictionary and training the replaced large language model based on the viral whole genome data to obtain a viral host prediction model specifically includes:
[0016] The host information is extracted from the viral whole genome data, and then RNA virus samples that infect eukaryotic hosts and their corresponding eukaryotic host information are screened out based on the host information.
[0017] The eukaryotic host information is given a standardized name, and the host lineage corresponding to the eukaryotic host information is obtained through a bioinformatics tool library.
[0018] The RNA virus samples are statistically analyzed and classified according to the host lineage, and RNA virus samples with sequence lengths shorter than a preset first sequence length are removed to obtain virus sequence samples, wherein the virus sequence samples include a first virus sequence sample and a second virus sequence sample.
[0019] The first virus sequence sample is randomly and repeatedly downsampled according to a preset second sequence length to obtain a third virus sequence sample.
[0020] The third virus sequence sample is divided into a training set, a validation set, and a test set. The text file in the large language model is replaced with the codon dictionary. Then, the replaced large language model is trained based on the training set, the validation set, and the test set to obtain the virus host prediction model.
[0021] In some embodiments, the step of training the replaced large language model based on the training set, the validation set, and the test set to obtain the virus host prediction model specifically includes:
[0022] The word segmentation length of the replaced large language model is modified to the preset word segmentation length to obtain the first large language model;
[0023] The first large language model is iteratively trained using the training set, its parameters are adjusted using the validation set, and its performance is evaluated using the test set to obtain the virus host prediction model.
[0024] In some embodiments, the virus host prediction model includes an input layer, an Albert layer, and a classification layer. The step of inputting the virus sequence into the virus host prediction model to obtain the optimal potential host specifically includes:
[0025] The virus sequence is input into the input layer for format conversion to obtain a virus vector;
[0026] The virus vector is input into the Albert layer for feature extraction to obtain the virus feature weights;
[0027] The virus feature weights are input into the classification layer for multi-class training to obtain multiple potential hosts, and then the optimal potential host is determined based on each potential host.
[0028] In some embodiments, the virus host prediction method further includes a step of pre-setting the fuzzy control system, which specifically includes:
[0029] A phylogenetic tree is constructed based on the first virus sequence sample and the second virus sequence sample to obtain phylogenetic relationships, wherein the phylogenetic relationships include the first branch distance and the second branch distance;
[0030] The mean of the first branch distance and the minimum second branch distance are used as input variables, and then the input variables are fuzzified to obtain a fuzzy set;
[0031] The fuzzy set is defuzzified to obtain the reliability level, which is then used as an output variable.
[0032] The fuzzy rules are determined, and the fuzzy function is adjusted according to the fuzzy rules to obtain the fuzzy control system.
[0033] In some embodiments, the reliability level includes reliable, relatively reliable, and unreliable, and the step of determining the host of the virus to be predicted and outputting it based on the reliability level specifically includes:
[0034] If the reliability level is rated as relatively reliable or unreliable, the corresponding potential host will be discarded.
[0035] If the reliability level is reliable, the corresponding potential host is determined as the host and output.
[0036] To achieve the above objectives, another aspect of this application proposes a virus host prediction system based on fuzzy control optimization, comprising:
[0037] A codon dictionary creation module is used to acquire viral whole genome data, count the frequency of each codon in the viral whole genome data, and obtain a codon dictionary based on the frequency of occurrence.
[0038] The prediction model building module is used to replace the text file in the preset large language model with the codon dictionary, and train the replaced large language model according to the virus whole genome data to obtain the virus host prediction model.
[0039] The potential host acquisition module is used to acquire the virus sequence of the virus to be predicted, input the virus sequence into the virus host prediction model, and obtain the optimal potential host.
[0040] The host determination module is used to input the optimal potential host into a pre-set fuzzy control system, obtain the reliability level corresponding to the optimal potential host, and then determine the host of the virus to be predicted based on the reliability level and output it.
[0041] The virus to be predicted is a eukaryotic RNA virus.
[0042] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the virus host prediction method based on fuzzy control optimization as described above.
[0043] To achieve the above objectives, another aspect of the embodiments of this application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs that can be executed by one or more processors to implement the virus host prediction method based on fuzzy control optimization as described above.
[0044] The beneficial effects of this invention are as follows: The virus host prediction method, system, and medium based on fuzzy control optimization of this invention acquires viral whole-genome data, statistically analyzes the frequency of each codon in the viral whole-genome data, obtains a codon dictionary based on the frequency, and then uses this codon dictionary to replace the text file in a large language model. The large language model is then trained based on the viral whole-genome data to obtain a virus host prediction model. Next, the viral sequence of the virus to be predicted is input into the trained virus host prediction model to obtain multiple potential hosts. The optimal potential host is selected from the potential hosts, and finally, the optimal potential host is input into a pre-set fuzzy control system. The reliability of each potential host is judged based on phylogenetic relationships and the distribution of viral whole-genome data. The host is determined based on the reliability and output. This invention, on the one hand, uses a codon dictionary to replace the text file in a large language model, trains the large language model to obtain a virus host prediction model, and predicts potential hosts through this virus host prediction model; on the other hand, by judging the reliability of potential hosts through a pre-set fuzzy control system, it can accurately predict a wide range of eukaryotic hosts. Furthermore, it can further explore and explain the relationship between viruses and their corresponding hosts through phylogenetic tree and fuzzy control system analysis. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments of the present invention are described below. It should be understood that the drawings described below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart illustrating the steps of a virus host prediction method based on fuzzy control optimization provided in this embodiment of the invention;
[0047] Figure 2 A flowchart illustrating a virus host prediction method based on fuzzy control optimization provided in an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of the structure of a virus host prediction system based on fuzzy control optimization provided in an embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0051] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0052] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0053] Viruses are the most abundant and diverse entities on Earth. Among them, eukaryotic viruses, especially eukaryotic RNA viruses, infect almost all taxa of eukaryotic organisms, and not only have a significant impact on human health and social production, but also profoundly affect global biogeochemical cycles.
[0054] With the development of next-generation sequencing (NGS) technology, research has shown that almost all viral sequences have been sequenced, but crucial host information is lacking, significantly hindering the further utilization of metaviromic data. Current viral host prediction methods primarily target prokaryotes, employing contrast-based approaches that require simultaneous reference to both viral and prokaryotic host sequence information, resulting in a large data volume and low efficiency. For eukaryotes, due to their massive and complex sequences, introns introduce significant noise into training. Therefore, current eukaryotic virus host prediction mainly employs contrast-free methods based on deep learning. However, these methods can mostly predict only a single-digit number of hosts, and the accuracy drops rapidly to around 54% when the number of hosts increases to 36.
[0055] To address this, this invention proposes a virus host prediction method based on fuzzy control optimization. By acquiring whole-genome data of a virus, the frequency of each codon in the whole-genome data is statistically analyzed, and a codon dictionary is obtained based on the frequency. This codon dictionary is then used to replace the text file in a large language model. The large language model is trained based on the whole-genome data to obtain a virus host prediction model. Next, the virus sequence to be predicted is input into the trained virus host prediction model to obtain multiple potential hosts. The optimal potential host is selected, and finally, the optimal potential host is input into a pre-set fuzzy control system. The reliability of each potential host is determined based on phylogenetic relationships and the distribution of the whole-genome data. The host is then determined and output based on the reliability. This invention, on the one hand, uses a codon dictionary to replace the text file in a large language model and trains the large language model to obtain a virus host prediction model, which then predicts potential hosts. On the other hand, by using a pre-set fuzzy control system to determine the reliability of potential hosts, it can accurately predict a wide range of eukaryotic hosts. Furthermore, it can further explore and explain the relationship between viruses and their corresponding hosts through phylogenetic tree and fuzzy control system analysis. This virus host prediction method can be applied to biomedical research, public health prevention and control, and ecological research, but it is not limited to these fields.
[0056] Reference Figure 1 , Figure 1 This invention provides a flowchart of a virus host prediction method based on fuzzy control optimization, comprising steps S101 to S104.
[0057] S101. Obtain the whole genome data of the virus, count the frequency of each codon in the whole genome data of the virus, and obtain the codon dictionary based on the frequency of occurrence.
[0058] As an optional implementation, step S101 can be further divided into the following steps S1011 to S1013:
[0059] S1011. Download the virus's complete genome data via NCBI;
[0060] NCBI refers to the National Center for Biotechnology Information (NCBI), which possesses a vast array of biomedical databases and software tools. It is responsible for collecting biomedical data and information and making it freely available to users worldwide. Downloading from NCBI yielded 18,750 complete viral genome sequences, including viral nucleic acid sequences and host origin information.
[0061] S1012. Based on the data recording time, the viral whole genome data is divided into the first viral whole genome data and the second viral whole genome data, and then the frequency of each codon in the first viral whole genome data is statistically analyzed.
[0062] S1013. Number each codon according to its frequency of occurrence, and then sort the codons according to the number to obtain a codon dictionary.
[0063] Specifically, the viral whole-genome data was divided according to the data recording time. Data before February 2023 was used as the first viral whole-genome data for training the model, and data after February 2023 was used as the second viral whole-genome data for testing the model's generalization ability. To help the model better understand the base sequence language, the frequency of 64 codons in the first viral whole-genome data was counted, and they were assigned numbers from 0 to 63 according to their frequency from high to low. Finally, these codons were sorted according to their numbers and stored in a vocab file (vocab*.txt) to obtain a codon dictionary.
[0064] S102. Replace the text file in the preset large language model with a codon dictionary, and train the replaced large language model based on the virus whole genome data to obtain the virus host prediction model.
[0065] As an optional implementation, step S102 can be further divided into the following steps S1021 to S1025:
[0066] S1021. Extract host information from the viral whole genome data, and then screen out RNA virus samples that infect eukaryotic hosts and their corresponding eukaryotic host information based on the host information.
[0067] Specifically, biological tools in Python can be used to identify and extract host information from all viral whole genome data (including first and second viral whole genome data), thereby screening out RNA virus samples that infect eukaryotic hosts.
[0068] S1022. Perform standardized naming operations on eukaryotic host information and obtain the host lineage corresponding to the eukaryotic host information through a bioinformatics tool library;
[0069] Specifically, host names in eukaryotic host information are manually standardized to Latin names. Then, using the Python packages Bio and ete3, host phylogenetic trees are crawled down to the species level. This requires not only obtaining phylogenetic information but also detail down to the specific species level to gain a deeper understanding of viral transmission and evolution across different host species. This helps in exploring and interpreting the relationship between viruses and their corresponding hosts. Bio and ete3 are Python libraries; Bio is used to process bioinformatics data, such as gene sequences and protein sequences, while ete3 is used for phylogenetic tree manipulation and analysis.
[0070] S1023. Statistically analyze and classify RNA virus samples according to host lineage, and remove RNA virus samples with sequence lengths shorter than a preset first sequence length to obtain virus sequence samples, wherein the virus sequence samples include a first virus sequence sample and a second virus sequence sample.
[0071] Specifically, the distribution of all RNA virus samples across different hosts was statistically analyzed to better understand the host preferences and distribution characteristics of the viruses, thereby improving the accuracy of subsequent analyses. Furthermore, the RNA virus samples were categorized into three types based on their infecting hosts: fungi, green plants, and metazoans, to allow for more in-depth analysis of different host types. Considering the extreme imbalance in the distribution of viral metagenomic data and the limited availability of host-annotated sequences, viral sequences with a length of less than 10 bp (i.e., the first sequence length) were filtered and removed based on their respective viral distributions to improve data quality and reliability, resulting in viral sequence samples. Here, bp is used to describe the number of base pairs in DNA or RNA.
[0072] The virus sequence samples include 3,016 first virus sequence samples and 617 second virus sequence samples. The first virus sequence samples correspond to the first virus whole genome data used for training the model before February 2023, and the second virus sequence samples correspond to the second virus whole genome data used for testing the model after February 2023.
[0073] S1024. Perform random repeated downsampling on the first virus sequence sample according to the preset second sequence length to obtain the third virus sequence sample;
[0074] Specifically, in order to adapt to the input of the model, the training effect of subsequence lengths of 150bp, 300bp and 500bp on the model was explored in advance. Finally, it was determined that the 300bp sequence length had the best training effect on the model. Using 300bp as the second sequence length, random repeated downsampling was performed to obtain the third virus sequence sample.
[0075] S1025. Divide the third virus sequence sample into a training set, a validation set, and a test set. Replace the text file in the large language model with a codon dictionary. Then train the replaced large language model based on the training set, validation set, and test set to obtain the virus host prediction model.
[0076] Specifically, based on the PyTorch framework, a codon dictionary (vocab*.txt) is used to replace the original reference vocabulary (vocab) for word segmentation in the model. The 300bp long subsequences in the training data (third virus sequence samples) are divided into training set, validation set and test set to train a lightweight large language model and obtain a virus host prediction model.
[0077] As an optional implementation, the step of training the replaced large language model based on the training set, validation set, and test set to obtain the virus host prediction model can be specifically divided into the following steps S10251 and S10252:
[0078] S10251. Modify the word segmentation length of the replaced large language model to the preset word segmentation length to obtain the first large language model;
[0079] Specifically, during the model data loading phase, the word segmentation length of the query sequence needs to be synchronously replaced with a word segmentation length of 3 (preset word segmentation length) (Python definition method split_kmer()). According to the correspondence between codons and numbers in the new codon dictionary (Python definition method load_vocab()), each codon is assigned a unique value to transform the query sequence into a vector representation that the subsequent model can recognize (Python definition method convert_seqs_to_ids()), resulting in the optimized first language model, thereby ensuring data consistency, accuracy, and efficiency.
[0080] S10252. Iteratively train the first language model using the training set, adjust the parameters of the first language model using the validation set, and evaluate the performance of the first language model using the test set to obtain the virus host prediction model.
[0081] Specifically, the training set is used to train the large language model. It is the main part of the entire dataset and contains enough information for the model to learn language structure and patterns. By continuously training and adjusting the parameters of the model, the model can better understand and generate text that conforms to language rules. The validation set is used to adjust the model's hyperparameters and monitor the model's performance during training. Through the validation set, the model's generalization ability can be evaluated during training, and overfitting can be prevented. The test set is used to evaluate the performance of the trained model, so as to comprehensively evaluate the model's performance and draw a final conclusion.
[0082] S103. Obtain the virus sequence of the virus to be predicted, input the virus sequence into the virus host prediction model, and obtain the optimal potential host.
[0083] As an optional implementation, the virus host prediction model includes an input layer, an Albert layer, and a classification layer. The step of inputting the virus sequence into the virus host prediction model to obtain the optimal potential host can be specifically divided into the following steps S1031 to S1033:
[0084] S1031. Input the virus sequence into the input layer and perform format conversion to obtain the virus vector;
[0085] S1032. Input the virus vector into the Albert layer for feature extraction to obtain the virus feature weights;
[0086] S1033. Input the virus feature weights into the classification layer for multi-class training to obtain multiple potential hosts, and then determine the optimal potential host based on each potential host.
[0087] Specifically, firstly, a segment of eukaryotic RNA virus sequence approximately 300 bp in length is input into the input layer of the virus host prediction model for format conversion, transforming the base language (ACGT…) into computer language (1769…) for subsequent layer recognition. These virus vectors then enter the Albert layer for feature extraction. The extracted virus feature weights are then fed into the classification layer for multi-class training. The classification layer outputs multiple potential hosts and their corresponding probabilities, further identifying the potential host with the highest probability as the optimal potential host. Furthermore, this embodiment of the invention uses second virus sequence samples from February 2023 onwards to simulate the emergence of a new virus and evaluate the model's generalization performance.
[0088] S104. Input the optimal potential host into the pre-set fuzzy control system to obtain the reliability level corresponding to the optimal potential host, and then determine the host of the virus to be predicted based on the reliability level and output it.
[0089] As an optional implementation, the virus host prediction method further includes a step of pre-setting a fuzzy control system, which can be specifically divided into the following steps S1041 to S1044:
[0090] S1041. Construct a phylogenetic tree based on the first virus sequence sample and the second virus sequence sample to obtain the phylogenetic relationship, wherein the phylogenetic relationship includes the first branch distance and the second branch distance;
[0091] Specifically, second viral sequence samples after February 2023 are considered new viruses. Analysis of the prediction results for each host output by the classification layer reveals that viral sequences that consistently infect a fixed number of hosts have better predictive performance. This embodiment of the invention further performs similarity clustering and phylogenetic tree analysis on the relationship between these new viruses (second viral sequence samples) and the training viral data (first viral sequence samples). Ultimately, it is found that on the constructed phylogenetic tree, most of the new viruses (second viral sequence samples) with good predictive performance have closer branch distances to the training viral data (first viral sequence samples). By constructing this phylogenetic tree, the relationship between viruses and their corresponding hosts can be further explored and explained. Here, the first branch distance represents the branch distance between the second viral sequence sample and the first viral sequence sample, and the second branch distance represents the branch distance between any two first viral sequence samples within the same host.
[0092] S1042. Take the mean of the first branch distance and the minimum second branch distance as input variables, and then perform fuzzification on the input variables to obtain a fuzzy set;
[0093] Specifically, the minimum first branch distance is used as a measure of similarity and as an input variable. At the same time, the distribution of the first virus sequence samples (the mean of the branch distances between any two first virus sequence samples) is used as an input variable. The precise values of the input variables are converted into fuzzy sets. The similarity is defined as fuzzy sets of four levels: completely similar, similar, partially similar, and dissimilar. The distribution of the first virus sequence samples is defined as fuzzy sets of three levels: concentrated, relatively concentrated, and not concentrated.
[0094] S1043. Defuzzify the fuzzy set to obtain the reliability level, and then use the reliability level as the output variable.
[0095] Specifically, the fuzzy set of the output variable is defuzzified and converted into a precise value to obtain the output variable of reliability. The reliability is divided into three levels: 60%-100% accuracy indicates reliability, 30%-50% accuracy indicates relatively reliable, and 0%-30% accuracy indicates unreliability.
[0096] S1044. Determine the fuzzy rules, adjust the fuzzy function according to the fuzzy rules, and obtain the fuzzy control system.
[0097] Specifically, 12 fuzzy rules are defined based on the characteristics and needs of the system. For example, "if the similarity is perfect and the training data distribution is relatively concentrated, then the reliability is reliable." Finally, based on the fuzzy rules, the fuzzy functions at different stages of input and output are repeatedly debugged to make the output of the fuzzy control close to the true output, thus obtaining the set fuzzy control system. Here, a fuzzy function is a function that maps a variable to one or more membership values, where these membership values represent the degree of similarity between the variable and one or more predefined fuzzy sets.
[0098] As an optional implementation, the reliability level includes reliable, relatively reliable, and unreliable. The step of determining the host of the virus to be predicted and exporting it based on the reliability level can be further divided into the following steps S1045 and S1046:
[0099] S1045. If the reliability level is relatively reliable or unreliable, the corresponding potential host will be discarded.
[0100] S1046. If the reliability level is reliable, identify the corresponding potential host as the host and output it.
[0101] Specifically, after obtaining a reliable fuzzy control system, the output results of the multi-classification layer are output only when the fuzzy control system determines that they are reliable (accuracy rate of 60%-100%), which can greatly improve the accuracy of system prediction.
[0102] In summary, the process of this virus host prediction method based on fuzzy control optimization is as follows: Figure 2 As shown:
[0103] The first step is to create a dictionary of codewords;
[0104] The second step is to use the codec dictionary to replace the text file in the large language model during the model data loading stage;
[0105] The third step is to modify the word segmentation length of the large language model to 3 based on the codon features;
[0106] The fourth step is to modify the word segmentation redirection mode of the large language model based on the codon dictionary;
[0107] The fifth step is to train the optimized large language model based on the first virus sequence sample to obtain the virus host prediction model.
[0108] The sixth step is to input the virus sequence to be predicted into the virus host prediction model and output the optimal potential host.
[0109] The seventh step is to determine the reliability of the optimal potential host through the fuzzy control system. When the reliability is deemed reliable, the corresponding optimal potential host is output.
[0110] The above describes the virus host prediction method based on fuzzy control optimization according to embodiments of the present invention. It can be understood that, compared with existing non-comparison prediction models for eukaryotes, the embodiments of the present invention acquire viral whole-genome data, statistically analyze the frequency of each codon in the viral whole-genome data, obtain a codon dictionary based on the frequency, and then use this codon dictionary to replace the text file in a large language model. The large language model is then trained based on the viral whole-genome data to obtain a virus host prediction model. Next, the viral sequence of the virus to be predicted is input into the trained virus host prediction model to obtain multiple potential hosts. The optimal potential host is selected and input into a pre-set fuzzy control system. The reliability of the optimal potential host is judged based on phylogenetic relationships and the distribution of the viral whole-genome data. When the reliability is deemed reliable, the optimal potential host is output. On the one hand, the present invention uses a codon dictionary to replace the text file in the large language model and uses second viral sequence samples after February 2023 as newly discovered viruses to evaluate the model's predictive performance, enabling accurate prediction of a wide range of eukaryotic hosts. On the other hand, through phylogenetic tree analysis and the output results of the fuzzy control system, it can partially explore and explain the relationship between viruses and their corresponding hosts.
[0111] This virus host prediction method based on fuzzy control optimization learns different sequence features of the same host from the sequence features and corresponding host labels of a large amount of training data, and outputs hosts with high accuracy. The accuracy achieved by the initial virus host prediction model after final training is shown in Table 1. As can be seen from Table 1, this model expands the prediction range of virus hosts, predicting up to 380 hosts with an accuracy of 73%. When the number of hosts increases to 195, the accuracy still reaches about 85%. For the prediction effect of new viruses, this embodiment of the invention further adds a fuzzy control system to intervene in the model's output results, achieving a prediction accuracy of over 60% for new viruses, and even over 80% for some hosts.
[0112] Table 1
[0113]
[0114] Reference Figure 3 This invention also provides a virus host prediction system based on fuzzy control optimization, comprising:
[0115] The codon dictionary creation module is used to acquire viral whole genome data, count the frequency of each codon in the viral whole genome data, and obtain the codon dictionary based on the frequency of occurrence.
[0116] The prediction model building module is used to replace the text file in the preset large language model with a codon dictionary, and train the replaced large language model based on the virus whole genome data to obtain the virus host prediction model.
[0117] The potential host acquisition module is used to acquire the virus sequence of the virus to be predicted, input the virus sequence into the virus host prediction model, and obtain the optimal potential host.
[0118] The host determination module is used to input the optimal potential host into a pre-set fuzzy control system, obtain the reliability level corresponding to the optimal potential host, and then determine the host of the virus to be predicted based on the reliability level and output it.
[0119] Among them, the virus to be predicted is a eukaryotic RNA virus.
[0120] The content of the above embodiments of the virus host prediction method based on fuzzy control optimization is applicable to the embodiments of the virus host prediction system based on fuzzy control optimization. The specific functions implemented by the embodiments of the virus host prediction system based on fuzzy control optimization are the same as those of the above embodiments of the virus host prediction method based on fuzzy control optimization, and the beneficial effects achieved are also the same as those achieved by the above embodiments of the virus host prediction method based on fuzzy control optimization.
[0121] This invention also provides an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned virus host prediction method based on fuzzy control optimization. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0122] like Figure 4 The diagram shown is a hardware structure schematic of an electronic device provided in an embodiment of the present invention. (Refer to...) Figure 4 This invention provides an electronic device, comprising:
[0123] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0124] The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the virus host prediction method based on fuzzy control optimization according to the embodiments of this invention.
[0125] Input / output interface 1003 is used to implement information input and output;
[0126] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0127] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0128] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0129] This invention also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described virus host prediction method based on fuzzy control optimization.
[0130] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0131] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 1 The method shown.
[0132] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0133] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0134] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0135] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0136] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or, if necessary, processing in other suitable ways, and then stored in computer memory.
[0137] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0138] In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0139] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0140] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A virus host prediction method based on fuzzy control optimization, characterized in that, Includes the following steps: Obtain the whole genome data of the virus, count the frequency of each codon in the whole genome data of the virus, and obtain a codon dictionary based on the frequency of occurrence; The text file in the preset large language model is replaced with the codon dictionary, and the replaced large language model is trained based on the virus whole genome data to obtain the virus host prediction model. Obtain the virus sequence of the virus to be predicted, input the virus sequence into the virus host prediction model, and obtain the optimal potential host; The optimal potential host is input into a pre-set fuzzy control system to obtain the reliability level corresponding to the optimal potential host, and then the host of the virus to be predicted is determined based on the reliability level and output. The virus to be predicted is a eukaryotic RNA virus; The step of replacing the text file in the preset large language model with the codon dictionary and training the replaced large language model based on the viral whole genome data to obtain the viral host prediction model specifically includes: The host information is extracted from the viral whole genome data, and then RNA virus samples that infect eukaryotic hosts and their corresponding eukaryotic host information are screened out based on the host information. The eukaryotic host information is given a standardized name, and the host lineage corresponding to the eukaryotic host information is obtained through a bioinformatics tool library. The RNA virus samples are statistically analyzed and classified according to the host lineage, and RNA virus samples with sequence lengths shorter than a preset first sequence length are removed to obtain virus sequence samples, wherein the virus sequence samples include a first virus sequence sample and a second virus sequence sample. The first virus sequence sample is randomly and repeatedly downsampled according to a preset second sequence length to obtain a third virus sequence sample. The third virus sequence sample is divided into a training set, a validation set, and a test set. The text file in the large language model is replaced with the codon dictionary. The replaced large language model is then trained based on the training set, the validation set, and the test set to obtain the virus host prediction model. The virus host prediction method further includes the step of pre-setting the fuzzy control system, which specifically includes: A phylogenetic tree is constructed based on the first virus sequence sample and the second virus sequence sample to obtain phylogenetic relationships, wherein the phylogenetic relationships include the first branch distance and the second branch distance; The mean of the first branch distance and the minimum second branch distance are used as input variables, and then the input variables are fuzzified to obtain a fuzzy set; The fuzzy set is defuzzified to obtain the reliability level, which is then used as an output variable. The fuzzy rules are determined, and the fuzzy function is adjusted according to the fuzzy rules to obtain the fuzzy control system.
2. The virus host prediction method based on fuzzy control optimization according to claim 1, characterized in that, The step of acquiring the viral whole genome data, calculating the frequency of each codon in the viral whole genome data, and obtaining a codon dictionary based on the frequency of occurrence specifically includes: Download the complete genome data of the virus using NCBI; Based on the data recording time, the viral whole genome data is divided into first viral whole genome data and second viral whole genome data, and then the frequency of occurrence of each codon in the first viral whole genome data is statistically analyzed. Each codon is numbered according to its frequency of occurrence, and then the codons are sorted according to their numbers to obtain the codon dictionary.
3. The virus host prediction method based on fuzzy control optimization according to claim 1, characterized in that, The step of training the replaced large language model based on the training set, the validation set, and the test set to obtain the virus host prediction model specifically includes: The word segmentation length of the replaced large language model is modified to the preset word segmentation length to obtain the first large language model; The first large language model is iteratively trained using the training set, its parameters are adjusted using the validation set, and its performance is evaluated using the test set to obtain the virus host prediction model.
4. The virus host prediction method based on fuzzy control optimization according to claim 1, characterized in that, The virus host prediction model includes an input layer, an Albert layer, and a classification layer. The step of inputting the virus sequence into the virus host prediction model to obtain the optimal potential host specifically includes: The virus sequence is input into the input layer for format conversion to obtain a virus vector; The virus vector is input into the Albert layer for feature extraction to obtain the virus feature weights; The virus feature weights are input into the classification layer for multi-class training to obtain multiple potential hosts, and then the optimal potential host is determined based on each potential host.
5. A virus host prediction method based on fuzzy control optimization according to any one of claims 1 to 4, characterized in that, The reliability level includes reliable, relatively reliable, and unreliable. The step of determining the host of the virus to be predicted and exporting it based on the reliability level specifically includes: If the reliability level is rated as relatively reliable or unreliable, the corresponding potential host will be discarded. If the reliability level is reliable, the corresponding potential host is determined as the host and output.
6. A virus host prediction system based on fuzzy control optimization, characterized in that, include: A codon dictionary creation module is used to acquire viral whole genome data, count the frequency of each codon in the viral whole genome data, and obtain a codon dictionary based on the frequency of occurrence. The prediction model building module is used to replace the text file in the preset large language model with the codon dictionary, and train the replaced large language model according to the virus whole genome data to obtain the virus host prediction model. The potential host acquisition module is used to acquire the virus sequence of the virus to be predicted, input the virus sequence into the virus host prediction model, and obtain the optimal potential host. The host determination module is used to input the optimal potential host into a pre-set fuzzy control system, obtain the reliability level corresponding to the optimal potential host, and then determine the host of the virus to be predicted based on the reliability level and output it. The virus to be predicted is a eukaryotic RNA virus; The step of replacing the text file in the preset large language model with the codon dictionary and training the replaced large language model based on the viral whole genome data to obtain the viral host prediction model specifically includes: The host information is extracted from the viral whole genome data, and then RNA virus samples that infect eukaryotic hosts and their corresponding eukaryotic host information are screened out based on the host information. The eukaryotic host information is given a standardized name, and the host lineage corresponding to the eukaryotic host information is obtained through a bioinformatics tool library. The RNA virus samples are statistically analyzed and classified according to the host lineage, and RNA virus samples with sequence lengths shorter than a preset first sequence length are removed to obtain virus sequence samples, wherein the virus sequence samples include a first virus sequence sample and a second virus sequence sample. The first virus sequence sample is randomly and repeatedly downsampled according to a preset second sequence length to obtain a third virus sequence sample. The third virus sequence sample is divided into a training set, a validation set, and a test set. The text file in the large language model is replaced with the codon dictionary. The replaced large language model is then trained based on the training set, the validation set, and the test set to obtain the virus host prediction model. The virus host prediction method further includes the step of pre-setting the fuzzy control system, which specifically includes: A phylogenetic tree is constructed based on the first virus sequence sample and the second virus sequence sample to obtain phylogenetic relationships, wherein the phylogenetic relationships include the first branch distance and the second branch distance; The mean of the first branch distance and the minimum second branch distance are used as input variables, and then the input variables are fuzzified to obtain a fuzzy set; The fuzzy set is defuzzified to obtain the reliability level, which is then used as an output variable. The fuzzy rules are determined, and the fuzzy function is adjusted according to the fuzzy rules to obtain the fuzzy control system.
7. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for establishing communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the virus host prediction method based on fuzzy control optimization as described in any one of claims 1 to 5.
8. A storage medium, said storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the virus host prediction method based on fuzzy control optimization as described in any one of claims 1 to 5.
