CN113611430B - Epidemic situation prediction method and device based on Bayesian neural network - Google Patents

Epidemic situation prediction method and device based on Bayesian neural network Download PDF

Info

Publication number
CN113611430B
CN113611430B CN202110859850.7A CN202110859850A CN113611430B CN 113611430 B CN113611430 B CN 113611430B CN 202110859850 A CN202110859850 A CN 202110859850A CN 113611430 B CN113611430 B CN 113611430B
Authority
CN
China
Prior art keywords
neural network
bayesian
network model
bayesian neural
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110859850.7A
Other languages
Chinese (zh)
Other versions
CN113611430A (en
Inventor
李辰潼
吴亮生
马敬奇
黄天仑
钟震宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Intelligent Manufacturing of Guangdong Academy of Sciences
Original Assignee
Institute of Intelligent Manufacturing of Guangdong Academy of Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Intelligent Manufacturing of Guangdong Academy of Sciences filed Critical Institute of Intelligent Manufacturing of Guangdong Academy of Sciences
Priority to CN202110859850.7A priority Critical patent/CN113611430B/en
Publication of CN113611430A publication Critical patent/CN113611430A/en
Application granted granted Critical
Publication of CN113611430B publication Critical patent/CN113611430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/80ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for detecting, monitoring or modelling epidemics or pandemics, e.g. flu
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Public Health (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Medical Informatics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Computational Mathematics (AREA)
  • Development Economics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pathology (AREA)

Abstract

The invention discloses an epidemic situation prediction method and device based on a Bayesian neural network, wherein the method comprises the following steps: constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients and disease time nodes of different patients in epidemic prevention and control; constructing a Bayesian neural network model, and training the Bayesian neural network model by using the patient user data set to obtain a converged Bayesian neural network model; obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted; and inputting the data to be predicted into a converged Bayesian neural network model, and outputting the probability data of the user to be predicted, which is sick at each time node. In the embodiment of the invention, in actual epidemic situation prevention and control, the epidemic situation prediction cost is reduced, and the epidemic situation tracking investigation efficiency is provided.

Description

Epidemic situation prediction method and device based on Bayesian neural network
Technical Field
The invention relates to the technical field of deep learning, in particular to an epidemic situation prediction method and device based on a Bayesian neural network.
Background
In epidemic situation transmission, an important problem is how to rapidly lock the positions of surrounding infected persons through the existing patient information, so that epidemic situations can be prevented and controlled to the greatest extent, and meanwhile, how to plan the journey of the healthy susceptible persons according to scattered patient information is also a problem to be solved urgently. In the prior art, an infection social network model between a patient and a healthy susceptible person can be constructed according to the social network model, and the change of infection states of different people can be simulated according to the model, but the disease time of different susceptible persons cannot be predicted based on the network, so that effective blocking, prevention and control are further carried out.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides an epidemic situation prediction method and device based on a Bayesian neural network, which can reduce the epidemic situation prediction cost and provide epidemic situation tracking investigation efficiency in actual epidemic situation prevention and control; meanwhile, the disease probability data of related high-risk groups at all time nodes can be predicted, so that effective blocking, prevention and control are performed.
In order to solve the technical problems, an embodiment of the present invention provides a bayesian neural network-based epidemic situation prediction method, which includes:
constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients and disease time nodes of different patients in epidemic prevention and control;
Constructing a Bayesian neural network model, and training the Bayesian neural network model by using the patient user data set to obtain a converged Bayesian neural network model;
obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted;
and inputting the data to be predicted into a converged Bayesian neural network model, and outputting the probability data of the user to be predicted, which is sick at each time node.
Optionally, the constructing a patient user data set based on the disease time nodes of different patients in epidemic prevention and control and a contact network obtained by epidemiological investigation between different patients includes:
Based on the disease time nodes of different patients in epidemic prevention and control and the contact network obtained by epidemiological investigation of different patients, the patient user data set is formed by taking the contact network as data and network data required by training.
Optionally, the bayesian neural network model includes a kernel function layer, a first bayesian full-connection layer, a second bayesian full-connection layer, an activation layer and an output layer;
The constructing the Bayesian neural network model comprises the following steps:
and the kernel function layer is used as an input layer, and the first Bayesian full-connection layer, the second Bayesian full-connection layer, the activation layer and the output layer are sequentially connected to form the Bayesian neural network model.
Optionally, the parameters of the first bayesian full-connection layer and the second bayesian full-connection layer both obey the positive-ethernet distribution.
Optionally, the kernel function of the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1, 2 and 3.
Optionally, the loss function of the bayesian neural network model is a loss function formed by deducting according to a bayesian formula, as follows:
Wherein d KL represents the distribution distance of KL dispersion; q and p are both distribution functions; w (i) denotes the weight of the ith sample.
Optionally, the process of deriving the loss function of the bayesian neural network model according to a bayesian formula is as follows:
Let Bayesian neural network model be f (x), the learning parameter set θ related to Bayesian neural network model, D be the learned data, w be the extraction parameter in θ generation distribution, p and q be distribution functions;
the required approximation distribution is p (f (w) |d) =p (w|d);
Since the bayesian neural network model can calculate the distribution as q (f (w) |θ) =q (w|θ), the KL divergence of the calculated distribution distance is applied as follows:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w|D))dw;
The Bayesian formula can be derived:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w)/p(D|w))dw;
it is further possible to obtain:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w))dw-∫q(w|θ)log p(D|w)dw;
Taking a special distribution, w-mu epsilon plus sigma, wherein epsilon is extracted from 0,1 positive distribution, and then taking d epsilon into d KL according to the Monte Carlo principle and the approximate formula q (w|theta) dw=q (epsilon) d epsilon, so as to obtain the loss function.
Optionally, the training the bayesian neural network model by using the patient user data set to obtain a converged bayesian neural network model includes:
Dividing the patient user data set into a training data set and a test data set, wherein the data volume ratio of the training data set to the test data set is 9:1;
Inputting the data in the training data set into the Bayesian neural network model for training to obtain a trained Bayesian neural network model;
Inputting the data in the test data set into the trained Bayesian neural network model for test verification to obtain a test verification result;
judging whether the trained Bayesian neural network model converges or not based on the test verification result;
If not, updating parameters of each node of the trained Bayesian neural network model based on the back propagation function, and repeating training until convergence or reaching the preset training times.
Optionally, the obtaining the user contact network within the preset time period of the user to be predicted and forming the data to be predicted includes:
obtaining a user contact network of a user to be predicted in a preset time period, and obtaining whether contact networks overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network;
And forming data to be predicted based on whether the user contact network and the contact network overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network.
In addition, the embodiment of the invention also provides an epidemic situation prediction device based on a Bayesian neural network, which comprises the following steps:
The data set construction module: the method comprises the steps of constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients in epidemic prevention and control;
Model training module: the method comprises the steps of constructing a Bayesian neural network model, and training the Bayesian neural network model by using a patient user data set to obtain a converged Bayesian neural network model;
A predicted data obtaining module: the method comprises the steps of obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted;
And a prediction module: and the data to be predicted is input into a converged Bayesian neural network model, and the probability data of the user to be predicted, which is sick at each time node, is output.
In the embodiment of the invention, in actual epidemic situation prevention and control, the epidemic situation prediction cost is reduced, and the epidemic situation tracking investigation efficiency is provided; meanwhile, the disease probability data of related high-risk groups at each time node can be predicted, so that effective blocking, prevention and control are performed; the common user can evaluate the behavior risk probability of the common user in epidemic situation by using the model in the method according to the contact network of the common user, thereby better protecting the common user and the family.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings which are required in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an epidemic situation prediction method based on a Bayesian neural network in an embodiment of the invention;
fig. 2 is a schematic structural diagram of an epidemic situation prediction device based on a bayesian neural network in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of an epidemic situation prediction method based on a bayesian neural network according to an embodiment of the present invention.
As shown in fig. 1, a bayesian neural network-based epidemic situation prediction method includes:
s11: constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients and disease time nodes of different patients in epidemic prevention and control;
in the implementation process of the invention, the construction of the patient user data set based on the epidemic situation prevention and control of different patients' disease time nodes and the contact network obtained by epidemiological investigation among different patients comprises the following steps: based on the disease time nodes of different patients in epidemic prevention and control and the contact network obtained by epidemiological investigation of different patients, the patient user data set is formed by taking the contact network as data and network data required by training.
Specifically, a patient user data set is built according to the time of different people infected in the transmission of epidemic situations encountered in actual disease prevention and control and the social network where the people are located for subsequent training and testing; in epidemic prevention and control, the time nodes of the diseases of different patients and the contact network obtained by epidemiological investigation among the patients are used as data and network data required by training to form a patient user data set; the node to be estimated in the network, the time of getting the disease of other patients in the network where the node is located (the patient earlier than the time of getting the disease of the node) and the network structure are input in the training process, and the time of getting the disease of the node is output.
S12: constructing a Bayesian neural network model, and training the Bayesian neural network model by using the patient user data set to obtain a converged Bayesian neural network model;
In the implementation process of the invention, the Bayesian neural network model comprises a kernel function layer, a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and an output layer; the constructing the Bayesian neural network model comprises the following steps: and the kernel function layer is used as an input layer, and the first Bayesian full-connection layer, the second Bayesian full-connection layer, the activation layer and the output layer are sequentially connected to form the Bayesian neural network model.
Further, the parameters of the first Bayesian full connection layer and the second Bayesian full connection layer are subjected to the direct distribution.
Further, the kernel function of the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1, 2 and 3.
Further, the loss function of the bayesian neural network model is a loss function formed by deduction according to a bayesian formula, and the loss function is as follows:
Wherein d KL represents the distribution distance of KL dispersion; q and p are both distribution functions; w (i) denotes the weight of the ith sample.
Further, the process of deriving the loss function of the bayesian neural network model according to a bayesian formula is as follows:
Let Bayesian neural network model be f (x), the learning parameter set θ related to Bayesian neural network model, D be the learned data, w be the extraction parameter in θ generation distribution, p and q be distribution functions;
the required approximation distribution is p (f (w) |d) =p (w|d);
Since the bayesian neural network model can calculate the distribution as q (f (w) |θ) =q (w|θ), the KL divergence of the calculated distribution distance is applied as follows:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w|D))dw;
The Bayesian formula can be derived:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w)/p(D|w))dw;
it is further possible to obtain:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w))dw-∫q(w|θ)log p(D|w)dw;
Taking a special distribution, w-mu epsilon plus sigma, wherein epsilon is extracted from 0,1 positive distribution, and then taking d epsilon into d KL according to the Monte Carlo principle and the approximate formula q (w|theta) dw=q (epsilon) d epsilon, so as to obtain the loss function.
Further, the training the bayesian neural network model by using the patient user data set to obtain a converged bayesian neural network model includes: dividing the patient user data set into a training data set and a test data set, wherein the data volume ratio of the training data set to the test data set is 9:1; inputting the data in the training data set into the Bayesian neural network model for training to obtain a trained Bayesian neural network model; inputting the data in the test data set into the trained Bayesian neural network model for test verification to obtain a test verification result; judging whether the trained Bayesian neural network model converges or not based on the test verification result; if not, updating parameters of each node of the trained Bayesian neural network model based on the back propagation function, and repeating training until convergence or reaching the preset training times.
Specifically, the constructed Bayesian neural network model comprises a kernel function layer, a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and an output layer; the Bayesian neural network model is formed by sequentially connecting a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and the output layer by taking a kernel function layer as an input layer. The first Bayesian full-connection layer and the second Bayesian full-connection layer are the same Bayesian full-connection layers extracted from the n-too distribution; the activation layer also extracts the distribution of the N and N, and the estimated time and probability of the infection of the corresponding node are output by the output layer.
The kernel function in the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1, 2 and 3.
The loss function of the Bayesian neural network model is a loss function formed by deduction according to a phyllos formula, and is as follows:
Wherein d KL represents the distribution distance of KL dispersion; q and p are both distribution functions; w (i) denotes the weight of the ith sample.
After the Bayesian neural network model is built, relevant training work is needed to be carried out on the Bayesian neural network model, training data are needed to be extracted before training, the training data are extracted from a patient user data set, namely the patient user data set is divided into a training data set and a testing data set, wherein the data volume ratio of the training data set to the testing data set is 9:1; inputting data in the training data set into a Bayesian neural network model for training to obtain a trained Bayesian neural network model; then, inputting the data in the test data set into the trained Bayesian neural network model for test verification to obtain a test verification result; judging whether the trained Bayesian neural network model is converged or not through the test verification result, if so, ending the training, if not, updating parameters of each node of the trained Bayesian neural network model by using a back propagation function, and repeating the training until the training is converged or the training preset times are reached.
S13: obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted;
in the implementation process of the invention, the obtaining the user contact network in the preset time period of the user to be predicted and forming the data to be predicted comprises the following steps: obtaining a user contact network of a user to be predicted in a preset time period, and obtaining whether contact networks overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network; and forming data to be predicted based on whether the user contact network and the contact network overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network.
Specifically, it is required to obtain a user contact network of a user to be predicted within a preset time period, and at the same time, it is required to obtain whether contact networks overlap in a preset time period before the occurrence of the disease of other patients in each node in the user contact network; and then overlapping the user contact network and the contact network within a preset time before the occurrence of the illness of other patients in each node in the user contact network to form data to be predicted.
S14: and inputting the data to be predicted into a converged Bayesian neural network model, and outputting the probability data of the user to be predicted, which is sick at each time node.
In the implementation process of the invention, the data to be predicted is input into a converged Bayesian neural network model for prediction processing, and then the probability data of the user to be predicted, which is sick at each time node, is output.
In the embodiment of the invention, in actual epidemic situation prevention and control, the epidemic situation prediction cost is reduced, and the epidemic situation tracking investigation efficiency is provided; meanwhile, the disease probability data of related high-risk groups at each time node can be predicted, so that effective blocking, prevention and control are performed; the common user can evaluate the behavior risk probability of the common user in epidemic situation by using the model in the method according to the contact network of the common user, thereby better protecting the common user and the family.
Example two
Referring to fig. 2, fig. 2 is a schematic structural diagram of an epidemic situation prediction apparatus based on a bayesian neural network according to an embodiment of the present invention.
As shown in fig. 2, an epidemic situation prediction apparatus based on a bayesian neural network, the apparatus comprising:
the data set construction module 21: the method comprises the steps of constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients in epidemic prevention and control;
in the implementation process of the invention, the construction of the patient user data set based on the epidemic situation prevention and control of different patients' disease time nodes and the contact network obtained by epidemiological investigation among different patients comprises the following steps: based on the disease time nodes of different patients in epidemic prevention and control and the contact network obtained by epidemiological investigation of different patients, the patient user data set is formed by taking the contact network as data and network data required by training.
Specifically, a patient user data set is built according to the time of different people infected in the transmission of epidemic situations encountered in actual disease prevention and control and the social network where the people are located for subsequent training and testing; in epidemic prevention and control, the time nodes of the diseases of different patients and the contact network obtained by epidemiological investigation among the patients are used as data and network data required by training to form a patient user data set; the node to be estimated in the network, the time of getting the disease of other patients in the network where the node is located (the patient earlier than the time of getting the disease of the node) and the network structure are input in the training process, and the time of getting the disease of the node is output.
Model training module 22: the method comprises the steps of constructing a Bayesian neural network model, and training the Bayesian neural network model by using a patient user data set to obtain a converged Bayesian neural network model;
In the implementation process of the invention, the Bayesian neural network model comprises a kernel function layer, a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and an output layer; the constructing the Bayesian neural network model comprises the following steps: and the kernel function layer is used as an input layer, and the first Bayesian full-connection layer, the second Bayesian full-connection layer, the activation layer and the output layer are sequentially connected to form the Bayesian neural network model.
Further, the parameters of the first Bayesian full connection layer and the second Bayesian full connection layer are subjected to the direct distribution.
Further, the kernel function of the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1, 2 and 3.
Further, the loss function of the bayesian neural network model is a loss function formed by deduction according to a bayesian formula, and the loss function is as follows:
wherein d KL represents the distribution distance of KL dispersion; q and p are both distribution functions; w (i) denotes the result of the i-th weight downsampling.
Further, the process of deriving the loss function of the bayesian neural network model according to a bayesian formula is as follows:
Let Bayesian neural network model be f (x), the learning parameter set θ related to Bayesian neural network model, D be the learned data, w be the extraction parameter in θ generation distribution, p and q be distribution functions;
the required approximation distribution is p (f (w) |d) =p (w|d);
Since the bayesian neural network model can calculate the distribution as q (f (w) |θ) =q (w|θ), the KL divergence of the calculated distribution distance is applied as follows:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w|D))dw;
The Bayesian formula can be derived:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w)/p(D|w))dw;
it is further possible to obtain:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w))dw-∫q(w|θ)log p(D|w)dw;
Taking a special distribution, w-mu epsilon plus sigma, wherein epsilon is extracted from 0,1 positive distribution, and then taking d epsilon into d KL according to the Monte Carlo principle and the approximate formula q (w|theta) dw=q (epsilon) d epsilon, so as to obtain the loss function.
Further, the training the bayesian neural network model by using the patient user data set to obtain a converged bayesian neural network model includes: dividing the patient user data set into a training data set and a test data set, wherein the data volume ratio of the training data set to the test data set is 9:1; inputting the data in the training data set into the Bayesian neural network model for training to obtain a trained Bayesian neural network model; inputting the data in the test data set into the trained Bayesian neural network model for test verification to obtain a test verification result; judging whether the trained Bayesian neural network model converges or not based on the test verification result; if not, updating parameters of each node of the trained Bayesian neural network model based on the back propagation function, and repeating training until convergence or reaching the preset training times.
Specifically, the constructed Bayesian neural network model comprises a kernel function layer, a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and an output layer; the Bayesian neural network model is formed by sequentially connecting a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and the output layer by taking a kernel function layer as an input layer. The first Bayesian full-connection layer and the second Bayesian full-connection layer are the same Bayesian full-connection layers extracted from the n-too distribution; the activation layer also extracts the distribution of the N and N, and the estimated time and probability of the infection of the corresponding node are output by the output layer.
The kernel function in the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1, 2 and 3.
The loss function of the Bayesian neural network model is a loss function formed by deduction according to a phyllos formula, and is as follows:
Wherein d KL represents the distribution distance of KL dispersion; q and p are both distribution functions; w (i) denotes the weight result of the ith sample.
After the Bayesian neural network model is built, relevant training work is needed to be carried out on the Bayesian neural network model, training data are needed to be extracted before training, the training data are extracted from a patient user data set, namely the patient user data set is divided into a training data set and a testing data set, wherein the data volume ratio of the training data set to the testing data set is 9:1; inputting data in the training data set into a Bayesian neural network model for training to obtain a trained Bayesian neural network model; then, inputting the data in the test data set into the trained Bayesian neural network model for test verification to obtain a test verification result; judging whether the trained Bayesian neural network model is converged or not through the test verification result, if so, ending the training, if not, updating parameters of each node of the trained Bayesian neural network model by using a back propagation function, and repeating the training until the training is converged or the training preset times are reached.
The predicted data obtaining module 23: the method comprises the steps of obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted;
in the implementation process of the invention, the obtaining the user contact network in the preset time period of the user to be predicted and forming the data to be predicted comprises the following steps: obtaining a user contact network of a user to be predicted in a preset time period, and obtaining whether contact networks overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network; and forming data to be predicted based on whether the user contact network and the contact network overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network.
Specifically, it is required to obtain a user contact network of a user to be predicted within a preset time period, and at the same time, it is required to obtain whether contact networks overlap in a preset time period before the occurrence of the disease of other patients in each node in the user contact network; and then overlapping the user contact network and the contact network within a preset time before the occurrence of the illness of other patients in each node in the user contact network to form data to be predicted.
Prediction module 24: and the data to be predicted is input into a converged Bayesian neural network model, and the probability data of the user to be predicted, which is sick at each time node, is output.
In the implementation process of the invention, the data to be predicted is input into a converged Bayesian neural network model for prediction processing, and then the probability data of the user to be predicted, which is sick at each time node, is output.
In the embodiment of the invention, in actual epidemic situation prevention and control, the epidemic situation prediction cost is reduced, and the epidemic situation tracking investigation efficiency is provided; meanwhile, the disease probability data of related high-risk groups at each time node can be predicted, so that effective blocking, prevention and control are performed; the common user can evaluate the behavior risk probability of the common user in epidemic situation by using the model in the method according to the contact network of the common user, thereby better protecting the common user and the family.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access memory (RAM, random Access Memory), magnetic or optical disk, and the like.
In addition, the foregoing describes in detail the method and apparatus for predicting epidemic situation based on bayesian neural network provided in the embodiments of the present invention, and specific examples should be adopted herein to illustrate the principles and embodiments of the present invention, where the foregoing description of the embodiments is only for helping to understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (8)

