Fuzzy logic online intelligent evaluation method for assisting cerebral apoplexy-associated pneumonia risk

Through the fuzzy logic online intelligent evaluation method and correlation analysis, combined with online regularization processing and fuzzy limit learning machine algorithm, the problem of inability to assess the risk of pneumonia in stroke patients in real time is solved in the existing technology, and a more accurate and timely risk assessment is achieved , providing strong support for clinical decision-making.

CN119008001APending Publication Date: 2024-11-22ANHUI UNIVERSITY OF TRADITIONAL CHINESE MEDICINE

Patent Information

Application Number
CN202411067955.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing technology cannot evaluate the risk of pneumonia in stroke patients in real time, resulting in untimely early warnings, limited treatment effects, and rely on doctors' experience and static data, lacking dynamic and real-time data processing capabilities.

Method used

The online intelligent evaluation method of fuzzy logic is adopted, combined with Pearson, Spearman and Kendall correlation analysis methods, data correlation analysis and real-time data set model construction are carried out, risk prediction is carried out through online regularization processing and fuzzy extreme learning machine algorithm, and self-adjustment is adjusted in real time. Adapt distance threshold.

Benefits of technology

Real-time and dynamic assessment of the risk of pneumonia in stroke patients is achieved, the accuracy and timeliness of the assessment are improved, personalized nursing advice is provided, and the support for clinical care and treatment is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119008001A_ABST
    Figure CN119008001A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent assessment, and discloses a fuzzy logic online intelligent assessment method and system for assisting cerebral apoplexy-associated pneumonia risk assessment, and the method comprises the steps: data correlation analysis; establishing a real-time data set model; carrying out online regularization processing on the data set; predicting a fuzzy system; and the adaptive distance threshold is adjusted in real time. Through the online intelligent auxiliary judgment method combining data correlation analysis and a fuzzy system, the problem that the pneumonia risk of a stroke patient cannot be evaluated in real time in the prior art is effectively solved. Traditional methods mostly depend on static data and experience judgment and are difficult to cope with dynamic changes of physiological states of patients, so that early warning of pneumonia is not timely, and the treatment effect is limited. According to the method, three correlation analysis methods of Pearson, Spearman and Kendall are utilized, the accuracy of data correlation calculation is improved, the correlation of the data is comprehensively judged in a probability vector fusion mode, and more reliable real-time evaluation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to but is not limited to the field of intelligent assessment technology, and in particular relates to a fuzzy logic online intelligent assessment method and system for assisting stroke-related pneumonia risk assessment. Background Art

[0002] Stroke is an acute cerebrovascular disease caused by rupture or blockage of cerebral blood vessels, which prevents blood from flowing into the brain normally and causes brain tissue damage.

[0003] Fuzzy logic is an effective method for dealing with imprecise and fuzzy information, and is suitable for dealing with complexity and uncertainty in the medical field. It can simulate the thinking process of human experts, process and analyze complex medical data, and improve the accuracy and reliability of risk assessment.

[0004] Existing online intelligent assessment methods do not have the function of combining data correlation analysis and fuzzy systems, utilizing online intelligent auxiliary decision methods, to assess the pneumonia risk of stroke patients in real time, and provide early warning and personalized nursing recommendations. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a fuzzy logic online intelligent evaluation system and system for assisting in the risk assessment of stroke-related pneumonia.

[0006] The present invention is implemented as follows: a fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment, the method comprising:

[0007] S1: Data collection and integration phase:

[0008] S11: Comprehensively collect various relevant data of stroke patients, including but not limited to real-time physiological data such as heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure, etc.;

[0009] S12: Obtain the patient's medical history data, such as previous history of pneumonia, smoking history, drinking history, number and severity of stroke attacks, chronic disease status, etc.;

[0010] S13: Integrate information from different data sources, including hospital information systems, electronic medical records, wearable devices and other health monitoring devices;

[0011] S2: Data preprocessing and standardization stage:

[0012] S21: Clean the collected raw data to remove outliers, duplicate values ​​and missing values ​​to ensure data quality;

[0013] S22: Standardize physiological data so that data of different dimensions can be compared and analyzed on the same scale;

[0014] S3: Data correlation analysis phase:

[0015] S31: Pearson correlation coefficient, Spearman rank correlation coefficient and Kendall correlation coefficient were used to calculate the correlation probability between each physiological data and the occurrence of pneumonia;

[0016] S32: For each correlation analysis method, derive the probability that the data is irrelevant and cannot be determined, and then generate the corresponding probability vector;

[0017] S33: Fusion of probability vectors from three correlation analysis methods to obtain a comprehensive correlation probability;

[0018] S34: By setting an appropriate threshold, the correlation between the data and the occurrence of stroke-related pneumonia is determined. If the comprehensive correlation probability exceeds the threshold, the data is considered to be significantly correlated with the occurrence of pneumonia.

[0019] S4: Real-time dataset model construction and update phase:

[0020] S41: Based on the correlation data determined in S3, a model is constructed that can receive and process the data in real time;

[0021] S42: Ensure that the model can be dynamically updated as new data is accessed to maintain the timeliness and accuracy of the assessment;

[0022] S5: Online regularization processing and risk assessment stage:

[0023] S51: Perform online regularization on the data in the model to eliminate the dimensional differences between different data and improve the consistency and comparability of the data;

[0024] S52: The regularized data were processed by fuzzy logic system to predict the risk of pneumonia in stroke patients;

[0025] S6: Risk warning and model adaptive optimization stage:

[0026] S61: According to the predicted risk probability, a risk warning threshold is set. When the predicted probability exceeds the threshold, the warning mechanism is triggered to notify medical staff in a timely manner;

[0027] S62: According to the actual cases of stroke-related pneumonia and the prediction results of the model, feedback adjustment and optimization of the model are carried out;

[0028] S63: Continuously monitor data trends and iteratively update the assessment model based on the latest medical research results to improve the sensitivity and accuracy of risk assessment.

[0029] This method aims to achieve real-time and dynamic assessment of the risk of stroke-related pneumonia in patients by comprehensively using data analysis, fuzzy logic and other technologies, and provide strong support for clinical decision-making.

[0030] Furthermore, an intelligent model was constructed that can assess the risk of SAP in stroke patients in real time, including the following steps:

[0031] 1. Data collection and processing:

[0032] Collect basic characteristic data of stroke patients, including but not limited to gender, age, smoking history, and drinking history;

[0033] Record the patient's primary disease information, such as atrial fibrillation, history of stroke, chronic lung disease, hypertension, hyperlipidemia, diabetes, heart failure, and malnutrition;

[0034] Follow up patients' complications, including hemorrhagic transformation, impaired consciousness, bulbar palsy, and dysphagia;

[0035] Record the medical procedures that the patient received, such as thrombectomy and the use of a nasogastric feeding tube;

[0036] The collected data are cleaned and standardized to ensure data quality.

[0037] 2. Risk factor analysis and screening:

[0038] Meta-analysis method was used to analyze the risk factors of the multi-dimensional data collected above to determine the risk factors significantly associated with the occurrence of SAP;

[0039] Based on the analysis results, risk factors that have a significant impact on SAP risks are screened out to form a set of key risk factors.

[0040] 3. Real-time dataset model construction:

[0041] Based on the screened key risk factors, a model is built that can receive and process this data in real time;

[0042] Ensure that the model can dynamically update data to adapt to changes in the patient's condition and maintain the timeliness and accuracy of the assessment.

[0043] 4. Risk assessment and early warning:

[0044] Apply fuzzy logic systems or other machine learning algorithms to process the data received in real time and predict the risk probability of SAP in stroke patients;

[0045] A threshold is set based on the predicted risk probability. When the risk exceeds the predetermined threshold, the early warning mechanism is triggered, prompting medical staff to take corresponding measures.

[0046] 5. Model adaptive optimization:

[0047] Based on actual SAP cases and model prediction results, the model is continuously adjusted and optimized;

[0048] By monitoring the changing trends of data and new medical research results, the assessment model is continuously updated to improve the sensitivity and accuracy of risk assessment.

[0049] This method realizes real-time and dynamic assessment of the risk of SAP in stroke patients by comprehensively using data analysis, fuzzy logic and other technologies, providing strong support for clinical decision-making.

[0050] Further, the S1 specifically includes:

[0051] S11: Data collection: Collect physiological data of stroke patients, including heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure, etc.; collect medical history data of patients, such as previous history of pneumonia, smoking history, drinking history, etc.;

[0052] S12: Data preprocessing: Clean the collected data to remove outliers and missing values; standardize various physiological data to ensure that the data are compared and analyzed under the same dimension;

[0053] S13: Calculate the correlation probability using three correlation analysis methods:

[0054] Pearson correlation coefficient ρ X.Y The calculation formula is:

[0055]

[0056] In the above formula, (X i ,Y i ) is the i-th value of any two variables X and Y, is the mean of two variables X and Y; Pearson correlation coefficient ρ X.Y The value is between [-1,1];

