Medical institution doctor seeing person number prediction method based on interpretable deep learning
By using an interpretable deep learning method in medical institution visit prediction, the block stack structure is designed for nested residual learning, which solves the problem of insufficient prediction accuracy and interpretability in the prior art, and achieves high-precision and interpretable prediction of visits.
Patent Information
- Application Number
- CN202510040863.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-13
AI Technical Summary
The existing medical institution visit prediction algorithm is difficult to achieve high-precision and explainable predictions, especially in terms of decomposition trends, periodicity and other components.
Using an interpretable deep learning method, medical institution business system collects visits data, performs data preprocessing and in-block structure design, and designs block stack structures to realize nested residual learning and decompose trends and periodic components.
It realizes high-precision prediction over a relatively long time scale, can effectively decompose trends and cycle components, provide interpretable prediction results, and helps medical institutions optimize resource scheduling and medical services.
Smart Images

Figure CN119993414A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical visit prediction, and specifically to a method for predicting the number of visits to medical institutions based on explainable deep learning. Background Art
[0002] In recent years, the operation and management of medical institutions in my country has entered the "digitalization" era, gradually getting rid of the previous extensive and subjective management methods, and transitioning to refined and intelligent management. Medical institutions across the country have successively established exclusive intelligent systems on top of traditional information systems to optimize the management and operation of hospitals, and finely control the personnel and equipment scheduling of various departments and departments, etc., to provide patients with a better diagnosis and treatment experience. Among them, the prediction of the number of visits is particularly important. Whether the number of visits can be accurately predicted determines whether the resource scheduling method in the future (several days) is reasonable, and this depends on high-precision time series prediction algorithms. At present, such algorithms are mainly analyzed and predicted in the following ways:
[0003] (1) Methods based on statistical analysis: Based on theoretical methods such as random process, linear model, Wo ld decomposition theorem, Pearson decomposition theorem, autoregression theory, etc., it is believed that time series can be decomposed into the sum of deterministic series and random series. It is believed that its statistical characteristics do not change with time to a certain extent. It can be decomposed into four components: long-term trend, periodic fluctuation, periodic change, and random fluctuation. The nonlinear relationship between future point value, lagged point value and current point value in the same sequence is established.
[0004] (2) Machine learning-based methods: Based on the theoretical methods of feature engineering, ensemble learning, supervised learning, and nonlinear modeling, it is believed that time series tasks are essentially supervised learning tasks. They can be transformed into regression prediction tasks in supervised learning through feature engineering, and multiple regression algorithms can be integrated through ensemble learning to further improve the accuracy of the prediction model.
[0005] (3) Deep learning-based methods: Similar to machine learning-based methods, they are based on the universal approximation theorem and use neural networks as a means to construct neural networks with different structures and rely on optimization algorithms to continuously reduce the error in multiple rounds of training until it converges to the specified error limit.
[0006] However, the existing algorithms still have shortcomings. Specifically, the existing methods based on statistical analysis are too simple, their effectiveness has relatively strict prerequisites, and the complexity that can be represented is too low, resulting in low generalization ability and large errors. The machine learning-based methods have too high requirements for the level of feature engineering and need additional input of other features to improve accuracy, resulting in a long optimization process. The deep learning-based methods have high prediction accuracy, but it is difficult to decompose the components that are of great concern in the actual operation process, such as trends and periodicity. In fact, they cannot meet the actual engineering requirements of "high accuracy and explainability".
[0007] Therefore, a method for predicting the number of visits to medical institutions based on explainable deep learning is needed to solve the problems raised in the above background technology. Summary of the invention
[0008] The purpose of the present invention is to provide a method for predicting the number of visits to medical institutions based on explainable deep learning to solve the problems raised in the above background technology.
[0009] To achieve the above object, the present invention provides the following technical solutions:
[0010] A method for predicting the number of visits to a medical institution based on explainable deep learning, comprising the following steps:
[0011] S1, collect the number of patients visiting outpatient departments every day in the past few years through the business system of medical institutions;
[0012] S2, delete the records where the name of the clinic department contains the word "nucleic acid", then group the data by date and perform statistics, and smoothly fill in the date records with missing statistical data;
[0013] S3, performing block internal structure design, and performing fast reactor internal structure design based on the designed blocks;
[0014] S4, based on the designed fast reactor, the overall structure of the prediction model is designed, and the block stack is set to a specific format to learn the specified information, so as to achieve component decomposition. The overall prediction model is learned through nested residual learning. The network can learn effective information within a relatively long time scale and achieve relatively long-term prediction.
[0015] As a preferred solution of the present invention, the intra-block structure designed in S3 comprises two parts. The first part is a fully connected network that can generate two expansion coefficients, wherein the forward coefficient is A and the reverse coefficient is B. The second part comprises two mapping functions that accept two coefficient inputs to generate a forward prediction y i and reverse prediction x i .
[0016] As a preferred solution of the present invention, the block stack designed in S3 is composed of several blocks connected in sequence. The first block stack takes the original data sequence as input, and its output includes two parts, one is the predicted value for several days in the future, that is, the forward prediction, and the other is the reconstructed value of the input, that is, the reverse prediction. The input of other blocks is the residual formed by subtracting the reverse prediction value of the previous block from the input of the previous block. Each block is fitting the information or residual that has not been fitted or learned by all the previous blocks, and is a supplement to all previous blocks.
[0017] As a preferred solution of the present invention, the overall structure of the prediction model in S4 is composed of several block stacks connected in sequence. Except for the first block stack, the other block stacks learn the residuals of the previous block stack. The whole process can be regarded as an effective decomposition of time series information, and different block stacks fit different aspects of time series information.
[0018] As a preferred solution of the present invention, the block stack is set to a specific format in S4 to learn the specified information to achieve component decomposition. The formula for obtaining the trend component is: Where t is an integer sequence value from 0 to the future prediction window, and the formula for obtaining the periodic component is:
[0019]
[0020] As a preferred solution of the present invention, the calculation formulas of the forward coefficient A and the reverse coefficient B are respectively Forward prediction y i and reverse prediction x i The calculation formulas are
[0021]
[0022] As a preferred solution of the present invention, the forward prediction y i and reverse prediction x i The coefficients in the calculation formula are all obtained through training and learning.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] 1. In the present invention, the number of patients visiting outpatient departments of all calibers per day in the past few years is collected through the business system of the medical institution, and the records in which the name of the visiting department contains the word "nucleic acid" are deleted. Then, the data is grouped and counted according to the date, and the date records with missing statistical data are smoothly filled, and the intra-block structure design is performed. The internal structure of the fast reactor is designed according to the designed block, and the overall structure of the prediction model is designed according to the designed fast reactor. The block stack is set to a specific format to learn the specified information, so as to achieve component decomposition. The prediction model as a whole is learned through nested residuals. The network can learn effective information in a relatively long time scale and achieve a relatively long period of prediction. In the intra-block design, a dual-channel multi-layer perceptron is combined with a mapping function to achieve automatic time feature learning. In the intra-block design, a sequential residual connection method is adopted to continuously reduce the error while effectively increasing the prediction length. In the overall design, a double-layer nested residual connection method is adopted to further increase the length of the credible prediction. The two block stacks at the head can accept special settings to ensure the interpretability of the results and obtain trends and cycles. Two important components can be calculated and can be used to predict the number of visits in the daily operational decision-making of medical institutions. They can also be used for the prediction of other important indicators, such as the number of surgeries and the number of hospitalizations. The prediction results can help medical institutions prepare in advance, improve the efficiency of reception, reduce patient waiting time, and improve the medical experience. Time series prediction can provide data support for the formulation and adjustment of health policies, such as adjusting medical insurance policies and optimizing the allocation of medical resources according to the prediction results. The prediction model helps to understand the changing trend of the reception capacity of medical institutions, promote the sustainable and healthy development of the medical and health industry, and lay the foundation for building a healthy China and achieving universal health coverage. In the face of predictable public health events such as seasonal peaks of influenza, time series prediction can be used to make emergency preparations in advance and effectively respond to public health emergencies. Accurate predictions can help medical institutions plan in advance, improve the quality of medical services, and meet the needs of patients, especially in primary medical and health institutions, to improve service capabilities. Time series prediction provides a scientific decision support tool to help medical institutions and health administrative departments make more accurate decisions based on data. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the structure inside the block of the present invention;
[0026] Figure 2 This is a schematic diagram of the internal structure of the block pile of the present invention;
[0027] Figure 3 It is a schematic diagram of the overall structure of the present invention;
[0028] Figure 4 It is a curve chart of the number of visits in a specific implementation case of the present invention;
[0029] Figure 5 It is a trend component diagram in a specific implementation case of the present invention;
[0030] Figure 6 It is a periodic component diagram in a specific implementation case of the present invention. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0032] To facilitate understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0033] It should be noted that when an element is referred to as being "fixed on" another element, it may be directly on the other element or there may also be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may also be a central element. The terms "vertical", "horizontal", "left", "right" and similar expressions used in this article are for illustrative purposes only.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0035] For examples, see Figure 1-6 , the present invention provides a technical solution:
[0036] A method for predicting the number of visits to a medical institution based on explainable deep learning, comprising the following steps:
[0037] S1, collect the number of patients visiting outpatient departments every day in the past few years through the business system of medical institutions;
[0038] S2, delete the records where the name of the clinic department contains the word "nucleic acid", then group the data by date and perform statistics, and smoothly fill in the date records with missing statistical data;
[0039] S3, performing block internal structure design, and performing fast reactor internal structure design based on the designed blocks;
[0040] S4, based on the designed fast reactor, the overall structure of the prediction model is designed, and the block stack is set to a specific format to learn the specified information, so as to achieve component decomposition. The overall prediction model is learned through nested residual learning. The network can learn effective information within a relatively long time scale and achieve relatively long-term prediction.
[0041] Furthermore, the intra-block structure designed in S3 includes two parts. The first part is a fully connected network that can generate two expansion coefficients, where the forward coefficient is A and the reverse coefficient is B. The second part includes two mapping functions that accept two coefficient inputs to generate the forward prediction y i and reverse prediction x i .
[0042] Furthermore, the block stack designed in S3 is composed of several blocks connected in sequence. The first block stack of the fast stack takes the original data sequence as input, and its output includes two parts, one is the predicted value for several days in the future, i.e., the forward prediction, and the other is the reconstructed value of the input, i.e., the reverse prediction. The inputs of other blocks are all the residuals formed by subtracting the reverse prediction value of the previous block from the input of the previous block. Each block is fitting the information or residuals that have not been fitted or learned by all the previous blocks, and is a supplement to all the previous blocks.
[0043] Furthermore, the overall structure of the prediction model in S4 is composed of several block stacks connected in sequence. Except for the first block stack, the other block stacks learn the residuals of the previous block stack. The whole process can be regarded as an effective decomposition of time series information, and different block stacks fit different aspects of time series information.
[0044] Furthermore, in S4, the block stack is set to a specific format to learn the specified information to achieve component decomposition. The formula for obtaining the trend component is: Where t is an integer sequence value from 0 to the future prediction window, and the formula for obtaining the periodic component is:
[0045]
[0046] Furthermore, the calculation formulas of the forward coefficient A and the reverse coefficient B are respectively Forward prediction y i and reverse prediction x i The calculation formulas are
[0047]
[0048] Furthermore, the forward prediction y iand reverse prediction x i The coefficients in the calculation formula are all obtained through training and learning.
[0049] Specific implementation cases
[0050] The number of patients who visited outpatient departments every day in the past few years was collected through the business system of medical institutions;
[0051] Delete the records where the name of the clinic department contains the word "nucleic acid", then group the data by date and perform statistics, and fill in the date records with missing statistical data smoothly;
[0052] The designed intra-block structure consists of two parts. The first part is a fully connected network, which can generate two expansion coefficients, where the forward coefficient is A and the reverse coefficient is B. The calculation formulas of the forward coefficient A and the reverse coefficient B are respectively The second part consists of two mapping functions, which accept two coefficient inputs to generate the forward prediction y i and reverse prediction x i , forward prediction y i and reverse prediction x i The calculation formulas are Forward prediction y i and reverse prediction x i The coefficients in the calculation formula are all obtained through training and learning;
[0053] The internal structure of the fast reactor is designed according to the designed blocks. The block stack is composed of several blocks connected in sequence. The first block stack of the fast reactor takes the original data sequence as input, and its output includes two parts, one is the predicted value of several days in the future, that is, the forward prediction, and the other is the reconstructed value of the input, that is, the reverse prediction. The input of other blocks is the residual formed by subtracting the reverse prediction value of the previous block from the input of the previous block. Each block is fitting the information or residual that has not been fitted or learned by all the previous blocks, which is a supplement to all the previous blocks.
[0054] The overall structure of the prediction model is designed based on the designed fast stack. The overall structure of the prediction model is composed of several fast stacks connected in sequence. Except for the first block stack, the other block stacks learn the residuals of the previous block stack. The whole process can be regarded as an effective decomposition of time series information. Different block stacks fit different aspects of time series information.
[0055] The block stack is set to a specific format to learn the specified information to achieve component decomposition. The formula for obtaining the trend component is: Where t is an integer sequence value from 0 to the future prediction window, and the formula for obtaining the periodic component is:
[0056]
[0057] The overall prediction model uses nested residual learning, and the network can learn effective information over a relatively long time scale, thus achieving relatively long-term predictions.
[0058] Collect the daily statistics of the number of patients in a tertiary hospital in a municipality from January 2019 to October 2024. The data is as follows Figure 4 As shown in the figure, the number of patients in the last 56 days was selected as the test set, and all the previous point values were selected as the training set. Each training was repeated for 1000 rounds and optimized 100 times. After running for about 1200 seconds in the CUDA environment of the RTX3060ti graphics card, the optimal model was obtained with an error MAPE of less than 5%. The trend and periodic components of the decomposition are shown in the figure below. Figure 5 and attached Figure 6 As shown;
[0059] In summary, the accuracy and interpretability of the model have been confirmed, which proves that this algorithm does not rely on specific feature engineering, but is automatically constructed, mainly through basis function mapping such as polynomials, binning, and Fourier series. The first block (Block) outputs two parts, forward prediction and reverse prediction, after receiving the time series input. The input of the remaining blocks is the difference between the input of the previous block and the reverse prediction of the previous block. The blocks are stacked to form a block stack (Stack). Each block stack forms a sequential stack, and the output values are weighted and summed to form the final prediction value output. The overall configurable structure and parameters are optimized through the Parzen Bayesian optimization algorithm to find the optimal structure and parameter combination. By setting different components for different block stacks, the extractability of the two main components of trend and cycle is guaranteed, which can be directly exported after the algorithm model is run.
[0060] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for predicting the number of visits to medical institutions based on explainable deep learning, characterized in that: The following steps are involved: S1, collect the number of patients visiting outpatient departments every day in the past few years through the business system of medical institutions; S2, delete the records where the name of the clinic department contains the word "nucleic acid", then group the data by date and perform statistics, and smoothly fill in the date records with missing statistical data; S3, performing block internal structure design, and performing fast reactor internal structure design based on the designed blocks; S4, based on the designed fast reactor, the overall structure of the prediction model is designed, and the block stack is set to a specific format to learn the specified information, so as to achieve component decomposition. The overall prediction model is learned through nested residual learning. The network can learn effective information within a relatively long time scale and achieve relatively long-term prediction.
2. According to claim 1, a method for predicting the number of visits to medical institutions based on explainable deep learning is characterized by: The intra-block structure designed in S3 includes two parts. The first part is a fully connected network that can generate two expansion coefficients, where the forward coefficient is A and the reverse coefficient is B. The second part includes two mapping functions that accept two coefficient inputs to generate the forward prediction y i and reverse prediction x i .
3. The method for predicting the number of visits to medical institutions based on explainable deep learning according to claim 1, characterized in that: The block stack designed in S3 is composed of several blocks connected in sequence. The first block stack takes the original data sequence as input, and its output includes two parts, one is the predicted value for several days in the future, i.e., the forward prediction, and the other is the reconstructed value of the input, i.e., the reverse prediction. The inputs of other blocks are all the residual formed by subtracting the reverse prediction value of the previous block from the input of the previous block. Each block is fitting the information or residual that has not been fitted or learned by all the previous blocks, and is a supplement to all the previous blocks.
4. The method for predicting the number of visits to medical institutions based on explainable deep learning according to claim 1, characterized in that: The overall structure of the prediction model in S4 is composed of several block stacks connected in sequence. Except for the first block stack, the other block stacks learn the residuals of the previous block stack. The whole process can be regarded as an effective decomposition of time series information, and different block stacks fit different aspects of time series information.
5. The method for predicting the number of visits to medical institutions based on explainable deep learning according to claim 1, characterized in that: In the S4, the block stack is set to a specific format to learn the specified information to achieve component decomposition. The formula for obtaining the trend component is: Where t is an integer sequence value from 0 to the future prediction window, and the formula for obtaining the periodic component is:
6. According to claim 2, a method for predicting the number of visits to medical institutions based on explainable deep learning is characterized by: The calculation formulas of the forward coefficient A and the reverse coefficient B are respectively B=θ j b , forward prediction y i and reverse prediction x i The calculation formulas are 7. The method for predicting the number of visits to medical institutions based on explainable deep learning according to claim 6, characterized in that: The forward prediction y i and reverse prediction x i The coefficients in the calculation formula are all obtained through training and learning.