1. An epidemic situation prediction method based on a Bayesian neural network, which is characterized by comprising the following steps:
constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients and disease time nodes of different patients in epidemic prevention and control;
Constructing a Bayesian neural network model, and training the Bayesian neural network model by using the patient user data set to obtain a converged Bayesian neural network model;
obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted;
Inputting the data to be predicted into a converged Bayesian neural network model, and outputting the probability data of the user to be predicted, which is sick at each time node;
the Bayesian neural network model comprises a kernel function layer, a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and an output layer; the constructing the Bayesian neural network model comprises the following steps:
The kernel function layer is used as an input layer, and the first Bayesian full-connection layer, the second Bayesian full-connection layer, the activation layer and the output layer are sequentially connected to form the Bayesian neural network model;
the kernel function of the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1,2 and 3.
2. The epidemic situation prediction method according to claim 1, wherein the constructing a patient user data set based on the nodes of the disease time of different patients in epidemic prevention and control and the contact network obtained by epidemiological investigation between different patients comprises:
Based on the disease time nodes of different patients in epidemic prevention and control and the contact network obtained by epidemiological investigation of different patients, the patient user data set is formed by taking the contact network as data and network data required by training.
3. The epidemic situation prediction method according to claim 1, wherein the parameters of the first bayesian full connection layer and the second bayesian full connection layer are both subject to a positive ethernet distribution.
4. The epidemic situation prediction method according to claim 1, wherein the loss function of the bayesian neural network model is a loss function derived from a bayesian formula, as follows:
Wherein d KL represents the distribution distance of KL dispersion; q and p are both distribution functions; w (i) denotes the weight of the ith sample.
5. The epidemic situation prediction method according to claim 4, wherein the derivation of the loss function of the bayesian neural network model according to a bayesian formula is as follows:
Let Bayesian neural network model be f (x), the learning parameter set θ related to Bayesian neural network model, D be the learned data, w be the extraction parameter in θ generation distribution, p and q be distribution functions;
the required approximation distribution is p (f (w) |d) =p (w|d);
Since the bayesian neural network model can calculate the distribution as q (f (w) |θ) =q (w|θ), the KL divergence of the calculated distribution distance is applied as follows:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w|D))dw;
The Bayesian formula can be derived:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w)/p(D|w))dw;
it is further possible to obtain:
dKL[q(w|θ)||p(w|D)]=∫q(w|θ)log(q(w|θ)/p(w))dw-∫q(w|θ)log p(D|w)dw;
Taking a special distribution, w-mu epsilon + sigma, wherein epsilon is extracted from 0,1 to be distributed, and further taking a similar formula q (w|theta) dw=q (epsilon) d epsilon into d KL according to the Monte Carlo principle, so as to obtain the loss function.
6. The epidemic situation prediction method according to claim 1, wherein the training the bayesian neural network model using the patient user data set to obtain a converged bayesian neural network model comprises:
dividing the patient user data set into a training data set test data set, wherein the data volume ratio of the training data set to the test data set is 9:1;
Inputting the data in the training data set into the Bayesian neural network model for training to obtain a trained Bayesian neural network model;
Inputting the data in the test data set into the trained Bayesian neural network model for test verification to obtain a test verification result;
judging whether the trained Bayesian neural network model converges or not based on the test verification result;
If not, updating parameters of each node of the trained Bayesian neural network model based on the back propagation function, and repeating training until convergence or reaching the preset training times.
7. The epidemic situation prediction method according to claim 1, wherein the obtaining the user contact network within the preset time period of the user to be predicted and forming the data to be predicted includes:
obtaining a user contact network of a user to be predicted in a preset time period, and obtaining whether contact networks overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network;
And forming data to be predicted based on whether the user contact network and the contact network overlap in a preset time before the occurrence of the illness of other patients in each node in the user contact network.
8. An epidemic situation prediction apparatus based on a bayesian neural network, the apparatus comprising:
The data set construction module: the method comprises the steps of constructing a patient user data set based on a contact network obtained by epidemiological investigation among different patients in epidemic prevention and control;
Model training module: the method comprises the steps of constructing a Bayesian neural network model, and training the Bayesian neural network model by using a patient user data set to obtain a converged Bayesian neural network model;
A predicted data obtaining module: the method comprises the steps of obtaining a user contact network in a preset time period of a user to be predicted, and forming data to be predicted;
And a prediction module: the method comprises the steps of inputting data to be predicted into a converged Bayesian neural network model, and outputting probability data of illness of a user to be predicted at each time node;
the Bayesian neural network model comprises a kernel function layer, a first Bayesian full-connection layer, a second Bayesian full-connection layer, an activation layer and an output layer; the constructing the Bayesian neural network model comprises the following steps:
The kernel function layer is used as an input layer, and the first Bayesian full-connection layer, the second Bayesian full-connection layer, the activation layer and the output layer are sequentially connected to form the Bayesian neural network model;
the kernel function of the kernel function layer is as follows:
Wherein Kernel i represents the ith Kernel function; A p-th column representing the ith power of the adjacency matrix; h p represents a 2×n matrix of the affected time and the affected state of the node, wherein the unaffected time is 0; the affected state is that the patient is not affected 0, the patient is asymptomatic affected 1, the patient is ill 2, and the patient is healed 3; w j,i represents the weight extracted from the mathematical distribution N (mu j,i,∑j,i), i represents the parameter in the ith kernel, j represents the jth weight matrix in the kernel, and j takes values of 1,2 and 3.
CN202110859850.7A 2021-07-28 2021-07-28 Epidemic situation prediction method and device based on Bayesian neural network Active CN113611430B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110859850.7A CN113611430B (en) 2021-07-28 2021-07-28 Epidemic situation prediction method and device based on Bayesian neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110859850.7A CN113611430B (en) 2021-07-28 2021-07-28 Epidemic situation prediction method and device based on Bayesian neural network