[0057] The Spearman correlation coefficient is also commonly known as the Spearman rank correlation coefficient; the rank is the order of the original data, so the essence of the Spearman rank correlation coefficient is to solve it according to the order of the original data. Its calculation formula is as follows:

[0058]

[0059] In the specific calculation process, the Spearman correlation coefficient first needs to sort the data of the two variables (X, Y) (uniformly in ascending or descending order) and obtain two element ranking sets X' and Y'; the element x in the ranking set i ,y i X i Rank in X and Y i The ranking in Y; subtract the corresponding elements in sets X' and Y' to obtain a ranking difference set d, where d i =x i -y i , 1≤i≤n; n is the number of variables;

[0060] The characteristics of the Spearman correlation coefficient are as follows: if there is a strict monotonically increasing relationship between the variables, the Spearman correlation coefficient between the two is 1; if there is a strict monotonically decreasing relationship between the variables, the Spearman correlation coefficient between the two is -1; 0 means there is no correlation between the variables;

[0061] Kendall correlation coefficient is a statistical value used to measure the correlation between two random variables; assuming that the corresponding elements in the two variables X and Y form an element pair set XY, the elements it contains are (X i ,Y i )(1≤i≤N); when any two elements in the set XY (X i ,Y i ) and (X j ,Y j ) have the same ranking (that is, when situation 1 occurs: X i >X j And Y i >Y j Or case 2: X i <X j And Y i <Y j ), the two elements are considered to be consistent; when situation 3 occurs: X i >X j And Y i <Y j Or case 4: X i <X j And Y i >Y j , these two elements are considered inconsistent; let the total number of consistent pairs be C, and the total number of inconsistent pairs be D; from this, we can deduce that the total number of pairs of all data is Combination, namely

[0062] The calculation formula of Kendall correlation coefficient τ is as follows:

[0063]

[0064] The characteristics of the Kendall correlation coefficient are as follows: when τ is 1, it means that the two random variables have the same rank correlation; when τ is -1, it means that the two random variables have completely opposite rank correlations; when τ is 0, it means that the two random variables are independent of each other;

[0065] S14: Derivation is irrelevant and probability cannot be determined:

[0066] (1) Irrelevant probability and undeterminable probability:

[0067] After calculating the relevant probability for each analysis method, derive its irrelevant probability and the probability of being unable to judge; for example, for the probability vector of the Pearson correlation coefficient, let the relevant probability be p1, the irrelevant probability be 1-p1-0.03, and the probability of being unable to judge be 0.03;

[0068] (2) Generate probability vector: Generate the probability vector of each analysis method. For example, the probability vector of the Pearson method is [p1, (1-p1-0.03), 0.03)];

[0069] S15: fusion probability vector;

[0070] S16: Determine data relevance: According to experience, set a threshold. If the correlation probability after fusion is greater than the threshold, the data is determined to be relevant, otherwise it is determined to be irrelevant.

[0071] The details are as follows:

[0072] After obtaining the results of the three correlation analysis coefficients, the irrelevance and inability to judge probabilities are then derived, and the probability vectors under each judgment path are generated; the probability vector m of the Pearson correlation coefficient is pe For example, the probabilities of being relevant, irrelevant, and unpredictable are: |m pe |,(1-|m pe |-0.03), 0.03; where |m pe | is the probability of the relevant results under the Pearson judgment method, (1-|m pe |-0.03) is the probability of irrelevant results under the Pearson judgment path, and 0.03 is the probability of an undetermined result. After the probability vectors of the three paths are obtained, they are fused and the final correlation analysis result of the data is solved. The fusion process is as follows:

[0073] 1) Calculate the basic probability vector m under Pearson, Spearman and Kendall correlation coefficients pe 、m spand m ke The Euclidean distance d between the three ij (1≤i,j≤3);

[0074] 2) Calculate the weight factor S under the i-th judgment path i :

[0075] 3) According to S i Calculate the basic probability m i The fusion weight w i :

[0076] 4) According to the fusion weight w i To calculate the fusion probability m i ': where m' i Including the relevant probability m after fusion fp , irrelevant probability m after fusion ip , after fusion, the probability m cannot be determined np ;

[0077] 5) According to empirical conditions, if m fp >0.9, the data are considered relevant, otherwise they are not relevant;

[0078] Further, the S2 specifically includes:

[0079] Calculate each dependent variable y i (i=1,…,N) all related independent variables x including itself, and then use the value x of the independent variable at time k k and the independent variable x at two historical moments before time k k-2 , x k-1 and the dependent variable t at time (k+1) k+1 Construct a data set, the data set expression is t k+1 =f(x k-2 ,x k-1 ,x k ), where x k =[x 1k ,x 2k …,x nk ,t k ] T , n is the target value t k+1 The number of independent variables related to ik (i=1,…,n) is the target value t k+1 The value of the ith independent variable at time k, t k represents the value of the dependent variable at time k, t k+1 It represents the target value of the dependent variable at time (k+1), k is the current time, and N is the total number of dependent variables.

[0080] Further, the S3 specifically includes:

[0081] Take the value x of the independent variable at time k k For example, the online regularization formula of data is as follows:

[0082]

[0083] in, and k are the iterative mean and iterative standard deviation of the data at time k, x stk is the data after regularization at time k;

[0084] The iterative algorithm is as follows:

[0085] Iterative mean:

[0086]

[0087] Iteration variance:

[0088]

[0089] In formula (2) is the iterative mean of the data at time (k-1). Similarly, is the iterative variance of the data at time (k-1).

[0090] Further, the S4 specifically includes:

[0091] The online fuzzy extreme learning machine algorithm is an algorithm specifically used for function approximation and classification. Its principle is to first randomly assign the parameters of the membership function, and then determine the corresponding consequent parameters through online training and learning data. Its model is as follows:

[0092]

[0093] x is the input set of the TSK fuzzy model, is the predicted output value of the TSK fuzzy model, L is the number of fuzzy rules, β i is the output layer weight, G(x; c i ,a i ) represents the output of the hidden layer, c i with a i are randomly generated membership function parameters.

[0094] According to the equivalence of FIS and SLFN, the mathematical model of FIS with L fuzzy rules is generated as follows:

[0095]

[0096] x st is the set of independent variables of the dataset after regularization, t st is the target value set of the data set after regularization;

[0097] For the TSK fuzzy model, the consequent parameter β i is a linear combination of the input variables and is expressed as follows:

[0098]

[0099] x ste is the input vector x st Add a unit vector to form an extended vector And q i is the parameter matrix of the TSK fuzzy model present in the i-th fuzzy rule, as shown below:

[0100]

[0101] Therefore, the output expression (5) of the TSK model can be written as follows:

[0102]

[0103] Equation (8) can be further written as follows:

[0104] HQ=T (9)

[0105] Where H is the hidden layer output matrix after fuzzy rule regularization, Q is the parameter matrix of the TSK model, and the expressions are as follows:

[0106]

[0107] Furthermore, the online fuzzy extreme learning machine algorithm includes two stages: initialization and online prediction, as shown below:

[0108] Phase 1: Initialization. This phase requires a training data set with a total number of rows N0. Perform initialization learning;

[0109] 1) Regularize the training data set η0;

[0110] 2) Randomly assign membership function parameters (c i ,a i ),i=1,…,L;

[0111] 3) Calculate the hidden layer output matrix H0 of the TSK model: H0 = H(c1,…,c L ,a1,…a L; x1,…,x N0 );

[0112] 4) Estimate the initial parameter matrix

[0113] 5) Let k = 0;

[0114] The second stage: online prediction, using the online dataset η after the N0th row = {(x i ,t i )|x i ∈R n ,t i ∈R m ,i=N0+1,…}Real-time iteration model parameter P k+1 and Q (k+1) ;

[0115] 1) Online regularization of the independent variable data x received each time k And calculate x stk ;

[0116] 2) Calculate the iterative hidden layer output matrix H at the (k+1)th moment under the TSK model k+1 ,H k+1 =H(c 1, …,c L ,a1,…a L ;x stk );

[0117] 3) Using the formula Calculate the predicted value for the next moment

[0118] 4) Read the actual target value t at the next moment k+1 , and for the target value t k+1 Regularization gives t stk+1 , and then find the predicted value Error

[0119] 5) Update the parameter matrix P k+1 and Q (k+1) , Where P k With Q (k) are the parameter matrices at the kth moment;

[0120] 6) k=k+1, continue to return to the second stage online prediction.

[0121] Further, the S5 specifically includes:

[0122] First, the predicted output value at the (k+1)th moment is obtained by S4 And Perform an inverse normalization transformation to calculate the original dimension value Then with the original dimension value t at time k k and the original dimension value t at the past (k-1) time k-1 Determine the data change status at time k together;

[0123] Generally speaking, the state of data can be divided into five states: rising, falling, fluctuating, oscillating, and stable. The following are the conditions for judging these five states:

[0124] 1) Ascending conditions:

[0125]

[0126] 2) Descending conditions:

[0127]

[0128] 3) Fluctuation conditions:

[0129]

[0130] 4) Oscillation conditions:

[0131]

[0132] 5) Stability conditions:

[0133]

[0134] where d kn It is the adaptive distance to judge the data at time k. The solution is as follows:

[0135] 1) Solve t in sequence k-1 ,t k and The difference between them forms the distance vector d k , d k =[d 1k ,d 2k ],d 1k =|t k -t k-1 |,

[0136] 2) Using iterative distance mean and Solve for the adaptive distance d kn , the specific algorithm is as follows:

[0137]

[0138] Another object of the present invention is to provide a fuzzy logic online intelligent assessment system for assisting stroke-related pneumonia risk assessment based on the fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as described in claims 1-7, the system specifically comprising:

[0139] Correlation analysis module, used for data correlation analysis;

[0140] Model building module, used for real-time data set model building;

[0141] Regularization processing module, used for online regularization processing of data sets;

[0142] Prediction module, used for fuzzy system prediction;

[0143] The threshold adjustment module is used to adjust the adaptive distance threshold in real time.

[0144] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the fuzzy logic online intelligent assessment method for assisting in the risk assessment of stroke-related pneumonia.

[0145] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to execute the steps of the fuzzy logic online intelligent assessment method for assisting in the risk assessment of stroke-related pneumonia.

[0146] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0147] First, the present invention effectively solves the problem that the risk of pneumonia in stroke patients cannot be assessed in real time in the prior art by combining data correlation analysis and an online intelligent auxiliary judgment method of a fuzzy system. Traditional methods are difficult to cope with the dynamic changes in the patient's physiological state, resulting in untimely early warning of pneumonia and limited treatment effects. The present invention utilizes three correlation analysis methods, Pearson, Spearman and Kendall, to improve the accuracy of data correlation calculation, and by integrating probability vectors, comprehensively judges the correlation of data, and achieves a more reliable real-time evaluation.

[0148] In terms of data processing, the present invention introduces online regularization processing technology to solve the problem of different dimensions of multi-dimensional physiological data and ensure the consistency and accuracy of data processing. The online regularization algorithm iteratively updates the mean and variance of the data, eliminates the influence of the data dimension in real time, and improves the accuracy and stability of data analysis. Compared with the traditional static processing method, the online processing method of the present invention is more suitable for dynamically changing data environments, allowing the system to more flexibly adapt to changes in the patient's physiological state.

[0149] The present invention adopts the online fuzzy extreme learning machine algorithm (OS-Fuzzy-ELMAlgorithm) in fuzzy system prediction, which realizes the rapid processing and accurate prediction of real-time data. The algorithm is based on the equivalence of fuzzy inference system and generalized single hidden layer feedforward neural network, and can handle complex function approximation and classification problems. By randomly assigning membership function parameters and training online, the system can learn and adjust quickly, and output the predicted data of the next moment in real time, which significantly improves the timeliness and accuracy of pneumonia risk assessment.

[0150] In addition, in predicting data and state judgment, the present invention effectively distinguishes the five states of data rise, fall, fluctuation, oscillation and stability by adjusting the adaptive distance threshold in real time, thereby enhancing the accuracy of data state analysis. Combined with the analysis results of the intelligent algorithm, the system can issue early warnings in a timely manner and provide personalized nursing advice, which significantly improves the efficiency and effectiveness of pneumonia risk assessment for stroke patients and provides strong technical support for clinical nursing and treatment.

[0151] Second, the current stroke-related pneumonia risk assessment method mainly relies on the doctor's experience and static data, and lacks dynamic and real-time data processing capabilities. This method is not only easily affected by human subjective factors, but also fails to reflect changes in the patient's condition in a timely manner, resulting in low accuracy and timeliness of the assessment results. In addition, the data preprocessing and analysis methods in the existing technology are relatively simple, and it is difficult to make full use of a large amount of complex physiological and medical history data, resulting in an inaccurate and incomplete assessment of the patient's pneumonia risk.

[0152] The present invention introduces three correlation analysis methods (Pearson, Spearman and Kendall) to conduct a comprehensive correlation analysis on the physiological data and medical history data of stroke patients. By calculating the relevant probability and deriving the irrelevant and undeterminable probabilities, the probability vectors of each analysis method are generated, and finally these probability vectors are fused and the threshold is set to determine the data correlation. This method not only improves the accuracy and comprehensiveness of data analysis, but also effectively captures the complex relationship between different data, providing a solid foundation for subsequent real-time data processing.

[0153] Based on data correlation analysis, the present invention further establishes a real-time data set model and performs online regularization processing on the data. By updating the data model in real time and processing the data online, the changes in the patient's physiological state can be reflected in a timely manner, ensuring that the data are compared and analyzed under the same dimension. Online regularization processing eliminates the dimensional differences of the data, improves the accuracy and consistency of data processing, and provides high-quality data support for real-time risk assessment.

[0154] The present invention introduces a fuzzy logic system for risk prediction, predicts the pneumonia risk of stroke patients through the fuzzy system, and adjusts the adaptive distance threshold in real time according to the prediction results. The fuzzy logic system can handle uncertainty and fuzzy data, improving the accuracy and reliability of risk prediction. The adaptive adjustment mechanism ensures the system's sensitivity and response speed to changes in patient status, providing a more intelligent and flexible risk assessment solution.

[0155] In summary, the present invention significantly improves the accuracy, timeliness and reliability of stroke-related pneumonia risk assessment by introducing technologies such as data correlation analysis, real-time data set model, online regularization processing, fuzzy system prediction and adaptive adjustment. Compared with the prior art, the present invention not only solves the limitations of data processing and analysis, but also realizes real-time dynamic assessment of patient risks through intelligent and automated technical means, which has significant technical progress and application value.

[0156] Third, the existing technology for stroke-related pneumonia risk assessment lacks dynamic and real-time data processing capabilities, which makes it impossible to reflect changes in the patient's condition in a timely manner. In addition, the existing data preprocessing and analysis methods are relatively simple and it is difficult to fully utilize a large amount of complex physiological and medical history data, thus limiting the accuracy and comprehensiveness of the assessment results. The existing static assessment methods cannot capture the complex relationship between data, resulting in inaccurate risk assessment.

[0157] The present invention introduces a series of innovative parameters, algorithms and mathematical models, including three correlation analysis methods (Pearson, Spearman and Kendall), online regularization processing, fuzzy logic system prediction and adaptive adjustment, etc. By using the Pearson correlation coefficient, Spearman rank correlation coefficient and Kendall correlation coefficient, a comprehensive correlation analysis is performed on the physiological data and medical history data of stroke patients, the correlation probability is calculated, and the irrelevant and unpredictable probabilities are derived, and the probability vectors of each analysis method are generated. Finally, these probability vectors are fused, thereby improving the accuracy and comprehensiveness of data analysis.

[0158] The present invention establishes a real-time data set model and solves the problem of comparing and analyzing data under the same dimension through online regularization processing. Online regularization processing eliminates the dimensional differences of data by dynamically updating the mean and variance, and improves the accuracy and consistency of data processing. This enables the system to reflect the changes in the patient's physiological state in real time, providing high-quality data support, thereby enhancing the real-time and accuracy of risk assessment.

[0159] The present invention uses a fuzzy logic system to predict risks, and processes uncertainty and fuzzy data through the fuzzy system, thereby improving the accuracy and reliability of risk prediction. The adaptive adjustment mechanism adjusts the threshold according to the real-time prediction results to ensure the system's sensitivity and response speed to changes in patient status. This intelligent and automated adjustment mechanism enables the system to maintain efficient risk assessment capabilities in the face of different patients and dynamic changes, providing a more intelligent and flexible risk assessment solution.

[0160] In summary, the present invention solves various technical problems in the risk assessment of stroke-related pneumonia in the prior art by introducing innovative parameters, algorithms and mathematical models. By using a variety of correlation analysis methods, real-time data set models, online regularization processing, fuzzy logic system prediction and adaptive adjustment and other technical means, the accuracy, timeliness and reliability of the assessment are significantly improved. Compared with the prior art, the present invention not only solves the limitations of data processing and analysis, but also realizes real-time dynamic assessment of patient risks through intelligent and automated technical means, which has significant technical progress and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0161] Figure 1 It is a flow chart of a fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment provided by an embodiment of the present invention;

[0162] Figure 2 is a data correlation analysis flow chart provided by an embodiment of the present invention;

[0163] Figure 3 It is a structural diagram of a fuzzy logic online intelligent assessment system for assisting stroke-related pneumonia risk assessment provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0164] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0165] The embodiment of the present invention proposes a stroke-related pneumonia risk assessment method that combines medical knowledge and fuzzy logic. The method first identifies factors closely related to the occurrence of pneumonia by deeply analyzing the multivariate data of stroke patients. Subsequently, these factors are used to build an online intelligent assessment model to accurately predict the risk of pneumonia in stroke patients.

