Patient doctor-seeing waiting time prediction model based on enhanced black-wing plinary algorithm

By combining the enhanced black-winged kite algorithm and the extreme core learning machine, using improved dual weights and random backup strategies, the RDBKA-KELM model was constructed, which solved the problem that the group intelligent optimization algorithm was trapped in the local optimal solution, and improved the accuracy and generalization ability of medical waiting time prediction.

CN120299658APending Publication Date: 2025-07-11WENZHOU DATA GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510492836.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-02-19
Filing Date
2025-04-18
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing medical waiting time prediction model is easy to fall into local optimal solutions because the group intelligent optimization algorithm is prone to falling into the local optimal solution, resulting in poor generalization ability and prediction results of the KELM model, and it is impossible to accurately predict the patient's medical waiting time.

Method used

The enhanced black-winged kite algorithm (RDBKA) is combined with the extreme core learning machine (KELM), and through improved dual weighting strategies and random backup strategies, the space is initially resolved and the attack and migration behavior of black-winged kite is simulated, population diversity and search efficiency are improved, and the best hyperparameters are output to build the RDBKA-KELM model.

Benefits of technology

It effectively avoids local optimal solutions, improves the generalization ability and prediction accuracy of the KELM model, and realizes efficient prediction of patients' waiting time for medical treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299658A_ABST
    Figure CN120299658A_ABST
Patent Text Reader

Abstract

The invention relates to a patient doctor-seeing waiting time prediction model based on an enhanced black-wing plinual algorithm, and provides an RDBKA based on two improvement strategies and a BKA to improve the accuracy and generalization ability of the prediction model, a random standby strategy enhances the solution space coverage rate of population initialization, and the solution space coverage rate of population initialization is improved. The dual-adaptive weight strategy enhances the search capability of the algorithm and the capability of quitting a local optimal solution; an RDBKA-KELM prediction model is provided, the model combines a KELM prediction method with a high-performance RDBKA algorithm, the accuracy and generalization ability of the prediction model can be improved, and the waiting time of the patient can be efficiently predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical treatment waiting time prediction, and particularly relates to a patient medical treatment waiting time prediction model based on an enhanced black-winged kite algorithm. Background Technique

[0002] The satisfaction of outpatient patients is closely related to the waiting time for treatment and the treatment level. A longer waiting time makes people more skeptical about medical services, especially when they are first-time patients; low patient satisfaction may lead to poor communication between patients and medical staff, and medical staff spending more time dealing with patients' complaints about waiting time rather than other necessary responsibilities, such as providing medical treatment. Therefore, reducing the waiting time of new patients in general internal medicine outpatient clinics is crucial for maintaining and improving the level of medical care. In addition, a major factor in reducing patient anxiety is to reduce the time patients have to wait from arriving at the outpatient department to the start of the examination.

[0003] Research status shows that more and more researchers are using machine learning methods to predict the frequency of hospital visits. However, since most prediction models use univariate time series feature prediction techniques, the change of patient flow is affected by various complex elements and does not have clear linear characteristics, so the accuracy of the model is not very good. However, this is due to the limitations of the classification predictor itself, resulting in significant biases in the model prediction results based on the kernel extreme learning machine KELM or other models.

[0004] Due to its flexibility and elasticity, swarm intelligence optimization technology is becoming increasingly popular in improving the accuracy of prediction models. Since it mimics the collective behavior of different species, it can be used to solve prediction optimization problems. Currently known algorithms include: Black-winged Kite Algorithm BKA, Harris Hawk Optimization Algorithm HHO, Whale Optimization Algorithm WOA, Bat Algorithm BA, Particle Swarm Optimization PSO, Moth-Flame Optimization Algorithm MFO, Sine-Cosine Algorithm Based on Differential Evolution SCADE, Adaptive Sine-Cosine Algorithm Based on Particle Swarm Optimization ASCA_PSO, Fruit Fly Optimization Algorithm with Multi-Population Sentinel Mechanism MOFOA, Adaptive Whale Optimization Algorithm with Two Parameters ACWOA, Opposite Sine-Cosine Algorithm OBSCA. These algorithms demonstrate how to use swarm intelligence to improve the performance of prediction models while capturing their essence and diversity.