Publications (2)

Publication Number Publication Date
CN113611430A CN113611430A (en) 2021-11-05
CN113611430B true CN113611430B (en) 2024-06-14

Family

ID=78305849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110859850.7A Active CN113611430B (en) 2021-07-28 2021-07-28 Epidemic situation prediction method and device based on Bayesian neural network

Country Status (1)

Country Link
CN (1) CN113611430B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712902A (en) * 2020-12-29 2021-04-27 医渡云(北京)技术有限公司 Infectious disease infection probability prediction method and device, storage medium, and electronic device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170308678A1 (en) * 2014-02-19 2017-10-26 Hrl Laboratories, Llc Disease prediction system using open source data
CN109493979A (en) * 2018-10-23 2019-03-19 平安科技(深圳)有限公司 A kind of disease forecasting method and apparatus based on intelligent decision
CN109767842B (en) * 2018-12-13 2023-08-22 平安科技(深圳)有限公司 Disease early warning method, disease early warning device and computer readable storage medium
CN111446000B (en) * 2020-02-26 2023-12-22 汤一平 System for tracing infectious sources based on epidemic disease virus field
CN111462917B (en) * 2020-03-02 2023-05-30 珠海中科先进技术研究院有限公司 Epidemic situation early warning method and system based on space geographic analysis and machine learning
KR102192786B1 (en) * 2020-05-20 2020-12-18 주식회사 클럽 Epidemiological Investigation System of Infectious Diseases through Automatic Calculation of Infection Probability and Its Method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712902A (en) * 2020-12-29 2021-04-27 医渡云(北京)技术有限公司 Infectious disease infection probability prediction method and device, storage medium, and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
大型邮轮人员感染新冠肺炎风险评估方法;张君辉;吴兵;严新平;;交通信息与安全(第02期);全文 *