[0166] 1) Data collection and preprocessing:

[0167] Collect key physiological data of stroke patients, including but not limited to heart rate, blood oxygen saturation, body temperature, respiratory rate and blood pressure.

[0168] Record the patient's medical history, especially any history of pneumonia, smoking, and drinking.

[0169] Clean the data, remove anomalies and missing values, and ensure the accuracy and completeness of the data.

[0170] All physiological data were standardized to facilitate uniform quantitative analysis.

[0171] 2) Analysis of related factors:

[0172] The Pearson correlation coefficient, Spearman rank correlation coefficient and Kendall correlation coefficient were used to deeply explore the potential association between various physiological data and the occurrence of pneumonia.

[0173] According to the calculation results of the correlation coefficient, the correlation, irrelevance and unpredictable probability of each data and the occurrence of pneumonia are derived to form a probability vector.

[0174] The probability vectors obtained from the three correlation analyses were integrated to obtain the comprehensive correlation probability between each data and the occurrence of pneumonia.

[0175] Set a threshold to determine whether each data is significantly correlated with the occurrence of pneumonia.

[0176] 3) Real-time dataset model construction:

[0177] Based on the relevant factors identified in step 2, build a model that can receive and process this data in real time.

[0178] Ensure that the model can dynamically update data to keep the assessment timely and accurate.

[0179] 4) Data regularization and fuzzy prediction:

[0180] The data of different dimensions received in the model are regularized online to eliminate the impact of dimensional differences.

[0181] The fuzzy logic system was used to process the regularized data and predict the risk probability of pneumonia in stroke patients.

[0182] 5) Model adaptive adjustment:

[0183] According to the risk probability output by the fuzzy system, the adaptive distance threshold of the model is adjusted in real time.

[0184] By monitoring the changing trends of data, the assessment model is continuously updated to improve the sensitivity and accuracy of risk assessment.

[0185] This paper integrates medical knowledge and fuzzy logic technology to build an intelligent model that can assess the risk of pneumonia in stroke patients in real time. The model not only takes into account the patient's physiological data, but also incorporates medical history information to more comprehensively assess the risk. Through the adaptive adjustment mechanism, the model can continuously optimize its predictive performance and provide strong support for clinical decision-making.

[0186] When building a real-time dataset model, we can use a regression or classification model based on machine learning, depending on our goal (predicting a specific risk value or classifying patients as high risk or low risk). The following is a specific example of mathematical model construction, using Support Vector Machines (SVM) as an example. It is a commonly used classification algorithm suitable for binary classification problems, such as determining whether a stroke patient is at high risk of pneumonia.

[0187] The mathematical model construction steps provided in the embodiment of the present invention are specifically as follows:

[0188] 1) Feature Selection:

[0189] According to the analysis of relevant factors in step 2, select the characteristics that are significantly associated with pneumonia risk, such as heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure, previous history of pneumonia, smoking history, etc.

[0190] 2) Data preprocessing:

[0191] Standardize or normalize the selected features so that each feature has the same scale.

[0192] For categorical features (such as previous history of pneumonia, smoking history), One-Hot Encoding can be used to convert them into numerical data.

[0193] 3) Model selection:

[0194] SVM is selected as the classifier. SVM classifies data by finding a hyperplane in high-dimensional space to maximize the boundary (i.e., interval) between two categories.

[0195] 4) Model training:

[0196] Use the historical dataset to train the SVM model. The historical dataset should contain stroke patient data with known pneumonia risk labels (high risk or low risk).

[0197] During the training process, the best model parameters, such as the penalty coefficient C and kernel function parameters, are selected through cross-validation and other techniques.

[0198] 5) Model evaluation:

[0199] Use an independent test dataset to evaluate the performance of the model. Common evaluation indicators include accuracy, recall, F1 score, etc.

[0200] Based on the evaluation results, adjust model parameters or try other algorithms to improve performance.

[0201] 6) Real-time dataset model application:

[0202] Deploy the trained SVM model into a real-time environment.

[0203] Receive relevant data of stroke patients in real time and perform necessary preprocessing.

[0204] The preprocessed data was input into the SVM model to obtain the prediction result of whether the patient was at high risk of pneumonia.

[0205] 7) Model update and maintenance:

[0206] As new data is collected, the model is retrained regularly to keep it current and accurate.

[0207] Monitor the performance of the model and tune it or replace it with a more suitable algorithm if necessary.

[0208] Through the above steps, we can build an SVM classification model that can receive and process stroke patient data in real time to predict whether the patient is at high risk of pneumonia. This model can be dynamically updated based on newly collected data to maintain the timeliness and accuracy of the assessment.

[0209] like Figure 1 As shown, an embodiment of the present invention provides a fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment, the method comprising:

[0210] S1: Data correlation analysis;

[0211] S2: Real-time data set model establishment;

[0212] S3: Online regularization processing dataset;

[0213] S4: Fuzzy system prediction;

[0214] S5: Real-time adjustment of the adaptive distance threshold.

[0215] like Figure 2 As shown, the S1 specifically includes:

[0216] S11: Data collection: Collect physiological data of stroke patients, including heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure, etc.; collect medical history data of patients, such as previous history of pneumonia, smoking history, drinking history, etc.;

[0217] S12: Data preprocessing: Clean the collected data to remove outliers and missing values; standardize various physiological data to ensure that the data are compared and analyzed under the same dimension;

[0218] S13: Calculate the correlation probability using three correlation analysis methods:

[0219] Pearson correlation coefficient ρ X.Y The calculation formula is:

[0220]

[0221] In the above formula, (X i ,Y i ) is the i-th value of any two variables X and Y, is the mean of two variables X and Y; Pearson correlation coefficient ρ X.Y The value is between [-1,1];

[0222] The Spearman correlation coefficient is also commonly known as the Spearman rank correlation coefficient; the rank is the order of the original data, so the essence of the Spearman rank correlation coefficient is to solve it according to the order of the original data. Its calculation formula is as follows:

[0223]

[0224] In the specific calculation process, the Spearman correlation coefficient first needs to sort the data of the two variables (X, Y) (uniformly in ascending or descending order) and obtain two element ranking sets X' and Y'; the element x in the ranking set i ,y i X i Rank in X and Y i The ranking in Y; subtract the corresponding elements in sets X' and Y' to obtain a ranking difference set d, where d i =x i -y i , 1≤i≤n; n is the number of variables;

[0225] The characteristics of the Spearman correlation coefficient are as follows: if there is a strict monotonically increasing relationship between the variables, the Spearman correlation coefficient between the two is 1; if there is a strict monotonically decreasing relationship between the variables, the Spearman correlation coefficient between the two is -1; 0 means there is no correlation between the variables;

[0226] Kendall correlation coefficient is a statistical value used to measure the correlation between two random variables; assuming that the corresponding elements in the two variables X and Y form an element pair set XY, the elements it contains are (X i ,Y i )(1≤i≤N); when any two elements in the set XY (X i ,Y i ) and (X j ,Y j ) have the same ranking (that is, when situation 1 occurs: X i >X j And Y i >Y j Or case 2: X i <X j And Y i <Y j ), the two elements are considered to be consistent; when situation 3 occurs: X i >X j And Y i <Y j Or case 4: X i <X j And Y i >Y j , these two elements are considered inconsistent; let the total number of consistent pairs be C, and the total number of inconsistent pairs be D; from this, we can deduce that the total number of pairs of all data is Combination, namely

[0227] The calculation formula of Kendall correlation coefficient τ is as follows:

[0228]

[0229] The characteristics of the Kendall correlation coefficient are as follows: when τ is 1, it means that the two random variables have the same rank correlation; when τ is -1, it means that the two random variables have completely opposite rank correlations; when τ is 0, it means that the two random variables are independent of each other;

[0230] S14: Derivation is irrelevant and probability cannot be determined:

[0231] (1) Irrelevant probability and undeterminable probability:

[0232] After calculating the relevant probability for each analysis method, derive its irrelevant probability and the probability of being unable to judge; for example, for the probability vector of the Pearson correlation coefficient, let the relevant probability be p1, the irrelevant probability be 1-p1-0.03, and the probability of being unable to judge be 0.03;

[0233] (2) Generate probability vector: Generate the probability vector of each analysis method. For example, the probability vector of the Pearson method is [p1, (1-p1-0.03), 0.03)];

[0234] S15: fusion probability vector;

[0235] S16: Determine data relevance: According to experience, set a threshold. If the correlation probability after fusion is greater than the threshold, the data is determined to be relevant, otherwise it is determined to be irrelevant.

[0236] The details are as follows:

[0237] After obtaining the results of the three correlation analysis coefficients, the irrelevance and inability to judge probabilities are then derived, and the probability vectors under each judgment path are generated; the probability vector m of the Pearson correlation coefficient is pe For example, the probabilities of being relevant, irrelevant, and unpredictable are: |m pe |,(1-|m pe |-0.03), 0.03; where |m pe | is the probability of the relevant results under the Pearson judgment method, (1-|m pe |-0.03) is the probability of irrelevant results under the Pearson judgment path, and 0.03 is the probability of an undetermined result. After the probability vectors of the three paths are obtained, they are fused and the final correlation analysis result of the data is solved. The fusion process is as follows:

[0238] 6) Calculate the basic probability vector m under Pearson, Spearman and Kendall correlation coefficients pe 、m sp and m ke The Euclidean distance d between the three ij (1≤i,j≤3);

[0239] 7) Calculate the weight factor S under the i-th judgment path i :

[0240] 8) According to S i Calculate the basic probability m i The fusion weight w i :

[0241] 9) According to the fusion weight wi To calculate the fusion probability m i ': where m' i Including the relevant probability m after fusion fp , irrelevant probability m after fusion ip , after fusion, the probability m cannot be determined np ;

[0242] 10) According to empirical conditions, if m fp >0.9, the data are considered relevant, otherwise they are not relevant;

[0243] The S2 specifically includes:

[0244] Calculate each dependent variable y i (i=1,…,N) all related independent variables x including itself, and then use the value x of the independent variable at time k k and the independent variable x at two historical moments before time k k-2 , x k-1 and the dependent variable t at time (k+1) k+1 Construct a data set, the data set expression is t k+1 =f(x k-2 ,x k-1 ,x k ), where x k =[x 1k ,x 2k …,x nk ,t k ] T , n is the target value t k+1 The number of independent variables related to ik (i=1,…,n) is the target value t k+1 The value of the ith independent variable at time k, t k represents the value of the dependent variable at time k, t k+1 It represents the target value of the dependent variable at time (k+1), k is the current time, and N is the total number of dependent variables.

[0245] The S3 specifically includes:

[0246] Take the value x of the independent variable at time k k For example, the online regularization formula of data is as follows:

[0247]

[0248] in, and k are the iterative mean and iterative standard deviation of the data at time k, x stk is the data after regularization at time k;

[0249] The iterative algorithm is as follows:

[0250] Iterative mean:

[0251]

[0252] Iteration variance:

[0253]

[0254] In formula (2) is the iterative mean of the data at time (k-1). Similarly, is the iterative variance of the data at time (k-1).

[0255] The S4 specifically includes:

[0256] The online fuzzy extreme learning machine algorithm is an algorithm specifically used for function approximation and classification. Its principle is to first randomly assign the parameters of the membership function, and then determine the corresponding consequent parameters through online training and learning data. Its model is as follows:

[0257]

[0258] x is the input set of the TSK fuzzy model, is the predicted output value of the TSK fuzzy model, L is the number of fuzzy rules, β i is the output layer weight, G(x; c i ,a i ) represents the output of the hidden layer, c i with a i are randomly generated membership function parameters.

[0259] According to the equivalence of FIS and SLFN, the mathematical model of FIS with L fuzzy rules is generated as follows:

[0260]

[0261] x st is the set of independent variables of the dataset after regularization, t st is the target value set of the data set after regularization;

[0262] For the TSK fuzzy model, the consequent parameter β i is a linear combination of the input variables and is expressed as follows:

[0263]

[0264] x ste is the input vector x st Add a unit vector to form an extended vector And q i is the parameter matrix of the TSK fuzzy model present in the i-th fuzzy rule, as shown below:

[0265]

[0266] Therefore, the output expression (5) of the TSK model can be written as follows:

[0267]

[0268] Equation (8) can be further written as follows:

[0269] HQ=T (9)

[0270] Where H is the hidden layer output matrix after fuzzy rule regularization, Q is the parameter matrix of the TSK model, and the expressions are as follows:

[0271]

[0272] The online fuzzy extreme learning machine algorithm includes two stages: initialization and online prediction, as shown below:

[0273] Phase 1: Initialization. This phase requires a training data set with a total number of rows N0. Perform initialization learning;

[0274] 7) Regularize the training data set η0;

[0275] 8) Randomly assign membership function parameters (c i ,a i ),i=1,…,L;

[0276] 9) Calculate the hidden layer output matrix H0 of the TSK model: H0 = H(c1,…,c L ,a 1, …a L ; x1,…,x N0 );

[0277] 10) Estimate the initial parameter matrix

[0278] 11) Let k = 0;

[0279] The second stage: online prediction, using the online dataset η after the N0th row = {(x i ,t i )|x i ∈R n ,t i ∈R m ,i=N0+1,…}Real-time iteration model parameter Pk+1 and Q (k+1) ;

[0280] 1) Online regularization of the independent variable data x received each time k And calculate x stk ;

[0281] 2) Calculate the iterative hidden layer output matrix H at the (k+1)th moment under the TSK model k+1 ,H k+1 =H(c1,…,c L ,a1,…a L ;x stk );

[0282] 3) Using the formula Calculate the predicted value for the next moment

[0283] 4) Read the actual target value t at the next moment k+1 , and for the target value t k+1 Regularization gives t stk+1 , and then find the predicted value Error

[0284] 5) Update the parameter matrix P k+1 and Q (k+1) , Where P k With Q (k) are the parameter matrices at the kth moment;

[0285] 12) k=k+1, continue to return to the second stage online prediction.

[0286] The S5 specifically includes:

[0287] First, the predicted output value at the (k+1)th moment is obtained by S4 And Perform an inverse normalization transformation to calculate the original dimension value Then with the original dimension value t at time k k and the original dimension value t at the past (k-1) time k-1 Determine the data change status at time k together;

[0288] Generally speaking, the state of data can be divided into five states: rising, falling, fluctuating, oscillating, and stable. The following are the conditions for judging these five states:

[0289] 6) Ascending conditions:

[0290]

[0291] 7) Descending conditions:

[0292]

[0293] 8) Fluctuation conditions:

[0294]

[0295] 9) Oscillation conditions:

[0296]

[0297] 10) Stability conditions:

[0298]

[0299] where d kn It is the adaptive distance to judge the data at time k. The solution is as follows:

[0300] 3) Solve t in sequence k-1 ,t k and The difference between them forms the distance vector d k , d k =[d 1k ,d 2k ],

[0301]

[0302] 4) Using iterative distance mean and Solve for the adaptive distance d kn , the specific algorithm is as follows:

[0303]

[0304] Specific embodiment:

[0306] Step 1: Data correlation analysis

[0307] Implementation example:

[0308] ```Python

[0309] import numpy as np

[0310] from scipy.stats import pearsonr,spearmanr,kendalltau

[0311] #Suppose there is a set of data on stroke patients

[0312] data = {

[0313] "heart_rate":np.array([...]),#heart rate data

[0314] "spo2":np.array([...]),#blood oxygen saturation data

[0315] "temperature":np.array([...]),#body temperature data

[0316] "resp_rate":np.array([...]),#Respiratory rate data

[0317] "bp":np.array([...]),#blood pressure data

[0318] "pneumonia":np.array([...])#Whether pneumonia occurs (0 or 1)

[0319] }

[0320] # Calculate Pearson correlation coefficient

[0321] p_corr,p_pval=pearsonr(data["heart_rate"],data["pneumonia"])

[0322] # Calculate the Spearman correlation coefficient

[0323] s_corr,s_pval=spearmanr(data["heart_rate"],data["pneumonia"])

[0324] #Calculate Kendall correlation coefficient

[0325] k_corr,k_pval=kendalltau(data["heart_rate"],data["pneumonia"])

[0326] #Derivation of irrelevance and inability to judge probability (assuming the probability of inability to judge is 0.03)

[0327] p_vector=[p_corr,1-p_corr-0.03,0.03]

[0328] s_vector=[s_corr,1-s_corr-0.03,0.03]

[0329] k_vector=[k_corr,1-k_corr-0.03,0.03]

[0330] # Calculate Euclidean distance

[0331] d_ps=np.linalg.norm(np.array(p_vector)-np.array(s_vector))

[0332] d_pk=np.linalg.norm(np.array(p_vector)-np.array(k_vector))

[0333] d_sk=np.linalg.norm(np.array(s_vector)-np.array(k_vector))

[0334] # Calculate weight factor

[0335] w_p=1 / d_ps / (1 / d_ps+1 / d_pk)

[0336] w_s=1 / d_ps / (1 / d_ps+1 / d_sk)

[0337] w_k=1 / d_pk / (1 / d_pk+1 / d_sk)

[0338] #Calculate fusion probability

[0339] p_fused=w_p*np.array(p_vector)+w_s*

[0340] np.array(s_vector)+w_k*np.array(k_vector)

[0341] #Determine data relevance (assuming the relevance threshold is 0.5)

[0342] is_related=p_fused[0]>0.5

[0343] ```

[0344] Step 2: Building a real-time data set model

[0345] Implementation example:

[0346] ```Python

[0347] import numpy as np

[0348] #Assume there is a set of data received in real time

[0349] new_data = {

[0350] "heart_rate":75,#Real-time heart rate data received

[0351] "spo2":98,#Real-time received blood oxygen saturation data

[0352] "temperature":36.5,#Real-time received body temperature data

[0353] "resp_rate":18,#Real-time received respiratory rate data

[0354] "bp":120 / 80#Real-time blood pressure data received

[0355] }

[0356] #Update real-time dataset

[0357] def update_dataset(dataset,new_data):

[0358] for key in new_data.keys():

[0359] dataset[key].append(new_data[key])

[0360] if len(dataset[key])>3:

[0361] dataset[key].pop(0)

[0362] return dataset

[0363] # Initialize the historical data set

[0364] dataset={

[0365] "heart_rate":[72,74],

[0366] "spo2":[97,98],

[0367] "temperature":[36.4,36.6],

[0368] "resp_rate":[17,18],

[0369] "bp":[115 / 75,118 / 78],

[0370] "pneumonia":[0,0]#Target dependent variable: whether pneumonia occurs

[0371] }

[0372] #Update the dataset

[0373] dataset=update_dataset(dataset,new_data)

[0374] #Build a real-time dataset model

[0375] realtime_model = []

[0376] for key in dataset.keys():

[0377] if key!="pneumonia":

[0378] realtime_model.extend(dataset[key])

[0379] realtime_model.append(new_data["pneumonia"])

[0380] ```

[0381] Step 3: Online regularization processing dataset

[0382] Implementation example:

[0383] ```Python

[0384] class OnlineNormalizer:

[0385] def __init__(self):

[0386] self.mean = 0

[0387] self.var=0

[0388] self.n = 0

[0389] def update(self,x):

[0390] self.n+=1

[0391] old_mean = self.mean

[0392] self.mean+=(x-self.mean) / self.n

[0393] self.var+=(x-old_mean)*(x-self.mean)

[0394] std=np.sqrt(self.var / self.n)

[0395] return(x-self.mean) / std if std>0else 0

[0396] # Initialize the online regularization processor

[0397] normalizers={key:OnlineNormalizer()for key in new_data.keys()}

[0398] #Regularize the dataset

[0399] normalized_data = {}

[0400] for key,value in new_data.items():

[0401] normalized_data[key]=

[0402] normalizers[key].update(value)

[0403] print(normalized_data)

[0404] ```

[0405] Step 4: Fuzzy system prediction

[0406] Implementation example:

[0407] ```Python

[0408] import numpy as np

[0409] class OSFuzzyELM:

[0410] def__init__(self,input_dim,hidden_dim,output_dim):

[0411] self.input_dim = input_dim

[0412] self.hidden_dim=hidden_dim

[0413] self.output_dim = output_dim

[0414] self.W = np.random.randn(hidden_dim, input_dim)

[0415] self.b = np.random.randn(hidden_dim, 1)

[0416] self.beta = np.zeros((hidden_dim, output_dim))

[0417] def hidden_layer_output(self, X):

[0418] return 1 / (1 + np.exp(-np.dot(self.W, X) + self.b))

[0419] def initialize(self, X, Y):

[0420] H = self.hidden_layer_output(X)

[0421] self.beta = np.dot(np.linalg.pinv(H), Y)

[0422] def predict(self, X):

[0423] H = self.hidden_layer_output(X)

[0424] return np.dot(H.T, self.beta)

[0425] def update(self, X, Y):

[0426] H = self.hidden_layer_output(X)

[0427] H_pinv = np.linalg.pinv(H)

[0428] self.beta = np.dot(H_pinv, Y)

[0429] # Initialize the online fuzzy extreme learning machine

[0430] input_dim = len(new_data)

[0431] hidden_dim = 10 #Number of neurons in the hidden layer

[0432] output_dim=1#output dimension

[0433] os_fuzzy_elm=OSFuzzyELM(input_dim,hidden_dim,output_dim)

[0434] # Initial training data set

[0435] X_train=np.random.randn(input_dim,100)

[0436] #Assume there are 100 initial training data

[0437] Y_train=np.random.randn(output_dim,100)

[0438] # Initialize the model

[0439] os_fuzzy_elm.initialize(X_train,Y_train)

[0440] #Online prediction

[0441] X_new

[0442] =np.array(list(normalized_data.values())).reshape(-1,1)

[0443] Y_pred=os_fuzzy_elm.predict(X_new)

[0444] print("Prediction data for the next moment:",Y_pred)

[0445] #Update the model

[0446] Y_real = np.array([1]) #Assume the real value at the next moment

[0447] os_fuzzy_elm.update(X_new,Y_real)

[0448] ```

[0449] Step 5: Adjust the adaptive distance threshold in real time

[0450] Implementation example:

[0451] ```Python

[0452] class AdaptiveThreshold:

[0453] def __init__(self):

[0454] self.history = []

[0455] def update(self, Y_pred, Y_real):

[0456] self.history.append(Y_real)

[0457] if len(self.history) > 3:

[0458] self.history.pop(0)

[0459] def compute_adaptive_distance(self):

[0460] if len(self.history) < 3:

[0461] return 0

[0462] differences = [abs(self.history[i] - self.history[i + 1]) for i in range(len(self.history) - 1)]

[0463] return np.mean(differences)

[0464] def determine_state(self, Y_pred):

[0465] adaptive_distance = self.compute_adaptive_distance()

[0466] if len(self.history) < 2:

[0467] return "未知"

[0468] Y_t = self.history[-1]

[0469] Y_t_minus_1 = self.history[-2]

[0470] if Y_t-Y_t_minus_1>adaptive_distance:

[0471] return "rising"

[0472] elif Y_t_minus_1-Y_t>adaptive_distance:

[0473] return "down"

[0474] elif abs(Y_t-Y_t_minus_1)<=adaptive_distance:

[0475] return "fluctuation"

[0476] elif abs(Y_t-self.history[-3])<=

[0477] adaptive_distance:

[0478] return "oscillation"

[0479] else:

[0480] return "stable"

[0481] # Initialize adaptive distance threshold

[0482] adaptive_threshold=AdaptiveThreshold()

[0483] #Online update and status judgment

[0484] adaptive_threshold.update(Y_pred,Y_real)

[0485] current_state=

[0486] adaptive_threshold.determine_state(Y_pred)

[0487] print("Current data status:",current_state)

[0488] ```

[0489] like Figure 3As shown, an embodiment of the present invention provides a fuzzy logic online intelligent assessment system for assisting stroke-related pneumonia risk assessment based on the fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment, and the system specifically includes:

[0490] Correlation analysis module, used for data correlation analysis;

[0491] Model building module, used for real-time data set model building;

[0492] Regularization processing module, used for online regularization processing of data sets;

[0493] Prediction module, used for fuzzy system prediction;

[0494] The threshold adjustment module is used to adjust the adaptive distance threshold in real time.

[0495] The threshold adjustment module is specifically described as follows:

[0496] Function: Used to adjust the adaptive distance threshold in risk assessment in real time to improve the accuracy of risk assessment.

[0497] Technical means: Based on environmental data and historical hidden danger records, machine learning algorithms (such as random forest or XGBoost) are used to dynamically adjust thresholds.

[0498] Advantages: Through adaptive adjustment, accurate assessment of hidden danger risks in different environments and conditions can be achieved, reducing false alarms and missed alarms.

[0499] System workflow:

[0500] 1) Environmental monitoring:

[0501] The camera continuously captures the environment around the transmission line and generates high-resolution two-dimensional images.

[0502] 2) Image processing:

[0503] The image processing module receives the two-dimensional images taken by the camera and converts them into high-precision three-dimensional point cloud data.

[0504] 3) Data transmission:

[0505] The main control module controls the shooting frequency of the camera, starts the image processing module for data processing, and transmits the processed three-dimensional point cloud data to the data processing module.

[0506] 4) Distance calculation:

[0507] The data processing module calculates the received three-dimensional point cloud data to determine the distance between the object and the transmission line.

[0508] 5) Hazard judgment:

[0509] The data processing module uses an integrated hidden danger judgment algorithm to compare the calculated distance value with the preset safety threshold.

[0510] 1. The data processing module first pre-processes the 3D point cloud data, including denoising, filtering and coordinate transformation.

[0511] 2. Use deep learning algorithms (such as PointNet++) to extract features from 3D point cloud data and identify potential hidden danger objects.

[0512] 3. Calculate the distance between the identified hazardous object and the transmission line, and compare the distance value with the preset safety threshold.

[0513] 4. When the distance between the object and the transmission line is less than the preset safety value, the data processing module sends the judgment result to the main control module.

[0514] 6)Threshold adjustment:

[0515] The threshold adjustment module uses a machine learning algorithm to dynamically adjust the adaptive distance threshold based on environmental data and historical hidden danger records.

[0516] 1. Collect environmental data (such as weather, light) and historical hazard records.

[0517] 2. Use machine learning algorithms to analyze data in real time and adjust the adaptive distance threshold.

[0518] 3. The updated threshold is fed back to the data processing module to improve the accuracy of risk assessment.

[0519] 7) Alarm trigger:

[0520] The main control module decides whether to trigger an alarm based on the judgment results of the data processing module.

[0521] 1. After receiving the hidden danger judgment result, the main control module conducts a secondary verification of the result to ensure the accuracy of the alarm.

[0522] 2. When a hidden danger is confirmed, the main control module sends a command to trigger the alarm module.

[0523] 8) Alarm notification:

[0524] The alarm module sends out an alarm signal according to the instructions of the main control module to notify relevant personnel.

[0525] 1. Sound and light alarm: trigger the sound and light alarm (such as buzzer, warning light) on site to remind the maintenance personnel on site.

[0526] 2. Remote notification: Send warning information to relevant operation and maintenance personnel through SMS, email or APP push. The warning information includes detailed information such as the location, type, distance value and time of the hidden danger object.

[0527] 3. Warning records: The alarm module automatically records all warning events, including time, location, type of hidden danger object and distance, for subsequent analysis and processing.

[0528] The detailed description of the threshold adjustment module makes it more consistent with the risk assessment theme, and the functions and workflows of each module are clearly presented in the attached figure, further improving the overall system design.

[0529] An embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the fuzzy logic online intelligent assessment method for assisting in the risk assessment of stroke-related pneumonia.

[0530] An embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the fuzzy logic online intelligent assessment method for assisting in the risk assessment of stroke-related pneumonia.

[0531] Example 1: Early pneumonia risk prediction

[0532] Patient background: 65-year-old male with history of stroke, smoking history, elevated body temperature and increased respiratory rate.

[0533] Data collection: real-time collection of heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure and other data.

[0534] Data processing: Pearson, Spearman and Kendall methods are used to calculate correlations, fuse probabilities, build real-time data set models, and perform regularization.

[0535] Prediction and evaluation: The online fuzzy extreme learning machine algorithm is used to predict pneumonia risk in real time. If the system displays a high risk, early intervention and close monitoring are recommended.

[0536] Example 2: Pneumonia recovery monitoring

[0537] Patient background: A 50-year-old female, recovering from pneumonia after a stroke, with no history of smoking and no previous history of pneumonia.

[0538] Data collection: real-time collection of heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure and other data.

[0539] Data processing: Pearson, Spearman and Kendall methods are used to calculate correlations, fuse probabilities, build real-time data set models, and perform regularization.

[0540] Prediction and evaluation: The online fuzzy extreme learning machine algorithm is used to predict pneumonia recovery in real time. The system shows that the recovery is good and it is recommended to continue observation and regular review.

[0541] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0542] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment, characterized in that: The method includes: S1: Data collection and integration phase: S11: Comprehensively collect various relevant data of stroke patients, including but not limited to real-time physiological data such as heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure, etc.; S12: Obtain the patient's medical history data, such as previous history of pneumonia, smoking history, drinking history, number and severity of stroke attacks, chronic disease status, etc.; S13: Integrate information from different data sources, including hospital information systems, electronic medical records, wearable devices and other health monitoring devices; S2: Data preprocessing and standardization stage: S21: Clean the collected raw data to remove outliers, duplicate values ​​and missing values ​​to ensure data quality; S22: Standardize physiological data so that data of different dimensions can be compared and analyzed on the same scale; S3: Data correlation analysis phase: S31: Pearson correlation coefficient, Spearman rank correlation coefficient and Kendall correlation coefficient were used to calculate the correlation probability between each physiological data and the occurrence of pneumonia; S32: For each correlation analysis method, derive the probability that the data is irrelevant and cannot be determined, and then generate the corresponding probability vector; S33: Fusion of probability vectors from three correlation analysis methods to obtain a comprehensive correlation probability; S34: By setting an appropriate threshold, the correlation between the data and the occurrence of stroke-related pneumonia is determined. If the comprehensive correlation probability exceeds the threshold, the data is considered to be significantly correlated with the occurrence of pneumonia. S4: Real-time dataset model construction and update phase: S41: Based on the correlation data determined in S3, a model is constructed that can receive and process the data in real time; S42: Ensure that the model can be dynamically updated as new data is accessed to maintain the timeliness and accuracy of the assessment; S5: Online regularization processing and risk assessment stage: S51: Perform online regularization on the data in the model to eliminate the dimensional differences between different data and improve the consistency and comparability of the data; S52: The regularized data were processed by fuzzy logic system to predict the risk of pneumonia in stroke patients; S6: Risk warning and model adaptive optimization stage: S61: According to the predicted risk probability, a risk warning threshold is set. When the predicted probability exceeds the threshold, the warning mechanism is triggered to notify medical staff in a timely manner; S62: According to the actual cases of stroke-related pneumonia and the prediction results of the model, feedback adjustment and optimization of the model are carried out; S63: Continuously monitor data trends and iteratively update the assessment model based on the latest medical research results to improve the sensitivity and accuracy of risk assessment.

2. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment according to claim 1, characterized in that: An intelligent model capable of real-time assessment of the risk of SAP in stroke patients was constructed, which included the following steps: 1) Data collection and processing: Collect basic characteristic data of stroke patients, including but not limited to gender, age, smoking history, and drinking history; Record the patient's primary disease information, such as atrial fibrillation, history of stroke, chronic lung disease, hypertension, hyperlipidemia, diabetes, heart failure, and malnutrition; Follow up patients' complications, including hemorrhagic transformation, impaired consciousness, bulbar palsy, and dysphagia; Record the medical procedures that patients received, such as thrombectomy and the use of nasogastric feeding tubes; Clean and standardize the collected data to ensure data quality; 2) Risk factor analysis and screening: Meta-analysis method was used to analyze the risk factors of the multi-dimensional data collected above to determine the risk factors significantly associated with the occurrence of SAP; Based on the analysis results, the risk factors that have a significant impact on SAP risks are screened out to form a set of key risk factors; 3) Real-time dataset model construction: Based on the screened key risk factors, a model is built that can receive and process this data in real time; Ensure that the model can dynamically update data to adapt to changes in the patient's condition and maintain the timeliness and accuracy of the assessment; 4) Risk assessment and early warning: Apply fuzzy logic systems or other machine learning algorithms to process the data received in real time and predict the risk probability of SAP in stroke patients; According to the predicted risk probability, a threshold is set. When the risk exceeds the predetermined threshold, the early warning mechanism is triggered to prompt medical staff to take corresponding measures; 5) Model adaptive optimization: Based on actual SAP cases and model prediction results, the model is continuously adjusted and optimized; By monitoring the changing trends of data and new medical research results, the assessment model is continuously updated to improve the sensitivity and accuracy of risk assessment.

3. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment according to claim 1, characterized in that: The S1 specifically includes: S11: Data collection: Collect physiological data of stroke patients, including heart rate, blood oxygen saturation, body temperature, respiratory rate, blood pressure, etc.; collect medical history data of patients, such as previous history of pneumonia, smoking history, drinking history, etc.; S12: Data preprocessing: Clean the collected data to remove outliers and missing values; standardize various physiological data to ensure that the data are compared and analyzed under the same dimension. S13: Calculate the correlation probability using three correlation analysis methods: S13: Calculate the correlation probability using three correlation analysis methods: Pearson correlation coefficient ρ X.Y The calculation formula is: In the above formula, (X i ,Y i ) is the i-th value of any two variables X and Y, is the mean of two variables X and Y; Pearson correlation coefficient ρ X.Y The value is between [-1,1]; The Spearman correlation coefficient is also commonly known as the Spearman rank correlation coefficient; the rank is the order of the original data, so the essence of the Spearman rank correlation coefficient is to solve it according to the order of the original data. Its calculation formula is as follows: In the specific calculation process, the Spearman correlation coefficient first needs to sort the data of the two variables (X, Y) (uniformly in ascending or descending order) and obtain two element ranking sets X' and Y'; the element x in the ranking set i ,y i X i Rank in X and Y i The ranking in Y; subtract the corresponding elements in sets X' and Y' to obtain a ranking difference set d, where d i =x i -y i , 1≤i≤n; n is the number of variables; The characteristics of the Spearman correlation coefficient are as follows: if there is a strict monotonically increasing relationship between the variables, the Spearman correlation coefficient between the two is 1; if there is a strict monotonically decreasing relationship between the variables, the Spearman correlation coefficient between the two is -1; 0 means there is no correlation between the variables; Kendall correlation coefficient is a statistical value used to measure the correlation between two random variables; assuming that the corresponding elements in the two variables X and Y form an element pair set XY, the elements it contains are (X i ,Y i )(1≤i≤N); when any two elements in the set XY (X i ,Y i ) and (X j ,Y j ) have the same ranking (that is, when situation 1 occurs: X i >X j And Y i >Y j Or case 2: X i <X j And Y i <Y j ), the two elements are considered to be consistent; when situation 3 occurs: X i >X j And Y i <Y j Or case 4: X i <X j And Y i >Y j , these two elements are considered inconsistent; let the total number of consistent pairs be C, and the total number of inconsistent pairs be D; from this, we can deduce that the total number of pairs of all data is Combination, namely The calculation formula of Kendall correlation coefficient τ is as follows: The characteristics of the Kendall correlation coefficient are as follows: when τ is 1, it means that the two random variables have the same rank correlation; when τ is -1, it means that the two random variables have completely opposite rank correlations; when τ is 0, it means that the two random variables are independent of each other; S14: Derivation is irrelevant and probability cannot be determined: (1) Irrelevant probability and undeterminable probability: After calculating the relevant probability for each analysis method, derive its irrelevant probability and the probability of being unable to judge; for example, for the probability vector of the Pearson correlation coefficient, let the relevant probability be p1, the irrelevant probability be 1-p1-0.03, and the probability of being unable to judge be 0.03; (2) Generate probability vector: Generate the probability vector of each analysis method. For example, the probability vector of the Pearson method is [p1, (1-p1-0.03), 0.03)]; S15: fusion probability vector; S16: Determine data relevance: According to experience, set a threshold. If the correlation probability after fusion is greater than the threshold, the data is determined to be relevant, otherwise it is determined to be irrelevant. The details are as follows: After obtaining the results of the three correlation analysis coefficients, the irrelevance and inability to judge probabilities are then derived, and the probability vectors under each judgment path are generated; the probability vector m of the Pearson correlation coefficient is pe For example, the probabilities of being relevant, irrelevant, and unpredictable are: |m pe |,(1-|m pe |-0.03), 0.03; where |m pe | is the probability of the relevant results under the Pearson judgment method, (1-|m pe |-0.03) is the probability of irrelevant results under the Pearson judgment path, and 0.03 is the probability of an undetermined result. After the probability vectors of the three paths are obtained, they are fused and the final correlation analysis result of the data is solved. The fusion process is as follows: 1) Calculate the basic probability vector m under Pearson, Spearman and Kendall correlation coefficients pe 、m sp and m ke The Euclidean distance d between the three ij (1≤i,j≤3); 2) Calculate the weight factor S under the i-th judgment path i : 3) According to S i Calculate the basic probability m i The fusion weight w i : 4) According to the fusion weight w i To calculate the fusion probability m i ': where m' i Including the relevant probability m after fusion fp , irrelevant probability m after fusion ip , after fusion, the probability m cannot be determined np ; 5) According to empirical conditions, if m fp >0.9, the data are considered relevant, otherwise they are not relevant; 4. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as claimed in claim 1, characterized in that: The S2 specifically includes: Calculate each dependent variable y i (i=1,…,N) all related independent variables x including itself, and then use the value x of the independent variable at time k k and the independent variable x at two historical moments before time k k-2 , x k-1 and the dependent variable t at time (k+1) k+1 Construct a data set, the data set expression is t k+1 =f(x k-2 ,x k-1 ,x k ). Among them, x k =[x 1k ,x 2k …,x nk ,t k ] T , n is the target value t k+1 The number of independent variables related to ik (i=1,…,n) is the target value t k+1 The value of the ith independent variable at time k, t k represents the value of the dependent variable at time k, t k+1 Represents the target value of the dependent variable at time (k+1), k is the current time, and N is the total number of dependent variables.

5. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as claimed in claim 1, characterized in that: The S3 specifically includes: Take the value x of the independent variable at time k k For example, the data online regularization formula is as follows: in, and k are the iterative mean and iterative standard deviation of the data at time k, x stk is the data after regularization at time k; The iterative algorithm is as follows: Iterative mean: Iteration variance: In formula (2) is the iterative mean of the data at time (k-1). Similarly, is the iterative variance of the data at time (k-1).

6. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as claimed in claim 1, characterized in that: The S4 specifically includes: The online fuzzy extreme learning machine algorithm is an algorithm that specifically processes function approximation and classification. Its principle is to first randomly assign the parameters of the membership function, and then determine the corresponding consequent parameters through online training and learning data. Its model is as follows: x is the input set of the TSK fuzzy model, is the predicted output value of the TSK fuzzy model, L is the number of fuzzy rules, β i is the output layer weight, G(x; c i ,a i ) represents the output of the hidden layer, c i with a i are randomly generated membership function parameters. According to the equivalence of FIS and SLFN, the mathematical model of FIS with L fuzzy rules is generated as follows: x st is the set of independent variables of the dataset after regularization, t st is the target value set of the data set after regularization; For the TSK fuzzy model, the consequent parameter β i is a linear combination of the input variables and is expressed as follows: x ste is the input vector x st Add a unit vector to form an extended vector And q i is the parameter matrix of the TSK fuzzy model present in the i-th fuzzy rule, as shown below: Therefore, the output expression (5) of the TSK model can be written as follows: Equation (8) can be further written as follows: HQ=T (9) Where H is the hidden layer output matrix after fuzzy rule regularization, Q is the parameter matrix of the TSK model, and the expressions are as follows:

7. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as claimed in claim 6, characterized in that: The online fuzzy extreme learning machine algorithm includes two stages: initialization and online prediction, as shown below: The first stage: initialization, this stage needs to use a training data set η0 with a total number of rows N0 = Perform initialization learning; 1) Regularize the training data set η0; 2) Randomly assign membership function parameters (c i ,a i ),i=1,…,L; 3) Calculate the hidden layer output matrix H0 of the TSK model: H0 = H(c1,…,c L ,a1,…a L ; x1,…,x N0 ); 4) Estimate the initial parameter matrix 5) Let k = 0; The second stage: online prediction, using the online dataset η after the N0th row = {(x i ,t i )|x i ∈R n ,t i ∈R m ,i=N0+1,…}Real-time iteration model parameter P k+1 and Q (k+1) ; 1) Online regularization of the independent variable data x received each time k And calculate x stk ; 2) Calculate the iterative hidden layer output matrix H at the (k+1)th moment under the TSK model k+1 ,H k+1 =H(c 1, …,c L ,a 1, …a L ;x stk ); 3) Using the formula Calculate the predicted value for the next moment 4) Read the actual target value t at the next moment k+1 , and for the target value t k+1 Regularization gives t stk+1 , and then find the predicted value Error T k+1 =[t stk+1 ] T ; 5) Update the parameter matrix P k+1 and Q (k+1) , Where P k With Q (k) are the parameter matrices at the kth moment; 6) k=k+1, continue to return to the second stage online prediction.

8. The fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as claimed in claim 1, characterized in that: The S5 specifically includes: First, the predicted output value at the (k+1)th moment is obtained by S4 And Perform an inverse normalization transformation to calculate the original dimension value Then with the original dimension value t at time k k and the original dimension value t at the past (k-1) time k-1 Determine the data change status at time k together; Generally speaking, the state of data can be divided into five states: rising, falling, fluctuating, oscillating, and stable. The following are the conditions for judging these five states: 1) Ascending conditions: 2) Descending conditions: 3) Fluctuation conditions: 4) Oscillation conditions: 5) Stability conditions: where d kn It is the adaptive distance to judge the data at time k. The solution is as follows: 1) Solve t in sequence k-1 ,t k and The difference between them forms the distance vector d k , d k =[d 1k ,d 2k ],d 1j =|t k -t k-1 |, 2) Using iterative distance mean and Solve for the adaptive distance d kn , the specific algorithm is as follows:

9. A fuzzy logic online intelligent assessment system for assisting stroke-related pneumonia risk assessment based on the fuzzy logic online intelligent assessment method for assisting stroke-related pneumonia risk assessment as described in claims 1-8, characterized in that: The system specifically includes: Correlation analysis module, used for data correlation analysis; Model building module, used for real-time data set model building; Regularization processing module, used for online regularization processing of data sets; Prediction module, used for fuzzy system prediction; The threshold adjustment module is used to adjust the adaptive distance threshold in real time.

10. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the fuzzy logic online intelligent assessment method for assisting the risk assessment of stroke-related pneumonia as described in any one of claims 1-8.

11. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the fuzzy logic online intelligent assessment method for assisting in the risk assessment of stroke-related pneumonia as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Risk prediction method and system

    CN107895596A

  • Abnormal data prediction method and system based on data correlation and fuzzy system

    CN114580747A

  • Nomogram clinical prediction model for cerebral hemorrhage-associated pneumonia and construction method of Nomogram clinical prediction model

    CN116189892A

  • Biomarker, kit and diagnostic equipment for predicting stroke-related pneumonia

    CN117031044A

  • Cerebral stroke digital intelligent early warning method and system based on big data

    CN117747104A

Cited By

  • Artificial intelligence-based correlation analysis method and system for spine-pelvis sagittal morphology parameters and cardiopulmonary exercise endurance parameters

    CN120183738A