[0005] Swarm intelligence optimization algorithms have proven their effectiveness in fine-tuning hyperparameters in prediction models, and are often combined with KELM models to provide excellent hyperparameters for building KELM models. However, in the iterative process of swarm intelligence optimization algorithms, it is easy to fall into local optimal solutions when judging the best individual in the population, resulting in problems such as limited convergence accuracy and slow search speed. The numerical output of the best individual cannot be used as the hyperparameter of the input KELM model, resulting in poor generalization ability of the KELM model and affecting the model's ability to provide accurate prediction results.

[0006] Therefore, designing a patient medical waiting time prediction model based on the enhanced Black Kite algorithm that can avoid falling into the local optimal solution and improve the accuracy of the prediction results has become a technical problem that needs to be solved urgently. Summary of the invention

[0007] In order to solve the above technical problems, a patient medical waiting time prediction model based on an enhanced Black Kite algorithm is provided, including using a KELM model and a Black Kite algorithm. The KELM model converts training data from an input space into a high-dimensional feature space, and replaces the inner product operation in the high-dimensional space with a kernel function operation in the original space. The kernel function is obtained using a sample input vector, and a kernel matrix of the KELM algorithm is constructed. The kernel function uses a radial basis kernel function with strong localization and high generalization capabilities. The prediction model includes the following construction steps: s1, collects patient outpatient data, including waiting time, number of people in line, and waiting density data; the waiting time is measured by taking a photo of the patient's face with a camera for face recognition punching in and getting a number, or opening a text message link to enter the hospital punching system to punch in and get a number, or the patient gets a number offline at the outpatient department, and the time starts from the patient's arrival at the outpatient department and the current time until the patient receives the outpatient treatment; s2, preprocessing to obtain the patient flow data set, removing abnormal data and null values, and dividing the data in the patient flow data set into a training set and a test set; s3, training set input extreme kernel learning machine model KELM, initialization model parameters; s4, use the parameters of the KELM model to initialize the parameters and population position of the enhanced black-winged kite algorithm RDBKA; s5, calculate the fitness value of each individual in the population according to the RDBKA algorithm, and update the optimal fitness value and the optimal individual; s6, iteratively update individuals and populations according to the improved strategy; s7, after reaching the maximum number of iterations, output the best individual position as the optimal hyperparameter of the KELM model; s8, to obtain the KELM model with the best hyperparameters to build the RDBKA-KELM prediction model, input the test set data for testing, and output the prediction results; The RDBKA algorithm is based on the Black-winged Kite algorithm and combines a random backup strategy to initialize the solution space. During the iterative process, the fitness value of the Black-winged Kite individuals is calculated, and then different attack behaviors of the Black-winged Kite in global search and exploration are simulated. Subsequently, a dual adaptive weight strategy is used to adaptively enhance the search and attack behaviors. Finally, the migration behavior of the Black-winged Kite is simulated to guide the population, and the optimal solution and the corresponding optimal fitness value are output after the iteration is completed.

[0008] As a further improvement of this method, the attack behavior model of the Black-winged Kite algorithm is , , where t and t + 1 represent the iteration times, and correspond to the iteration times, representing the position of the i-th Black-winged Kite in the j-th dimension, r is a random number between 0 and 1, p is a constant with a size of 0.9, T represents the total of all iterations, and t represents the currently completed iteration times; The migration behavior model of the Black-winged Kite algorithm is , where, represents the fitness value of the random position obtained from any Black-winged Kite in the j-th dimension in the t-th iteration; C(0,1) represents the Cauchy mutation function; represents the current position of any Black-winged Kite in the j-th dimension in the t-th iteration; represents the Black-winged Kite with the best performance among these positions in the j-th dimension in the t-th iteration; The probability density function equation of the one-dimensional Cauchy distribution of the Cauchy mutation function is , When 𝛿 = 1 and 𝜇 = 0, its probability density function is in the traditional form, and the exact formula is as follows, 。

[0009] As a further improvement of this method, the random backup strategy determines whether to apply the random replacement method to the newly generated population in a probabilistic manner by comparing the Cauchy random number with the ratio of the evaluation times to the total number of evaluations, and replaces the vector of the current Black-winged Kite with the best Black-winged Kite.

[0010] As a further improvement of this method, the dual adaptive weight strategy uses the weight w1 to improve the global search ability of the Black-winged Kite algorithm, and the weight w2 to improve the local search ability of the Black-winged Kite algorithm. The expression is , , Among them, s is limited by the local optimality of the method and is automatically added when the individual position remains unchanged. When updating s, it is adjusted by dividing it by 2; 𝐹𝐸𝑠 represents the current evaluation number, and 𝑀𝑎𝑥𝐹𝐸𝑠 represents the maximum evaluation count; the ranges of w1 and 𝑤2 are [0,1] and [0.5,1] respectively; The weights w1 and w2 are added to the equation of the black-winged kite algorithm to obtain an equation, .

[0011] As a further improvement of this method, the RDBKA-KELM prediction model establishes the initial parameter set of the RDBKA algorithm by obtaining the optimal values of C and 𝛾 of the radial basis kernel function, and uses the root mean square error RMSE of the fitness function to determine the fitness values of the population members; the equation for obtaining the optimal values is , Among them, represents the matching size value of the patient waiting time prediction, represents the actual size of the patient flow; The calculation formula for the fitness value is ; After reaching the maximum number of iterations described in step s6, the C and 𝛾 related to the best fitness value are output as the best hyperparameters.

[0012] As a further improvement of this method, the preprocessing of the patient outpatient data includes data cleaning. After cleaning the data, the time series input matrix and output label of the KELM model are defined. The time series input matrix is , where d is the number of sample features and 𝑛 is the step parameter; the output label is , and X and Y are divided into a test set and a training set in a 1:1 ratio as the input and label of the KELM model.

[0013] As a further improvement of this method, it also includes a model accuracy evaluation step. By comparing and testing the constructed RDBKA-KELM model with the existing BKA-KELM model and KELM model, the parameters set for the test model include: the population size is 20; the size is 2; the values of C and 𝛾 are limited by an upper limit of 100 and a lower limit of 0.1; the evaluation indicators include the Spearman correlation coefficient R^2, mean absolute error MAE, and root mean square error RMSE of the equation, and the formulas are , , , Among them, represents the actual value size of the test sample, represents the average value size of the test sample, represents the projection value of the test sample, and 𝑚 represents the number of samples.

[0014] After adopting the above technical solution, the main problems to be solved by this patent are how to combine the swarm intelligence optimization algorithm with the KELM model to predict the patient's waiting time for medical treatment, avoid the swarm intelligence optimization algorithm falling into the local optimal solution, and improve the generalization ability of the KELM model and the accuracy of the prediction results. To solve the above problems, based on two improvement strategies, the dual-weight strategy and the random backup strategy, together with the BKA algorithm, this patent obtains an RDBKA-KELM model, which can improve the accuracy and generalization ability of the prediction model and efficiently predict the patient's waiting time.

[0015] The initial solution space is carried out through the random backup strategy. During the search process of the black-winged kite population, some vectors perform well at the position of the current kite, while others perform poorly. After comparing the ratio of the evaluation times to the total number of evaluations with the Cauchy random number, it is determined whether to apply the random replacement method in the newly generated population according to whether the two match, increasing the diversity of individuals in the population and giving full play to the performance potential of different black-winged kite individuals at the current best position; through the dual adaptive weight strategy, weights are assigned to the attack behavior and migration behavior of the black-winged kite. Among them, the main goal of weight 𝑤1 is to improve the global search ability, and weight 𝑤2 is mainly used to improve the local search ability. Cooperating with the random backup strategy, it makes the black-winged kite algorithm more difficult to produce local optimal solutions. Description of the Drawings

[0016] Figure 1 Shown is the flowchart for constructing the RDBKA-KELM prediction model of this patent.

[0017] Figure 2 Shown is the flowchart of the RDBKA algorithm of this patent.

[0018] Figure 3 Shown is the comparison chart of the Friedman test results of the RDBKA of this patent.

[0019] Figure 4 Shown is the comparison chart of the convergence curves of the RDBKA and the peer algorithm of this patent.

[0020] Figure 5 Shown is the prediction result chart of the RDBKA-KELM model of this patent based on the original data of the training set.

[0021] Figure 6 Shown is the prediction result chart of the RDBKA-KELM model of this patent based on the test set.

[0022] Figure 7 Shown is the R of this patent based on the training set and the test set 2 Comparison chart of index values.

[0023] Figure 8 The figure shows the comparison chart of RMSE index values of this patent based on the training set and the test set.

[0024] Figure 9 The figure shows the comparison chart of MAE index values of this patent based on the training set and the test set.

[0025] Figure 10 The figure shows the comparison color chart of the Friedman test results of RDBKA of this patent.

[0026] Figure 11 The figure shows the comparison color chart of the convergence curves of RDBKA and the peer algorithm of this patent.

[0027] Figure 12 The figure shows the prediction result color chart of the RDBKA-KELM model of this patent based on the original data of the training set.

[0028] Figure 13 The figure shows the prediction result color chart of the RDBKA-KELM model of this patent based on the test set.

[0029] Figure 14 The figure shows the R of this patent based on the training set and the test set 2 Comparison color chart of index values.

[0030] Figure 15 The figure shows the comparison color chart of RMSE index values of this patent based on the training set and the test set.

[0031] Figure 16 The figure shows the comparison color chart of MAE index values of this patent based on the training set and the test set. Detailed implementation manners

[0032] As Figures 1 - 16 shown, where Figures 3 - 9 and Figures 10 - 16 correspond in sequence. To solve the above technical problems, a patient waiting time prediction model based on the enhanced black-winged kite algorithm includes using the KELM model and the black-winged kite algorithm. The KELM model transforms the training data from the input space into a high-dimensional feature space, and replaces the inner product operation in the high-dimensional space with a kernel function operation in the original space. The kernel function is obtained using the sample input vector, and the kernel matrix of the KELM algorithm is constructed. The kernel function uses a radial basis kernel function with strong localization and high generalization ability. The prediction model includes the following construction steps. s1. Collect the outpatient data of patients, including waiting time, number of people in the queue, and waiting density data. The waiting time is obtained by taking the number through face recognition of the patient's facial image captured by a camera, or by opening the SMS link to enter the hospital check-in system to take the number, or the patient takes the number offline at the outpatient department. This is used as the time when the patient arrives at the outpatient department and starts timing until the patient receives outpatient treatment. s2. Preprocess to obtain the patient flow data set, remove abnormal data and null values, and divide the data in the patient flow data set into a training set and a test set. s3. Input the training set into the Extreme Kernel Learning Machine model KELM and initialize the model parameters. s4. Use the parameters of the KELM model to initialize the parameters and population positions of the Reinforced Black-winged Kite Algorithm RDBKA. s5. Calculate the fitness value of each individual in the population according to the RDBKA algorithm, and update the optimal fitness value and the optimal individual. s6. Iteratively update the individuals and the population according to the improvement strategy. s7. After reaching the maximum number of iterations, output the best individual position as the best hyperparameters of the KELM model. s8. Construct the RDBKA-KELM prediction model with the KELM model with the best hyperparameters, input the data of the test set for detection, and output the prediction result. The RDBKA algorithm is based on the Black-winged Kite Algorithm, combines the random backup strategy to initialize the solution space, calculates the fitness value of the Black-winged Kite individuals during the iteration process, then simulates different attack behaviors of the Black-winged Kite in global search and exploration, and then uses the dual adaptive weight strategy to adaptively enhance the search and attack behaviors. Finally, it simulates the migration behavior of the Black-winged Kite to guide the population, and outputs the optimal solution and the corresponding optimal fitness value after the iteration.

[0033] The attack behavior model of the Black-winged Kite Algorithm is , , where t and t + 1 represent the number of iterations, and correspond to the number of iterations, represent the position of the i-th Black-winged Kite in the j-th dimension, r is a random number between 0 and 1, p is a constant with a size of 0.9, T represents the total of all iterations, and t represents the number of iterations that have been completed currently; The migration behavior model of the Black-winged Kite Algorithm is , where, represents the fitness value of the random position in the j-th dimension obtained from any Black-winged Kite in the t-th iteration; C(0, 1) represents the Cauchy mutation function; represents the current position of any black-winged kite in the j-th dimension during the t-th iteration; represents the black-winged kite with the best performance among these positions in the j-th dimension during the t-th iteration; The probability density function equation of the one-dimensional Cauchy distribution of the Cauchy mutation function is , When 𝛿 = 1 and 𝜇 = 0, its probability density function is in the traditional form, and the exact formula is as follows, .