Also Published As

Publication number Publication date
CN113611430A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
Paré et al. Epidemic processes over time-varying networks
Wang et al. Computational models and optimal control strategies for emotion contagion in the human population in emergencies
Allen Rationality, algorithms and juridical proof: A preliminary inquiry
WO2021035975A1 (en) Method and apparatus for predicting hot-topic subject on basis of multiple evaluation dimensions, terminal, and medium
Georgopoulos et al. Fuzzy cognitive map decision support system for successful triage to reduce unnecessary emergency room admissions for the elderly
Lo et al. An artificial neural-network based predictive model for pre-evacuation human response in domestic building fire
Fisher et al. Simulating the evolution of homeless populations in canada using modified deep q-learning (mdql) and modified neural fitted q-iteration (mnfq) algorithms
US20240257943A1 (en) Training method of brain activity state classification model, brain activity state classification method, device, and storage medium
CN113611430B (en) Epidemic situation prediction method and device based on Bayesian neural network
Li et al. A lstm-based method for comprehension and evaluation of network security situation
Ding et al. Time Series Forecasting of US COVID-19 Transmission.
Luo et al. Knowledge grounded conversational symptom detection with graph memory networks
Godio et al. SEIR modeling of the Italian epidemic of SARS-CoV-2
Heng et al. Identifying key risk factors in air traffic controller workload by seir model
Atlam et al. ANFIS for risk estimation in risk-based access control model for smart homes
CN113592296B (en) Public policy decision method, device, electronic equipment and storage medium
Aibinu et al. Determination of Complex‐Valued Parametric Model Coefficients Using Artificial Neural Network Technique
Huntsman et al. Prospects for inconsistency detection using large language models and sheaves
Stylios et al. Genetic algorithm enhanced Fuzzy Cognitive Maps for medical diagnosis
CN113657703A (en) Regional typhoon disaster rigidity and toughness system dynamics simulation method
Hawdon et al. Addressing the race gap in incarceration rates: An agent based model
Ghali et al. Reducing error rates for iris image using higher contrast in normalization process
Guan et al. Research on Intelligent Perception and Cognitive Computing of Information Security System Based on Computer Big Data
Gao et al. Drug Propagation Prediction Model based on CA-SIS and SVM
Bharadwaj et al. Reliable human authentication using AI-based multibiometric image sensor fusion: Assessment of performance in information security

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant