A data classification method based on artificial intelligence
By introducing concepts such as interpolation step, direction, deviation value and credibility value, combined with K-nearest neighbor interpolation and secondary weights, a development chain is constructed to solve the problems of dynamic changes and multi-dimensional information not being considered in medical data classification, improve the accuracy of data classification and grading and the generalization ability of the model, and support more accurate disease analysis and treatment plan formulation.
Patent Information
- Application Number
- CN202510504357.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-04-22
AI Technical Summary
Existing medical data classification methods fail to fully consider the dynamic changes and multi-dimensional information of data, resulting in inaccurate classification results, unable to adapt to new data types and classification requirements, and affecting the scientific nature of medical decision-making.
Concepts such as interpolation step, direction, deviation value and credibility value are introduced. Through K-nearest neighbor interpolation calculation and secondary weight mechanism, a development chain is constructed to perform data correction and classification and grading, comprehensively considering data information from different perspectives and time periods.
It improves the predictive performance and accuracy of the data classification and grading model, ensures that the interpolated data is close to the true value, enhances the generalization ability of the model and the robustness of data processing, and supports more accurate disease analysis and treatment plan formulation.
Smart Images

Figure CN120030392B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data classification, and in particular to a data hierarchical classification method based on artificial intelligence. Background Art
[0002] In today's digital age, data is exploding. It comes from a wide range of sources, diverse types, and massive volumes. Efficiently and accurately processing and analyzing this massive amount of data to unlock valuable insights has become a critical challenge across many fields. Data classification, a crucial component of data processing and analysis, aims to categorize data into different levels and categories based on factors such as its characteristics, value, and risk, enabling refined data management, efficient utilization, and effective protection. In the healthcare sector, data is particularly crucial. Medical data encompasses a wide range of aspects, including patient information, symptoms, diagnoses, treatment plans, medication use, and allergy history. These data are not only crucial for disease diagnosis, treatment decisions, and prognosis assessment, but also provide strong support for medical research, public health management, and healthcare policy development. However, medical data often suffers from incompleteness and inaccuracy, with missing data being a common problem. For example, for various reasons, certain physiological indicators of patients may not be recorded, or the recorded data may contain errors. This missing or inaccurate data can severely impact the accuracy and reliability of medical data analysis, negatively impacting the scientific nature of medical decision-making.
[0003] For example, Chinese patent application No. 202411110376.8 discloses a data classification and grading method based on artificial intelligence, comprising: collecting original medical data, pre-processing the original medical data using the k-means clustering algorithm to obtain a clustered medical data set; completing the clustered medical data set using the K-nearest neighbor interpolation method to obtain a complete clustered medical data set; constructing a medical data prediction model using a convolutional neural network and a regularization technique based on a reward function; training the medical data prediction model using the complete clustered medical data set; performing hyperparameter tuning on the medical data prediction model using a Bayesian optimization algorithm; and inputting the medical data to be classified and graded into the medical data prediction model to obtain classification and grading results. The present invention adopts global data automatic completion technology, model regularization technology, and hyperparameter space effective retrieval technology, and can perform model training according to preset data classification and grading standards, thereby improving the accuracy of the data classification and grading model.
[0004] Most existing methods in existing patent documents are based on simple rules or statistical features, failing to fully consider the dynamic nature of data and multi-dimensional information. For example, in medical data classification, classification based solely on a single indicator or simple threshold fails to fully reflect the complexity of patients' conditions and individual differences. Moreover, with the continuous development of medical technology and the rapid increase in data volume, traditional classification methods are unable to adapt to new data types and classification requirements, resulting in inaccurate and unreasonable classification results, and unable to provide effective support for medical decision-making. Summary of the Invention
[0005] This application provides an artificial intelligence-based data grading and classification method. By introducing concepts such as interpolation step size, direction, deviation value and credibility value, as well as corresponding quantitative relationships, it can more accurately evaluate the reliability of interpolation and make reasonable corrections to real-time data, thereby reducing the deviation caused by data missing and improving the predictive performance of the data classification and grading model.
[0006] This application provides an artificial intelligence-based data classification method, including:
[0007] S101, collect data, interpolate missing data in the collected data using K-nearest neighbor interpolation, record the interpolation step size during the interpolation process, discretize the collected data, use an algorithm to determine the associated perspective, select an indicator from the associated perspective as a new value selection perspective, and set a secondary weight for the new value selection perspective;
[0008] S102, calculating a credibility value based on the recorded interpolation step length, obtaining real-time data, and calculating a deviation value between the real-time data and the interpolation value;
[0009] Collect initial data, form an initial data cluster and a current data cluster based on the initial data and real-time data respectively, calculate a numerical deviation based on the initial data cluster and the current data cluster, use the numerical deviation to match the transition cluster between the initial data cluster and the current data cluster, and construct the initial data cluster, transition cluster and current data cluster into a development chain;
[0010] Obtain the target area based on the transition cluster, and the target area guides the missing data;
[0011] S103, calculating a correction coefficient based on the calculated credibility value and the deviation value, and correcting the real-time data and the credibility value using the calculated correction coefficient;
[0012] S104: Establish a data prediction model based on the corrected real-time data, and use the data prediction model to classify and grade the data.
[0013] Preferably, for each missing data in the data, the distance between each missing data and the sample is calculated, the calculated distances are sorted, and the K samples closest to the missing value are selected as nearest neighbor samples. Based on the obtained K nearest neighbor samples, a first-level weight is assigned to each neighbor point, and the interpolation is calculated using the values of the selected K nearest neighbor samples and the corresponding weights.
[0014] Preferably, the interpolation method is to calculate the interpolation by weighted average method, and the formula is: , where V represents interpolation, represents the value of the i-th neighbor point, Represents the first-level weight of the i-th neighbor point. The interpolation step refers to the absolute difference between the interpolation value and the reference value, that is, s=|VR|, where V is the interpolation value and R is the reference value. The interpolation step reflects the degree of closeness between the interpolation value and the reference value. The smallest interpolation step indicates the highest credibility. The credibility value is calculated. The interpolation direction refers to recording the number of times each reference value is used during the interpolation process.
[0015] Preferably, the calculation formula of the credibility value is: , where C is the credibility value and T is the threshold. When s≤T, the credibility value C increases linearly with the decrease of step size s, and the maximum value is 1. When s>T, C is 0. The threshold T is dynamically adjusted according to the distribution characteristics of the data set, and the deviation value is calculated by the formula ,in, is the deviation value, is the interpolation, For real-time data, > When , d is a positive number, indicating that the interpolated value is greater than the true value; when < When , d is a negative number, indicating that the interpolation value is less than the true value; when = When d=0, it indicates that the interpolation is completely accurate, and the positive or negative value of the deviation directly reflects the offset direction of the interpolation.
[0016] Preferably, the formula for calculating the correction coefficient is: , where k is the correction coefficient, ranging from [0,1], C is the credibility value, d is the deviation value, which indicates the difference between the interpolated value and the true value, and D is the normalization constant used to control the sensitivity of the correction coefficient.
[0017] Preferably, the formula for calculating the secondary weight is: ,in, represents the weight of the i-th associated perspective, and n represents the number of selected perspectives.
[0018] Preferably, the data space between the initial data cluster and the current data cluster is divided into multiple intervals, and a deviation threshold and a direction threshold are set. The multiple intervals are set according to the deviation threshold and the direction threshold. According to the deviation and direction of each indicator, the intervals are matched to the corresponding transition clusters. The initial data cluster is located at the starting point of the development chain, the current data cluster is located at the end point of the development chain, and the transition clusters are arranged in sequence between the initial data cluster and the current data cluster in the chronological order of disease development. According to the determined connection order, the initial data cluster, the matched transition cluster and the current data cluster are connected in sequence to form a development chain.
[0019] Preferably, the target area is obtained according to the transition cluster, and the method for the target area to guide the missing data is: a similarity threshold is set according to the characteristics of the data in the development chain, the similarity between the transition cluster and the missing data is calculated using the Euclidean distance, and the calculated similarity is compared with the similarity threshold. When the similarity is greater than the similarity threshold, the interval in the transition cluster is the target area for obtaining the missing data, and features are extracted from the target area to identify the development trend of the features. The development trend is input into the set prediction model, and the prediction result output by the prediction model is used to guide the missing data.
[0020] Preferably, the development chain is identified: the software is used to identify the first development chain and the second development chain. For each development chain, its first data point is identified as the starting point and the last data point is identified as the end point. The starting value of the first development chain is compared with the end point value. If the end point value is greater than the starting value, it is judged to be in an ascending direction; if the end point value is less than the starting value, it is judged to be in a descending direction. It is identified whether the directions of other data points in the first development chain are consistent with the directions of the starting point and the end point. If there are data points with inconsistent directions, these data points with inconsistent directions with the starting point and the end point are removed from the first development chain. The remaining values in the first development chain are calculated using the credibility value formula to screen out the most credible value in the first development chain. Similarly, the most credible value on the second development chain is calculated. The deviation between the most credible value in the first development chain and the most credible value on the second development chain is calculated.
[0021] Preferably, the weights are allocated according to the calculated deviation and the credibility values of the first development chain and the second development chain. The specific formula is: , ,in, represents the weight of the first development chain, is a constant used to adjust the sensitivity of weight distribution to ensure that the sum of weights is 1. The weight of the first development chain is represented, and the set weight is substituted into step S101.
[0022] One or more technical solutions provided in this application have at least the following technical effects or advantages: by introducing concepts such as interpolation step size, direction, deviation value, and credibility value, as well as corresponding quantitative relationships, it is possible to more accurately evaluate the reliability of interpolation and reasonably correct real-time data, thereby reducing deviations caused by missing data, improving the predictive performance of data classification and grading models, and improving the accuracy of medical data interpolation, ensuring that the interpolated data is closer to the true value, thereby improving the accuracy and reliability of data classification and grading. By recording directions and limiting the number of references, it is possible to prevent deviations caused by over-reliance on a single reference value. Using more accurate interpolated data to train classification and grading models can improve the predictive performance and generalization ability of the model.
[0023] By introducing secondary weights and selecting values from different perspectives, when the credibility of Example 1 is low, it is possible to comprehensively consider data information from more different sources and perspectives, reducing errors caused by individual abnormal data or the limitations of a single perspective. For example, when processing medical data, the judgment of a cluster of disease data may be biased due to the abnormality of certain adjacent values. After introducing secondary weights, data obtained from different feature spaces and time series relationships and related perspectives can balance the impact of such abnormalities, obtain more accurate disease assessment values, and avoid a cluster of values being too dependent on a few reference values, which in turn leads to the cluster values dominating the values of a certain type of data during training. This improves the accuracy and robustness of data processing and makes the trained model more generalizable.
[0024] By constructing a development chain between the patient's initial data cluster, transition cluster, and the cluster where the current diagnosed disease is located, and guided by the development chain, we can more accurately determine the direction of missing data acquisition based on the actual dynamics of the patient's disease development, make the supplementary data more consistent with the patient's individual situation, and guide the direction of obtaining missing values (missing data), thereby improving the patient's data set, improving the accuracy of disease analysis and the rationality of treatment plan formulation, and obtaining a complete patient data set. This can more comprehensively reflect the development process and characteristics of the patient's disease, provide more reliable data support for subsequent disease diagnosis, treatment, and prognosis assessment, and the supplementary data is more consistent with the patient's individual situation and the actual needs of disease development, making the grading and classification of data more accurate;
[0025] Accurately identifying the impact of interpolation calculations from different directional development chains makes interpolation calculations more precise and improves the efficiency of data classification. By rationally assigning weights and comprehensively considering information from different directional development chains, more accurate and reliable analysis results are obtained. A final result that comprehensively considers information from different directional data clusters is obtained, which more accurately reflects the actual development trend of the data or event. Weights are assigned based on the deviation and credibility of the values, making the impact of different directional data clusters on the final result more reasonable and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of a data classification method based on artificial intelligence according to the present invention;
[0027] Figure 2 A schematic diagram of a process for setting secondary weights according to an embodiment of the present invention;
[0028] Figure 3 A schematic diagram of the process of constructing a development chain according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] To facilitate understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.
[0030] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are for illustrative purposes only and do not represent the only implementation method.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains; the terms used herein in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more of the associated listed items.
[0032] Example 1: Figure 1 The following is a flow chart of a data classification method based on artificial intelligence according to an embodiment of the present invention, including:
[0033] S101, collecting data, interpolating missing data in the collected data using K-nearest neighbor interpolation, and recording the interpolation step length during the interpolation process;
[0034] Specifically, medical data is collected from the hospital's database, electronic health record (EHR) system, laboratory test results, and imaging diagnostic reports. The hospital's database usually includes the patient's basic information, such as name, age, gender, contact information, etc., as well as the patient's medical records, including visit time, department, doctor, diagnosis results, etc.; the electronic health record (EHR) system includes symptoms, signs, diagnosis, treatment plan, drug use, allergy history, etc. The EHR system is usually connected to various departments and units of the hospital and can update the patient's medical information in real time; laboratory test results include laboratory test results (such as blood routine, biochemical indicators, etc.) and imaging test results (such as X-ray, CT, MRI, etc.).
[0035] In the K-nearest neighbor interpolation method, the K value represents the number of nearest neighbor samples used to interpolate missing values. Cross-validation is used to determine the K value. The data set is randomly divided into a training set and a validation set. For different K values (such as from 1 to a certain maximum value), K-nearest neighbor interpolation is performed on the training set, and the accuracy of the interpolation results is evaluated on the validation set (such as using indicators such as mean square error and mean absolute error). The K value that performs best on the validation set is selected as the optimal K value. For each missing value in the data, the distance between each missing value and other samples is calculated. The distance between the missing value and the sample is calculated using Euclidean distance. The calculated distances are sorted, and the K samples closest to the missing value are selected as the nearest neighbor samples. Based on the obtained K nearest neighbor samples, a first-level weight is assigned to each neighbor point. The size of the weight reflects the degree of influence of the neighbor point on the interpolation. The values of the selected K nearest neighbor samples and the corresponding weights are used to calculate the interpolation by weighted average method. The formula is: , where V represents interpolation, represents the value of the i-th neighbor point, It represents the first-level weight of the i-th neighbor point. The interpolation step size refers to the difference between the interpolation value and a reference value during the interpolation process. The interpolation direction refers to the number of times each reference value (i.e., the value of the nearest neighbor sample) is used during the interpolation process. If a reference value is used too many times, its weight is reduced to improve the accuracy and stability of the interpolation result.
[0036] S102, calculating a credibility value based on the recorded interpolation step length, obtaining real-time data, and calculating a deviation value between the real-time data and the interpolation value;
[0037] Furthermore, the interpolation step size (s) is the absolute difference between the interpolated value and the reference value, that is, s = |VR|, where V is the interpolated value and R is the reference value. The interpolation step size reflects the closeness of the interpolated value to the reference value. A smaller step size means that the interpolated value is more likely to be close to the true value, thus having a higher credibility. The credibility value is calculated as follows:
[0038]
[0039] Where C is the credibility value and T is the threshold. When s≤T, the credibility value C increases linearly with the decrease of step size s, and the maximum value is 1 (when s=0). When s>T, C is forced to be 0, indicating that the interpolation is unreliable due to excessive deviation from the reference value. The threshold T is dynamically adjusted according to the distribution characteristics of the data set, and the deviation value is calculated by the formula ,in, is the deviation value, is the interpolation, For real-time data, > When , d is a positive number, indicating that the interpolation overestimates the true value; when < When , d is negative, indicating that the interpolation underestimates the true value; when = When d=0, it indicates that the interpolation is completely accurate. The positive or negative sign of the deviation value directly reflects the offset direction of the interpolation. A positive deviation indicates overestimation, and a negative deviation indicates underestimation. The absolute value of the deviation value indicates the degree of difference between the interpolation and the real-time data. The larger the absolute value, the more significant the difference.
[0040] Specific example: There is a medical data set that contains missing values for a patient's physiological indicators (such as blood sugar levels). In order to fill these missing values, we use the K-nearest neighbor interpolation method (K=3), that is, select the values of the three known samples closest to each missing value for interpolation. The following is the specific calculation process, including the calculation of the credibility value and the deviation value. The blood sugar level data of patient ID 101 is missing, and the nearest neighbor samples are: sample A blood sugar value 5.8 mmol / L, distance 0.2, sample B blood sugar value 6.2 mmol / L, distance 0.3, sample C blood sugar value 6.0 mmol / L, distance 0.5, , total weight W=25+11.11+4=40.11, , using the average of the nearest neighbor samples as the reference value: , calculate the interpolation step: s = | 5.93-6.0 | = 0.07mmol / L, calculate the credibility value: set the threshold T = 0.2mmol / L, , the blood glucose value of patient 101 was obtained through actual measurement as 6.1 mmol / L, and the deviation value was calculated as: d=5.93-6.1=-0.17mmol / L.
[0041] S103, calculating a correction coefficient based on the calculated credibility value and the deviation value, and correcting the real-time data and the credibility value using the calculated correction coefficient;
[0042] Specifically, the correction coefficient is calculated based on the reliability value and the deviation value. The formula for calculating the correction coefficient is:
[0043] Where k is the correction coefficient, which ranges from [0, 1] but can be extended to a reasonable range by adjusting D. C is the credibility value, which reflects the initial reliability of the interpolation. d is the deviation value, which indicates the difference between the interpolation and the true value. D is the normalization constant, which is used to control the sensitivity of the correction coefficient. , so that the maximum value of k does not exceed 1. When |d| is large (significant deviation), the denominator increases and k decreases, but the weighting effect of C makes k still inversely proportional to the deviation; when C is small (low credibility), even if |d| is small, k will increase due to the amplification effect of C, strengthening the correction of low-credibility interpolation. The introduction of D avoids k due to |d| being too small or too large, ensuring that the correction amplitude is controllable.
[0044] Use the calculated correction coefficient to correct the real-time data. The formula is: ,in, is the corrected real-time data. When k is large, Closer to interpolation, reducing the impact of deviation, when k is small, retaining more original values of real-time data; using the correction coefficient to correct the credibility value, the formula is: ,in, is the corrected credibility value. If k is large (such as k=0.5), the corrected =0.5C, reduce the weight of low confidence interpolation, if k is small (such as k=0.1), after correction ≈0.9C, preserving the stability of high-confidence interpolation.
[0045] S104, establishing a data prediction model based on the corrected real-time data, and using the data prediction model to classify and grade the data;
[0046] Specifically, a convolutional neural network (CNN) is used as the basic architecture of the model, and a regularization technology based on a reward function is adopted to prevent the model from overfitting. The reward function gives a higher reward when the difference between the model prediction result and the true value is small, and at the same time imposes a certain penalty on the complexity of the model, so that the model will not be too complex and lose its generalization ability while pursuing accurate prediction. The interpolated and corrected data is used as the input of the data prediction model, and the data prediction model outputs the prediction result; the corrected data set is divided into a training set and a validation set in a ratio of (7:3). The training set is used for model parameter learning, and the validation set is used for The performance of the model is evaluated in order to adjust the training strategy in time. The model is iteratively trained using the training set. In each iteration, the training data is input into the model, and the predicted output of the model is calculated through forward propagation. Then, the loss function value between the predicted output and the true label is calculated. Next, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters, and the parameters of the model are updated according to the optimization algorithm (stochastic gradient descent) to minimize the loss function. During the training process, the model is regularly evaluated using the validation set, and the validation set data is input into the trained model to calculate the performance indicators of the model on the validation set, such as accuracy, loss value, etc. By observing the performance changes on the validation set, we can determine whether the model is overfitting or underfitting. If overfitting occurs, we can consider adjusting the complexity of the model, increasing the regularization strength, or reducing the number of training rounds. If underfitting occurs, we can increase the complexity of the model, increase the training data, or adjust the learning rate. The actual medical data is input into the model, and the model classifies and grades the data according to the learned features and patterns. For example, the severity of the patient's condition is graded, and the patients are divided into different levels such as mild, moderate, and severe. Diseases are classified to determine which disease the patient has.
[0047] The technical solutions in the above-mentioned embodiments of the present application have at least the following technical effects or advantages: by introducing concepts such as interpolation step, direction, deviation value and credibility value, as well as corresponding quantitative relationships, it is possible to more accurately evaluate the reliability of interpolation and make reasonable corrections to real-time data, thereby reducing the deviation caused by missing data, improving the predictive performance of the data classification and grading model, improving the accuracy of medical data interpolation, ensuring that the interpolated data is closer to the true value, thereby improving the accuracy and reliability of data classification and grading, and preventing deviations caused by over-reliance on a single reference value by recording directions and limiting the number of references. Using more accurate interpolated data to train the classification and grading model can improve the predictive performance and generalization ability of the model.
[0048] Example 2: Based on the first embodiment, the adjacent points are valued and different weights are set, that is, the first weight. This embodiment finds values from different perspectives and sets weights for the values found from different perspectives, that is, the second-level weight. Not only the adjacent values are considered, when the reliability calculated in the first embodiment is low, the second-level weight is entered, such as Figure 2 shown.
[0049] S201, discretize the collected data and use an algorithm to determine the associated perspective;
[0050] Furthermore, for the collected continuous data, the intervals are divided according to data distribution and business logic, and the patient age is divided into 0-18 years old (children), 19-40 years old (youth), 41-60 years old (middle-aged), and 61 years old and above (elderly); the Apriori algorithm is used to determine the association perspective. First, the minimum support and minimum confidence are set. The minimum support refers to the lowest frequency of an item set appearing in all transactions, which reflects the prevalence of the item set. In medical data analysis, if there are a total of 1,000 patient records, then an item set must appear in at least 100 records to meet the requirements. The minimum confidence refers to the credibility of an association rule, which indicates the probability of the result item set appearing when the premise item set appears. The minimum confidence is set to 0.6. Only when the confidence of an association rule reaches 60% is it considered valid. Scan the entire data set, count the frequency of each single item, find the single item that meets the minimum support, and form a frequent item set. In medical data, statistics show that "smoking" appears in 300 records. Records appear in "drinking" appear in 200 records, and "lung cancer" appears in 150 records. If the minimum support is 0.1, then "smoking" and "drinking" will enter the frequent item set, while "lung cancer" may be eliminated because it does not meet the support requirement. Use the frequent item set to generate a candidate item set, scan the data set again, count the occurrence frequency of the candidate item set, find the frequent item set that meets the minimum support, and so on, iteratively generate higher-order frequent item sets until no new frequent item sets can be generated. For example, by combining the items in the frequent item set, generate the "smoking and drinking" waiting option set, and then count its occurrence frequency to determine whether it becomes a frequent item set. Generate association rules from the frequent item set. For each frequent item set, its non-empty true subset is used as the premise item set, and the remaining part is used as the result item set to form an association rule. For example, for the frequent item set "smoking and drinking", the association rules "smoking → drinking", "drinking → smoking", and "smoking and drinking → lung cancer" can be generated. For each generated association rule, its confidence is calculated. The confidence calculation formula is: For the association rule "smoking and drinking → lung cancer", if the support of "smoking and drinking and lung cancer" is 0.1 and the support of "smoking and drinking" is 0.15, then the confidence of the rule is ≈0.67, according to the set minimum confidence, the effective association rules are screened out, and only the rules with confidence greater than or equal to the minimum confidence are retained.
[0051] Analyze the selected association rules to identify those with strong associations with the target data. Strong associations are typically characterized by rules with high support and confidence. When analyzing factors related to lung cancer, the association rule "Smoking and drinking → lung cancer" was found to have a support of 0.1 and a confidence of 0.6, indicating a strong association between smoking and drinking and lung cancer. Based on these strong association rules, factors with strong associations with the target data are extracted. For example, from the rule "Smoking and drinking → lung cancer," the factor "Smoking and drinking" is extracted. Factors with strong associations with the target data are used as association perspectives. "Smoking and drinking" is an association perspective related to "lung cancer." Based on this association perspective, relevant indicators are selected as new value selection perspectives. For example, if the association perspective is related to other diseases associated with a particular disease, indicators related to these related diseases (such as incidence rate and cure rate) are selected as new value selection perspectives.
[0052] S202, setting a secondary weight for the obtained new selected perspective;
[0053] Specifically, we select the hierarchical analysis method to determine the weights according to the characteristics of the data, and construct a hierarchical model. The target layer is the accuracy of disease prediction, which is the core purpose of the entire analysis. The middle layer is a new value selection perspective, such as the "smoking and drinking" perspective and the gene module perspective. In medical research, smoking and drinking are known to be important factors that may affect the occurrence of diseases, and the gene module can provide information from the genetic level. The bottom layer is the indicators under each perspective, such as the amount of smoking and drinking frequency under the "smoking and drinking" perspective, and the gene expression level under the gene module perspective. These indicators are specific and quantifiable data, which are used to support the value selection perspective of the middle layer and construct a judgment matrix. Medical experts are invited to compare the value selection perspectives of the middle layer in pairs. Assume that there are n value selection perspectives in the middle layer, and the constructed judgment matrix A= ,in It indicates the importance of the i-th selection perspective relative to the j-th selection perspective. Its value selection rules are as follows: when i=j, =1, indicating that the same selected perspective is equally important compared to itself; when i When the value of each selection perspective is j, the expert's judgment is assigned. For example, if the expert believes that the i-th selection perspective is slightly more important, obviously more important, or strongly more important than the j-th selection perspective, the values are assigned as 3, 5, 7, etc., respectively. Otherwise, the values are assigned as 1 / 3, 1 / 5, 1 / 7, etc. Experts make judgments based on their rich clinical experience and professional knowledge and construct a judgment matrix. The elements in the matrix reflect the relative importance of each selection perspective. The judgment matrix is normalized, and then the eigenvector and eigenvalue are calculated. The elements in the eigenvector correspond to the weight of each selection perspective. The weight formula for calculating the selection perspective is: ,in, represents the weight of the i-th selection perspective, and n represents the number of selection perspectives.
[0054] The technical solutions in the above-mentioned embodiments of the present application have at least the following technical effects or advantages: by introducing secondary weights and selecting values from different perspectives, when the credibility of embodiment one is low, it is possible to comprehensively consider data information from more different sources and perspectives, reducing errors caused by individual abnormal data or the limitations of a single perspective. For example, when processing medical data, the judgment of a cluster of disease data may be biased due to the abnormality of certain adjacent values. After the introduction of secondary weights, the data obtained from different feature spaces and time series relationships and related perspectives can balance the impact of such abnormalities, obtain more accurate disease assessment values, avoid a cluster of values being too dependent on a few reference values, and then cause the cluster values to dominate the values of a certain type of data during training, thereby improving the accuracy and robustness of data processing and making the trained model more generalizable.
[0055] Example 3: Based on the methods of Example 1 and Example 2, obtaining values from adjacent points and obtaining values from multiple perspectives only obtains values from point pairs, which cannot accurately reflect the progression of the patient's disease. This example constructs a development chain based on the initial data cluster, transition cluster, and current data cluster for data from different time periods of the patient, which can more accurately determine the direction of obtaining missing data and make the supplementary data more consistent with the individual situation of the patient, such as Figure 3 shown.
[0056] S301, collecting initial data, forming an initial data cluster and a current data cluster based on the initial data and real-time data, calculating a numerical deviation based on the initial data cluster and the current data cluster, and determining a direction of the numerical deviation;
[0057] Specifically, initial data is collected. The initial data includes basic physiological indicators, symptoms, past medical history, and genetic test results of the patient when they are first diagnosed or first admitted to the hospital. An initial data cluster is formed based on the initial data. A current data cluster is formed based on the collected real-time data. Key indicators are selected from the initial data cluster and the current data cluster for comparison. The selection of key indicators is based on the characteristics of the disease, treatment needs, and the purpose of data analysis. The key indicators include physiological indicators and symptom severity. The change of each indicator from the initial state to the current state is calculated based on the physiological indicators and symptom severity. The calculation formula of the numerical deviation is: x= ,in, is the corresponding indicator value in the current data cluster, is the corresponding index value in the initial data cluster, x is the data deviation. When Δx > 0, it is a positive deviation, indicating an increase in the index value, that is, the patient's physiological state or symptom severity has worsened during the disease progression; when Δx < 0, it is a negative deviation, indicating a decrease in the index value, that is, the patient's physiological state or symptom severity has improved during the disease progression; when Δx = 0, it is no deviation, indicating no change in the index value, that is, the patient's physiological state or symptom severity has remained stable during the disease progression. Determine the direction of the deviation: when the deviations of multiple key indicators are all positive, it indicates that the patient's disease state is generally worsening and more aggressive treatment measures are needed; when the deviations of multiple key indicators are all negative, it indicates that the patient's disease state is generally improving and the current treatment plan can be continued or appropriately adjusted; when the deviations of multiple key indicators are close to zero or the positive and negative deviations offset each other, it indicates that the patient's disease state is generally stable and the current treatment plan can be maintained and regularly monitored.
[0058] S302, matching the initial data cluster with the current data cluster according to the numerical deviation amount and deviation direction, and constructing a development chain based on the initial data cluster, the transition cluster and the current data cluster;
[0059] Furthermore, a deviation threshold and a direction threshold are set according to the importance and variation range of the indicator. The deviation threshold is used to divide the degree of variation of the indicator value, and the direction threshold is used to judge the variation direction of the indicator value, i.e., increase, decrease or no change. The data space between the initial data cluster and the current data cluster is divided into multiple intervals. The multiple intervals can be set according to the deviation threshold and the direction threshold, and the data space is divided into seven intervals, i.e., slight increase, moderate increase, significant increase, slight decrease, moderate decrease, significant decrease and no change. According to the deviation and direction of each indicator, it is matched to the corresponding transition cluster, and the relationship between the deviation and the threshold of the indicator value is compared to achieve the transition. If the deviation of an indicator is less than the deviation threshold and is in a positive direction, it will be matched to a slightly increased transition cluster; if the deviation of an indicator is greater than the deviation threshold and is in a negative direction, it will be matched to a significantly decreased transition cluster; based on the development time and logical order of the patient's disease, the connection order between each data cluster and the transition cluster is determined. The initial data cluster should be located at the starting point of the development chain, the current data cluster should be located at the end point of the development chain, and the transition cluster is arranged in sequence between the two according to the chronological order of the disease development. According to the determined connection order, the initial data cluster, the matched transition cluster and the current data cluster are connected in sequence to form a development chain that reflects the development process of the patient's disease.
[0060] S303, based on the obtained transition clusters, calculating the similarity between the transition clusters and the missing data. When the similarity is greater than a set threshold, the area near the transition cluster is designated as the target area for missing data acquisition, and the missing data is guided based on the obtained target area.
[0061] Specifically, a similarity threshold is set according to the characteristics of the data in the development chain. The similarity threshold is used to judge the degree of similarity between the transition cluster and the missing features of the missing data. The Euclidean distance is used to calculate the similarity between the transition cluster and the missing data, and the calculated similarity is compared with the similarity threshold. When the similarity is greater than the similarity threshold, the area near the transition cluster is the target area for obtaining the missing data. The target area is marked in the development chain, and the missing data is guided according to the obtained target area. Features related to the missing data, such as numerical trends, change patterns, etc., are extracted from the target area. The extracted features are matched with the known features of the missing data (such as the features of adjacent data points) to find the most similar feature combination. Based on the matching results, the values or patterns corresponding to the similar features in the target area are mapped to the missing data as a reference for interpolation. The development trend of the data in the target area is analyzed, such as rising, falling or stable, etc. Based on the trend analysis results, the possible values or change patterns of the missing data are predicted, and the prediction results are used as a guide for the missing data to help it be interpolated or corrected.
[0062] The technical solutions in the above-mentioned embodiments of the present application have at least the following technical effects or advantages: by constructing a development chain between the patient's initial data cluster, the transition cluster and the cluster where the currently diagnosed disease is located, and through the guidance of the development chain, it is possible to more accurately determine the direction of obtaining missing data based on the actual dynamics of the patient's disease development, so that the supplementary data is more in line with the patient's individual situation, and guide the direction of obtaining missing values (missing data), thereby improving the patient's data set, improving the accuracy of disease analysis and the rationality of treatment plan formulation, and obtaining a complete patient data set, which can more comprehensively reflect the development process and characteristics of the patient's disease, and provide more reliable data support for subsequent disease diagnosis, treatment and prognosis evaluation. The supplementary data is more in line with the patient's individual situation and the actual needs of disease development, making the grading and classification of data more accurate.
[0063] Example 4: Based on the development chain in the above-mentioned Example 3, if there are several development chains in different directions, the data clusters in each development chain are adjacent, resulting in inaccurate interpolation calculation. This example solves the data processing problem caused by the adjacent data clusters in the development chains in different directions, so that the interpolation calculation is more accurate.
[0064] Identify the development chain constructed in step S302, use Python to identify the first development chain and the second development chain, for each development chain, identify its first data point as the starting point and the last data point as the end point, compare the starting point value of the first development chain with the end point value, if the end point value is greater than the starting point value, it is judged to be in an ascending direction; if the end point value is less than the starting point value, it is judged to be in a descending direction, record the determined direction, identify whether the directions of other data points in the first development chain are consistent with the directions of the starting point and the end point, if data points with inconsistent directions are found, remove these data points with inconsistent directions from the first development chain, calculate the remaining values in the first development chain using the credibility formula in step S102, filter out the highest credibility value in the first development chain, similarly calculate the highest credibility value on the second development chain, calculate the deviation between the highest credibility value in the first development chain and the highest credibility value in the second development chain, calculate the deviation amount using the deviation calculation formula in step S301, and assign weights based on the calculated deviation amount and the credibility of the first and second development chains. The specific formula is: , ,in, represents the weight of the first development chain, is a constant used to adjust the sensitivity of the weight distribution, ensure that the sum of the weights is 1, and avoid calculation errors when the denominator is zero. The weight of the second development chain is represented, and the set weight is substituted into step S101.
[0065] The technical solutions in the above-mentioned embodiments of the present application have at least the following technical effects or advantages: accurately identifying the impact of interpolation calculations of development chains in different directions, making interpolation calculations more precise, improving the efficiency of data classification, and obtaining more accurate and reliable analysis results by rationally assigning weights and comprehensively considering information from development chains in different directions. A final result that comprehensively considers information from data clusters in different directions is obtained, which more accurately reflects the actual development trend of the data or event. Weights are assigned based on the deviation and credibility of the values, making the impact of data clusters in different directions on the final result more reasonable and accurate.
[0066] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Various modifications and variations are readily apparent to those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A data classification method based on artificial intelligence, characterized in that: include: S101, collecting data, interpolating missing data in the collected data using K-nearest neighbor interpolation, recording the interpolation step size during the interpolation process, where the interpolation step size refers to the absolute difference between the interpolated value and the reference value, discretizing the collected data, determining an associated perspective using an algorithm, selecting an indicator from the associated perspective as a new selected perspective, and setting a secondary weight for the new selected perspective, wherein the data is medical data; The medical data includes physiological indicators of the patient, and the missing values of the physiological indicators are interpolated using a K-nearest neighbor interpolation method to obtain physiological indicator interpolation values, and an interpolation step length of the physiological indicator is obtained based on the physiological indicator interpolation values; S102, calculating a credibility value based on the recorded interpolation step length, obtaining real-time data, and calculating a deviation value between the real-time data and the interpolation value; S103, calculating a correction coefficient based on the calculated credibility value and the deviation value, and correcting the real-time data and the credibility value using the calculated correction coefficient; S104: Based on the corrected real-time data, a data prediction model is established, and the data is classified and graded using the data prediction model. The medical data is input into the model, and the model is used to grade the patients according to the severity of their conditions, dividing the patients into mild, moderate, and severe levels. Collecting initial data, wherein the initial data is the basic physiological indicators, symptom manifestations, past medical history and genetic test results of the patient when he is just diagnosed and admitted to the hospital; forming an initial data cluster and a current data cluster according to the initial data and real-time data respectively; selecting key indicators from the initial data cluster and the current data cluster for comparison; the key indicators include physiological indicators and symptom severity; calculating a numerical deviation amount according to the initial data cluster and the current data cluster; using the numerical deviation amount to match the transition cluster between the initial data cluster and the current data cluster; constructing the initial data cluster, the transition cluster and the current data cluster into a development chain; the development chain is based on the development time and logical sequence of the patient's disease to determine the connection order between each data cluster and the transition cluster; the initial data cluster is located at the starting point of the development chain, the current data cluster is located at the end point of the development chain, and the transition clusters are arranged in sequence between the two according to the chronological order of disease development; and the initial data cluster, the matched transition cluster and the current data cluster are connected in sequence according to the determined connection order; The target region is obtained according to the transition cluster, and the target region guides the missing data.
2. The data classification method based on artificial intelligence according to claim 1, characterized in that: For each missing data in the data, calculate the distance between each missing data and the sample, sort the calculated distances, select the K samples closest to the missing value as the nearest neighbor samples, assign a first-level weight to each neighbor point based on the obtained K nearest neighbor samples, and use the values of the selected K nearest neighbor samples and the corresponding weights to calculate the interpolation.
3. The data classification method based on artificial intelligence according to claim 2, characterized in that: The interpolation method is to use the weighted average method to calculate the interpolation. The formula is: ,in, Indicates interpolation, K indicates the value of K nearest neighbor points, represents the value of the i-th neighbor point, Represents the first-level weight of the i-th neighbor point, and the interpolation step formula is: s=| -R|, where is the interpolation, R is the reference value, the interpolation step reflects the closeness between the interpolation and the reference value, the smallest interpolation step indicates the highest credibility, and the credibility value is calculated. The interpolation direction refers to recording the number of times each reference value is used during the interpolation process.
4. The data classification method based on artificial intelligence according to claim 3, characterized in that: The calculation formula of the credibility value is: , where C is the credibility value and T is the threshold. When s≤T, the credibility value C increases linearly with the decrease of step size s, and the maximum value is 1. When s>T, C is 0. The threshold T is dynamically adjusted according to the distribution characteristics of the data set, and the deviation value is calculated by the formula ,in, is the deviation value, is the interpolation, For real-time data, > When , d is a positive number, indicating that the interpolated value is greater than the true value; when < When , d is negative, indicating that the interpolated value is less than the true value; when = When d=0, it indicates that the interpolation is completely accurate, and the positive or negative value of the deviation directly reflects the offset direction of the interpolation.
5. The data classification method based on artificial intelligence according to claim 1, characterized in that: The formula for calculating the correction coefficient is: , where k is the correction coefficient, ranging from [0, 1], C is the credibility value, d is the deviation value, which indicates the difference between the interpolated value and the true value, and D is the normalization constant used to control the sensitivity of the correction coefficient.
6. The data classification method based on artificial intelligence according to claim 1, characterized in that: The formula for calculating the secondary weight is: ,in, represents the weight of the i-th associated perspective, n represents the number of selected perspectives, and wk represents the weight corresponding to the k-th factor when not normalized.
7. The data classification method based on artificial intelligence according to claim 1, characterized in that: The data space between the initial data cluster and the current data cluster is divided into multiple intervals, and a deviation threshold and a direction threshold are set. The multiple intervals are set according to the deviation threshold and the direction threshold. According to the deviation and direction of each indicator, the intervals are matched to the corresponding transition clusters. The initial data cluster is located at the starting point of the development chain, the current data cluster is located at the end point of the development chain, and the transition clusters are arranged in sequence between the initial data cluster and the current data cluster according to the chronological order of disease development. According to the determined connection order, the initial data cluster, the matched transition cluster and the current data cluster are connected in sequence to form a development chain.
8. The data classification method based on artificial intelligence according to claim 1, characterized in that: The target area is obtained according to the transition cluster. The method for the target area to guide the missing data is as follows: a similarity threshold is set according to the characteristics of the data in the development chain, the similarity between the transition cluster and the missing data is calculated using the Euclidean distance, and the calculated similarity is compared with the similarity threshold. When the similarity is greater than the similarity threshold, the interval in the transition cluster is the target area for obtaining the missing data. Feature extraction is performed on the target area, and the development trend of the feature is identified. The development trend is input into the set prediction model, and the prediction result output by the prediction model is used to guide the missing data.
9. The data classification method based on artificial intelligence according to claim 7, characterized in that: Identify the development chain: Use software to identify the first development chain and the second development chain. For each development chain, identify its first data point as the starting point and the last data point as the end point. Compare the starting value of the first development chain with the end point value. If the end point value is greater than the starting value, it is judged to be in an ascending direction; if the end point value is less than the starting value, it is judged to be in a descending direction. Identify whether the directions of other data points in the first development chain are consistent with the directions of the starting and end points. If there are data points with inconsistent directions, remove these data points that are inconsistent with the starting and end points from the first development chain. Use the credibility value formula to calculate the remaining values in the first development chain, screen out the most credible value in the first development chain, and similarly calculate the most credible value on the second development chain. Calculate the deviation between the most credible value in the first development chain and the most credible value in the second development chain.
10. The data classification method based on artificial intelligence according to claim 9, characterized in that: The weights are allocated based on the calculated deviation and the credibility values of the first and second development chains. The specific formula is: , ,in, represents the weight of the first development chain, is a constant used to adjust the sensitivity of weight distribution to ensure that the sum of weights is 1. The weight of the second development chain is represented, and the set weight is substituted into step S101.
Citation Information
Patent Citations
Metabonomics data processing method, device and equipment and readable storage medium
CN118212994A
Data classification and grading method based on artificial intelligence
CN118626918A