[0034] The random reserve strategy determines whether to apply the random replacement method to the newly generated population with a certain probability by comparing the Cauchy random number with the ratio of the number of evaluations to the total number of evaluations, and replaces the vector of the current black-winged kite with the best black-winged kite.

[0035] The dual adaptive weight strategy uses the weight w1 to improve the global search ability of the black-winged kite algorithm, and the weight w2 to improve the local search ability of the black-winged kite algorithm. The expression is , , where s is limited by the local optimality of the method and is automatically added when the individual position remains unchanged. When updating s, it is adjusted by dividing it by 2; 𝐹𝐸𝑠 represents the current number of evaluations, and 𝑀𝑎𝑥𝐹𝐸𝑠 represents the maximum number of evaluations; the ranges of w1 and 𝑤2 are [0,1] and [0.5,1] respectively; Adding the weights w1 and w2 to the equation of the black-winged kite algorithm, the equation is obtained, .

[0036] The RDBKA-KELM prediction model obtains the optimal values of C and 𝛾 of the radial basis kernel function, establishes the initial parameter set of the RDBKA algorithm, and uses the root mean square error RMSE of the fitness function to determine the fitness values of the population members; the equation for obtaining the optimal values is , where, represents the matching size value for patient waiting time prediction, represents the actual size of patient flow; The calculation formula for the fitness value is ; After reaching the maximum number of iterations described in step s6, output C and 𝛾 related to the best fitness value as the best hyperparameters.

[0037] The preprocessing of the patient outpatient data includes data cleaning, and the time series input matrix and output label of the KELM model are defined from the cleaned data. The time series input matrix is , where d is the number of sample features and 𝑛 is the step size parameter; the output label is , X and Y are divided into a test set and a training set in a 1:1 ratio as the input and label of the KELM model.

[0038] It also includes a model accuracy evaluation step. By comparing and testing the constructed RDBKA-KELM model with the existing BKA-KELM model and KELM model, the parameters set for the test model include: the population size is 20; the size is 2; the values of C and 𝛾 are restricted by an upper limit of 100 and a lower limit of 0.1; the evaluation metrics include the Spearman correlation coefficient R^2, mean absolute error MAE, and root mean square error RMSE of the equation, and the formulas are , , , where represents the actual value size of the test sample, represents the average value size of the test sample, represents the projected value of the test sample, and 𝑚 represents the number of samples.

[0039] The main problem to be solved in this patent is how to combine the swarm intelligence optimization algorithm with the KELM model to predict the waiting time of patients, avoid the swarm intelligence optimization algorithm from falling into local optima, and improve the generalization ability of the KELM model and the accuracy of the prediction results. To solve the above problems, based on two improvement strategies, the dual weight strategy and the random backup strategy, together with the BKA algorithm, this patent obtains an RDBKA-KELM model, which can improve the accuracy and generalization ability of the prediction model and efficiently predict the patient waiting time.

[0040] The solution space is initialized through the random backup strategy. During the search process of the black-winged kite population, some vectors perform well at the position of the current kite, while others do not. After comparing the ratio of the number of evaluations to the total number of evaluations with the Cauchy random number, it is determined whether to apply the random replacement method in the newly generated population based on whether they match, increasing the diversity of individuals in the population and fully exerting the performance potential of different black-winged kite individuals at the current best position; through the dual adaptive weight strategy, weights are assigned to the attack behavior and migration behavior of the black-winged kite. Among them, the main goal of weight 𝑤1 is to improve the global search ability, and weight 𝑤2 is mainly used to improve the local search ability. Cooperating with the random backup strategy, it makes it more difficult for the black-winged kite algorithm to produce local optima.

[0041] The outpatient data of patients collected in this patent are the data generated when patients go to the hospital for outpatient treatment, mainly including the waiting time, queuing number, and waiting density of patients collected on a daily basis, which can be obtained from the outpatient check-in and call record in the existing hospital system. Figure 5 And Figure 6 represents the original result and predicted result of the time required for a patient to wait for medical treatment on a certain day under the patient flow on that day. The original result is the waiting time of the patient under the patient flow on that day directly obtained from the outpatient data of the patient, and the predicted result is the waiting time of the patient predicted by the model under the patient flow on that day.

[0042] By using the IEEE CEC2014 benchmark function test set, the test functions are shown in Table 1; in the comparative experiment, the enhanced black-winged kite algorithm RDBKA of this patent is compared with other popular swarm intelligence optimization algorithms, such as PSO, SCA, and BKA, etc. In the experiment, the search dimension of the algorithm is 30, the population size is 30, the number of evaluations is 300000, the internal parameters of the algorithm are all set to the default values, and each algorithm is run independently 30 times to obtain fair and effective experimental results.

[0043]

[0044] Table 1.: Explanation of 30 benchmark test functions.

[0045] RDBKA was compared with 12 other peer algorithms using 30 benchmark functions, including six original algorithms such as BKA, HHO, WOA, BA, PSO, MFO, and JAYA, and the remaining six are newer variant algorithms including SCADE, ASCA_PSO, MOFOA, ACWOA, and OBSCA; the comparative experimental results are shown in Table 2, where SD represents the experimental variance and AVE is the average best fitness value of thirty different tests.

[0046] The experimental results show that in most function evaluations, the performance of RDBKA is better than that of peer algorithms, which indicates that RDBKA is more suitable for performing difficult tasks; in addition, the low SD variation of RDBKA indicates that the algorithm has strong stability.

[0047]

[0048] Table 2.: Comparison results of RDBKA and other algorithms.

[0049] The average ranking of RDBKA was verified by using the Friedman test, and the research results are as Figure 3As shown; Table 3 shows the results of the Wilcoxon signed-rank test, and RDBKA ranks first overall in the results of the Wilcoxon signed-rank test; the Friedman test shows that although the average rank of RDBKA is slightly different from those of the PSO and MFO algorithms, the overall performance is still better; comprehensively, the performance of RDBKA is superior to other peer algorithms.

[0050] Algorithm + / − / = Mean Rank RDBKA ~ 1.93 1 BKA 21 / 0 / 9 5.63 4 HHO 22 / 2 / 6 4.03 2 WOA 26 / 1 / 3 6.87 7 BA 22 / 7 / 1 6.37 6 PSO 21 / 4 / 5 5.03 3 MFO 27 / 1 / 2 8.10 9 JAYA 27 / 2 / 1 7.40 8 SCADE 27 / 1 / 2 9.77 11 ASCA_PSO 26 / 1 / 3 6.03 5 MOFOA 23 / 2 / 5 10.17 13 ACWOA 28 / 0 / 2 8.20 10 OBSCA 28 / 1 / 1 10.13 12 Table 3: Results of the Wilcoxon signed-rank test.

[0051] As Figure 4 shown, by capturing the optimization search process of each technique, in unimodal and basic multimodal function classifications, compared with other similar types of algorithms, RDBKA shows faster search performance and higher convergence accuracy on F2, F6, F8, F9, F10, and F11. The comparison with the hybrid and combined functions F12, F13, and F16 shows that RDBKA also performs well in solving difficult optimization problems. On the test functions F6, F8, F9, F10, and F16, RDBKA is clearly in the leading position; among them, only RDBKA can continuously defeat other algorithms.

[0052] In addition, in the functional tests of F11 and F16, RDBKA clearly shows a downward inflection point in the middle of the algorithm cycle, indicating that RDBKA has great potential to surpass local optima and defeats other compared algorithms in terms of search and exploitation capabilities.

[0053] The patient flow dataset is divided into 365 sample sets through a 4:1 cross-validation method and input into the RDBKA-KELM model. As Figure 5 shown, the prediction result graph of the RDBKA-KELM model is obtained. The line graph shows the excellent overall prediction effect of the RDBKA-KELM model, especially in the range of 200 - 315 days. The almost perfect overlap between the original line and the predicted line indicates a high prediction accuracy.

[0054] By comparing the RDBKA-KELM model with popular classification prediction models such as BKA-KELM, KELM, BP, RF, KELM, and RBF, the model training process uses 10-fold cross-validation to ensure the stability of the prediction results and avoid accidental errors. The evaluation results of each model are shown in Table 4. Considering the three evaluation metrics of R 2 , RMSE, and MAE, the RDBKA-KELM model performs the best; the R 2The correlation coefficient is 0.84654. To evaluate the model error, RMSE and MAE are adopted. The equivalent values of the two KELM model errors of the RDBKA-KELM model are the smallest, which are 1.6411 and 1.2117 respectively, proving that the RDBKA-KELM model is superior to other models in making accurate predictions and providing benefits.

[0055] Model R2 RMSE MAE RDBKA - KELM 0.84654 1.6411 1.2117 BKA - KELM 0.79014 1.9249 1.4325 SVR 0.78842 1.7326 1.214 BP 0.78944 1.9342 1.3987 KELM 0.83084 1.6715 1.231 ELM 0.71113 2.1821 1.6257 RBF 0.83352 1.6823 1.2817 Table 4: Evaluation results of each prediction model.

[0056] The RDBKA-KELM prediction line chart of the test set is as Figure 6 shown. The data distribution of the test set is represented by the Original line, while the prediction results of the RDBKA-KELM model are represented by the Predicted line. It can be seen that the RDBKA-KELM also makes excellent predictions with high correlations in the test set prediction. At the same time, in terms of the deviation of the RDBKA-KELM prediction, the deviation generated by the test set compared with the training set is more significant. For example, the deviation on the 10th, 15th, 30th, and 36th days is larger. When facing the waiting time data of new patients, the trained RDBKA-KELM model will not show overfitting and generally maintains very good prediction performance and will not produce the effects similar to model training.

[0057] Through Figure 7 、 8 and 9, the vertical axis is the evaluation criterion, and the horizontal axis is each comparison model; Figure 7 illustrates how to reduce the prediction correlation of the model and the minimum KELM fluctuation after changing to the RDBKA-KELM model; in contrast, the RDBKA-KELM model continues to be superior to KELM in terms of accuracy, indicating that the RDBKA-KELM model is a better method for predicting the waiting time of future patients; Figure 8 and Figure 9 show the intuitive differences in accuracy between the RDBKA-KELM and other models such as BP and RBF. Even after changing the data set, the RDBKA-KELM prediction results also show the smallest error changes, indicating that the improved model has high stability.

Claims

1. A patient medical waiting time prediction model based on an enhanced Black Kite algorithm, comprising the use of a KELM model and a Black Kite algorithm, wherein the KELM model converts training data from an input space into a high-dimensional feature space, and replaces the inner product operation in the high-dimensional space with a kernel function operation in the original space, obtains a kernel function using a sample input vector, and constructs a kernel matrix of the KELM algorithm, wherein the kernel function uses a radial basis kernel function with strong localization and high generalization capabilities, and is characterized in that: The prediction model includes the following construction steps: S1. Collect outpatient data of patients, including waiting time, queuing number, and waiting density data; the waiting time is obtained by taking the number through face recognition by shooting the facial images of patients with a camera, or by opening the SMS link to enter the hospital check-in system to take the number, or the patient takes the number offline at the outpatient department. This is used as the time when the patient arrives at the outpatient department and starts timing from the current moment until the patient receives outpatient service. S2. Preprocess to obtain the patient flow data set, remove abnormal data and null values, and divide the data in the patient flow data set into a training set and a test set. S3. Input the training set into the extreme kernel learning machine model KELM and initialize the model parameters. S4. Use the parameters of the KELM model to initialize the parameters and population positions of the enhanced black-winged kite algorithm RDBKA. S5. Calculate the fitness value of each individual in the population according to the RDBKA algorithm, and update the optimal fitness value and the optimal individual. S6. Iteratively update the individuals and the population according to the improvement strategy. S7. After reaching the maximum number of iterations, output the best individual position as the best hyperparameters of the KELM model. S8. Construct the RDBKA-KELM prediction model with the KELM model with the best hyperparameters, input the data of the test set for detection, and output the prediction result. The RDBKA algorithm is based on the black-winged kite algorithm, combines a random backup strategy to initialize the solution space, calculates the fitness value of the black-winged kite individuals during the iteration process, then simulates different attack behaviors of the black-winged kite in global search and exploration, and then uses a dual adaptive weight strategy to adaptively enhance the search and attack behaviors. Finally, it simulates the migration behavior of the black-winged kite to guide the population, and outputs the optimal solution and the corresponding optimal fitness value after the iteration is completed.

2. The patient medical treatment waiting time prediction model based on the enhanced black-winged kite algorithm according to claim 1, wherein: The attack behavior model of the black-winged kite algorithm is , , where t and t + 1 represent the number of iterations, and corresponding to the number of iterations, representing the position of the i-th black-winged kite in the j-th dimension, r is a random number between 0 and 1, p is a constant with a magnitude of 0.9, T represents the total of all iterations, and t represents the number of iterations that have been completed currently; The migration behavior model of the black-winged kite algorithm is , Among them, represents the fitness value of the j - dimensional random position obtained from any black - winged kite in the t - th iteration; C(0, 1) represents the Cauchy mutation function; represents the current position of any black - winged kite in the j - th dimension in the t - th iteration; represents the black - winged kite with the best performance among these positions in the j - th dimension in the t - th iteration; The probability density function equation of the one-dimensional Cauchy distribution of the Cauchy mutation function is , When 𝛿 = 1 and 𝜇 = 0, its probability density function is in the traditional form, and the exact formula is as follows: .

3. The patient medical treatment waiting time prediction model based on the enhanced black-winged kite algorithm according to claim 2, wherein: The random backup strategy determines whether to apply the random replacement method in the newly generated population by comparing the Cauchy random number with the ratio of the number of evaluations to the total number of evaluations, and replaces the vector of the current black-winged kite with the best black-winged kite in a probabilistic manner.

4. The patient waiting time prediction model based on the enhanced black-winged kite algorithm according to claim 2, wherein: The dual adaptive weight strategy uses the weight w1 to improve the global search ability of the black-winged kite algorithm, and the weight w2 to improve the local search ability of the black-winged kite algorithm. The expression is , , where s is restricted by the local optimality of the method and is automatically added when the individual position remains unchanged. When updating s, it is adjusted by dividing it by 2; 𝐹𝐸𝑠 represents the current number of evaluations, and 𝑀𝑎𝑥𝐹𝐸𝑠 represents the maximum number of evaluations; the ranges of w1 and 𝑤2 are [0,1] and [0.5,1] respectively. Add weights w1 and w2 into the equation of the Black-winged Kite algorithm to obtain the equation, .

5. The patient medical treatment waiting time prediction model based on the enhanced black-winged kite algorithm according to claim 4, wherein: The RDBKA-KELM prediction model establishes the initial parameter set of the RDBKA algorithm by obtaining the optimal values C and 𝛾 of the radial basis kernel function, and uses the root mean square error RMSE of the fitness function to determine the fitness values of the population members; the equation for obtaining the optimal values is , Among them, represents the matching size value for predicting the patient waiting time, represents the actual size of the patient flow; The calculation formula of the fitness value is ; after reaching the maximum number of iterations described in step s6, output 𝐶 and 𝛾 related to the best fitness value as the best hyperparameters.

6. The patient waiting time prediction model based on the enhanced black-winged kite algorithm according to claim 1, wherein: The preprocessing of the patient outpatient data includes data cleaning. After cleaning the data, the time series input matrix and output label of the KELM model are defined. The time series input matrix is , where d is the number of sample features and 𝑛 is the step parameter; the output label is . X and Y are divided into a test set and a training set in a 1:1 ratio as the input and label of the KELM model.

7. The patient waiting time prediction model based on the enhanced black-winged kite algorithm according to claim 1, characterized in that: It also includes a model accuracy evaluation step. By comparing and testing the constructed RDBKA-KELM model with the existing BKA-KELM model and KELM model, the parameters of the test model are set as follows: the population size is 20; the dimension is 2; the values of C and 𝛾 are restricted by an upper limit of 100 and a lower limit of 0.1; the evaluation metrics include the Spearman correlation coefficient R^2, the mean absolute error MAE, and the root mean square error RMSE of the equation. The formula is , , , Among them, represents the actual value size of the test sample, represents the average value size of the test sample, represents the projection value of the test sample, and 𝑚 represents the number of samples.